Yes, the reason the larger one works is because the parameters to *
just happen to overflow to values that let the result of * not go out
of bounds.
As for doing bounds checking during (int), I think that would be a net
loss. Generally speaking, casting to a primitive is intended to aid
The failure to detect the integer overflow is not the fault of the
multiply function itself. The integer argument has already overflown
by the time it reaches the multiply function. Maybe adding overflow
detection to the coercion functions would be a solution?
On May 29, 1:51 pm, Dex Wood