Exact calulation of trigonometric functions

136 Views Asked by At

My question is a bit related to computer science and I am not quit sure if this place is a good one for it. Let me know if I should move it.

So as you know values of functions like sin or cosine can be irrationals, and also they are implemented thanks to Taylor expansions. So from these very reason we can not obtain exact values. Recently I heard about method of approximation which uses Pythagorean primitive triple (W.S. Anglin,1988) and Farey sequence used together to obtain rational approximation. Some more information can be find here and in this thread at math.stackexchange.

My question is if we can really gain something by using rational approximation? I have to say that I implemented it in C++ with GMP and looks like difference between functions from standard library and approximation starts on very far decimal place.

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, you can, on those hardware systems that have CPUs without floating-point units: you can do all your computations using only integers.

This question would fit better on https://scicomp.stackexchange.com/.