Hi The C library atan returns: "Upon successful completion, these functions return the arc tangent of x in the range [-pi/2,pi/2] radians." And atan2 returns: " Upon successful completion, these functions return the arc tangent of y/x in the range [ -pi,pi ] radians." Note that the two domains are different Is the domain of the return value in Verilog-AMS defined? While I'm copying/pasting, C also defines a further set of rules for the atan2 return value wrt input values og +/-0, NaN and Inf (see below). Should Verilog-AMS behave in the same way? "If y is +/-0 and x is < 0, +/-pi is returned. If y is +/-0 and x is > 0, +/-0 is returned. If y is < 0 and x is +/-0, -pi/2 is returned. If y is > 0 and x is +/-0, pi/2 is returned. If x is 0, a pole error does not occur. If either x or y is NaN, a NaN is returned. If y is +/-0 and x is -0, +/-pi is returned. If y is +/-0 and x is +0, +/-0 is returned. For finite values of +/-y > 0, if x is -Inf, +/-pi is returned. For finite values of +y > 0, if x is +/-Inf, +/-0 is returned. For finite values of x, if y is +/-Inf, +/-pi/2 is returned. If y is +/-Inf and x is -Inf, +/-3pi/4 is returned. If y is +/-Inf and x is +Inf, +/-pi/4 is returned. If both arguments are 0, a domain error does not occur." 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.Received on Tue Feb 5 08:48:26 2008
This archive was generated by hypermail 2.1.8 : Tue Feb 05 2008 - 08:48:42 PST