Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: print and floating point output
- X-seq: zsh-workers 19912
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Matthias Kopfermann <matthi@xxxxxxxxxxxxxxxxx>
- Subject: Re: print and floating point output
- Date: Tue, 11 May 2004 13:57:14 +0200
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20040511114356.GA16256@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Matthias Kopfermann <matthi@xxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20040511114356.GA16256@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi Matthias :)
* Matthias Kopfermann <matthi@xxxxxxxxxxxxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author