Without concern for rationale, it is part of the ODF 1.2 OpenFormula syntax that unary minus has precedence over all binary operators.
It is not uncommon for there to be such a rule in programming languages (C/C++, Java, and JavaScript, for example). Some languages that have an exponentiation operator (not that common) might have different precedence cases, so that A^-b might be either illegal or A^(-b) -a^b might be either (-a)^b or -(a^b), the second being the case for Fortran In Openformula both forms are legal and the unary - has higher precedence (is done first) over ^. It is unfortunate that the built-in Help defines the operators in Calc but it does not specify the precedence. - Dennis PS: There are times when INVALID and WON'T FIX are inappropriate responses. One can be taken as saying something about the submitter, the other says something about the developer, although WON'T FIX is appropriate for a trivial defect that has no serious consequences or for an implementation-specific case that will be preserved. My preference over INVALID is BY DESIGN (it is meant to be that way) and even SPECIFIED or TO SPEC or STANDARD (when it is required to be that way). -----Original Message----- From: Rory O'Farrell [mailto:ofarr...@iol.ie] Sent: Monday, May 27, 2013 05:21 AM To: dev@openoffice.apache.org Subject: Re: Question about: OpenOffice Calc. "=-1^2" like expressions On Mon, 27 May 2013 14:08:15 +0200 Andrea Pescetti <pesce...@apache.org> wrote: > Andre Fischer wrote: > > In any case, this is a problem with no good solution. > > Indeed. Before this becomes another 0 ^ 0... there is an issue for this, > it dates back to 2004 and it is marked invalid. That's it. > > https://issues.apache.org/ooo/show_bug.cgi?id=24271 > > If someone has strong feelings he can post comments there, even though I > don't believe that marking the issue as REOPENED would have any > practical effects. > > Regards, > Andrea. > I think whether this behaviour be mathematically correct or incorrect we must follow the behaviour of MS Excel. -- Rory O'Farrell <ofarr...@iol.ie> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org