-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: ODF 1.2
-
Fix Version/s: ODF 1.3
-
Component/s: Graphics, Part 3 (Schema) [1.2: 1]
-
Labels:None
-
Proposal:
The arguments of atan2 are specified in the order x,y. But the applications Apache OpenOffice, Symphony, LibreOffice, Calligra Stage, PowerPoint Preview 2013 use it in the order atan2(y,x).
The order (y,x) is common for programming languages too.
Does anyone know an application, that has implemented it in the order (x,y)?
If not, I suggest to change it in ODF1.2 Errata.
Funny, I automatically thought it was ATAN2(x,y) where it is the arctangent of y/x (or complex(x,y) if you prefer).
But I see that has not been the case in programming languages for as long as ATAN2(y,x) has been defined (starting in FORTRAN, continuing through C, etc.). I must have been aware of the FORTRAN parameter order (having been on the ANSI TC) but it fell out of my brain.
It is interesting that the programming language definition for atan2(y,x) is the common implementation, but the description in ODF 1.2 contradicts that. I also note that although atan2 is defined in the syntax for draw:formula in ODF 1.0/1.1, there is no definition for the function whatsoever in those versions of the specification.
It would seem that this is a specification error in the addition of details that was made from ODF 1.0 to ODF 1.2.
For further amusement: In ODF 1.2 OpenFormula and OOXML, the definition is for ATAN2(x,y) and that is how implementations work, in LibreOffice, Apache OpenOffice, Excel, except that the ODF spreadsheet implementations have ATAN2(0,0) = 0 where Excel produces #DIV/0!