Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | numeric‎ | math
m (Text replace - "/sidebar" to "/navbar")
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh)
Line 35: Line 35:
 
{{dcl list template | cpp/numeric/math/dcl list div}}
 
{{dcl list template | cpp/numeric/math/dcl list div}}
 
{{dcl list end}}
 
{{dcl list end}}
 +
 +
[[de:cpp/numeric/math/remainder]]
 +
[[es:cpp/numeric/math/remainder]]
 +
[[fr:cpp/numeric/math/remainder]]
 +
[[it:cpp/numeric/math/remainder]]
 +
[[ja:cpp/numeric/math/remainder]]
 +
[[pt:cpp/numeric/math/remainder]]
 +
[[ru:cpp/numeric/math/remainder]]
 +
[[zh:cpp/numeric/math/remainder]]

Revision as of 21:28, 2 November 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