This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug localedata/12394] New: thousands grouping bug when rounding requires an extra leading digit
- From: "ajschorr at alumni dot princeton.edu" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 12 Jan 2011 16:15:28 +0000
- Subject: [Bug localedata/12394] New: thousands grouping bug when rounding requires an extra leading digit
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12394
Summary: thousands grouping bug when rounding requires an extra
leading digit
Product: glibc
Version: 2.12
Status: NEW
Severity: normal
Priority: P2
Component: localedata
AssignedTo: libc-locales@sources.redhat.com
ReportedBy: ajschorr@alumni.princeton.edu
Created attachment 5191
--> http://sourceware.org/bugzilla/attachment.cgi?id=5191
C code to demonstrate the bug
The attached program printthou.c gives buggy results:
bash-4.1$ echo 999.999 999999.999 | printthou
1000.00
,000,000.00
The program is using printf with the format "%'.2f". As you can
see, those inputs expose bugs in the logic.
These inputs give the expected results:
bash-4.1$ echo 1000 1000000 | printthou
1,000.00
1,000,000.00
Regards,
Andy
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.