ceil() and floor()

Gerald I. Evenden gie at charon.er.usgs.gov
Mon Mar 28 11:56:43 EST 1994


>From: nsmith at polar.bowdoin.edu (Neel Smith)
>Subject: ceil() and floor()
>Sender: grass-lists-owner at max.cecer.army.mil
>Date: Mon, 28 Mar 1994 11:07:06 (EST)
>
>Can anyone tell me easily where these functions are defined?  I don't
>see them in any of the obvious libraries.
>
>Thanks in advance.
>
>Neel Smith
>nsmith at abacus.bates.edu

These are standard C functions that are part of the math library.
They have been around forever.

double ceil(double x) : returns the smallest integral value not less than x

double floor(double x) : returns the largest integral value not greater than x

`floor' should not be confused with integer truncation:

	floor(15.7)  ->  15.0
	floor(-15.7) -> -16.0

Gerald (Jerry) I. Evenden   Internet: gie at charon.er.usgs.gov
voice: (508)563-6766          Postal: P.O. Box 1027
  fax: (508)457-2310                  N.Falmouth, MA 02556-1027



More information about the grass-dev mailing list