From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16014 invoked from network); 11 May 2004 11:58:37 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 11 May 2004 11:58:37 -0000 Received: (qmail 30197 invoked from network); 11 May 2004 11:58:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 May 2004 11:58:18 -0000 Received: (qmail 18089 invoked by alias); 11 May 2004 11:58:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19912 Received: (qmail 18079 invoked from network); 11 May 2004 11:58:05 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 11 May 2004 11:58:02 -0000 Received: (qmail 29737 invoked from network); 11 May 2004 11:58:02 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 11 May 2004 11:58:00 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i4BBv6r29210; Tue, 11 May 2004 13:57:06 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1BNVso-0002vC-00>; Tue, 11 May 2004 13:57:14 +0200 Date: Tue, 11 May 2004 13:57:14 +0200 From: DervishD To: Matthias Kopfermann Cc: zsh-workers@sunsite.dk Subject: Re: print and floating point output Message-ID: <20040511115714.GF10839@DervishD> Mail-Followup-To: Matthias Kopfermann , zsh-workers@sunsite.dk References: <20040511114356.GA16256@finlandia.infodrom.north.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040511114356.GA16256@finlandia.infodrom.north.de> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 Hi Matthias :) * Matthias Kopfermann dixit: > I wonder if it really was a good decision to print so many numbers > after the point. > When asking Sven W9y he told me that that's a problem of > gcc's printf/fprintf which indeed gives that result when using it with > more than 15 numbers after the point. Not in my system, at least :? Could you point to an example? > on the other hand perl, ruby and python all return > the right result: > perl -le 'print 2.8*16.0' => 44.8 > python -c 'print 2.8*16.0' => 44.8 > ruby -e 'puts 2.8*16.0' => 44.8 > > so i guess it would make a lot sense and not cause confusion if zsh > would have a more sensible output with `print' and for users > not using `printf'. You're right. 'printf' from coreutils-5.2.1 works ok and prints the correct number. Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/