From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bernard Urban Newsgroups: gmane.lisp.guile.bugs Subject: Re: division by 0 Date: Tue, 20 Apr 2004 15:21:06 +0200 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <873c6ywzst.fsf@merceron.meteo.fr> References: <877jy22d62.fsf@merceron.meteo.fr> <87r7vnm418.fsf@zagadka.ping.de> <878yhk10lb.fsf@merceron.meteo.fr> <87k70bjvex.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082467781 32716 80.91.224.253 (20 Apr 2004 13:29:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Apr 2004 13:29:41 +0000 (UTC) Cc: bug-guile@gnu.org, Bernard Urban Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Apr 20 15:29:25 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFvJV-00080f-00 for ; Tue, 20 Apr 2004 15:29:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFvGu-0000bJ-ID for guile-bugs@m.gmane.org; Tue, 20 Apr 2004 09:26:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFvGm-0000a6-D7 for bug-guile@gnu.org; Tue, 20 Apr 2004 09:26:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFvG8-0000Oq-1d for bug-guile@gnu.org; Tue, 20 Apr 2004 09:26:27 -0400 Original-Received: from [137.129.1.4] (helo=cadillac.meteo.fr) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFvF8-0000Bg-Bl for bug-guile@gnu.org; Tue, 20 Apr 2004 09:24:54 -0400 Original-Received: from merceron.meteo.fr (localhost.meteo.fr [127.0.0.1]) by cadillac.meteo.fr (8.9.3 (PHNE_28760_binary)/8.9.3) with ESMTP id NAA08762; Tue, 20 Apr 2004 13:24:31 GMT Original-To: Kevin Ryde In-Reply-To: <87k70bjvex.fsf@zip.com.au> (Kevin Ryde's message of "Tue, 20 Apr 2004 11:21:58 +1000") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.4 Precedence: list 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 Xref: main.gmane.org gmane.lisp.guile.bugs:1314 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1314 Kevin Ryde writes: > Bernard Urban writes: >> >> Is (/ 1 x) always equal to (/ x) in 1.7 ? >> This is actually my problem. It originates in the fact that hobbit >> converts (/ x) to (/ 1 x), and for x = 0, it fails for 1.6. > > You need to be clearer about what you're trying to report. > > If you're saying (/ 0) is not the same as (/ 1 0), then I see that's > the case. My guess would be that's wrong, probably both ought to give > errors (on the basis there's no multiplicative inverse of an exact Page 20 of R5RS says: "This report recommends, but does not require, that the IEEE 32-bit and 64-bit floating point standards be followed..." Sot it is fine for guile to follow the standard (actually IEEE-754), which implies treatment of infinity and NAN. > zero). This is the case in the cvs head, perhaps it should be made so > in the 1.6 series too. > My argument is one of coherence, and I always believed coherence was in the spirit of scheme: guile> (/ 3) 0.333333333333333 guile> (/ 3.0) 0.333333333333333 guile> (/ 1 3) 0.333333333333333 guile> (/ 1 3.0) 0.333333333333333 guile> (/ 0) +#.# guile> (/ 0.0) +#.# guile> (/ 1 0) standard input:16:1: In procedure / in expression (/ 1 0): standard input:16:1: Numerical overflow ABORT: (numerical-overflow) guile> (/ 1 0.0) +#.# guile> -- Bernard Urban _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile