From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: inum/double = on 64-bits Date: 06 Jan 2005 10:06:11 -0500 Message-ID: References: <87brc3mmcl.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 1105024169 8758 80.91.229.6 (6 Jan 2005 15:09:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Jan 2005 15:09:29 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 06 16:08:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmZFy-0003D9-00 for ; Thu, 06 Jan 2005 16:08:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmZRH-0003CL-4v for guile-devel@m.gmane.org; Thu, 06 Jan 2005 10:20:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CmZQq-00032m-K9 for guile-devel@gnu.org; Thu, 06 Jan 2005 10:20:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CmZQp-00031v-4D for guile-devel@gnu.org; Thu, 06 Jan 2005 10:20:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmZQo-00031s-Vi for guile-devel@gnu.org; Thu, 06 Jan 2005 10:20:11 -0500 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CmZDH-0002TK-ST for guile-devel@gnu.org; Thu, 06 Jan 2005 10:06:12 -0500 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 7729D2014; Thu, 6 Jan 2005 10:06:11 -0500 (EST) Original-To: guile-devel@gnu.org In-Reply-To: <87brc3mmcl.fsf@zip.com.au> Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4630 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4630 On a debian alpha, a comparison like (= #x111111111111111 (exact->inexact #x111111111111110)) gives #t, where on a 32-bit system it's #f. Is the language clear on what the right answer is? Are you saying that the behavior is suboptimal, or a violation of R5RS? On my system, I get #t. A perhaps related suboptimality is in printing large inexact values. On NetBSD/i386 2.0ish, guile 1.6.5: guile> (= #x111111111111111 (exact->inexact #x111111111111110)) #t guile> #x111111111111110 76861433640456464 guile> (exact->inexact #x111111111111110) 76861433640456500.0 guile> (inexact->exact (exact->inexact #x111111111111110)) 76861433640456464 NetBSD/sparc64 (LP64) 2.0ish, guile 1.6.4: guile> (= #x111111111111111 (exact->inexact #x111111111111110)) #t guile> #x111111111111110 76861433640456464 guile> (exact->inexact #x111111111111110) 76861433640456500.0 guile> (inexact->exact (exact->inexact #x111111111111110)) 76861433640456464 It seems odd to me (from a user viewpoint, but also from thinking about the implementation) that inexact->exact can restore information that had appeared missing. I wonder if I am seeing the effects of the extra floating point bits beyond IEEE754 on i386, but I see the same behavior on sparc64. -- Greg Troxel _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel