nextafter, nexttoward

From cppreference.com
< c‎ | numeric‎ | math
 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
nextafternexttoward
(C99)(C99)
(C99)
Classification
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
Macro constants
 
Defined in header <math.h>
float       nextafterf( float from, float to );
(since C99)
double      nextafter( double from, double to );
(since C99)
long double nextafterl( long double from, long double to );
(since C99)
float       nexttowardf( float from, long double to );
(since C99)
double      nexttoward( double from, long double to );
(since C99)
long double nexttowardl( long double from, long double to );
(since C99)

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

Contents

[edit] Parameters

from, to - floating point values

[edit] Return value

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

[edit] Example

[edit] See also

C++ documentation for nextafter