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

Invalid assertion in Number::lessThan #3108

Closed
linusg opened this issue Jun 29, 2023 · 1 comment · Fixed by #3169
Closed

Invalid assertion in Number::lessThan #3108

linusg opened this issue Jun 29, 2023 · 1 comment · Fixed by #3169
Labels

Comments

@linusg
Copy link
Member

linusg commented Jun 29, 2023

At least as far as I can tell, Number::lessThan fails the assertion in step 10 for input values such as x=0, y=1 as none of steps 1-9 apply:

  1. If x is NaN, return undefined.
  2. If y is NaN, return undefined.
  3. If x is y, return false.
  4. If x is +0𝔽 and y is -0𝔽, return false.
  5. If x is -0𝔽 and y is +0𝔽, return false.
  6. If x is +∞𝔽, return false.
  7. If y is +∞𝔽, return true.
  8. If y is -∞𝔽, return false.
  9. If x is -∞𝔽, return true.
  10. Assert: x and y are finite and non-zero.
  11. If ℝ(x) < ℝ(y), return true. Otherwise, return false.
@jmdyck
Copy link
Collaborator

jmdyck commented Jun 29, 2023

Since ES1, the corresponding text said that the mathematical values of x and y "are both finite and not both zero". PR #2007 changed it to the current assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants