floor, ceil, fmod, fabs
Purpose
Computes floor, ceiling, remainder, absolute value func-
tions.
Library
Math Library (libm.a)
Syntax
#include <math.h>
double floor (x) double fmod (x, y)
double x; double x, y;
double ceil (x) double fabs (x)
double x; double x;
Description
The floor subroutine returns the largest integer (as a
double) not greater than the x parameter.
The ceil subroutine returns the smallest integer not less
than the x parameter.
The fmod subroutine returns the remainder of x / y. More
precisely, this value is x if the y parameter is 0. Oth-
erwise, it is the number f with the same sign as x such
that x = iy + f for some integer i, and |f| < |y|.
The fabs subroutine returns the absolute value of x, |x|.
Related Information
In this book: "abs."