-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hexadecimal-encoded constants do not respect number
configuration setting [was 64-bit numerical calculation error]
#3342
Comments
By default, mathjs uses the JavaScript You should be able to switch to JavaScript
However, there is a bug in that hexadecimal-encoded numeric constants do not appear to respect the |
number
configuration setting [was 64-bit numerical calculation error]
Thanks for the clear explanation Glen. I did look into why it doesn't work for Instead of math.config({ number: "BigNumber"})
const res = math.evaluate('hex(0x0AF076A6E6E12400 - 0x0112A88517556970)')
// 0x9ddce21cf8bba90 (correct) |
hex(0x0AF076A6E6E12400 - 0x0112A88517556970)
"0x9ddce21cf8bba80"
The correct answer must be 0x9ddce21cf8bba90.
The text was updated successfully, but these errors were encountered: