View Bug Activity | Format For Printing
Host system: Debian unstable with GCC 4.1.0 compiling glibc 2.4-2006032009.tar.bz2 testing float (without inline functions) Failure:Test: llrint_downward (-0.2) == -1 Result: is: 0 should be: -1 Failure:Test: llrint_upward (0.2) == 1 Result: is: 0 should be: 1 Test suite completed: 2811 test cases plus 2513 tests for exception flags executed. 2 errors occurred. I have found that a simple test program - built with the normal glibc that Debian-unstable ships - won't work either: #include <fenv.h> #include <math.h> #include <stdio.h> int main(void) { printf("%d\n", fesetround(FE_DOWNWARD)); // says 0 printf("%f\n", llrint(-.2L)); // says 0 } Which makes me think whether this could be a limitation of the CPU? (UltraSPARC II, codename per /proc/cpuinfo: "TI Blackbird")
I believe there is a generic bug in the C versions of lrint* and llrint*; the same failures appear on MIPS64. I am testing a patch.
Patch submitted: http://sourceware.org/ml/libc-alpha/2006-06/msg00069.html
Should be fixed in cvs.
*** Bug 5547 has been marked as a duplicate of this bug. ***