Paul, You are correct. The Verilog-2005 LRM makes the same mixup. Although, as you say, it is mathematically correct, I will file an issue with P1800 to correct it there. Shalom > -----Original Message----- > From: owner-verilog-ams@server.eda.org [mailto:owner-verilog- > ams@server.eda.org] On Behalf Of Paul Floyd > Sent: Thursday, April 19, 2007 1:16 PM > To: verilog-ams > Subject: Confusing definition of atan2 > > Hi > > In section 4.2.2 of the LRM, atan2 is defined as > > atan2(x, y) Arc-tangent of x/y > > Mathematically, this is correct, but to me it seems more conventional > to > reverse the order of x and y. When I started learning trigonometry, I > was taught that tan is opposite over adjacent, or tan(t) = y/x, for a > triangle like > > /| > / | > / | y > /t | > ----- > x > > For the LRM definition, the triangle would have to be > > /| > / | > / | x > /t | > ----- > y > > which I find a bit confusing. > > In C, atan2 is declared as double atan2(double y, double x); > > Regards > Paul > -- > Dr Paul Floyd > Mentor Graphics Corporation > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Apr 19 03:48:37 2007
This archive was generated by hypermail 2.1.8 : Thu Apr 19 2007 - 03:48:41 PDT