Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Mathematical Library Functionsnextafter(3M)


NAME

 nextafter - next representable double-precision floating-point number

SYNOPSIS

 
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double nextafter(double x, double 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.

RETURN VALUES

 

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

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

If x is finite and the correct function value would overflow, nextafter() returns +-HUGE_VAL (according to the sign of x) and sets errno to ERANGE.

ERRORS

 

The nextafter() function will fail if:

ERANGE
The correct value would overflow.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

attributes(5),


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.