Zsh Mailing List Archive
Messages sorted by:
Re: inf and nan in arithmetic expansions
- X-seq: zsh-workers 42346
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: inf and nan in arithmetic expansions
- Date: Thu, 08 Feb 2018 09:38:20 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180208093823euoutp0261d1cbfa38b191569c4fc103efbb7c35~RUCz8WX7n2214922149euoutp02f
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518082703; bh=jAcXzU2A2a16sk9rODpOLMb1Q4S1KksCwnFw6MfmJ90=; h=Date:From:To:Subject:In-reply-to:References:From; b=Uemo7KmXlMnM78M/dGy3q0CbU3a6K7j6JzM1oV7y9ZpRDLoMYghro3utrBZqhW7qY H8rcr9GloxFGCOKEYAi1EjMDj37XSNhcPL6WIZaxZrmKErVxGjyKyUO8b4/NxKBtD6 SZ7cbcB0hB5N1crDeQQS67Ios2dLQBX2vGsrRcz0=
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20180207223051.GA30393@chaz.gmail.com> <CGME20180208073241epcas2p48a6d5f95ba0c1e0dfdf15c6c3a0b0609@epcas2p4.samsung.com> <firstname.lastname@example.org>
On Thu, 08 Feb 2018 00:25:46 +0100
Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Stephane Chazelas wrote:
> > neither "inf." nor "inf" are understood in arithmetic
> > expressions (and for "inf.", nor by other tools like awk, or
> > even the builtin printf):
> > It should be safe to change zsh so that inf. (and Inf. INF. NAN.
> > nan., maybe also Infinity.) are recognised in arithmetic
> > expression, as it's currently invalid, but that leaves the
> > problem of "inf." not being recognised by other tools
> > (awk/printf).
> There was actually a patch posted back in workers/19597 to do this. I
> don't know why it never got integrated other than that a certain
> amount of integration work was perhaps required.
> It might be possible to forward port that work from 4.1.1 to the current
> release. Would that be welcomed or was the original patch rejected for
> good reasons?
That's fine by me --- I'd completely forgotten. The math code only
evolves fairly slowly.
I'd be a little bit worried if there were cases that produced errors
before that no longer do. But given that typically the result is
"inf." with no error at the moment, that may well not be a real problem.
Messages sorted by: