[Libreoffice-bugs] [Bug 44076] =(-8)^(1/3) should return -2
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Aug 11 23:17:20 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=44076
Jean-Baptiste Faure <jbfaure at libreoffice.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbfaure at libreoffice.org
--- Comment #21 from Jean-Baptiste Faure <jbfaure at libreoffice.org> ---
Why did you implement mathematical inconsistency in Calc? Because MS did the
same in Excel?
Now a^b != exp(b*ln(a))
And computing (-8)^x with x -> 1/3 gives
0,3 #NUM !
0,33 #NUM !
0,333 #NUM !
0,3333 #NUM !
0,33333 #NUM !
0,333333 #NUM !
0,3333333 #NUM !
0,33333333 #NUM !
0,333333333 #NUM !
0,3333333333 #NUM !
0,33333333333 #NUM !
0,333333333333 #NUM !
0,3333333333333 #NUM !
0,33333333333333 #NUM !
0,333333333333333 -2
The last result is wrong because 0,333333333333333 != 1/3
Even better:
0,333333333333334 -2 :-(
And the function f(x) = (-8)^x is not continuous.
You are confusing cubic root and the exponentiation function. a^b is not
defined for a ≤ 0
I am interesting to know a use case where we have to compute the cubic root of
a negative number without knowing in advance that the number is negative.
Best regards. JBF
--
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/20210811/08a410c1/attachment.htm>
More information about the Libreoffice-bugs
mailing list