I tried with Taylor series but no good.
For angles less than 45 degrees, the code seem to work ok, but for larger angles the deviation is high.

I have decided to use interpolation with select.

Appreciate the help I got from this place.