Forum Discussion
Altera_Forum
Honored Contributor
10 years ago@Demirayar. I also understand that you want to calculate arctan(x) using fixed point inputs x that is 16 bit wide. You have 2^16 possible inputs and 2^16 possible outputs.
First of all note that your function is symmetric w.r.t. 0. Hence you need to calclaute it only for x>0. This simplifies the work. I suggest to use a look up table that store coarse values (as a an example 2^10 values that are the exact values when the 6 LSB of your input are zero). To get the final value interpolate between two adjacent points. Note that your function is quite linear around zero and almost flat far from zero. it should be easy to approximate.