Y
Hacker News
new
|
ask
|
show
|
jobs
by
ummonk
2509 days ago
You get 5 decimal places if you divide by 1000...
1 comments
concert-gilled
2508 days ago
Thanks, I missed that. I was just looking at the number of decimal places. Is that method accurate?
(1000 * incorrectly_rounded) / 1000 == incorrectly_rounded
link
ummonk
2508 days ago
It's not incorrectly rounded. It's correctly rounded to two decimal places in either case. Two decimal places just isn't enough digits when you give it 1 USD, so you have to give it 1000 USD.
link
(1000 * incorrectly_rounded) / 1000 == incorrectly_rounded