Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by bla3

4 years ago

This is Java, not JavaScript. The exponents table was likely of integer type. Then it works.

2 comments

bla3

Reply

alisonkisk  4 years ago

How does that avoid the misrounding bug for 999,999B = 1000KB (wrong), 1MB correct?

  • bla3  4 years ago

    D'oh, you're right.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities