This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I am seeing different results for a number of atan2 test cases: - math-atan2-005 math:atan2(-1, -0.0e0) actual: 3.14159265358979 expected: -math:pi() div 2 excel: 3.141592654 - math-atan2-006 math:atan2(+1, 0.0e0) actual: 0 expected: +math:pi() div 2 excel: 0 - math-atan2-007 math:atan2(-0.0e0, -1) actual: -1.5707963267949 expected: -math:pi() excel: -1.570796327 - math-atan2-008 math:atan2(+0.0e0, -1) actual: -1.5707963267949 expected: +math:pi() excel: -1.570796327 - math-atan2-009 math:atan2(-0.0e0, +1) actual: 1.5707963267949 expected: -0.0e0 excel: 1.570796327 - math-atan2-010 math:atan2(+0.0e0, +1) actual: 1.5707963267949 expected: +0.0e0 excel: 1.570796327
Please may you check your implementation. Some libraries including excel use atan2(x,y) where as our specification uses atan2(y,x). Does this account for the discrepancies?
As you had guessed, the library that I am using defines atan2(x,y). Thanks for pointing this out to me.