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/13886] New: floorl(-0x1.ffffffffffffffffffffffffff8p+105) returns -0x1.000000000000000000000000000p+106


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.


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