DPRG
DPRG List  



[DPRG] Off Topic: gcc help

Subject: [DPRG] Off Topic: gcc help
From: warm38 at juno.com warm38 at juno.com
Date: Tue Jul 20 13:55:52 CDT 2010

I'm going on with trying to check out the + - * / for signed/unsigned
char.
I'm trying to think of a way to get through it efficiently.
example: Adding -120 to -120 and adding 120 to 120 is too much for 8
bits.  How would I check that?

if I add a (going from -127 to 127) to b (going from -127 to 127 -- I
have to have a stopping point, and -127 is it)
How do I verify that the answer is good or out of range?  A lot of "if"
tests?

And how would I report that?

For adding and subtracting I could just try a series of special values
-128, -65, -64, -63, -2, -1, 0, 1, 2, 63, 64, 127 and check the result. 
I think this would be the best method.

Multiplication... Ideas?

wade 
____________________________________________________________
Penny Stock Jumping 2000%
Sign up to the #1 voted penny stock newsletter for free today!
http://thirdpartyoffers.juno.com/TGL3141/4c45f177c622b33f816st04vuc

More information about the DPRG mailing list