Complex arg-trig functions

Stephen Montgomery-Smith stephen at missouri.edu
Wed Sep 19 03:48:43 UTC 2012


On 09/18/2012 01:19 AM, Bruce Evans wrote:
> On Mon, 17 Sep 2012, Stephen Montgomery-Smith wrote:

>> I don't think your code works.  It should be ry = atan2f(2, -ay) / 2,
>> not ry = atan2f(2, ay) / 2.
>
> Only logically.  As I explained, the negation makes no difference to the
> result, but of course takes longer, so I removed it.

No, they give different results.  atan2(y,x) = Pi - atan2(y,-x) if y is 
positive.



More information about the freebsd-numerics mailing list