Hi all, As we know this order of float/double values -Infinity --> Negative Numbers/Fractions --> -0.0 --> +0.0 --> Positive Numbers/Fractions --> Infinity. I could not undestand why -0.0 == 0.0 // true but -0.0< 0.0 // false and Math.ceil(-0.0) // -0.0 Math.floor(-0.0) // -0.0
As per the Java Language Spec. Math.ceil() and Math.floor() both differentiate between -0.0. and 0.0
<a href="http://www.rajindery.com" target="_blank" rel="nofollow">Rajinder Yadav</a><p>Each problem that I solved became a rule which served afterwards to solve other problems. --Rene Descartes
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards