Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl - next displayable floating-point number
&pagelevel(4)&pagelevel
Syntax | #include <math.h> double nextafter(double x, double y); C11 float nextafterf(float x, float y); long double nextafterl(long double x, long double y); double nexttoward(double x, long double y); float nexttowardf(float x, long double y); long double nexttowardl(long double x, long double y); (End) |
Description | These functions return the next displayable floating-point number that follows x in direction y. If y is less than x, the largest displayable floating-point number smaller than x is returned. |
Return val. | Next displayable floating-point number that follows x in direction y |
|
| if successful. |
| +/-HUGE_VAL +/-HUGE_VALF +/-HUGE_VALL
| depending on the function type and the sign of x, if an error occurs.
errno is set to indicate the error. |
Errors | nextafter() , nextafterf() , nextafterl() , nexttoward() , nexttowardf() and nexttowardl() will fail if:
|
| ERANGE
| x is finite but the result of the function-call would cause an overflow. |
See also | math.h .
|