Skip to content
Prev 66667 / 398502 Next

strange result of acos

On 29-Mar-05 Ted Harding wrote:
Just to make more explicit what's happening here:

t<-0.01*(0:200)*pi

sin(t)^2 + cos(t)^2 -1
##[output omitted]

unique(sin(t)^2 + cos(t)^2 -1)
##[1]  0.000000e+00 -1.110223e-16  2.220446e-16

2^(-53)
##[1] 1.110223e-16

so the error is either +2^(-52) or -2^(-53)

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 29-Mar-05                                       Time: 12:27:11
------------------------------ XFMail ------------------------------