[mercury-users] Math Module

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Oct 20 00:44:08 AEST 2002


On 19-Oct-2002, Noel  Pinto <cool4life at rediffmail.com> wrote:
> 2) Why are operations such as identifying smallest integers, 
> largest integers etc. called Next Integers?

> Plz do explain to me 
> how do I use them in examples.

Noel is referring to the following text in the Mercury library
documentation:

 | % "Next integer" operations
 | 
 | 	% math__ceiling(X) = Ceil is true if Ceil is the smallest integer
 | 	% not less than X.

Noel, you need to read the documentation more carefully.
If you read it in full, you should realize that it doesn't say
"Ceil is the smallest integer", it says 
"Ceil is the smallest integer *not less than X*".
In other words, Ceil is the next integer after X.

That's why these operations ceiling, floor, etc.
are called "next integer" operations.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list