trig functions (which "fail" on the Sun as well)

Keith Bierman fpgroup khb at chiba.Eng.Sun.COM
Fri Nov 16 12:01:53 AEST 1990



In article <43209 at mips.mips.COM> mark at mips.COM (Mark G. Johnson) writes:

...
   Conclusion: don't be irate about noise-in-the-LSB when the argument
   is 0*PI; there's inaccuracy elsewhere too.


   $ a.out
   approx PI/4:  w = 7.853982e-01
       sine of that:  x = 7.071068e-01
	   delta between x and sqrt(1/2):  y = 1.110223e-16
	   delta between x and sqrt(1/2):  z = 1.110223e-16 (method 2)
....

And with C1.0

chiba:/net/chiba/home2/khb>cc -fast sgi2.c && a.out
approx PI/4:  w = 7.853982e-01
    sine of that:  x = 7.071068e-01
        delta between x and sqrt(1/2):  y = 1.110223e-16
        delta between x and sqrt(1/2):  z = 1.110223e-16 (method 2)


IEEE 754 does not require correctly rounded results for trig nor for
data conversions. Some folks are striving very hard to get "nearly
correctly rounded results" sorry for the inconvience along the way.
--
----------------------------------------------------------------
Keith H. Bierman    kbierman at Eng.Sun.COM | khb at chiba.Eng.Sun.COM
SMI 2550 Garcia 12-33			 | (415 336 2648)   
    Mountain View, CA 94043



More information about the Comp.sys.sgi mailing list