Everything

fmod functions


[Syntax]

double fmod(double x, double y)

float fmodf(float x, float y)

long double fmodl(long double x, long double y) [V2.01.00 or later]

[Description]

These functions return the value of "x - ny" for integer n, when y is a value other than 0. The result has the same sign as x, and its absolute value must be less than the absolute value of y.

 

[Special case]

Condition

Return value

Exception

x==±∞

NaN

EDOM

y==±∞

x

-

y==0

NaN

EDOM