-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
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:
new BN('500000000000000000000').toString() // works well
new BN('5e+21').toString() // returns 63521 for some reason
new BN(500000000000000000000).toString() // throws Error: Assertion failed
new BN(5e+21).toString() // throws Error: Assertion failedI don't know the reasons behind the assertion of big numbers, but at least it can support scientific notation as a string
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels