Bug 165525 - Inconsistency in behaviour with the presence of a double sign (operation, number), as with = - -1 and = - -1^2
Summary: Inconsistency in behaviour with the presence of a double sign (operation, num...
Status: RESOLVED DUPLICATE of bug 114929
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-01 13:05 UTC by Moreno
Modified: 2025-03-01 16:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moreno 2025-03-01 13:05:57 UTC
Description:
Hello

The problem is similar to this old bug report
https://bugs.documentfoundation.org/show_bug.cgi?id=114929
I got there just by playing with -3^2.

There is an inconsistency in the management of the double sign (operation sign and number sign).
= - -1 is interpreted by LibreOffice as = 0 - -1 and the result is correct and is +1.
Writing instead = - -1^2 the result is still +1 and is wrong, if instead I write = 0 - -1^2 the answer is correctly -1, It's as if when there is an exponentiation the first sign is completely ignored.


It is not a serious problem but certainly an inconsistent behaviour.

Bye, Moreno

Steps to Reproduce:
1.= - -1  OK
2.= 0 - -1 OK
3.= - -1^2 Wrong
4.= 0 - -1 OK

Actual Results:
+1
+1
+1 <<<
-1

Expected Results:
+1
+1
-1 <<<
-1


Reproducible: Always


User Profile Reset: No

Additional Info:
--
Comment 1 Moreno 2025-03-01 13:11:56 UTC
Sorry, a mistake
4.= 0 - -1^2 OK
Comment 2 m_a_riosv 2025-03-01 16:43:18 UTC

*** This bug has been marked as a duplicate of bug 114929 ***