fmod
floating-point remainder function
You're viewing an older version of this page (#3245). View the current version.
NAME
fmod
INTERFACE
#include <math.h>
double fmod ( double x, double y ) long fmodl ( long double x, long double y ) float fmodf ( float x, float y )
DESCRIPTION
The fmod functions compute the floating-point remainder of dividing x by y. The return value is , where n is the quotient of x/y, rounded into an integer towards zero
SPECIAL VALUES
fmod ( ±0, y ) returns ±0 for y not zero.
fmod ( x, y ) returns a NaN and raises the invalid floating-point exception for x infinite or y zero.
fmod ( x, ±∞ ) returns x for x not infinite.
STANDARDS
The fmod functions conform to ISO/IEC 9899:1999(E).