• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data types

 
Thimal Deemantha
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Why the output is 3.2300000190734863
except 3.23
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15448
42
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the float and double data types are not infinitely precise; you can get rounding errors when you start doing calculations with them.
 
Thimal Deemantha
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic