From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bill Schottstaedt Newsgroups: gmane.lisp.guile.devel Subject: Re: ratio implementation Date: Tue, 29 Jul 2003 04:57:33 -0700 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3F26612D.6090501@ccrma.stanford.edu> References: <3F250809.9030108@ccrma.stanford.edu> <871xwakvv3.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1059479941 7071 80.91.224.249 (29 Jul 2003 11:59:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2003 11:59:01 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jul 29 13:58:57 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19hT85-0001pa-00 for ; Tue, 29 Jul 2003 13:58:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hT7k-0001Tb-HR for guile-devel@m.gmane.org; Tue, 29 Jul 2003 07:58:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19hT7G-0000cH-OC for guile-devel@gnu.org; Tue, 29 Jul 2003 07:58:06 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19hT73-0000Cs-A6 for guile-devel@gnu.org; Tue, 29 Jul 2003 07:57:54 -0400 Original-Received: from smtp7.stanford.edu ([171.67.16.34]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hT6q-0008HD-3x for guile-devel@gnu.org; Tue, 29 Jul 2003 07:57:40 -0400 Original-Received: (from root@localhost) by smtp7.Stanford.EDU (8.12.9/8.12.9) id h6TBvcVS017019 for guile-devel@gnu.org; Tue, 29 Jul 2003 04:57:38 -0700 (PDT) Original-Received: from cm-mail.stanford.edu (cm-mail.Stanford.EDU [171.64.197.135]) by smtp7.Stanford.EDU (8.12.9/8.12.9) with ESMTP id h6TBvZ1t017011; Tue, 29 Jul 2003 04:57:36 -0700 (PDT) Original-Received: from cmn30.stanford.edu (cmn30.stanford.edu [171.64.197.179]) by cm-mail.stanford.edu (8.11.6/8.11.6) with ESMTP id h6TBvY000600; Tue, 29 Jul 2003 04:57:34 -0700 Original-Received: from ccrma.stanford.edu (localhost [127.0.0.1]) by cmn30.stanford.edu (8.12.8/8.12.5) with ESMTP id h6TBvXMA011267; Tue, 29 Jul 2003 04:57:34 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en Original-To: Kevin Ryde In-Reply-To: <871xwakvv3.fsf@zip.com.au> 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:2668 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2668 Kevin Ryde wrote: >>I notice that r5rs seems to >>imply that (inexact->exact .3) should return 3/10 (see the rationalize >>example which is assuming this) >> >> > >Isn't that the effect of the rationalize function, rather than >inexact->exact? > > The example I was referring to was: (rationalize (inexact->exact .3) 1/10) ==> 1/3 ; exact which only makes sense if (inexact->exact .3) does not return 0, but 3/10. Then rationalize of that with an error of 1/10 finds the simpler ratio 1/3. In Guile currently (I'm typing from work, so I can't actually check this...), the (inexact->exact .3) returns 0, so rationalize would also return 0. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel