Bug 138996 - Are FLOSS doomed to be buggy because famous closed sources software are (just for the sake of compatibility)??
Summary: Are FLOSS doomed to be buggy because famous closed sources software are (just...
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-17 14:40 UTC by LI AR
Modified: 2020-12-17 15:07 UTC (History)
0 users

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 LI AR 2020-12-17 14:40:15 UTC
Hi,

I just stumbled into a strange behaviour in LibreOffice Calc, which returned a false result after I evaluated a long formula. Simplifying the formula, I discovered that the problem can be resumed to inserting "-4^2" in a cell and getting a different results than inserting "0-4^2". I was quite astonished!!!

Looking for an explanation, I found this:
https://en.wikipedia.org/wiki/Order_of_operations#Unary_minus_sign

So in the end, the conclusion is the LibreOffice is buggy because M$ Excel is and because Calc is trying to be as compatible as possible with M$ Excel it HAS to be buggy.

This raised a general question: are all the FLOSS apps doomed to be buggy, just because famous closed-source software are? For instance, should we voluntarily introduce bugs in the Linux kernel just because Wine need to work exactly like M$'s kernel?!??

PS: For the curious ones, the operator's precedence are (quite) well defined mathematically, so YES Excel IS buggy (should I say "again"?):
https://www.youtube.com/watch?v=tYf3CpbqAVo [in French]
https://fr.wikipedia.org/wiki/ISO/CEI_80000-2
https://people.engr.ncsu.edu/jwilson/files/mathsigns.pdf
Comment 1 Mike Kaganski 2020-12-17 15:07:40 UTC
First of all, this is an invalid issue. Its question ("Are FLOSS doomed to be buggy because famous closed sources software are (just for the sake of compatibility)??") has nothing to do with problems that bug tracker is used for.

Then, it is wrong when (emotionally) discussing *correct* behavior of LibreOffice (and Excel). In "-4^2", the unary minus is not an operation, it is *part of mathematical notation for negative numbers*, while in "0-4^2", the minus is a binary operation that has its precedence relative to other math operations. And no, it's wrong to think that three different things (minus as part of negative number notation; minus as unary negation - as in -(2+5); and minus as binary subtraction operation) have the same rules of application / precedence. When used as part of negative number notation, it is considered prior to *any* operation you might want to apply to the negative number.

It's a different thing that users sometimes don't know math well enough; there is tdf#114929 that suggests automatic bracketing for this.