Java Math Ceiling function

I have been using the ceiling function Math.ceil() but the result is not what I think it should be. I get the ceiling and floor functions giving the same result. Math.ceil(47/2) returns 23.0 when I think it should be 24.0. The floor function Math.floor(47/2) also returns 23.0, which is correct. How do I get the proper result from the ceiling function?

[360 byte] By [Encino_Man] at [2007-11-26 11:25:52]
# 1
Can u try Math.ceil(47.0/2.0) ? If the objects are not double, then i think the division itself is performed as an integer operation...
KarthikR at 2007-7-7 3:41:23 > top of Java-index,Development Tools,Java Tools...