Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ floor(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

abs(S)


 floor(S)                       6 January 1993                       floor(S)


 Name

    floor, ceil, fmod, fabs - floor, ceiling, remainder, absolute value func-
    tions

 Syntax


    cc  . . .  -lm


    #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

    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:  x
    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 an integer i, and | f| <| y|.

    fabs returns the absolute value of x, | x|.

 See also

    abs(S)

 Standards conformance

    ceil, fabs, floor and fmod are conformant with:
    AT&T SVID Issue 2;
    X/Open Portability Guide, Issue 3, 1989;
    ANSI X3.159-1989 Programming Language -- C;
    IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C
    Language] (ISO/IEC 9945-1);
    and NIST FIPS 151-1.


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