From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#16356: doc out of date about (integer? +inf.0) Date: Sun, 5 Jan 2014 22:54:35 +0000 Message-ID: <20140105225435.GA30283@fysh.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1388967691 19336 80.91.229.3 (6 Jan 2014 00:21:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jan 2014 00:21:31 +0000 (UTC) To: 16356@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jan 06 01:21:32 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vzxwc-0004no-2W for guile-bugs@m.gmane.org; Mon, 06 Jan 2014 01:21:26 +0100 Original-Received: from localhost ([::1]:59936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vzxwb-0006Kk-JJ for guile-bugs@m.gmane.org; Sun, 05 Jan 2014 19:21:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzxNY-0005yB-EZ for bug-guile@gnu.org; Sun, 05 Jan 2014 18:45:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzxNQ-0002I9-1D for bug-guile@gnu.org; Sun, 05 Jan 2014 18:45:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzxNP-0002HV-V4 for bug-guile@gnu.org; Sun, 05 Jan 2014 18:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VzxNP-000513-AW for bug-guile@gnu.org; Sun, 05 Jan 2014 18:45:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 05 Jan 2014 23:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16356 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138896546119144 (code B ref -1); Sun, 05 Jan 2014 23:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2014 23:44:21 +0000 Original-Received: from localhost ([127.0.0.1]:37197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VzxMi-0004yh-Of for submit@debbugs.gnu.org; Sun, 05 Jan 2014 18:44:21 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44598) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vzwb8-0003aH-Sp for submit@debbugs.gnu.org; Sun, 05 Jan 2014 17:55:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vzwb0-00087D-6n for submit@debbugs.gnu.org; Sun, 05 Jan 2014 17:55:10 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vzwb0-000879-4K for submit@debbugs.gnu.org; Sun, 05 Jan 2014 17:55:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vzwat-0003CW-Pv for bug-guile@gnu.org; Sun, 05 Jan 2014 17:55:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vzwak-00082g-Vk for bug-guile@gnu.org; Sun, 05 Jan 2014 17:54:55 -0500 Original-Received: from river.fysh.org ([5.135.154.127]:53092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vzwak-00081I-Po for bug-guile@gnu.org; Sun, 05 Jan 2014 17:54:46 -0500 Original-Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1VzwaZ-0008Tl-Gd; Sun, 05 Jan 2014 22:54:35 +0000 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sun, 05 Jan 2014 18:44:18 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sun, 05 Jan 2014 19:21:12 -0500 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7376 Archived-At: 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