From: Matthias Andree (no email)
Date: Mon Dec 24 2001 - 00:05:42 EST
<> writes:
> The code is not robust. Multiplication by numbers > 2 can
A robust integer math code does not use C, it is a PITA
otherwise. Period. SCNR.
Instead of emulating the multiplication, why not check against overflows
BEFORE "*= 10"? You need to check after the addition as well.
C math sucks. It's almost as ugly as assembler, but it doesn't let you
test the overflow flag which would TRIVIALLY report an overflow.
-- Matthias Andree "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin - To unsubscribe, send mail to with content (not subject): unsubscribe postfix-users
|
|
|