Algorithms for trigonimetric functions

Does any one know any good site where i can find algorithm how cos , sin , etc. fuctions are beeing calculated.Thnx for all the help.
[147 byte] By [Samuraya] at [2007-10-2 12:54:39]
# 1

Tried google? Topic hints: numerical math, interpolation

Tried reading the javadocs? They state that java's Math class is designed to provide the same results as a well known math library. They say that that library can be found here ftp://ftp.netlib.org/fdlibm.tar. Perhaps that might contain some pointers

DaanSa at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 2
Try Google on the words "CORDIC algorithm".And:sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9! ...cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! ...// and of course: tan(x) = sin(x) / cos(x)Good luck.
prometheuzza at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 3
Thnx for all the help...i ll try that.
Samuraya at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 4
BASICALLY WHAT IM LOOKING FOR ARE SOME ALGORITHMS FOR infinite Taylor series.
Samuraya at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 5

> BASICALLY WHAT IM LOOKING FOR ARE SOME ALGORITHMS FOR

> infinite Taylor series.

Taylor series:

sin(x) = SUM_{n=0..inf} ((-1)^n / (2*n+1)!) * x^(2*n+1)

cos(x) = SUM_{n=0..inf} ((-1)^n / (2*n)!) * x^(2*n)

prometheuzza at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 6
Thnx , thats what i need , but i wonder , how you can calculate current value in Taylor series out of previouse one?
Samuraya at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 7
Are you trying to calculate a term in a particular series from a previous term? Or are you looking for something like sin(x) = f(sin(x-a))?
DaanSa at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 8

Ya something like that....for example for sin(a) or something like that:

public static double sin(double x){

double border=0.00001;

double temp=x;

double count=1;

double sum=temp;

while(border<Math.abs(temp)){

count+=2;

temp=-temp*x*x/(count*(count-1));

sum+=temp;

}

return sum;

}

Something in this lines.>

Samuraya at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...
# 9
P.S.It would be great to have this methods for cos(x) tan(x) etc.I know that i could use Math class but still.
Samuraya at 2007-7-13 10:09:29 > top of Java-index,Other Topics,Algorithms...