jQuery in Action, 2nd edition*
The moose likes Cattle Drive and the fly likes float arithmetic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "float arithmetic" Watch "float arithmetic" New topic
Author

float arithmetic

Manisha Abhyankar
Greenhorn

Joined: Jan 13, 2001
Posts: 1
I am trying to do float arithmetic for dollar amounts. The sum is not precise to the two decimal places of cents. It gets rounded up and the final total is different from the actual total by a few cents or a couple of dollars! Has anyone used float for accumulating totals precise to the two decimal places?
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20695
    ∞

Which assignment is this for?


permaculture Wood Burning Stoves 2.0 - 4-DVD set
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: float arithmetic