Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/numeric/math/remainder"

From cppreference.com
< cpp‎ | numeric‎ | math
m (Text replace - "{{cpp|" to "{{c|")
m (Text replace - "/sidebar" to "/navbar")
Line 1: Line 1:
 
{{cpp/title|remainder}}
 
{{cpp/title|remainder}}
{{cpp/numeric/math/sidebar}}
+
{{cpp/numeric/math/navbar}}
 
{{ddcl list begin}}
 
{{ddcl list begin}}
 
{{ddcl list header | cmath}}
 
{{ddcl list header | cmath}}

Revision as of 13:48, 15 June 2012

 
 
 
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <cmath>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
float       remainder( float x, float y );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
double      remainder( double x, double y );
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
long double remainder( long double x, long double y );
</td>

<td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
Promoted    remainder( Arithmetic x, Arithmetic y );
</td>

<td > (4) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

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

Template:cpp/numeric/math/dcl list fmodTemplate:cpp/numeric/math/dcl list div