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: real == frac Date: Sun, 30 Nov 2003 02:31:21 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87vfp2abh2.fsf@zagadka.ping.de> References: <87u14xphf4.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 1070156450 11049 80.91.224.253 (30 Nov 2003 01:40:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Nov 2003 01:40:50 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 30 02:40:48 2003 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 1AQGZs-0007fM-00 for ; Sun, 30 Nov 2003 02:40:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AQHWw-0002gt-Kx for guile-devel@m.gmane.org; Sat, 29 Nov 2003 21:41:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQHW5-0002CH-8X for guile-devel@gnu.org; Sat, 29 Nov 2003 21:40:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQHVX-0001ZD-Pf for guile-devel@gnu.org; Sat, 29 Nov 2003 21:40:55 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AQHRb-0008Cl-0H for guile-devel@gnu.org; Sat, 29 Nov 2003 21:36:19 -0500 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by mx20.gnu.org with esmtp (Exim 4.24) id 1AQGQk-00016Z-Tt for guile-devel@gnu.org; Sat, 29 Nov 2003 20:31:23 -0500 Original-Received: from dialin.speedway15.dip183.dokom.de ([195.253.15.183] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1AQGTj-0002zI-00 for guile-devel@gnu.org; Sun, 30 Nov 2003 02:34:27 +0100 Original-Received: (qmail 20133 invoked by uid 1000); 30 Nov 2003 01:31:21 -0000 Original-To: guile-devel@gnu.org In-Reply-To: <87u14xphf4.fsf@zip.com.au> (Kevin Ryde's message of "Sat, 22 Nov 2003 06:58:55 +1000") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3101 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3101 Kevin Ryde writes: > I noticed that > > (= 0.5 (+ 1/2 (/ 1 (ash 1 1000)))) > > gives #t, but I think with exact fractions it should now be #f, since > the second arg is 1/2+1/2^1000, not an actual 0.5. > > I guess fraction2double is rounding, making the comparison not quite > right. Going the other way, converting double to fraction and > comparing fractions would avoid that. Yes, that would be an improvement. Could you implement it? -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel