bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk number to string bug


From: Andrew J. Schorr
Subject: Re: gawk number to string bug
Date: Fri, 23 Dec 2005 18:58:42 -0500
User-agent: Mutt/1.4.1i

On Fri, Dec 23, 2005 at 05:20:57PM -0500, Andrew J. Schorr wrote:
> So do we need to truncate before calling snprintf("%.0f")?  Is it well-defined
> what happens when a non-integral value is printed using "%d" in gawk?

I guess the right thing to do is probably to call double_to_int to truncate
the value.  The attached patch contains that change...

I'm still not clear on whether we need to do something about -0.0. 
Should that be printed as "0" or "-0"?

Regards,
Andy

Attachment: format_tree.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]