From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: real == frac Date: Sat, 22 Nov 2003 06:58:55 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <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 1069448435 503 80.91.224.253 (21 Nov 2003 21:00:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2003 21:00:35 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 21 22:00:33 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 1ANIOH-0005wm-00 for ; Fri, 21 Nov 2003 22:00:33 +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 1ANJLO-00071C-HQ for guile-devel@m.gmane.org; Fri, 21 Nov 2003 17:01:38 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ANJKz-0006yF-Io for guile-devel@gnu.org; Fri, 21 Nov 2003 17:01:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ANJKQ-0006Ua-5r for guile-devel@gnu.org; Fri, 21 Nov 2003 17:01:10 -0500 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ANJKJ-0006TD-G6 for guile-devel@gnu.org; Fri, 21 Nov 2003 17:00:31 -0500 Original-Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id hALKx5i0026853 for ; Sat, 22 Nov 2003 07:59:05 +1100 Original-Received: from localhost (ppp100.dyn228.pacific.net.au [203.143.228.100]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id hALKvKMX026131 for ; Sat, 22 Nov 2003 07:57:21 +1100 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1ANIMh-00028u-00; Sat, 22 Nov 2003 06:58:55 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) 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:3081 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3081 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. I suspect the same applies to all uses of fraction2double in <, min and max too. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel