zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <Phil.Pennock@globnix.org>
To: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
Cc: 'ZSH Users' <zsh-users@sunsite.dk>
Subject: Re: question about float variables
Date: Wed, 10 Oct 2001 12:28:02 +0200	[thread overview]
Message-ID: <20011010122802.A15641@globnix.org> (raw)
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

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

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))
> 
> 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? 

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,
> 
> 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. :^)
-- 
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-08-13

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-09 23:33 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 [this message]
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=20011010122802.A15641@globnix.org \
    --to=phil.pennock@globnix.org \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --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).