Fix `min' and `max' handling of NaNs, infinities, and signed zeroes
* libguile/numbers.c (scm_min, scm_max): Properly order the real
infinities and NaNs, per R6RS, and also take care to handle signed
zeroes properly. Note that this ordering is different than that of
`<', `>', `<=', and `>=', which return #f if any argument is a real
NaN, and consider the real zeroes to be equal. The relevant real
infinity (-inf.0 for min, +inf.0 for max) beats everything, including
NaNs, and NaNs beat everything else. Previously these were handled
improperly in some cases, e.g.:
(min 1/2 +nan.0) now returns +nan.0 (previously returned 0.5),
(max 1/2 +nan.0) now returns +nan.0 (previously returned 0.5),
(min -inf.0 +nan.0) now returns -inf.0 (previously returned +nan.0),
(max +inf.0 +nan.0) now returns +inf.0 (previously returned +nan.0),
(min -0.0 0.0) now returns -0.0 (previously returned 0.0),
(max 0.0 -0.0) now returns 0.0 (previously returned -0.0),
(max 0 -0.0) now returns 0.0 (previously returned -0.0),
(max -0.0 0 ) now returns 0.0 (previously returned -0.0).
* test-suite/tests/numbers.test (min, max): Add many more test cases
relating to NaNs, infinities, and signed zeroes. Change most existing
test cases to use `eqv?' instead of `=', in order to check exactness.