66735
2006-06-26 07:24:03 +0000
amend brackets for inputs starting with number with algebraic sign
2013-08-07 15:12:27 +0000
1
1
2
Application
Calc
viewing
recent-trunk
All
All
CLOSED
DUPLICATE
26755
P5 (lowest)
Trivial
---
1
rainerbielefeld_ooo_qa
requirements
issues
pescetti
issues
FEATURE
---
---
6
oldest_to_newest
1711433
0
rainerbielefeld_ooo_qa
2006-06-26 07:24:03 +0000
In issue 24271 we found out that there seems to be some worrying concerning
correct interpretation of mathematical expressions starting with and only
containing an operation with a single number with algebraic sign like '=-2^4'
and similar. This would be more clearly if OOo would change that input '=-2^4'
to '=(-2)^4'
1711434
1
frank
2006-07-13 10:54:38 +0000
IMHO not a practicable way and unnecessary as the minus in '=-4^2' can't be
anything else as a simple marker for a negative number, so the result is
absolutly correct.
1711435
2
lcn
2006-08-10 17:42:13 +0000
IMHO, If auto change (like Gnumeric), the input =-4^2 should be automatically
change to =-(4)^2, following math software (R, Scilab, maxima,...) that result -16.
But in that case, all combination should be tested : -(4^2) ???...
1711436
3
lcn
2006-08-28 05:17:47 +0000
In Google, Have yous tried to type -4^2 ?
It resuts -(4^2) = -16.
1711437
4
discoleo
2006-10-26 23:32:53 +0000
Issue 24271 has been closed, but it is still a big BUG.
-4^2 = -16 !!! ALWAYS
Software, that does NOT conform to this is wrong.
You do not have in mathematics an "inverse sign" operator, therefore "-" is
really a minus before anything else.
* IF you want to raise the number "-4" to sqare, THEN you have to type: (-4)^2
* -4^2 = -(4^2) = -16
* -3! = -(3!)
* -x^2 = -(x^2) !!!!
** you never interpret -x^2 = (-x)*(-x) = x^2 !!!! FALSE
# the operators '^' AND '!' have highest left-side precedence (BUT NOT
right-sided, e.g. -2^3^4 = -2^(3^4)=-(2^(3^4)) )
R v2.4.0: -4^2 = -16
Octave v2.1.73: -4^2 = -16
(I will ask a collegue next week to test Mathematica, too)
1711438
5
discoleo
2006-11-09 11:20:06 +0000
I was told the results for *Mathematica* (v5.(x)):
It is as expected: -4^2 = -16 !!!
Mathematica is a reference program in mathematics, so this should be viewed as
written by the almighty. I do not have access to mathematica myself, but I am
confident that the person I asked, actually tested this (and did NOT tell me
what he thinks is correct).
As noted in a previous post, other mathematical software (like Scilab, maxima,
octave, R) interpret it the same way.
As I mentioned, you do *NOT* have an "inverse sign" operator in mathematics. "-"
is only the substraction. IF you want to specify the number "-4" you have to
type "(-4)" !!!! BASTA.
Why does gnumeric interpet it differently?
Interesting question and I believe the answer is as follows:
# -4^2 = -16 AND NOT +16, which is wrong
# BUT many spreadsheet users were used to get +16 in Excel,
# so gnumeric let those users calculate what they expected,
# BUT changed the syntax to be correct, so people NOT accustomed to this BUG
would know (and see) that it is NOT what they expect
So, I can only recommend that Calc adopts this same strategy. This way,
professionals can live with this bug, because Calc would tell them:
> when people who use this spreadsheet write =-4^2
> they usually mean =(-4)^2; so does Calc.
1711439
6
rcoo
2008-05-28 22:53:18 +0000
Similar isues :
http://www.openoffice.org/issues/show_bug.cgi?id=24271
http://www.openoffice.org/issues/show_bug.cgi?id=26755
Please close duplicates.
1711440
7
rcoo
2008-05-29 13:44:32 +0000
Here is the similar discussion for Gnumeric:
http://bugzilla.gnome.org/show_bug.cgi?id=115941
... with a sensible conclusion. Why wouldn't we do the same job ?
1711441
8
ooo
2008-06-02 14:26:26 +0000
Resolving this issue as duplicate of issue 26755 that now also has more details
and pointers. Please transfer your votes.
*** This issue has been marked as a duplicate of 26755 ***
1711442
9
ooo
2008-06-02 14:27:03 +0000
Closing dup.