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

Int bottom is not safe #312

Open
ursi opened this issue Dec 2, 2024 · 0 comments
Open

Int bottom is not safe #312

ursi opened this issue Dec 2, 2024 · 0 comments

Comments

@ursi
Copy link

ursi commented Dec 2, 2024

export const topInt = 2147483647;
export const bottomInt = -2147483648;

The bottom and top values for Int are listed as above. The problem here is that -bottom is greater than top, which means bottom is actually not a safe value for the Ring instance of Int. You can verify for yourself that negate bottom == bottom!

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

No branches or pull requests

1 participant