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

Prevent overflow errors #125

Open
memetican opened this issue Sep 1, 2022 · 1 comment
Open

Prevent overflow errors #125

memetican opened this issue Sep 1, 2022 · 1 comment

Comments

@memetican
Copy link

Describe the bug
Basic evaluations such as 123456 * 789456 generates an overflow result, e.g.
-1321167872.

To Reproduce
Evaluate 123456 * 789456

Expected behavior
Should error. Ideally this would be the default behavior, with the ability to override, e.g. ExceptionOnOverflow = false.
That situation might only be useful for e.g. CS studies.

Alternatively, some way to detect that the result has overflowed, so the calling func can handle it accordingly.

Platform (please complete the following information):
All.

@bijington
Copy link
Owner

Apologies for the delayed response to this. We could consider adding a new option to this https://github.com/bijington/expressive/wiki/Usage#custom-options which could allow for a developer to choose whether to overflow or not. I would prefer to keep the current behaviour as the default to avoid breaking anyone though

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