From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@chbouib.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Bug with large fractions Date: Sat, 06 Jan 2007 13:05:16 +0100 Message-ID: <87d55se4xv.fsf@chbouib.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168085152 27526 80.91.229.12 (6 Jan 2007 12:05:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2007 12:05:52 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 06 13:05:50 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H3AJ1-0001FV-Cx for guile-devel@m.gmane.org; Sat, 06 Jan 2007 13:05:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3AJ0-0000an-Mx for guile-devel@m.gmane.org; Sat, 06 Jan 2007 07:05:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3AIu-0000Y4-4d for guile-devel@gnu.org; Sat, 06 Jan 2007 07:05:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3AIs-0000Wt-8y for guile-devel@gnu.org; Sat, 06 Jan 2007 07:05:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3AIs-0000Wp-19 for guile-devel@gnu.org; Sat, 06 Jan 2007 07:05:38 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H3AIr-0003Z8-HF for guile-devel@gnu.org; Sat, 06 Jan 2007 07:05:37 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H3AId-0002QV-OZ for guile-devel@gnu.org; Sat, 06 Jan 2007 13:05:24 +0100 Original-Received: from adh419.fdn.fr ([80.67.176.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Jan 2007 13:05:23 +0100 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Jan 2007 13:05:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: guile-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 17 =?iso-8859-1?Q?Niv=F4se?= an 215 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i486-pc-linux-gnu User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:hSdSwtqtB6ac7+hv987SweU6Trk= X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6398 Archived-At: Hi, Before I forget about it, I noticed a bug with large fractions. It shows up in the following example: guile> 123123123123123123.12 123123123123123000.0 A quick look at numbers.c:mem2decimal_from_point, and then trying to re-execute the algorithm in there by hand shows that this is not a reader bug: guile> (define x (* 123123123123123123 100)) guile> x 12312312312312312300 guile> (set! x (+ x 12)) guile> x 12312312312312312312 guile> (set! x (/ x 100)) guile> x 3078078078078078078/25 ;; this is wrong! guile> (exact->inexact x) 123123123123123000.0 This is executed on a Guile before Han-Wen's fix, FWIW. Perhaps people more knowledgeable about this will have an idea of what's going wrong. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel