trig functions
Peter S. Shenkin
shenkin at cunixf.cc.columbia.edu
Thu Nov 15 02:40:36 AEST 1990
In article <9011131959.AA11389@> lmo at lsr-vax.UUCP ("Lance M. Optican - LMO") writes:
>From: "Allan R. Wilks" <uunet!ucbvax.berkeley.edu!alice!allan>
>> [[ cos(0) on sgi gives 1.11022e-16 ]]
>
>It is reasonable to expect the maht library to perform well! I
>tried Allan Wilks program on both Sun/3 and Sun/4 machines, and
>they both gave "0" as the difference between 1.0 and cos(0.0).
>Who at SGI is responsible for the math library? What standards
>of compatibility are enforced with other machine architectures?
Compatibility is not necessarily the issue, because it's possible to be
compatible with a lousy standard, and machine architectures probably have
less to do with it than the approximation algorithm being used. Wilks and
LMO are seeing something they don't like on the Iris, and something they
do like on the Sun. Before they cast stones, they should test cos(x) for
every possible double-precision of x ( :-) )and make sure they still
like the Sun version better. There's nothing about x=0 that is magic, and
that should make it give a more accurate value of cos(x) than any other
number. The classic criterion for a numerical approximation method is that
it give a maximum error less than some stated value over its entire
domain. Clearly, if 1.11022e-16 is less than the certified error, then this
value meets the criterion. There are other issues as well, such as
monotonicity, but certainly just the fact that ( cos(x) != 0. ) on
SGI is not troublesome to me.
-P.
************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb**************************
Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY 10027
(212)854-1418 shenkin at cunixc.cc.columbia.edu(Internet) shenkin at cunixc(Bitnet)
***"In scenic New York... where the third world is only a subway ride away."***
More information about the Comp.sys.sgi
mailing list