[Libreoffice-bugs] [Bug 143881] New: FORMULA: abs{x}^2 is formatted with unexpected operator precedence

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 14 22:01:06 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143881

            Bug ID: 143881
           Summary: FORMULA: abs{x}^2 is formatted with unexpected
                    operator precedence
           Product: LibreOffice
           Version: 7.1.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Formula Editor
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mathematikus at gmx.de

Description:
When generating a formula with the content abs{x}^2 it is formated like |x²|
and not as expected like |x|².

Steps to Reproduce:
1. open LO impress (or LO writer)
2. generate a new formula object, e.g. via the menu "Insert" - "Object" -
"Formula..."
3. type the following code: abs{x}^2 
3b. alternativly: click onto the |o| icon in the "functions" category of the
GUI sidebar. Afterwards complete the suggested code fragment "abs{<?>}" to the
formula wanted: "abs{x}^2".
4. leave the formular editor to see the layouted result of this formula

Actual Results:
This formula is displayed as: |x²|

Expected Results:
I expected the curly brackets to "stick" the x to the abs function. Therefore I
expected the result to look like this: |x|²


Reproducible: Always


User Profile Reset: No



Additional Info:
I suggest to change the operator precedence in this case, such that the curly
brackets after the "abs" keyword stick the content of those brackets inside the
argument of the abs function. Then this would behave in the same way as
"log(x)^2".

Alternativly I suggest to change the output of the formula GUI sidebar to "abs
<?>" instead of "abs{<?>}". Removing the curly brackets form the suggested text
string would show me as user that I should not expect abs to behave like other
functions with argument (e.g. like the above log), but that I should care
myself to properly put bracket around, to achieve what I want.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210814/654b7ae4/attachment.htm>


More information about the Libreoffice-bugs mailing list