This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/20909] New: incorrect floating point format


In some locales, certain floating point numbers are printed incorrectly. (I
think the problem lies with numbers with one significant digits, in scientific
format, with a thousands separator and thousands grouping.)

For example:

#include <iostream>
#include <locale>
#include <ostream>

int main()
{
  std::wcout.imbue(std::locale("en_US"));
  std::wcout << 2e10 << '\n';
}

Prints "2e,+10".

-- 
           Summary: incorrect floating point format
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cpp at tempest-sw dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]