Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sh emulation POSIX non-conformances ("inf"/"Inf" in arithmetic expressions)
On Sat, Apr 24, 2021 at 12:33 AM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
>
> $ Infinity=42 zsh -c 'printf "%g\n" Infinity'
> inf
That's ... curious ...
Infinity=42 zsh -c 'printf "%g\n" $(( Infinity ))'
42
> (as that's what strtod() returns)
Er, hm. Does that mean we should be using strtod() in math context
instead of hard-coding "Inf" into the lexer?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author