This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 math/19594] New: [ldbl-128ibm] roundl incorrect in non-default rounding modes


https://sourceware.org/bugzilla/show_bug.cgi?id=19594

            Bug ID: 19594
           Summary: [ldbl-128ibm] roundl incorrect in non-default rounding
                    modes
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

The ldbl-128ibm implementation of roundl is incorrect in non-default rounding
modes.  Errors include incorrect signs of zero results, spurious overflow
exceptions, and other incorrect results; some examples follow.  I have a patch
for 2.24.

Failure: Test: round_downward (min_subnorm_value)
Result:
 is:         -0.00000000000000000000000000000000e+00 
-0x0.000000000000000000000000000p+0
 should be:   0.00000000000000000000000000000000e+00  
0x0.000000000000000000000000000p+0
 difference:  0.00000000000000000000000000000000e+00  
0x0.000000000000000000000000000p+0
 ulp       :  0.0000
 max.ulp   :  0.0000

Failure: round_downward (-max_value): Exception "Overflow" set
Failure: Test: round_downward (-max_value)
Result:
 is:         -inf  -inf
 should be:  -1.79769313486231580793728971405302e+308 
-0x1.fffffffffffff7ffffffffffff8p+1023

Failure: Test: round_downward (0.8)
Result:
 is:         -0.00000000000000000000000000000000e+00 
-0x0.000000000000000000000000000p+0
 should be:   1.00000000000000000000000000000000e+00  
0x1.000000000000000000000000000p+0
 difference:  1.00000000000000000000000000000000e+00  
0x1.000000000000000000000000000p+0
 ulp       :  40564819207303340847894502572032.0000
 max.ulp   :  0.0000

(Such errors appear rounding upward and to zero as well.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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