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 Int Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Int" Watch "Int" New topic
Author

Int

Alk
Greenhorn

Joined: Feb 02, 2000
Posts: 25
Do we have 0.0 and -0.0 as two different in java?
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
I think it's not because of Java but because of an IEEE floating point format standard.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Alk
Greenhorn

Joined: Feb 02, 2000
Posts: 25
So,
ceil(-0.4) will be -0.0 and not 0.0, am I right , Tony?
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Yes you are
 
Consider Paul's rocket mass heater.
 
subject: Int
 
Similar Threads
what this code returns true
Math class
what s the result
Math.min and Math. max
-0.0 and +0.0