Go to the source code of this file.
|
template<typename T > |
constexpr T | internal::fmod_check (const T x, const T y) noexcept |
|
template<typename T1 , typename T2 , typename TC = common_return_t<T1,T2>> |
constexpr TC | internal::fmod_type_check (const T1 x, const T2 y) noexcept |
|
template<typename T1 , typename T2 > |
constexpr common_return_t< T1, T2 > | fmod (const T1 x, const T2 y) noexcept |
| Compile-time remainder of division function. More...
|
|
◆ fmod()
template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > fmod |
( |
const T1 |
x, |
|
|
const T2 |
y |
|
) |
| |
|
constexprnoexcept |
Compile-time remainder of division function.
- Parameters
-
x | a real-valued input. |
y | a real-valued input. |
- Returns
- computes the floating-point remainder of \( x / y \) (rounded towards zero) using
\[ \text{fmod}(x,y) = x - \text{trunc}(x/y) \times y \]