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: Wed, 15 Oct 2003 05:57:58 -0700 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3F8D4456.40801@ccrma> References: <3F250809.9030108@ccrma.stanford.edu> <87smmyibk7.fsf@zagadka.ping.de> <3F6637EC.7010004@dirk-herrmanns-seiten.de> <3F66F68B.3070100@ccrma.stanford.edu> <3F6A1F1A.8000507@dirk-herrmanns-seiten.de> <87pth9cbmt.fsf@zagadka.ping.de> <3F8A853D.1020708@ccrma> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1066223072 2278 80.91.224.253 (15 Oct 2003 13:04:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 13:04:32 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 15 15:04:30 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 1A9lKI-00059J-01 for ; Wed, 15 Oct 2003 15:04:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9lEp-0004y0-ET for guile-devel@m.gmane.org; Wed, 15 Oct 2003 08:58:51 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9lEl-0004xU-10 for guile-devel@gnu.org; Wed, 15 Oct 2003 08:58:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9lEE-0004rL-5j for guile-devel@gnu.org; Wed, 15 Oct 2003 08:58:46 -0400 Original-Received: from [171.64.14.23] (helo=smtp1.Stanford.EDU) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9lED-0004qe-Na for guile-devel@gnu.org; Wed, 15 Oct 2003 08:58:13 -0400 Original-Received: from cm-mail.stanford.edu (cm-mail.Stanford.EDU [171.64.197.135]) by smtp1.Stanford.EDU (8.12.10/8.12.10) with ESMTP id h9FCw3mr028382; Wed, 15 Oct 2003 05:58:04 -0700 (PDT) Original-Received: from ccrma (cmn13.stanford.edu [171.64.197.162]) by cm-mail.stanford.edu (8.11.6/8.11.6) with ESMTP id h9FCvw916011; Wed, 15 Oct 2003 05:57:58 -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: Marius Vollmer In-Reply-To: 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:2877 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2877 > With your new files, I now get > guile> (inexact->exact 123456789123456789.0) > 0 I noticed this, but wasn't sure how to proceed; in the previous guile, you'd get (in a sense) equally bogus results: guile> (inexact->exact 17452826108659293487.0) 17452826108659294208 guile> (= (truncate 17452826108659293487.3) 17452826108659293487.0) #f I wasn't even sure whether you wanted inexact->exact to be changed -- I left the old code in place. I wrote a gmp version of the continued fraction code about 10 years ago -- I think I can still find it. > guile> (define pi (* 2 (acos 0))) > guile> (- (inexact->exact pi) pi) > 3.31628058347633e-10 > Shouldn't we be able to do better than this? I think so; but in the current version, I'm setting the minimum error to 1/INT_MAX, which looks like it's in the ballpark of e-10. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel