Path: utzoo!utgpu!news-server.csri.toronto.edu!eecg.toronto.edu!drb Newsgroups: comp.sys.sgi From: drb@eecg.toronto.edu (David R. Blythe) Subject: Re: trig functions Message-ID: <1990Nov16.220719.22567@jarvis.csri.toronto.edu> Keywords: math library Organization: EECG, University of Toronto References: <11609@alice.att.com> Date: 17 Nov 90 03:07:19 GMT Lines: 13 In article <11609@alice.att.com> allan@alice.att.com (Allan R. Wilks) writes: > >Is it reasonable to expect the cosine of (exactly) 0 to be (exactly) 1? No it is not. Its reasonable to expect a result which meets the accuracy specification for that routine. In the case of libm43 cos() has an accuracy of one unit in the last place (1 ulp) which for ieee double precision is 1.1e-16. This is documented in the intro manual pages for the math library (i.e man math). The faster cody&waite implementation of cos() in the libm library has an accuracy of 2 ulps. -drb drb@clsc.utoronto.ca