[Bug manual/32804] New: frexpl documentation concerning ldbl-128ibm

vincent-srcware at vinc17 dot net sourceware-bugzilla@sourceware.org
Wed Mar 19 17:15:17 GMT 2025


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

            Bug ID: 32804
           Summary: frexpl documentation concerning ldbl-128ibm
           Product: glibc
           Version: 2.41
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: vincent-srcware at vinc17 dot net
                CC: mtk.manpages at gmail dot com
  Target Milestone: ---

The manual/arith.texi file says about frexpl: "the return value multiplied by 2
raised to this exponent equals the original number @var{value}."

But this is not always correct in the case of ldbl-128ibm (a.k.a.
double-double), where a number is represented by the exact sum of 2
floating-point values of type double. sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
gives an example in a comment: "This can happen if the input was something
weird like 0x1p1000 - 0x1p-1000."

The reason is that the low component underflows. On this subject, see bug 16619
and bug 16740.

The behavior (at least the issue) should be documented.

For C2Y, it is suggested that the behavior be left unspecified in such cases,
just by changing "floating-point number" to "model floating-point number"
(because the problematic numbers are not part of the floating-point model
described in 5.2.5.3.3):
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3357.pdf

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


More information about the Glibc-bugs mailing list