floor man page on NeXTSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
NeXTSTEP logo
[printable version]


FLOOR(3M)							     FLOOR(3M)

NAME
       fabs, floor, ceil- absolute value, floor, and ceiling functions

SYNOPSIS
       #include <math.h>

       double floor(double x);

       double ceil(double x);

       double fabs(double x);

(ALSO AVAILABLE IN BSD)
       double rint(double x);

DESCRIPTION
       Fabs returns the absolute value |x|.

       Floor returns the largest integer no greater than x.

       Ceil returns the smallest integer no less than x.

       Rint  returns  the  integer  (represented as a double precision number)
       nearest x in the direction of the prevailing rounding mode.

NOTES
       In the default rounding mode, to nearest, on a machine that conforms to
       IEEE  754,  rint(x)  is	the  integer  nearest  x  with	the additional
       stipulation that	 if  |rint(x)-x|=1/2  then  rint(x)  is	 even.	 Other
       rounding	 modes	can  make  rint act like floor, or like ceil, or round
       towards zero.

       Another way to obtain an integer near x is to declare (in C):
	      double x;	    int k;    k = x;
       Most C compilers round x towards 0 to get the integer k,	 but  some  do
       otherwise.   If in doubt, use floor, ceil, or rint first, whichever you
       intend.	Also note that, if x is larger than  k	can  accommodate,  the
       value  of k and the presence or absence of an integer overflow are hard
       to predict.

SEE ALSO
       abs(3), ieee(3M), math(3M)

4th Berkeley Distribution	August 1, 1992			     FLOOR(3M)
[top]

List of man pages available for NeXTSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net