Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour when parsing very large numbers #104

Open
dappelt opened this issue Feb 22, 2018 · 0 comments
Open

Unexpected behaviour when parsing very large numbers #104

dappelt opened this issue Feb 22, 2018 · 0 comments

Comments

@dappelt
Copy link

dappelt commented Feb 22, 2018

Observed Behaviour

bignum() does not instantiate very large integers (>= 1e+308) as expected:

bignum(1e+307).toNumber() === 1e+307 // expected
bignum(1e+308).toNumber() === 0 // unexpected

Expected Behaviour

Instantiate a bignum object for very large integers as expected or throw an error if the argument passed to bignum() exceeds a threshold.

Version Info

@dappelt dappelt changed the title Error when parsing very large numbers Unexpected behaviour when parsing very large numbers Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant