Difference between revisions of "cpp/numeric/math/remainder"
From cppreference.com
m (Update links.) |
m (Use since= and until= params of {{dcl}} template.) |
||
Line 3: | Line 3: | ||
{{dcl begin}} | {{dcl begin}} | ||
{{dcl header | cmath}} | {{dcl header | cmath}} | ||
− | {{dcl | | + | {{dcl | since=c++11 |num=1| |
float remainder( float x, float y ); | float remainder( float x, float y ); | ||
}} | }} | ||
− | {{dcl | | + | {{dcl | since=c++11 |num=2| |
double remainder( double x, double y ); | double remainder( double x, double y ); | ||
}} | }} | ||
− | {{dcl | | + | {{dcl | since=c++11 |num=3| |
long double remainder( long double x, long double y ); | long double remainder( long double x, long double y ); | ||
}} | }} | ||
− | {{dcl | | + | {{dcl | since=c++11 |num=4| |
Promoted remainder( Arithmetic x, Arithmetic y ); | Promoted remainder( Arithmetic x, Arithmetic y ); | ||
}} | }} |
Revision as of 15:44, 1 July 2013
Defined in header <cmath>
|
||
float remainder( float x, float y ); |
(1) | (since C++11) |
double remainder( double x, double y ); |
(2) | (since C++11) |
long double remainder( long double x, long double y ); |
(3) | (since C++11) |
Promoted remainder( Arithmetic x, Arithmetic y ); |
(4) | (since C++11) |
Computes the remainder of the floating point division operation x/y. In difference to fmod
, the return type will be negative if fmod(x, y)>y/2.
4) If any argument has integral type, it is cast to double. If any other argument is long double, then the return type is long double, otherwise it is double
Parameters
x, y | - | floating point values |
Return value
remainder of dividing arguments
See also
(C++11)(C++11) |
remainder of the floating point division operation (function) |
(C++11) |
computes quotient and remainder of integer division (function) |