zsh-users
 help / color / mirror / code / Atom feed
* question about float variables
@ 2001-10-09 23:33 Bruno Bonfils
  2001-10-10  8:58 ` Borsenkow Andrej
  0 siblings, 1 reply; 6+ messages in thread
From: Bruno Bonfils @ 2001-10-09 23:33 UTC (permalink / raw)
  To: ZSH Users

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

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 #2: Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-10-12  4:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-09 23:33 question about float variables Bruno Bonfils
2001-10-10  8:58 ` Borsenkow Andrej
2001-10-10  9:42   ` Phil Pennock
2001-10-10 10:10     ` Borsenkow Andrej
2001-10-10 10:28       ` Phil Pennock
2001-10-10 12:47   ` Bruno Bonfils

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).