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

Do not force 32 bits in JS math operations #1143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 9, 2023

  1. Do not force 32 bits in JS math operations

    The "n | 0" is a hack to truncate numbers, but it forces n to 32 bits, which is inconsistent with the expected precision of 54 integer bits using the JS backend. For example, truncate(2147483648) yields -2147483648 (negative), and similarly, 21474836481 // 10 yields -2147483648.
    richcarl committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    c02dca4 View commit details
    Browse the repository at this point in the history