Re: Fwd: Proposed document change Bradley Lucier 03 Dec 2022 17:26 UTC

On 11/28/22 9:59 PM, Taylor R Campbell wrote:
> Attached is a collection of known-answer test that you could try -- I
> generated it just now with MIT Scheme.  It tests the cartesian product
> of:
>
> - the five operators {floor/, ceiling/, truncate/, euclidean/, round/}
> - the nine numerators {0, 1, 2, 3, 4, 5, 6, 7, 8}
> - both signs for numerators
> - the eight denominators {1, 2, 3, 4, 5, 6, 7, 8}
> - both signs for denominators
>
> These 1440 test cases cover zero, units, primes, a square, a composite
> of distinct primes, and a cube.  (They don't, however, cover anything
> that requires bignum arithmetic.)  I haven't vetted these answers in
> any way other than verifying the tests pass in MIT Scheme -- I
> recommend running them through the property tests, and eyeballing them
> to spot-check for reasonableness.

Just for curiosity's sake, I searched for arguments that would
distinguish between every pair of the six (including balanced/) division
procedures (i.e., for every pair of different division procedures, those
two division procedures differ on at least one of these arguments).  The
list is surprisingly short and simple, at least to me:

((-1 2) (2 3) (1 -2) (1 4) (1 2))

Brad