OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Matthias Andree (madt.e-technik.uni-dortmund.de)
Date: Sun Dec 23 2001 - 23:05:42 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    <Victor.Duchovnimorganstanley.com> 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 majordomopostfix.org with content (not subject): unsubscribe postfix-users