This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: asinh() gives NaN on Linux/x86/glibc with optimization on
- To: mlist-egcs at nntp-server dot caltech dot edu
- Subject: Re: asinh() gives NaN on Linux/x86/glibc with optimization on
- From: Shimpei Yamashita <shimpei+usenet+ dot mil+ dot gov at BOFH dot submm dot caltech dot edu>
- Date: 23 Dec 1998 01:29:22 GMT
- Newsgroups: mlist.egcs
- Organization: Hummingbird Heaven
- References: <egcs.m0zsbnn-00038vC@ocean.lucon.org>
H.J. Lu <hjl@lucon.org> writes:
[me saying asinh of negative number gives wrong answer]
>
># gcc -v
>Reading specs from /usr/lib/gcc-lib/i586-pc-linux/egcs-2.91.60/specs
>gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
># gcc -O6 x.c
># a.out
>Input argument for asinh: -100
>asinh(-100.000000)=-5.298342
># ldd a.out
> libc.so.6 => /lib/libc.so.6 (0x40007000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
># ls -l /lib/libc.so.6
>lrwxrwxrwx 1 root root 26 Dec 11 08:16 /lib/libc.so.6 ->
>glibc-2.0-981211/libc.so.6
>
>I am running glibc 2.0.7 981211.
Hmm. That's funny. That's exactly what I did and I get NaN's for
answer. I'm using the version of glibc that came with RedHat 5.2, so
maybe that's the problem. OTOH, what kind of a bug in the library
would cause different optimizations in the *calling* program to give
different results?
BTW, where do I get the new snapshots of glibc? The snapshot
repository in ftp.kernel.org doesn't seem to be updated anymore.
--
Shimpei Yamashita <http://www.submm.caltech.edu/%7Eshimpei/>