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: Wed, 15 Oct 2003 09:37:25 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87oewjcrwq.fsf@zip.com.au> 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 X-Trace: sea.gmane.org 1066189027 10439 80.91.224.253 (15 Oct 2003 03:37:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 03:37:07 +0000 (UTC) Cc: Bill Schottstaedt , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 15 05:37:04 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 1A9cTA-0004pm-00 for ; Wed, 15 Oct 2003 05:37:04 +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 1A9aup-0007oZ-QE for guile-devel@m.gmane.org; Tue, 14 Oct 2003 21:57:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9Z8N-0005bE-2S for guile-devel@gnu.org; Tue, 14 Oct 2003 20:03:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9Z1W-0001eb-HM for guile-devel@gnu.org; Tue, 14 Oct 2003 19:56:49 -0400 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 1A9YjZ-00032Z-Im for guile-devel@gnu.org; Tue, 14 Oct 2003 19:37:45 -0400 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by mx20.gnu.org with esmtp (Exim 4.24) id 1A9YjX-000266-MQ for guile-devel@gnu.org; Tue, 14 Oct 2003 19:37:44 -0400 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 h9ENbcYH015224; Wed, 15 Oct 2003 09:37:38 +1000 Original-Received: from localhost (ppp113.dyn228.pacific.net.au [203.143.228.113]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id h9ENXjst018504; Wed, 15 Oct 2003 09:33:46 +1000 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1A9YjH-0000iz-00; Wed, 15 Oct 2003 09:37:27 +1000 Original-To: Marius Vollmer Mail-Copies-To: never In-Reply-To: (Marius Vollmer's message of "Tue, 14 Oct 2003 15:03:41 +0200") 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:2876 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2876 Marius Vollmer writes: > > I don't have the details ready yet, but I think I'll try to come up > with code for this... (when it isn't already in GMP). gmp has an mpq_set_d, which does what you imagine, extract the bits to make a binary fraction. The actual implementation is uglified by the details of gmp internals though. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel