Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | amend brackets for inputs starting with number with algebraic sign | ||
---|---|---|---|
Product: | Calc | Reporter: | Rainer Bielefeld <rainerbielefeld_ooo_qa> |
Component: | viewing | Assignee: | requirements <requirements> |
Status: | CLOSED DUPLICATE | QA Contact: | issues@sc <issues> |
Severity: | Trivial | ||
Priority: | P5 (lowest) | CC: | issues, pescetti |
Version: | recent-trunk | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | FEATURE | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Rainer Bielefeld
2006-06-26 07:24:03 UTC
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. 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) ???... In Google, Have yous tried to type -4^2 ? It resuts -(4^2) = -16. 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) 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.
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. 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 ? 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 *** Closing dup. |