Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ Nice, but I don't think this will work, as JavaScript itself (not the computer) will lose precision after just 2^53. \$\endgroup\$ Commented Jan 29, 2017 at 13:24
  • \$\begingroup\$ You're right, but I don't think that limit can be avoided, even if we split the number up in portions of 32 bits in an array, because eventually, the number needs to be processed as a whole. If you do have an idea on how to solve this, please let me know. \$\endgroup\$ Commented Jan 29, 2017 at 13:40
  • 1
    \$\begingroup\$ There are JS libraries for arbitrary-precision math--I even built one at some point--so I'm certain it's possible. I'll have a go the next time I'm at my computer \$\endgroup\$ Commented Jan 29, 2017 at 14:22
  • \$\begingroup\$ I did some googling, and it seems interesting. I'll have a shot at it too. \$\endgroup\$ Commented Jan 29, 2017 at 16:00