zsh-users
 help / color / mirror / code / Atom feed
From: Bruno Bonfils <asyd@debian-fr.org>
To: ZSH Users <zsh-users@sunsite.dk>
Subject: question about float variables
Date: Wed, 10 Oct 2001 01:33:24 +0200	[thread overview]
Message-ID: <20011010013324.A9741@debian-fr.org> (raw)

[-- 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 --]

             reply	other threads:[~2001-10-10  8:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-09 23:33 Bruno Bonfils [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011010013324.A9741@debian-fr.org \
    --to=asyd@debian-fr.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).