View Single Post
  #4   Spotlight this post!  
Unread 21-01-2012, 21:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,072
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: (FPGA) high throughput inverse tangent 2 input

Quote:
Originally Posted by Betty Boop View Post
*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)
Those outputs are all correct. See attachment.

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.


Attached Thumbnails
Click image for larger version

Name:	atan2.png
Views:	19
Size:	24.6 KB
ID:	11500  

Last edited by Ether : 21-01-2012 at 21:48.
Reply With Quote