Issue 35907 - absolute value bar in wrong place: "abs {...} ^2"
Summary: absolute value bar in wrong place: "abs {...} ^2"
Status: ACCEPTED
Alias: None
Product: Math
Classification: Application
Component: code (show other issues)
Version: OOo 1.1.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2004-10-21 03:24 UTC by marcdny1
Modified: 2013-08-07 14:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description marcdny1 2004-10-21 03:24:53 UTC
The following code will not place the absolute value bar (right hand one) 
before the power - it reverses them.

P_s = sum_n int_{(n-1) times   %pi times f_s + (f_s - f_m)} ^ {(n-1) times   %
pi times f_s + (f_s + f_m)} abs{ sinc^2(f) times S(f)  }  ^2   df
Comment 1 lohmaier 2004-10-21 20:29:09 UTC
confirming. I would expect the bar to appear before the ^2 as well.

Workaround:
put the abs{} statement in paranthesis as well, i.e. make it read
  { abs {...} } ^2 
or insert an empty argument before the ^2, e.g. make it read
  abs {...} {} ^2
(use either of those depending on where you want the 2 to be positioned - I'd
prefer the first one)
Comment 2 lohmaier 2004-10-21 20:34:19 UTC
To reproduce, you can take a simpler expression like "abs {5}^2"
while "abs {5}=5" works as expected (e.g. the "abs 5" is accepted as left
argument to the equal sign, this is inconsistent.
Comment 3 thomas.lange 2004-11-15 09:45:34 UTC
Set target to OOo 2.0
Comment 4 andreas.martens 2004-12-03 10:56:59 UTC
Set to target OOoLater due to lack of resources.
Comment 5 umr5174 2005-05-24 20:30:15 UTC
This happens to formulae as simple as abs{x}^2 , which is the same as abs x^2 .
These 2 formulae have to give the same result because braces are used in OOo
just to regroup terms.
This can be considered as a convention: power having priority over abs.
One can add brackets to get any desired order: {abs x}^2 .

To my mind, the real problem appears for
abs(x)^2 or fact(3)^2 or any function followed by a power
because the results here differ from the mathematical convention.
The problem is that OOo interprets all kinds of parentheses, braces, brakets and
 line couples the same way,
not acknowledging the special mathemtical meaning of parentheses to give
arguments to a function.

This should be corrected soon, if OpenOffice doesn't want to discourage formula
editor users. At least, it should be documented BEFORE OOo 2.0 release.