[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

truncate/round/floor/ceiling functions



I  think  that I may  have  found  an  inconsistent  definition  for the
functions floor/round/ceiling and trucate.

This inconsistency  occurs when there are 2 arguments.  For example, let
us look at `(truncate 10.0 4.0)'.

1).  We see that  (truncate  10.0 4.0) is  defined to be  equivalent  to
    (truncate (/ 10.0 4.0)) = (truncate 2.5), which yields (2 0.5).

2.) However, applying the sentence (from pg 216 in the Aluminum Edition)

	"If any of  these  functions  is given 2  arguments  x and y and
	 produces results q and r, then q*y + r = x."

    yields, for  x=10.0 and y= 4.0, q=2 and r=2.0, or a result of 
    (2.0 2.0).

We then have 2 different results for `truncate 10.0 4.0', depending upon
whether one does the division or not.

How is this resolved?  Any clarifications would be appreciated.

Paul Beiser
Hewlett-Packard   
Ft. Collins, Colorado
uucp:   ...{ihnp4,hplabs}!hpfcla!paul
arpa:   "hpfclp!paul%hplabs.csnet"@csnet-relay