Originally Posted by

**Geoff M** Hi all,

I have a question regarding the accuracy of trig functions with regard to computer programming.

Do the accuracy of trig functions change as the angle approaches the function's asymptotes?

For example; would the angle returned by arctan be less accurate for say a triangle with height 100000 and width .0000001 than say a triangle with height 10 and width 10. What I'm steering towards here is that as the function reaches it's asymptote does the accuracy reduce?

Likewise I'm wondering (but perhaps it's not as relevant) with Sin and Cos as they reach their maximum and minimum values of +1 and -1 do they lose accuracy as the function flattens out (as the derivate reaches zero).

Also with respect to computer programming we're using floating point calculations which have inherent inaccuracies. Does anyone have any thoughts on how this might all tie together?

In my early programming I used to construct static tables for performing integer math on sin (scaled up by 10000 etc or a power of 2) so I could do fast lookups, but I always avoided using tan lookups because of the amyptototes and thought I could not perform the integer math effectively.

Again any thoughts?