Documentation Archive Developer
Search
ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



NEARBYINT(3)             BSD Library Functions Manual             NEARBYINT(3)

NAME
     nearbyint -- round to integral value in floating-point format

SYNOPSIS
     #include <math.h>

     double
     nearbyint(double x);

     long double
     nearbyintl(long double x);

     float
     nearbyintf(float x);

DESCRIPTION
     The nearbyint() functions return the integral value (represented as a
     double precision number) nearest to x according to the prevailing round-ing rounding
     ing mode.

SPECIAL VALUES
     nearbyint(+-0) returns +-0 for all rounding modes.

     nearbyint(+-infinity) returns +-infinity for all rounding modes.

SEE ALSO
     abs(3), fabs(3), ceil(3), floor(3), math(3)

STANDARDS
     The nearbyint() functions conform to ISO/IEC 9899:1999(E).

BSD                            January 29, 2003                            BSD