Trig. accuracy tests are often made worse with a degree to radian (and back) calculation too, so it's always good to know what the internal representation is and work with that if you want an extra digit or 2 accuracy. the calculations above introduce 6 extra conversions.
My old Imperial 99T calculator gives an error of 1.44 in the test above with 9 degrees (0.15708 rad), but converting 9° to radians (once), doing the sin(cos(tan... and back again then back to degrees gives a difference of ... zero.
So it might be interesting to do the conversion once, then do the sin(cos( ... and back again then convert back to degrees.
Then there's the difference between accuracy and precision, but that's another can of worms
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/