-
Notifications
You must be signed in to change notification settings - Fork 153
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
Support of scientific notation #209
Comments
@Kukunin Having same issue 2 years later, what did you do to solve this? Thanks! |
For anyone getting the same issue, apparently BN.js throws from 1e+21 and above, I solved it using the following function:
|
Need fix for this |
I would also like to be able to do BigNumber.from('1e27'). |
@samlaf this did the job for me 2 years back, is it not working now? |
new BN( <BN: 1d42aea2879f2e44dea5a13ae3465277b06749ce90c777839e74404a7e8000000000000000000000000> |
Nice @june07 , but still think this should be hidden inside the library. Why do I need this ugly code in my user code? |
I believe that bn.js should support scientific notation for big numbers: a number
5e+21
or a string"5e+21"
or both.Current situation:
I don't know the reasons behind the assertion of big numbers, but at least it can support scientific notation as a string
The text was updated successfully, but these errors were encountered: