The fmod function

Name

fmod -- 

Synopsis

#include <math.h>

double fmod (double x, double y);

Description

The fmod function computes the floating point remainder of x/y.

Returns

The fmod function returns the value x-i*y for some integer i such that, if y is nonzero, the result has the same sign as x and a magnitude less than the magnitude of y. If y is zero, whether a domain error occurs or the fmod function returns zero is implementation-defined.

Implementation Notes

If y is zero, then the floating point exception SIGFPE will be raised.
EDOM is not set.