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 24091
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#448732: zsh: printf %g -0 outputs 0 instead of -0
- Date: Mon, 12 Nov 2007 14:30:22 +0000
- In-reply-to: <20071112142647.GL29405@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071031121911.GA2242@xxxxxxxxxxxxxxxxxxx> <20071031163838.GA21586@xxxxxxxxxxx> <20071106104620.17b5760c@news01> <20071112142647.GL29405@xxxxxxxxxxxxxxxxxxx>
Vincent Lefevre wrote:
> On 2007-11-06 10:46:20 +0000, Peter Stephenson wrote:
> > On Wed, 31 Oct 2007 12:38:38 -0400
> > Clint Adams <schizo@xxxxxxxxxx> wrote:
> > > I believe the gist is that since %g calls for a float, -0 should be
> > > parsed as negative zero.
> >
> > I tried the following patch, but on my system (Fedora 7 with glibc
> > glibc-2.6-4) strtod() returns the double value 0 (not -0) when parsing
> > the input "-0". I confirmed this with a standalone programme. It seems
> > pointless working around this in the shell.
>
> The bug in glibc's strtod() was fixed on 2007-08-03:
>
> revision 1.25
> date: 2007/08/03 16:45:24; author: drepper; state: Exp; lines: +4 -3
> (____STRTOF_INTERNAL): Properly handle -0.
Thanks, I committed the change in zh so the problem should go away
eventually.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author