1FMOD(3) Linux Programmer's Manual FMOD(3)
2
3
4
6 fmod, fmodf, fmodl - floating-point remainder function
7
9 #include <math.h>
10
11 double fmod(double x, double y);
12 float fmodf(float x, float y);
13 long double fmodl(long double x, long double y);
14
15 Link with -lm.
16
18 The fmod() function computes the remainder of dividing x by y. The
19 return value is x - n * y, where n is the quotient of x / y, rounded
20 towards zero to an integer.
21
23 The fmod() function returns the remainder, unless y is zero, when the
24 function fails and errno is set.
25
27 EDOM The denominator y is zero.
28
30 SVr4, 4.3BSD, C89. The float and long double variants are C99 require‐
31 ments.
32
34 remainder(3)
35
36
37
38 2002-07-27 FMOD(3)