0
Completed

Greater resolution for trigonometric function

LPC 7 years ago in IQANdesign updated by Gustav Widén (System support) 7 years ago 5

Is it possible to have an update on the trigonometric functions?


I want to calculate the distance between geographical coordinates, but for that I need great precision on values returned by sin, cos and atan functions.


It says the minimal input for those functions is 0.1 degree, but in order to compute a legitimate value, there shouldn't be a minimal value other than 0.


Thanks for the feedback

Answer

+2
Answer

Have you considered using small angle approximation?


sin(theta) ≈ theta (in radians)


See https://en.wikipedia.org/wiki/Small-angle_approximation


James

GOOD, I'M SATISFIED
Satisfaction mark by LPC 7 years ago
+2
Answer

Have you considered using small angle approximation?


sin(theta) ≈ theta (in radians)


See https://en.wikipedia.org/wiki/Small-angle_approximation


James

+1

Yes this seems to work great if the angle is small enough.


Thank you James A!


LPC

Good to hear that the small angle approximation worked here.


Just to clarify the resolution for the sin() function for anyone else, this is the description in the IQANdesign user manual:

Operand resolution for trigonometric operators is at least 0.1°.

Result resolution is at least 3 decimals.