449,307 Members | 2,120 Online
Need help? Post your question and get tips & solutions from a community of 449,307 IT Pros & Developers. It's quick & easy.

# Making Arctan function with CORDIC algorithms

 P: 10 i`m doing thesis about comparing calculation of arctan by polynomial and CORDIC. I`ve read a lot of journal and books about CORDIC and this is what i understand. 1. make x and y 2. make iterations 3. process with cordic calculation 4. the arctan result is calculating by arctan(y/x). what i m confused that in cordic equation there`s Zi=Zo-arctan(2^-i) i can do Z=0 , but how can i get arctan(2^-i) values? from what i m reading that it come from arctan tables? how can i make arctan tables? and let say i m looking arctan(0.1) = ... is that mean that i have to set the X=1 and the Y =0.1 ??? i m not that good in programming. anyone can help me? ps. i`m using borland c++ builder Feb 5 '07 #1
4 Replies

 Expert 100+ P: 1,510 i`m doing thesis about comparing calculation of arctan by polynomial and CORDIC. I`ve read a lot of journal and books about CORDIC and this is what i understand. 1. make x and y 2. make iterations 3. process with cordic calculation 4. the arctan result is calculating by arctan(y/x). what i m confused that in cordic equation there`s Zi=Zo-arctan(2^-i) i can do Z=0 , but how can i get arctan(2^-i) values? from what i m reading that it come from arctan tables? how can i make arctan tables? and let say i m looking arctan(0.1) = ... is that mean that i have to set the X=1 and the Y =0.1 ??? i m not that good in programming. anyone can help me? ps. i`m using borland c++ builder which cordic equation are you using to determine arctan()? do you have a reference? arctan can take two parameters, the X and Y coordinates, e.g. atan2() http://cplusplus.com/reference/clibrary/cmath/atan2.html or one parameter X / Y, e.g. atan() http://cplusplus.com/reference/clibrary/cmath/atan.html Feb 5 '07 #2

 P: 10 which cordic equation are you using to determine arctan()? do you have a reference? arctan can take two parameters, the X and Y coordinates, e.g. atan2() http://cplusplus.com/reference/clibrary/cmath/atan2.html or one parameter X / Y, e.g. atan() http://cplusplus.com/reference/clibrary/cmath/atan.html i`m counting arctan for one parameter using this equation xi+1=xi+ - yi*2^-i yi+1=yi+ - xi*2^-i Zi+1=Zi+ - arctan (2^-i) the plus n minus is depend on the Y value Feb 5 '07 #3

 Expert 100+ P: 1,510 i`m counting arctan for one parameter using this equation xi+1=xi+ - yi*2^-i yi+1=yi+ - xi*2^-i Zi+1=Zi+ - arctan (2^-i) the plus n minus is depend on the Y value have you seen http://www.voidware.com/cordic.htm Feb 5 '07 #4

 P: 10 have you seen http://www.voidware.com/cordic.htm thanks you a lot, it help me very much Feb 7 '07 #5