Ok , here's what the floor() for Math class say's

floor

public static double floor(double a)

Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.

Parameters:

a - a double value.

a - an assigned value.

Returns:

the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.

With the above in mind i expected

Math.floor(-5.2) = -5; //incorrect

instead

Math.floor(-5.2) = -6; //correct

Can somebody explain as to why cause with this i figure that the statement " not greater than the argument and is equal to a mathematical integer " is either wrong ( LOL ) or i just don't seem to get the language .

BTW the question bears root's in the 3rd & last post on this

thread http://www.javaranch.com/ubb/Forum24/HTML/011243.html Thanx

Ashish

[This message has been edited by Ashish Hareet (edited July 30, 2001).]