Namespaces
Variants
Views
Actions

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

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 46: Line 46:
 
  | output=
 
  | output=
 
}}
 
}}
 +
 +
[[de:cpp/numeric/math/nextafter]]
 +
[[es:cpp/numeric/math/nextafter]]
 +
[[fr:cpp/numeric/math/nextafter]]
 +
[[it:cpp/numeric/math/nextafter]]
 +
[[ja:cpp/numeric/math/nextafter]]
 +
[[pt:cpp/numeric/math/nextafter]]
 +
[[ru:cpp/numeric/math/nextafter]]
 +
[[zh:cpp/numeric/math/nextafter]]

Revision as of 21:31, 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       nextafter( float from, float to );
</td>

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

<td >
double      nextafter( double from, double to );
</td>

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

<td >
long double nextafter( long double from, long double to );
</td>

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

<td >
Promoted    nextafter( Arithmetic from, Arithmetic to );
</td>

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

<td >
float       nexttoward( float from, long double to );
</td>

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

<td >
double      nexttoward( double from, long double to );
</td>

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

<td >
long double nexttoward( long double from, long double to );
</td>

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

<td >
double      nexttoward( Integral from, long double to );
</td>

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

Returns the next representable value of from in the direction of to. If from equals to to, to is returned.

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

from, to - floating point values

Return value

the next representable value of from in the direction of to.

Example