Namespaces
Variants
Views
Actions

std::nextafter, std::nexttoward

From cppreference.com
< cpp‎ | numeric‎ | math
Revision as of 14:53, 24 December 2011 by P12bot (Talk | contribs)

Template:cpp/numeric/math/sidebar 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 class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

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

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

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

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

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

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

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

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

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

<td class="t-dcl-nopad"> </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.

Parameters

from, to - floating point values

Return value

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

Example

Template:example cpp