Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

abs(3C)

ieee(3M)

FLOOR(3M)



     FLOOR(3M)                                               FLOOR(3M)



     NAME
          floor, ceil, fmod, fabs - floor, ceiling, remainder,
          absolute value functions

     SYNOPSIS
          #include <math.h>

          double floor (x)
          double x;

          double ceil (x)
          double x;

          double fmod (x, y)
          double x, y;

          double fabs (x)
          double x;

          double rint(x)
          double x;

     DESCRIPTION
          floor returns the largest integer (as a double-precision
          number) not greater than x.

          Ceil returns the smallest integer not less than x.

          Fmod returns the floating-point remainder of the division of
          x by y:  zero if y is zero or if x/y would overflow;
          otherwise the number f with the same sign as x, such that x
          = iy + f for some integer i, and |f| < |y|.

          Fabs returns the absolute value of x, |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;

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




     Page 1                                        (last mod. 8/20/87)





     FLOOR(3M)                                               FLOOR(3M)



     ORIGIN
          AT&T V.3





















































     Page 2                                        (last mod. 8/20/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026