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 c/53319] New: exact subtract of two decimal floating-point values raises FE_INEXACT


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

             Bug #: 53319
           Summary: exact subtract of two decimal floating-point values
                    raises FE_INEXACT
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tydeman@tybor.com


Code similar to
  _Decimal64 res1, val = 0.9999999999999999DD /* 16 9s */
  res1 = val;
  res1 = res1 - val;  /* exactly zero */
raises FE_INEXACT when in fact the result is an exact zero.


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