Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!swbatl!texbell!moxie!texsun!sundc!newstop!exodus!exodus-bb!khb From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup) Newsgroups: comp.sys.sgi Subject: Re: trig functions (which "fail" on the Sun as well) Message-ID: Date: 16 Nov 90 01:01:53 GMT References: <9011131959.AA11389@> <43209@mips.mips.COM> Sender: news@exodus.Eng.Sun.COM Organization: Sun MegaSystems Lines: 33 In-reply-to: mark@mips.COM's message of 14 Nov 90 17:24:47 GMT In article <43209@mips.mips.COM> mark@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@Eng.Sun.COM | khb@chiba.Eng.Sun.COM SMI 2550 Garcia 12-33 | (415 336 2648) Mountain View, CA 94043