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

Division of -2^31 by -1 #8

Closed
apt1002 opened this issue Jun 6, 2020 · 1 comment
Closed

Division of -2^31 by -1 #8

apt1002 opened this issue Jun 6, 2020 · 1 comment

Comments

@apt1002
Copy link
Collaborator

apt1002 commented Jun 6, 2020

Should raise an error.

@rrthomas
Copy link
Owner

rrthomas commented Jun 9, 2020

In fact, the Forth standard says "In all integer arithmetic operations, both overflow and underflow shall be ignored. The value returned when either overflow or underflow occurs is implementation defined." So instead, define the result as ARM does: -(2^31)/-1 = -(2^31).

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

2 participants