Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#448732: zsh: printf %g -0 outputs 0 instead of -0
- X-seq: zsh-workers 24044
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#448732: zsh: printf %g -0 outputs 0 instead of -0
- Date: Wed, 31 Oct 2007 12:38:38 -0400
- Cc: Vincent Lefevre <vincent@xxxxxxxxxx>, 448732-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <20071031121911.GA2242@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Vincent Lefevre <vincent@xxxxxxxxxx>, 448732-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071031121911.GA2242@xxxxxxxxxxxxxxxxxxx>
I believe the gist is that since %g calls for a float, -0 should be
parsed as negative zero.
On Wed, Oct 31, 2007 at 01:19:11PM +0100, Vincent Lefevre wrote:
> vin:~> printf "%g %g\n" -0 -0.
> 0 -0
>
> whereas with the printf from the coreutils on etch:
>
> courge:~> /usr/bin/printf "%g %g\n" -0 -0.
> -0 -0
>
> (this will not work on sid due to the bug 448723, but this is a
> different bug since the zsh behavior is the same on any OS).
>
> Discussion:
> https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=11150
> https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=11151
> https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=11156
> https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=11159
> https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=11160
Messages sorted by:
Reverse Date,
Date,
Thread,
Author