expressive icon indicating copy to clipboard operation
expressive copied to clipboard

Prevent overflow errors

Open memetican opened this issue 3 years ago • 1 comments

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.

memetican avatar Sep 01 '22 00:09 memetican

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

bijington avatar Nov 15 '22 20:11 bijington