aspose file tools*
The moose likes Java in General and the fly likes data types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "data types" Watch "data types" New topic
Author

data types

Thimal Deemantha
Greenhorn

Joined: Nov 02, 2012
Posts: 9



Why the output is 3.2300000190734863
except 3.23
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14338
    
  22

Because the float and double data types are not infinitely precise; you can get rounding errors when you start doing calculations with them.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Thimal Deemantha
Greenhorn

Joined: Nov 02, 2012
Posts: 9
Jesper de Jong wrote:Because the float and double data types are not infinitely precise; you can get rounding errors when you start doing calculations with them.


THANK YOU
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data types