On Feb 11, 2008, at 19:26, Andreas Delmelle wrote:



Err...
Math.floor(-2.0) == Math.ceil(-2.0) == Math.rint(-2.0) == -2.0

Did you actually check that? In that case, your JVM would not be compliant, I think...

The API docs say:

Math.floor(-2.3) = -3
Math.ceil(-2.3) = -2
Math.rint(-2.3) = -2

Sorry, must be the Monday...
Of course, we're both absolutely right, and for doubles that correspond to integers, what I wrote actually does not matter...


Cheers

Andreas

Reply via email to