trig functions

Allan R. Wilks allan at alice.att.com
Tue Nov 13 02:48:57 AEST 1990


Is it reasonable to expect the cosine of (exactly) 0 to be (exactly) 1?

$ cat > a.c <<!
#include <math.h>
main()
{
	printf("%g\n", 1.0-cos(0.0));
}
!
$ cc a.c -lm
$ a.out
1.11022e-16
$ cc a.c -lm43
$ a.out
0

Allan R. Wilks
AT&T Bell Labs
allan at research.att.com



More information about the Comp.sys.sgi mailing list