File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Math.min and Math. max Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Math.min and Math. max" Watch "Math.min and Math. max" New topic
Author

Math.min and Math. max

rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
Why is Math.min(-0.0,+0.0) == Math.max(0.0,+0.0) true..??


Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Hanna Habashy
Ranch Hand

Joined: Aug 20, 2003
Posts: 532
hi:
I will return true. However, some platforms use foating point operator which can distenguish between 0 and -0


SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
 
Don't get me started about those stupid light bulbs.
 
subject: Math.min and Math. max