Closed Brinkhuis closed 1 year ago
x * x
multiplies two Int8 values under as saferintegers, the result must fit into an Int8 -- which it does not and so errors.
x ^ 2
raises an Int8 value to a Int64 value as saferintegers, the result must fit into an Int64 -- which it does and so does not error.
closing this -- let me know if something is unexplained or overlooked. thank you.
This code seems to work just fine:
Result:
When I change the code to:
It gives no OverflowError.