Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isnan(3C)

FLOOR(3)                             SysV                             FLOOR(3)



NAME
     floor, ceil, fmod, fabs - round floating-point numbers to floating-point
     integers, signed and unsigned integers, or computes the Modulo Remainder
     and floating-point 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;

DESCRIPTION
     The floor function returns the largest floating-point integer not greater
     than the x argument.

     The ceil function returns the smallest floating-point integer not less
     than the x argument.

     The fmod function computes the modulo floating-point remainder of x/y.
     The fmod function returns the value x -(i*y) for some i such that if y is
     nonzero, the result has the same sign as x and magnitude less than the
     magnitude of y.

     The fabs function returns the absolute value of x, a floating-point
     number.

DIAGNOSTICS
     Upon successful completion, the floor function returns the largest
     integral value not greater than x.  If x is NaN, NaN is returned.
     Otherwise, NaN or -HUGE_VAL is returned.

     Upon successful completion, the ceil function returns the smallest
     integral value not less than x.  If x is NaN, NaN is returned.
     Otherwise, either HUGE_VAL or NaN is returned.

     Upon successful completion, the fmod function returns the remainder of
     the division of x by y.  If x or y is NaN, NaN is returned.  If y is 0
     (zero), the fmod function returns 0 (zero).

     Upon successful completion, the fabs function returns the absolute value
     of x.  If x is NaN, NaN is returned.  Otherwise, NaN is returned.

ERRORS
     The floor function fails if

     [ERANGE]  The result would cause an overflow.


     The ceil function fails if

     [ERANGE]  The result would cause an overflow.

SEE ALSO
     isnan(3C)

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