Bug#578316: libc6: tanh(50000+50000i) gives invalid result

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug#578316: libc6: tanh(50000+50000i) gives invalid result

Thomas Weber-8
Package: libc6
Version: 2.10.2-6
Severity: normal


the value of tanh(50000 + 50000I) should be (close to) (1,0). However,
with the attached file trig.cc, I get

libc version 2.10.2
arg       (50000,50000)
sinh(arg) (-inf,-inf)
cosh(arg) (-inf,-inf)
s/c       (nan,nan)
tanh(arg) (nan,0)

This came up on the GNU Octave list, see

I also tried 2.11 from experimental, same problem.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin                      2.10.2-6   Embedded GNU C Library: Binaries
ii  libgcc1                       1:4.4.3-7  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]         1.5.32     Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.10.2-6   Embedded GNU C Library: National L

-- debconf information excluded

trig.cc (536 bytes) Download Attachment