Bug#448527: libc6: hypotf underflows for small inputs
Package: libc6
Version: 2.3.6.ds1-13
Severity: normal
The hypotf function in libm produces incorrect results for the code
below.
Comparing Debian 4 glibc source with current upstream source code shows
a change in the constants used for bit fiddling in the function. It
should be possible to backport the fix.
Current implementation on Debian 4 produces a result of 0 instead of
2.009718e-14.
#include <math.h>
#include <stdio.h>
int main() {
float a,b,c;
a = -1.81341284e-16;
b = 2.00963666e-14;
c = hypotf(a,b);
printf("result of hypotf(%e,%e) is %e.\n", a, b, c); }
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages libc6 depends on:
ii tzdata 2007b-1 Time Zone and Daylight
Saving Time
libc6 recommends no packages.
-- no debconf information
Reply to: