unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#16356: doc out of date about (integer? +inf.0)
@ 2014-01-05 22:54 Zefram
  2014-01-09  3:56 ` Mark H Weaver
  0 siblings, 1 reply; 2+ messages in thread
From: Zefram @ 2014-01-05 22:54 UTC (permalink / raw)
  To: 16356

The "Integers" node of the guile info document contains this gem (source
in doc/ref/api-data.texi):

          (integer? +inf.0)
          => #t

Actual guile-2.0.9 behaviour:

scheme@(guile-user)> (integer? +inf.0)
$16 = #f

The doc example matches the behaviour of guile-1.8, which classifies
+inf.0 and -inf.0 as integers, and +nan.0 as rational but not integer.
guile-2.0 follows R6RS in treating all three of these values as real
but not rational, and the "Reals and Rationals" node describes this
accurately.

Debian incarnation of this bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734323

Mathematically, infinities are not real, and NaN is, as the acronym says,
not a number.  The documentation could perhaps do with a note about
the difference between mathematical terminology and Scheme terminology.
I was rather surprised to find any discrepancy, as Scheme's numerical
tower stands out among programming languages as being uniquely accurate
in its use of mathematical terms.  Scheme's concept of "real" more
closely corresponds to the mathematical concept of "hyperreal", which
includes infinities, although NaN doesn't fit.  Scheme's "complex" is
similarly extended relative to the mathematical complex numbers, but
the mathematical term "hypercomplex" unfortunately refers to something
quite different (quaternions and the like).

-zefram





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#16356: doc out of date about (integer? +inf.0)
  2014-01-05 22:54 bug#16356: doc out of date about (integer? +inf.0) Zefram
@ 2014-01-09  3:56 ` Mark H Weaver
  0 siblings, 0 replies; 2+ messages in thread
From: Mark H Weaver @ 2014-01-09  3:56 UTC (permalink / raw)
  To: Zefram; +Cc: 16356-done

Zefram <zefram@fysh.org> writes:

> The "Integers" node of the guile info document contains this gem (source
> in doc/ref/api-data.texi):
>
>           (integer? +inf.0)
>           => #t
>
> Actual guile-2.0.9 behaviour:
>
> scheme@(guile-user)> (integer? +inf.0)
> $16 = #f

Fixed in f659df44954a7f182361395396c5e0340b08c7dd on the stable-2.0
branch, which will become Guile 2.0.10.

   Thanks!
     Mark





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-09  3:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-05 22:54 bug#16356: doc out of date about (integer? +inf.0) Zefram
2014-01-09  3:56 ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).