>> David Fox writes
>> Is there any way to read and write infinity or minus infinity?  I
>> supose I could check each number and write the value shown above it it
>> was too big.
>
>No there is not yet. What about #+inf and #-inf? 
>I put it on my TODO list.
In the spirit of compatibility, could you consider making the syntax
compatible with an existing system? :-)  A quick survey shows that
Chez Scheme			+inf.0       -inf.0
MacScheme Student Edition 3.0	#<INFINITY>  -#<INFINITY>
                                (output only)
PC Scheme (Geneva 4.0)		Cannot compute infinities (gives error)
Scsh				Has inexact bignums (no infinities :-)
MacGambit 2.2.2			Uses largest flonum as an alias for this
Larceny 0.25			+inf.0	     -inf.0
(Popular implementations I can't get to at the moment that one might
want to check: MIT Scheme, Gambit-C, MzScheme/Rice Scheme, Scheme->C,
SCM, Bigloo.)
Furthermore, for reference,
Clisp				Cannot compute infinities (gives error)
Allegro Common Lisp 4.2 (Sun)	#.EXCL::*INFINITY-SINGLE*
                                (also as input)
Of the three commercial Scheme systems mentioned above, only Chez Scheme
supports reading of infinities, and it is the only one actively being
developed, and I think that forms precedent of some kind (which is why
Larceny has adopted the same convention).  Not the least, this syntax
lends itself to represent infinite complexes, e.g. +inf.0+1.0i or
-3.0-inf.0i.  I would make an argument, therefore, that in the spirit of
compatibility and portability you pick the same syntax as Chez Scheme.
--lars
Received on Thu Oct 03 1996 - 19:09:16 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST