cpp/numeric/math/remainder

@1-3@ Computes the IEEE remainder of the floating point division operation. @A@ Additional overloads are provided for all other combinations of arithmetic types.

The IEEE floating-point remainder of the division operation calculated by this function is exactly the value, where the value  is the integral value nearest the exact value. When $|quo-x/y| = ½$, the value is chosen to be even.

In contrast to std, the returned value is not guaranteed to have the same sign as.

If the returned value is zero, it will have the same sign as.

Return value
If successful, returns the IEEE floating-point remainder of the division as defined above.

If a domain error occurs, an implementation-defined value is returned (NaN where supported)

If a range error occurs due to underflow, the correct result is returned.

If is zero, but the domain error does not occur, zero is returned.

Error handling
Errors are reported as specified in math_errhandling.

Domain error may occur if is zero.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * The current rounding mode has no effect.
 * fe_inexact is never raised, the result is always exact.
 * If is ±∞ and  is not NaN, NaN is returned and fe_invalid is raised
 * If is ±0 and  is not NaN, NaN is returned and fe_invalid is raised
 * If either argument is NaN, NaN is returned