How to multiply two ints and check
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat May 20 04:30:53 AEST 1989
In article <4700038 at m.cs.uiuc.edu> robison at m.cs.uiuc.edu writes:
>There is a much simpler, faster, and machine-independent way to check
>for multiplication overflow --- check the product by division. ...
Nope, for portability you have to avoid signed-integer overflow in
the first place. The overflow might (and does in some implementations)
cause an ABEND.
More information about the Comp.lang.c
mailing list