Thursday, July 30, 2009

Hey for my computer science class we are using C++. I need help with finding the arc tangent w/out libraries.

Basically I have made a single c++ file that presents the user with a menu, calculates some math, and then option 4 of this menu is to allow the user to find the inverse tangent of an inputted number. We can not use any math libraries so we are given the polynomial:


arctan(x) = x - x3/3 + x5/5 - x7/7 + . . ., for |x| %26lt; 1


I have to make a loop to calculate this number, and I am completely lost, please help!

Hey for my computer science class we are using C++. I need help with finding the arc tangent w/out libraries.
Arctan is basically the inverse of tangent, so tan of (x,y) maps to arctan (y,x). If you take the term tan(x) = y, Arctan(y) = x. What you should do is split the term and store them in arrays and compute the individual values in the while loop, and then take the tangent of the value. I'm not 100% sure if this makes sense, I'm kinda tired.


No comments:

Post a Comment