public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/12394] New: thousands grouping bug when rounding requires an extra leading digit
@ 2011-01-12 16:15 ajschorr at alumni dot princeton.edu
  2011-01-12 16:18 ` [Bug localedata/12394] " ajschorr at alumni dot princeton.edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ajschorr at alumni dot princeton.edu @ 2011-01-12 16:15 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-27 12:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 16:15 [Bug localedata/12394] New: thousands grouping bug when rounding requires an extra leading digit ajschorr at alumni dot princeton.edu
2011-01-12 16:18 ` [Bug localedata/12394] " ajschorr at alumni dot princeton.edu
2011-01-12 16:48 ` eblake at redhat dot com
2011-01-12 22:14 ` bruno at clisp dot org
2011-01-12 22:17 ` [Bug libc/12394] " bruno at clisp dot org
2011-01-13  0:43 ` drepper.fsp at gmail dot com
2011-01-13  1:39 ` drepper.fsp at gmail dot com
2014-06-27 12:30 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).