![]() |
(FPGA) high throughput inverse tangent 2 input
Hello! I would just like to ask what is the effect of having a 'negative x' on the high throughput inverse tangent (2 input)? It's because when I have 'negative y' (and 'positive x'), the answer is correct. However, whenever I have 'negative x' (regardless of the sign of y), the answer would always be wrong. Thank you for your time!
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
|
Re: (FPGA) high throughput inverse tangent 2 input
*The output is not yet multiplied to pi so that it is expressed in pi radians. :)
input: y = 1, x = 2 output: 0.1482 (correct) input: y = -1, x = 2 output: -0.1482 (correct) input: y = 1, x = -2 output: 0.8542 (even the sign is wrong) input: y = -1, x=-2 output: -0.8518 (sign is again wrong and from my observation, it doesn't take into account the sign of x) |
Re: (FPGA) high throughput inverse tangent 2 input
1 Attachment(s)
Quote:
Starting from the +X axis and going counterclockwise, atan2 goes from 0 to +pi Starting from the +X axis and going clockwise, atan2 goes from 0 to -pi. |
Re: (FPGA) high throughput inverse tangent 2 input
ohh! sorry, sir, but can you please explain the last two cases :( I've tried manual calculation using calculator :(
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
Then read this article: http://en.wikipedia.org/wiki/Atan2 Then ask me a specific question and I'll gladly help. |
Re: (FPGA) high throughput inverse tangent 2 input
Hi! :D Now I understand :D THANK YOU VERY MUCH! :D
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
May I ask: What is your interest in atan2? Are you taking a math class, or are you using it for FRC? |
Re: (FPGA) high throughput inverse tangent 2 input
No, Sir. I'm using it in determining the phase of a signal given its I and Q data. :D
|
| All times are GMT -5. The time now is 18:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi