From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20393 invoked from network); 16 Aug 1997 04:07:37 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 16 Aug 1997 04:07:37 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.8.5/8.8.5) id AAA13762; Sat, 16 Aug 1997 00:00:17 -0400 (EDT) Resent-Date: Fri, 15 Aug 1997 23:59:29 -0400 (EDT) From: unpingco@mpl.ucsd.edu (Jose Unpingco) Message-Id: <9708160359.AA24903@cryptica.UCSD.EDU> Subject: almost floating point... To: zsh-users@math.gatech.edu (zsh) Date: Fri, 15 Aug 1997 20:59:51 -0700 (PDT) X-Mailer: ELM [version 2.4 PL25] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"_MqMO.0.JM3.WMIzp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/973 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu hi, I like to use the arithmetic abilities of zsh often and have noticed that z=1; echo $(( $z + 1/3*6 )) doesn't add 2 to 1 =3. I think the intermediate divide operation confuses things somehow since z=1; echo $(( $z + 6/3 )) does add 2+1=3. I was wondering what the rules for this are? Also, are there any compact alternatives if one needs to do batch floating point computations through the shell without using PERL or AWK. For example, foreach file (numbers*.txt) < $file | end Thank you for your time and consideration. ---------------------------------------------------------------------- Jose Unpingco Mail Code ECE 0407; WK# (619) 534-5904 ----------------------------------------------------------------------