This is the mail archive of the libc-help@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]

Re: Interaction between rounding direction and trigonometric functions


Hi Ho!

--- On Sat, 9/6/08, "Pete Eberlein" <eberlein@linux.vnet.ibm.com> wrote:

> Also, here are the results for SLES10 SP1, Power6, using Advance
> Toolchain GLIBC 2.8, GCC 4.3.1, again very wrong:
> 
> theta = 5.27906
> sin(theta) = -0.843695
> cos(theta) = 0.536822
> Repeating after setting the rounding direction to UPWARD:
> theta = 5.27906
> sin(theta) = -0.0702948
> cos(theta) = 9.55255

It works okay with me here, I guess.

eus@experimental:~/glibc$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.6
eus@experimental:~/glibc$ cat /etc/slackware-version
Slackware 10.2.0
eus@experimental:~/glibc$ /lib/libc.so.6
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.6.
Compiled on a Linux 2.4.31 system on 2005-09-10.
Available extensions:
	GNU libio by Per Bothner
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	linuxthreads-0.10 by Xavier Leroy
	BIND-8.2.3-T5B
	libthread_db work sponsored by Alpha Processor Inc
	NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
eus@experimental:~/glibc$ g++ -Wall bug2.cc
eus@experimental:~/glibc$ ./a.out
theta = 5.27906
sin(theta) = -0.843695
cos(theta) = 0.536822
Repeating after setting the rounding direction to UPWARD:
theta = 5.27906
sin(theta) = -0.843695
cos(theta) = 0.536822
eus@experimental:~/glibc$ 

Best regards,
Eus


      


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