Y
Hacker News
new
|
ask
|
show
|
jobs
by
koverstreet
661 days ago
It's somewhat acceptable with double precision floats - never single precision floats.
But far better to just use integer cents.
1 comments
IX-103
661 days ago
Integer cents implies a specific rounding mode (truncation). That's probably not what you should be using. Floating point cents gets the best of both worlds (if you set the right rounding mode).
link