From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "John W. Eaton" Newsgroups: gmane.lisp.guile.devel Subject: Re: IEEE Inf and NaN support for numbers.c Date: Thu, 21 Mar 2002 15:16:53 -0600 Sender: guile-devel-admin@gnu.org Message-ID: <15514.19909.408835.204209@segfault.bogus.domain> References: <15494.39950.119995.223196@segfault.bogus.domain> <87lmcuyifu.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1016746055 1729 127.0.0.1 (21 Mar 2002 21:27:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2002 21:27:35 +0000 (UTC) Cc: guile-devel Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16oA5u-0000Rm-00 for ; Thu, 21 Mar 2002 22:27:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16oA5X-0005Fj-00; Thu, 21 Mar 2002 16:27:11 -0500 Original-Received: from bevo.che.wisc.edu ([128.104.177.141]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16o9vw-0004Xj-00 for ; Thu, 21 Mar 2002 16:17:16 -0500 Original-Received: from segfault.bogus.domain (12-221-96-229.client.insightBB.com [12.221.96.229]) by bevo.che.wisc.edu (8.12.1/8.12.1/Debian -5) with ESMTP id g2LLGu6Q016607; Thu, 21 Mar 2002 15:16:56 -0600 Original-Received: from segfault.bogus.domain (localhost [127.0.0.1]) by segfault.bogus.domain (8.12.1/8.12.1/Debian -5) with ESMTP id g2LLGsRu029625; Thu, 21 Mar 2002 15:16:55 -0600 Original-Received: (from jwe@localhost) by segfault.bogus.domain (8.12.1/8.12.1/Debian -5) id g2LLGriY029562; Thu, 21 Mar 2002 15:16:53 -0600 Original-To: Marius Vollmer In-Reply-To: <87lmcuyifu.fsf@zagadka.ping.de> X-Mailer: VM 7.03 under Emacs 20.7.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.5 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:141 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:141 On 14-Mar-2002, Marius Vollmer wrote: | "John W. Eaton" writes: | | > The following patch adds basic IEEE Inf and NaN support for guile. This | > introduces two new predicates (inf? and nan?) and two new functions | > (inf and nan, which return IEEE Infinity and NaN values, | > respectively). | | Nice, thanks. | | > guile> (/ 0) | > Inf | | This is not a good print syntax for the new "inf" value. It looks | like a symbol, while it really is a number. Likewise for "NaN". | | What about using "1/0" for inf and "0/0" for NaN. Does this fit with | the IEEE rules? I suppose it would work, but it is a bit misleading, because Inf and NaN can be generated in ways other than just 1/0 and 0/0. | When this works, we don't need the 'inf' and 'nan' procedures. Sure, but perhaps it is nice to have a way to request a NaN or Inf value without having to perform additional arithmetic operations? Eventually, I'd like to be able to make it possible to control what happens when Inf and NaN are generated. For example, generate an exception instead of simply continuing. In that case, it might be good to have another way to get at Inf and NaN without generating the exception. I'd also be happy to have these procedures only available if some package/module/whatever is loaded, but I don't know how to do that (yet). | Do we want to care about signalling versus quiet NaNs, and the extra | information in the mantissa of NaNs? (I don't think so.) Perhaps not yet, but it might be useful to have these things later. | Also, somewhat unrelated to your patch, Guile can not read the | (illegal) notation "#.#" that is produces for funny numbers. It's | probably best to avoid outputting this notation altogether and just | find a way to cope with funny numbers more sanely. (Like you just did | for infinity.) Right, I wasn't sure what to do with the #.# thing, so I tried to leave it alone as much as possible. BTW, would people object to reformatting numbers.c to follow the GNU coding standards? Thanks, jwe _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel