Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#164686: zsh: Wrong floatting point operation (when locale_decimal_sign=","?)
- X-seq: zsh-workers 17822
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#164686: zsh: Wrong floatting point operation (when locale_decimal_sign=","?)
- Date: Mon, 14 Oct 2002 18:00:21 -0400
- Cc: Marco Bodrato <bodrato@xxxxxxxxxxxxx>, 164686-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <E1816J0-0001YL-00@debian>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E1816J0-0001YL-00@debian>
> Here is the log of a repetible, wrong session of zsh:
>
> $ LANG=it_IT@euro zsh
> debian% a=4003
> debian% b=4
> debian% typeset -F 4 a
> debian% typeset -F 4 c
> debian% c=$((a/b))
> debian% print $c
> 75,0000
> debian% c=5.5
> debian% c=$((a/b))
> debian% print $c
> 1000.7500
> debian% exit
>
> And here is the correct one:
>
> $ LANG=C zsh
> debian% a=4003
> debian% b=4
> debian% typeset -F 4 a
> debian% typeset -F 4 c
> debian% c=$((a/b))
> debian% print $c
> 1000.7500
> debian% exit
>
> I think the problem reside in the fact that in italian we write
> 4003/4 = 1.000,75
Do we need another set of setlocale() calls somewhere?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author