From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Todd Newsgroups: gmane.lisp.guile.user Subject: Re: number->string radix patch Date: Tue, 11 May 2004 00:23:11 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <4B900A04-A30B-11D8-9EFC-000A95B4C7DC@vzavenue.net> References: <20040103221857.GA518@Richard-Todds-Computer.local> <20040104035022.GA742@Richard-Todds-Computer.local> <3FF88AD5.6010701@vzavenue.net> <87isjr1bkb.fsf@alice.rotty.yi.org> <3FF8EF71.6090802@vzavenue.net> <20040105200131.GA492@Richard-Todds-Computer.local> <20040106184116.GA7618@Richard-Todds-Computer.local> <87fza8c976.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084253246 8026 80.91.224.253 (11 May 2004 05:27:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 05:27:26 +0000 (UTC) Cc: Robert Uhl , guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue May 11 07:27:15 2004 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 1BNPnO-0002qX-00 for ; Tue, 11 May 2004 07:27:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNPmt-0007p3-NO for guile-user@m.gmane.org; Tue, 11 May 2004 01:26:43 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNPmW-0007mO-29 for guile-user@gnu.org; Tue, 11 May 2004 01:26:20 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNPly-0007Xn-CI for guile-user@gnu.org; Tue, 11 May 2004 01:26:17 -0400 Original-Received: from [66.171.59.140] (helo=smtp.vzavenue.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNPly-0007XW-3b for guile-user@gnu.org; Tue, 11 May 2004 01:25:46 -0400 Original-Received: from [10.0.1.2] (70.112.171.66.subscriber.vzavenue.net [66.171.112.70]) by smtp.vzavenue.net (MOS 3.4.3-CR) with ESMTP id AOZ21117; Tue, 11 May 2004 01:23:18 -0400 (EDT) In-Reply-To: <87fza8c976.fsf@zagadka.ping.de> Original-To: Marius Vollmer X-Mailer: Apple Mail (2.613) X-Junkmail-Status: score=0/50, host=smtp.vzavenue.net X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3162 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3162 I built guile from CVS on my Mac G5, and I get the same results I did originally: /tmp/bldguile richardt$ guile guile> (number->string 0.25 2) "0.01" guile> (number->string 11.33333333333333333 12) "B.4" guile> (number->string 1.324e44 16) "5.EFE0A14FAFEe24" guile> I had done the original patch on a G4 machine. I'm thinking it's a precision difference between macs and intel machines. Those second two answers are only different in the least significant numbers, which looks like different amounts of rounding error to me. Someone with an intel box may be able to do some tuning of the tolerance parameters in the algorithm. I'd be happy to help in any way I can, but it may be an unavoidable difference. On May 10, 2004, at 3:34 PM, Marius Vollmer wrote: > Richard Todd writes: > >> On Mon, Jan 05, 2004 at 06:36:07PM -0700, Robert Uhl wrote: >>> Although my one true project is to figure out number->string well >>> enough >>> to make it Do the Right Thing for decimals in bases other than 10 >>> (I'm a >>> big fan of duodecimal). >> >> I've seen this wish twice from you in the short time I've been >> watching guile-user, so I took a crack at it. > > Ok, I have finally installed your patch. Thanks again! (I wrote a > basic ChangeLog entry, but please do that yourself for the next > patch.) > > I used your examples as test cases, but cannot reproduce some: > >> guile> (number->string 0.25 2) >> "0.01" >> guile> (number->string 11.33333333333333333 12) >> "B.4" >> guile> (number->string 1.324e44 16) >> "5.EFE0A14FAFEe24" > > I get > > guile> (number->string 0.25 2) > "0.010" > guile> (number->string 11.33333333333333333 12) > "B.400000000000009" > guile> (number->string 1.324e44 16) > "5.EFE0A14FAFDF8e24" > > The first looks certainly wrong, but I'm not sure about the other two. > Richard, could you try to investigate this? > > -- > GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 > _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user