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 debug/83861] New: sscanf %lg conversion bug


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83861

            Bug ID: 83861
           Summary: sscanf %lg conversion bug
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: albertmcchan at yahoo dot com
  Target Milestone: ---

double x;
sscanf("6.2e-323", "%lg", &x);

x were set to 6e-323, which was 1 ULP short

correct value should be 6.4e-323

this bug failed even with the latest gcc 7.1 that comes with
Strawberry Perl 5.26.1.1 32-bits for Windows

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