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: Re: ratio implementation Date: Tue, 29 Jul 2003 10:41:20 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <871xwakvv3.fsf@zip.com.au> References: <3F250809.9030108@ccrma.stanford.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1059439365 14461 80.91.224.249 (29 Jul 2003 00:42:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2003 00:42:45 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jul 29 02:42:43 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 19hIZf-0003l5-00 for ; Tue, 29 Jul 2003 02:42:43 +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 19hIZa-00072B-QX for guile-devel@m.gmane.org; Mon, 28 Jul 2003 20:42:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19hIZ0-0006qb-QO for guile-devel@gnu.org; Mon, 28 Jul 2003 20:42:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19hIYs-0006VV-1U for guile-devel@gnu.org; Mon, 28 Jul 2003 20:41:55 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hIYY-00066P-27 for guile-devel@gnu.org; Mon, 28 Jul 2003 20:41:34 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h6T0fSiI017204; Tue, 29 Jul 2003 10:41:29 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h6T0fSQg016128; Tue, 29 Jul 2003 10:41:28 +1000 (EST) Original-Received: from localhost (ppp97.dyn228.pacific.net.au [203.143.228.97]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h6T0fQaB024852; Tue, 29 Jul 2003 10:41:27 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19hIYL-0001Rx-00; Tue, 29 Jul 2003 10:41:21 +1000 Original-To: Bill Schottstaedt Mail-Copies-To: never In-Reply-To: <3F250809.9030108@ccrma.stanford.edu> (Bill Schottstaedt's message of "Mon, 28 Jul 2003 04:24:57 -0700") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (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:2666 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2666 Bill Schottstaedt writes: > > I use longs for the numerator and denominator, so if bignums are > encountered, I fallback on the old method using scm_divide. It'd be nice to allow bignum numerators and denominators. It's rather easy to make a calculation where the denominator starts to blow up. The gmp mpq functions might help, but there's no particular need to use them, most of the same things could be done directly just with a pair of scheme integers. > 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? _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel