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

Comment by meetups323

4 years ago

Loop code has the same bug.

3 comments

meetups323

Reply

bla3  4 years ago

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

  • 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