nextafter(), nextafterf()

compute next floating-point value 

Function


SYNOPSIS

#include <math.h> double nextafter(double x, double y)

float nextafterf(float x, float y)


DESCRIPTION

The nextafter() function computes the next representable double-precision floating-point value following x in the direction of y. Thus, if y is less than x, nextafter() returns the largest representable floating-point number less than x.

The nextafterf() function is a single-precision version of nextafter().


PARAMETERS

x 

Is the base number for calculation.

y 

Is the number indicating relative direction for calculation.


RETURN VALUES

The nextafter() function returns the next representable double-precision floating-point number following x in the direction of y.

If x or y is NaN, nextafter() returns NaN.

If x is finite and the correct function value would overflow, HUGE_VAL is returned and errno is set to ERANGE.


CONFORMANCE

UNIX 98


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
math()


MKS Toolkit 9.2 Documentation Build 16.