[Bug math/13886] New: floorl(-0x1.ffffffffffffffffffffffffff8p+105) returns -0x1.000000000000000000000000000p+106

schwab@linux-m68k.org sourceware-bugzilla@sourceware.org
Wed Mar 21 15:20:00 GMT 2012


http://sourceware.org/bugzilla/show_bug.cgi?id=13886

             Bug #: 13886
           Summary: floorl(-0x1.ffffffffffffffffffffffffff8p+105) returns
                    -0x1.000000000000000000000000000p+106
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: sjmunroe@us.ibm.com
        ReportedBy: schwab@linux-m68k.org
    Classification: Unclassified


$ cat floor.c
#include <float.h>
#include <math.h>
#include <stdio.h>

int
main (void)
{
  long double x = -0x1.ffffffffffffffffffffffffff8p+105L;
  long double ld = floorl (x);
  printf ("floor (%.*La) = %.*La\n",
      LDBL_MANT_DIG / 4 + 1, x, LDBL_MANT_DIG / 4 + 1, ld);
}
$ gcc -m32 floor.c -lm -o floor32
$ gcc -m64 floor.c -lm -o floor64
$ ./floor32
floor (-0x1.ffffffffffffffffffffffffff8p+105) =
-0x1.ffffffffffffffffffffffffff8p+105
$ ./floor64
floor (-0x1.ffffffffffffffffffffffffff8p+105) =
-0x1.000000000000000000000000000p+106

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list