This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2194] printf: meaning of precision for 'd', 'i', 'o', 'u', 'x', 'X' directives
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Jan 2006 17:29:46 -0000
- Subject: [Bug libc/2194] printf: meaning of precision for 'd', 'i', 'o', 'u', 'x', 'X' directives
- References: <20060123151149.2194.bruno@clisp.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From bruno at clisp dot org 2006-01-23 17:29 -------
(In reply to comment #3)
> The precision and the width are the same concepts
They are the same concepts for the %s and %S conversion specifiers, not for
the others. See http://www.opengroup.org/susv3/functions/fprintf.html
> The number of digits is achieved by padding it with zero.
The sample program specifies a precision of 10. According to POSIX the
precision is the minimum amount of digits. Yet glibc outputs strings like
"01.234.567" which has only 8 digits.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2194
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.