Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#448732: zsh: printf %g -0 outputs 0 instead of -0



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