Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
question about float variables
- X-seq: zsh-users 4360
- From: Bruno Bonfils <asyd@xxxxxxxxxxxxx>
- To: ZSH Users <zsh-users@xxxxxxxxxx>
- Subject: question about float variables
- Date: Wed, 10 Oct 2001 01:33:24 +0200
- Mail-followup-to: Bruno Bonfils <asyd@xxxxxxxxxxxxx>, ZSH Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
hi all,
How to divide two numbers ?
I try this :
float var1=0.0
var1=$((2.4 + 1.4))
echo $var1
return 3.800000000e+00 good !!
but
float var1=0.0
var1=$((3 / 2))
echo $var1
return 1.000000000e+00 not good ! :(
and how to format the output of $var1 ?
(i want a number like 95.3)
Thank you very much
--
Bruno Bonfils
Admin Sys Linux
http://www.darksnow.org http://www.debian-fr.org
http://www.zshfr.org
Attachment:
pgpn9xfi9WKF5.pgp
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author