From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: Bug 13 (expt 0 0) -> 0, release-critical or not? Date: 15 May 2002 21:19:47 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87lmalp6b0.fsf@zagadka.ping.de> References: <87n0x150j6.fsf@raven.i.defaultvalue.org> <87vgagdc5k.fsf@zagadka.ping.de> <87661qrolk.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021490483 22294 127.0.0.1 (15 May 2002 19:21:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 May 2002 19:21:23 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 1784Kw-0005nT-00 for ; Wed, 15 May 2002 21:21:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 1784Kd-0002xC-00; Wed, 15 May 2002 15:21:03 -0400 Original-Received: from dialin.speedway42.dip168.dokom.de ([195.138.42.168] helo=zagadka.ping.de) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 1784JQ-0002rO-00 for ; Wed, 15 May 2002 15:19:49 -0400 Original-Received: (qmail 1678 invoked by uid 1000); 15 May 2002 19:19:47 -0000 Original-To: Rob Browning In-Reply-To: <87661qrolk.fsf@raven.i.defaultvalue.org> Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:615 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:615 Rob Browning writes: > Marius Vollmer writes: > > >> According to R5RS (expt 0 0) -> 1 > > > > Yes, should be release critical. I have tagged it as such. > > On a related note, how about this? > > $ guile > guile> (exp (* 0.0 (log 0.0))) > #.# > guile> (exp (* 0 (log 0.0))) > 1.0 > > OK? I would say "yes". The first case uses floating point only and should conform to IEEE 754. The "#.#" really is a NaN (and 1.7 will print it as +nan.0). This is sensible since (* 0.0 (log 0.0)) is zero times -infinity. The second case computes exact zero times inexact infinity. Should the result be exact or inexact? I can't say. To me, it makes both sense for the product to result in exact zero, as to result in inexact Nan. R5RS allows both. But the latter option would conflict 'more' with R5RS, I guess, since it specifies (expt 0 0) to return 1. But it explicitely only defers (expt x y) to (exp (* y (log x)) for x != 0. In my view, (expt 0 0) should be undefined, and any program that needs a definite value for it should special case it. But that's not what R5RS specifies... In absence of any good advice from numericans, the best we can do is not gratuitously change what we are doing. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel