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/16619] New: [ldbl-128ibm] frexpl bad results on some denormal arguments


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

            Bug ID: 16619
           Summary: [ldbl-128ibm] frexpl bad results on some denormal
                    arguments
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
              Host: powerpc*-*-linux*

ldbl-128ibm frexpl generates bad results on some arguments where there is a
large gap between the exponents of the high and low parts.

#include <math.h>
#include <stdio.h>

union u { long double ld; double d[2]; };

int
main (void)
{
  union u x, y;
  int i;
  x.d[0] = 0x1p127;
  x.d[1] = 0x1p-1074;
  y.ld = frexpl (x.ld, &i);
  printf ("%d %a %a\n", i, y.d[0], y.d[1]);
  return 0;
}

prints

128 0x1p-1 -0x1p+846

(that's a valid input long double producing an invalid output long double).

I believe this is causing large errors of clog10l seen in glibc testing (hypotl
produces such long doubles, then clog10l passes them to log10l which uses
frexpl).

-- 
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]