Can't get proper answer in tangent inverse method. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can't get proper answer in tangent inverse method.

//This is my tangent inverse method public double arcTan(double x) { double total=0; for(int i=1;i<=49;i++) { total=total+(power(-1,i+1)*power(x,(2*i)-1))/(2*i)-1; } return total; } //when I call It and try to find arcTan (3) it gives me 1.7493 but in calculator the value is 1.2490. Need Help

11th Oct 2017, 6:50 PM
Usama Zafar
Usama Zafar - avatar
1 Answer
+ 7
Could you please publish your code at the playground and link it here? The power method is missing.
12th Oct 2017, 4:59 AM
Tashi N
Tashi N - avatar