Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rutgers!cunixf.cc.columbia.edu!shenkin From: shenkin@cunixf.cc.columbia.edu (Peter S. Shenkin) Newsgroups: comp.sys.sgi Subject: Re: trig functions Message-ID: <1990Nov14.154036.1822@cunixf.cc.columbia.edu> Date: 14 Nov 90 15:40:36 GMT References: <9011131959.AA11389@> Organization: Columbia University Lines: 30 In article <9011131959.AA11389@> lmo@lsr-vax.UUCP ("Lance M. Optican - LMO") writes: >From: "Allan R. Wilks" >> [[ 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@cunixc.cc.columbia.edu(Internet) shenkin@cunixc(Bitnet) ***"In scenic New York... where the third world is only a subway ride away."***