Rework the testing framework for number-theoretic division operators
* test-suite/tests/numbers.test (test-eqv?): Remove special handling of
zeroes. Zeroes are now compared like all other numbers. Exact
numbers are compared with `eqv?' and inexact numbers are compared to
within test-epsilon.
Rework the testing framework for number-theoretic division operators:
`euclidean/', `euclidean-quotient', `euclidean-remainder',
`centered/', `centered-quotient', and `centered-remainder'.
Previously we compared all test results against a simple scheme
implementation of the same operations. However, these operations have
discontinuous jumps where a tiny change in the inputs can lead to a
large change in the outputs, e.g.:
(euclidean/ 130.
00000000000 10/7) ==> 91.0 and 0.0
(euclidean/ 129.
99999999999 10/7) ==> 90.0 and 1.
42857142856141
In the new testing scheme, we compare values against the simple
implementations only if the input arguments contain an infinity or a
NaN. In the common case of two finite arguments, we simply make sure
that the outputs of all three operators (e.g. `euclidean/',
`euclidean-quotient', `euclidean-remainder') equal each other, that
outputs are exact iff both inputs are exact, and that the required
properties of the operator are met: that Q is an integer, that R is
within the specified range, and that N = Q*D + R.