bug-gnulib
[Top][All Lists]
Advanced

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

Re: *printf questions


From: Fred J. Tydeman
Subject: Re: *printf questions
Date: Thu, 05 Apr 2007 17:40:11 -0700 (PDT)

On Thu, 05 Apr 2007 18:30:06 -0600, Eric Blake wrote:

>However, he also raised the question as to whether "%010f" and "%010a" are
>supposed to output "       inf" (glibc does this) or "0000000inf" (FreeBSD
>does this).  Personally, I think that FreeBSD has a bug in this regard,

C99+TC1+TC2: 7.19.6.1 The fprintf function
Paragraph 6, discussion on the '0' flag:  ... leading zeros ...
are used to pad to the field width rather than performing space
padding, except when converting an infinity or NaN.

FreeBSD has a bug.
---
Fred J. Tydeman        Tydeman Consulting
address@hidden      Testing, numerics, programming
+1 (775) 358-9748      Vice-chair of J11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.





reply via email to

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