Re: integer overflow behavior multiply

2009-05-30 Thread ataggart
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

Re: integer overflow behavior multiply

2009-05-29 Thread Dex Wood
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