From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6252 invoked from network); 10 Oct 2001 10:32:07 -0000 Received: from unknown (HELO sunsite.dk) (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Oct 2001 10:32:07 -0000 Received: (qmail 16937 invoked by alias); 10 Oct 2001 10:31:50 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4363 Received: (qmail 16925 invoked from network); 10 Oct 2001 10:31:49 -0000 Date: Wed, 10 Oct 2001 12:28:02 +0200 From: Phil Pennock To: Borsenkow Andrej Cc: 'ZSH Users' Subject: Re: question about float variables Message-ID: <20011010122802.A15641@globnix.org> Mail-Followup-To: Borsenkow Andrej , 'ZSH Users' References: <20011010114224.A12923@globnix.org> <003401c15173$c65e9220$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <003401c15173$c65e9220$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Wed, Oct 10, 2001 at 02:10:23PM +0400 X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. X-No-Archive: yes --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2001-10-10 at 14:10 +0400, Borsenkow Andrej wrote: > - multiply by 1.0: $((var1*1.0/var2)) > - use temps > - use float() function: $((float(var1)/var2)) >=20 > What is wrong with above? Nothing -- if you take the time to _read_ the mail to which you're replying, before launching into a tirade, you might notice that I actually pointed to "zmodload math/compfunc" and then using the float() function. I wasn't saying that zsh is not useful. > BTW how is it different from C?=20 What has this got to do with it? Is C an exemplar of good design, now? > > I've not seen a way in zsh to modify this to be 'sensible' for humans, >=20 > If you can suggest how to 'sensibly' incorporate it into zsh grammar ... Yet Another typeset flag. There are already flags handling how parameters are displayed, alignment, etc etc. One to say "display this param as though using %g". > > Personally, I'd use the OS's printf(1) if it exists, > It is included into 4.1 branch. Cool. :^) --=20 Across all scientific fields, skeptical analysis of technical claims made by others, and the presentation of detailed evidence to support such analysis,= is the heart of the scientific method. To outlaw such analysis is to outlaw the scientific method itself. -- Ed Felten; declaration in Felten v RIAA 2001-0= 8-13 --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OpenBSD) iD8DBQE7xCKxfDS04Uzk9lURAvkBAKDPSVpDIiDdwJ0tbEF5MxdkpoJpUQCgkP0A 81rYmtv1ZqgJ181nvwd4qhs= =oGYg -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--