0
Java code to calculate cos(x)
in cosine series we have take summation from k=0 to k=infinity. for. x^k/k! how to limit k from 0 to infinity ?
1 Odpowiedź
+ 2
A sum till infinity is just a mathematical concept –you cannot effectively iterate till infinity. Instead, set a tolerance like t=.00001 (for example), and keep on adding till the difference between the previous sum and the actual sum is less than (in absolute value) that tolerance value.