W
wheresjim
I think I am going crazy. I have used Math.ceil many times to round up
a number, and for some reason I cannot make it work properly today.
The following code:
public class MathTest
{
public static void main(String args[])
{
System.out.println(Math.ceil(40/15));
}
}
Produces this output:
2.0
Should it not take the result (2.6666666666666666666666666666667
according to my Microsoft calculator) and round it up to 3?
a number, and for some reason I cannot make it work properly today.
The following code:
public class MathTest
{
public static void main(String args[])
{
System.out.println(Math.ceil(40/15));
}
}
Produces this output:
2.0
Should it not take the result (2.6666666666666666666666666666667
according to my Microsoft calculator) and round it up to 3?