From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#10519: guile and (mini-)gmp Date: Sun, 22 Jul 2012 11:04:25 +0200 Message-ID: <87txx0415y.fsf@gnu.org> References: <87aa5o2bm2.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1342947880 12082 80.91.229.3 (22 Jul 2012 09:04:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2012 09:04:40 +0000 (UTC) Cc: 10519@debbugs.gnu.org, Niels =?UTF-8?Q?M=C3=B6ller?= , Torbjorn Granlund To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Jul 22 11:04:40 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sss5f-0007gJ-RW for guile-bugs@m.gmane.org; Sun, 22 Jul 2012 11:04:40 +0200 Original-Received: from localhost ([::1]:37348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sss5e-00083u-Rq for guile-bugs@m.gmane.org; Sun, 22 Jul 2012 05:04:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sss5b-00083S-SG for bug-guile@gnu.org; Sun, 22 Jul 2012 05:04:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sss5a-0005vj-ML for bug-guile@gnu.org; Sun, 22 Jul 2012 05:04:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sss5a-0005vc-Ju for bug-guile@gnu.org; Sun, 22 Jul 2012 05:04:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SssBp-0001hp-Nq for bug-guile@gnu.org; Sun, 22 Jul 2012 05:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 22 Jul 2012 09:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10519 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10519-submit@debbugs.gnu.org id=B10519.13429482566546 (code B ref 10519); Sun, 22 Jul 2012 09:11:01 +0000 Original-Received: (at 10519) by debbugs.gnu.org; 22 Jul 2012 09:10:56 +0000 Original-Received: from localhost ([127.0.0.1]:56823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SssBk-0001hX-1y for submit@debbugs.gnu.org; Sun, 22 Jul 2012 05:10:56 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:59898) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SssBh-0001hQ-Ru for 10519@debbugs.gnu.org; Sun, 22 Jul 2012 05:10:54 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 30E1785B3; Sun, 22 Jul 2012 11:04:27 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pqZ1vEKVNFbE; Sun, 22 Jul 2012 11:04:27 +0200 (CEST) Original-Received: from pluto (ip-62-143-217-138.unitymediagroup.de [62.143.217.138]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id BBD171D5; Sun, 22 Jul 2012 11:04:26 +0200 (CEST) In-Reply-To: <87aa5o2bm2.fsf@netris.org> (Mark H. Weaver's message of "Mon, 16 Jan 2012 05:19:33 -0500") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6456 Archived-At: Hi Mark! Mark H Weaver skribis: > nisse@lysator.liu.se (Niels M=C3=B6ller) writes: >> 2. The next problem is maybe more a nuisance than a real problem. I'm >> looking at scm_i_big2dbl, in numbers.c. >> >> I notice this code doesn't currently use mpz_get_d (comment says >> that's because gmp-4.2 and earlier didn't do well-defined rounding). [...] > Don't worry about this. I have a patch set that (among other things) > reimplements scm_i_big2dbl in a much more robust way, with proper > rounding, and without using such low-level GMP accessors. I posted this > patch set to guile-devel on 7 Oct, "[PATCH] Improvements to exact > rationals et al". I will resubmit it soon. Apparently this didn=E2=80=99t make it into the tree yet, right? Could you resubmit it? >> 3. Occcasional use of mpq functions (do_divide, scm_inexact_to_exact), >> for conversion of fradctions to and from doubles. mini-gmp has no >> mpq-functions (and it shouldn't have), so these calls have to either >> be eliminated altogether, or be made conditional on HAVE_LIBGMP. >> >> For conversion double->fraction, mpq seems overkill: Just multiply by >> a power of two to make the number an integer, to construct a fraction >> p / 2^k, and then eliminate any common factors of two (if fractions >> are required to be in some canonical form). > > Agreed. I can easily reimplement this to avoid the mpq functions, and > will do so. Nice. Could you look into it? :-) Thanks! Ludo=E2=80=99.