You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note
Changing configuration to 'BigNumber' does fix the issue: math.config({ number: 'BigNumber' }):
// With math.config({ number: 'BigNumber' })math.evaluate(hex(18446744073709552))// 0x4189374bc6a7f0math.evaluate(hex("18446744073709552"))// 0x4189374bc6a7f0
However, then the following expression gives an error, which may be a separate bug:
// With math.config({ number: 'BigNumber' })math.evaluate(format(-830,{notation: "hex",wordSize: 32}))// Error: Option "wordSize" must be a number// can be fixed by doing:math.evaluate(format(-830,{notation: "hex",wordSize: number(32)}))// 0xfffffcc2i32
// With math.config({ number: 'number' })math.evaluate(format(-830,{notation: "hex",wordSize: 32}))// 0xfffffcc2i32
Thank you
The text was updated successfully, but these errors were encountered:
Try console.log(18446744073709552) in your developer console. By creating it as number, the value is already rounded off before it reaches the bignumber(...) constructor, since a JavaScript number can hold only about 16 digits.
Describe the bug
Using a number value instead of string gives different results in the following case:
To Reproduce
Visit: https://mathnotepad.com/#contents=N4IgzgLghhCmIC5RlgG1gYwgSwPYDtFRt8ATWAD0QEYAacaAJwkQAZ7Yy2BfesDRrlSoAKrgAOPDhXGNYYMHnxhEAbVAA3KKgCu8BCAAWlABQAjbAHN8OgLZnYjE9QAcAFjcA2AOwfW3gGZvVgBOAFYwgCYASmiAHXxjCnMrG3tHEziQVw8fP0Dg8Kis2JB6W1hoIm5eTW09RBAykAqqpBqAXXoNR0UCRAD6HXFSGFhSRsjWSLcAWlZqWZmRahCEaYQAzwA6VjCXAC0QbiA%3D
Note
Changing configuration to 'BigNumber' does fix the issue:
math.config({ number: 'BigNumber' })
:However, then the following expression gives an error, which may be a separate bug:
Thank you
The text was updated successfully, but these errors were encountered: