This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki NonFiniteSyntax version 3

author

aag

comment

Fixed footnote for MIT Scheme.

ipnr

216.239.45.4

name

NonFiniteSyntax

readonly

0

text

Here's how various Schemes deal with syntax for non-finite inexact numbers.  "Standard syntax" means what R6RS prescribes: `+inf.0` for positive infinity, `-inf.0` for negative infinity, and `+nan.0` (or `-nan.0`) for NaN.  The current draft of R7RS does not prescribe `-nan.0`; it is under ballot at this writing.

Racket, Gauche, Chicken (with or without the numbers egg), Bigloo, Scheme48, Guile, Kawa, Chez, !Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, STklos, Spark accept and print the standard syntax.

Gambit, Chibi accept and print the standard syntax, except that they do not accept `-nan.0`.

!SigScheme, Scheme 9, Dream, Oaklisp, Owl Lisp are excluded because they do not have inexact non-finite numbers.

MIT has full control over floating-point exceptions.  To ignore exceptions, one must do `(flo:ignore-exception-traps thunk)`.

The following table concisely describes the other Schemes in the test suite.  "Std syntax" is "yes" if the Scheme can read the standard syntax, "print" shows what `(let* ((i (* 1.0e200 1.0e200)) (n (- i i))) (list i (- i) n))` prints, and "own syntax" is "yes" if the Scheme can reread what it prints.

||Scheme||std syntax||prints||own syntax||
||!TinyScheme||no||`(inf -inf -nan)`||no||
||BDC||no||`(Infinity -Infinity NaN)`||no||
||Elk||no||`(inf -inf -nan.0)`||no||
||Inlab||no||`(inf.0 -inf.0 -nan.0)`||no||
||KSi||yes||`(+inf.0 -inf.0 nan.0)`||yes||
||MIT||no||+||no||
||NexJ||yes||`(Infinity -Infinity NaN)`||no||
||Rep||no||`(inf. -inf. -nan.)`||no||
||RScheme||no||`(inf. -inf. -nan.)`||no||
||Scheme 7||no||`(inf.0 -inf.0 -nan.0)`||no||
||Schemik||no||`(inf -inf -nan)`||no||
||SCM||*||`(+inf.0 -inf.0 0/0)`||yes||
||scsh||no||`(inf. -inf. -nan.)`||no||
||Shoe||no||`(inf -inf -nan)`||no||
||SISC||no||`(infinity.0 -infinity.0 nan.0)`||no||
||SXM||no||`(inf.0 -inf.0 -nan.0)`||no||
||UMB||no||`(inf.0 -inf.0 -nan)`||no||
||VX||yes||`(inf. -inf. -nan.)`||no||
||XLisp||no||`(inf -inf -nan)`||no||

[*] Accepts `+inf.0` and `-inf.0` but not `+nan.0` or `-nan.0`

[+] Prints #[+inf] and #[-inf] for infinities.  Will add info on NaNs when I have it. -- ArthurGleckler

time

2012-03-29 01:47:49

version

3