Integer Arithmetic

The computer relies on arithmetic. Here we test a variety of arithmetic operations expressed as 32 bit two's complement binary numbers (Java's int).
 
eg.ArithmeticFixture
xy+-*/
000000
123-120.5
1-102-1-1
10000100002000001000000001


Now we try something similar using automatic type conversion offered by ColumnFixtures (BFL1).

eg.ArithmeticColumnFixture
xyplus()times()divide()floating()
235600.666666666667
0000errorerror
0000
2003005006000000.666666666667
2310101010
20035600.6666667
2-3-1-60-0.666666666667


fit.Summary

Document prepaired by Ward Cunningham
First Version July 11, 2002
Last Update August 17, 2002