Hi,
I am using FastRTS DSP library, to do the arctan calculation. I checked the user guide, that atan2sp function call be used. I implemented this function into DSP, codes shown below.
float DSP_result = atan2sp(input_a, input_b);
However, I found the results of this function are wrong intermittently. I did 10 times calculations. The DSP results are shown below. May I know whether it is a known bug for this function or not? Could you tell me how to solve this problem? Thank you.
No | Input_a | Input_b | DSP_result | Correct_result | |||
0 | -576.171 | 158.69286 | -1.30203366 | -1.302033693 | |||
1 | -46.5937 | 451.34616 | -0.10286829 | -0.102868282 | |||
2 | 102.6404 | -588.7323 | 2.968986273 | -0.172606487 | |||
3 | 408.1201 | -198.5481 | 2.023581266 | -1.118011447 | |||
4 | 394.9116 | 448.46439 | 0.721985221 | 0.72198521 | |||
5 | -175.124 | -418.6664 | -2.74541903 | 0.396173583 | |||
6 | -577.437 | 153.9697 | -1.31021583 | -1.310215747 | |||
7 | -282.481 | 355.22577 | -0.67181683 | -0.671816819 | |||
8 | 107.8062 | -587.8464 | 2.960216522 | -0.181376247 | |||
9 | 450.763 | 53.286163 | 1.453129172 | 1.453129148 |