Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How does one explain these Math.ceil() different results?

user12076936Feb 16 2010 — edited Feb 17 2010
Hello,

Math.ceil(0.14) returns 1.0
Math.ceil(1/7) returns 0.0
Why? Is this a bug?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2010
Added on Feb 16 2010
6 comments
146 views