remainder - remainder function
#include <math.h> double remainder(double x, double y);
The remainder() function returns the floating point remainder r = x - ny when y is non-zero. The value n is the integral value nearest the exact value x/y. When | n - x/y | = ½ , the value n is chosen to be even.The behaviour of remainder() is independent of the rounding mode.
The remainder() function returns the floating point remainder r = x - ny when y is non-zero.When y is 0, remainder() returns (NaN or equivalent if available) and sets errno to [EDOM].
If the value of x is ±Inf, remainder() returns NaN and sets errno to [EDOM].
If x or y is NaN, then the function returns NaN and errno may be set to [EDOM].
The remainder() function will fail if:
- [EDOM]
- The y argument is 0 or the x argument is positive or negative infinity.
The remainder() function may fail if:
- [EDOM]
- The x or y argument is NaN.
None.
None.
None.
abs(), <math.h>.