std::fmod

From Cppreference

Jump to: navigation, search
Defined in header <cmath>

float       fmod( float x, float y );

double      fmod( double x, double y );

long double fmod( long double x, long double y );

Computes the remainder of the division operation x/y.

[edit] Parameters

x, y - floating point values

[edit] Return value

Remainder of dividing arguments. The result has the same sign as x.

[edit] See also

div
ldiv
lldiv
the quotient and remainder of integer division
(function)
remainder (C++11)
signed remainder of the division operation
(function)