The computer relies on arithmetic. Here we test a variety of arithmetic
operations.
| Math.ArithmeticFixture | |||||
| x | y | + | - | * | / |
| 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 2 | 3 | -1 | 2 | 0.5 |
| 1 | -1 | 0 | 2 | -1 | -1 |
| 10000 | 10000 | 20000 | 0 | 100000000 | 1 |
| Math.ArithmeticColumnFixture | |||||
| x | y | plus() | times() | divide() | floating() |
| 2 | 3 | 5 | 6 | 0 | 0.666666666667 |
| 0 | 0 | 0 | 0 | error | error |
| 0 | 0 | 0 | 0 | ||
| 200 | 300 | 500 | 60000 | 0 | 0.666666666667 |
| 2 | 3 | 10 | 10 | 10 | 10 |
| 200 | 3 | 5 | 6 | 0 | 0.6666667 |
| 2 | -3 | -1 | -6 | 0 | -0.666666666667 |
| fit.Summary |
This document implements Ward Cunningham's FIT examples