Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

fmod, fmodf, fmodl - compute floating-point remainder value function

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double fmod(double x, double y);
C11
float fmodf(float x, float y);
long double fmodl(long double x, long double y); (End)

Description

These functions compute the remainder of the division x/y. The remainder has the same sign as the dividend x, and its absolute value is always less than the divisor y.

Return val.

Remainder of the division x/y


if successful.


0             if y = 0.

Notes

An application should verify that y is non-zero before calling fmod().

See also

ceil(), ceilf(), ceill(), fabs(), floor(), math.h.