infinities are no longer integers

* libguile/numbers.c (scm_is_integer): Infinities are not integers, per
  the R6RS.
  (scm_even_p, scm_odd_p): Passing an infinity to even? or odd? is an
  error.

* test-suite/tests/numbers.test ("integer?"): Adapt test.
  ("expt"): Add tests for +inf.0 and -inf.0 exponents.

* NEWS: Add NEWS entries.
This commit is contained in:
Andy Wingo 2011-01-23 00:06:24 +01:00
commit 8e43ed5d0b
4 changed files with 22 additions and 16 deletions

5
NEWS
View file

@ -10,6 +10,11 @@ latest prerelease, and a full NEWS corresponding to 1.8 -> 2.0.
Changes in 1.9.15 (since the 1.9.14 prerelease):
** Infinities are no longer integers.
Following the R6RS, infinities (+inf.0 and -inf.0) are no longer
considered to be integers.
** New reader option: `hungry-eol-escapes'
Guile's string syntax is more compatible with R6RS when the