[Bug math/23961] New: powf can overflow to inf without setting errno in non-nearest rounding mode

nsz at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Fri Dec 7 15:44:00 GMT 2018


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

            Bug ID: 23961
           Summary: powf can overflow to inf without setting errno in
                    non-nearest rounding mode
           Product: glibc
           Version: 2.27
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: nsz at gcc dot gnu.org
  Target Milestone: ---

powf(0x1.7ac7cp+5, 23) is 0x1.fffffep+127 in nearest rounding mode
powf(0x1.7ac7cp+5, 23) is inf in upward rounding mode
powf(-0x1.7ac7cp+5, 23) is -inf in downward rounding mode

they don't set errno because the internal threshold
that checks for overflow assumes nearest rounding.
(the final result is not checked for performance reasons.)

if glibc aims to support errno in non-nearest rounding
mode too then this should be fixed.

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


More information about the Glibc-bugs mailing list