A solution to calculation of odd roots of negative numbers with Calc

Lionel Elie Mamane lionel at mamane.lu
Tue Jul 17 20:34:29 PDT 2012


On Tue, Jul 17, 2012 at 10:44:59PM +0200, Albert Thuswaldner wrote:
> On Tue, Jul 17, 2012 at 8:29 PM, marlon orlando barahona alvarez
> <ingmarov at gmail.com> wrote:

>> Is dificult add this correction to Calc? I have seen reports of this bug
>> with date 2004.

> I have read the bug report you mentioned:
> https://issues.apache.org/ooo/show_bug.cgi?id=37129

> and I tend to agree with the conclusion of comment 11 that it wold be
> wrong to alter the behavior of the POWER function for this particular
> case, (since there are multiple roots).

Hmm... There is only one *real* root, so it looks natural to me to
privilege it and return that one, because the function was passed a
real number as an argument, so it should interpret the world it is
supposed to operate it as narrowly as possible while still having a
solution: don't appeal to complex numbers if you don't have
to. Thinking like you do, we'd also have to remove sqrt() because
there are two roots, and how could it choose one of them?

-- 
Lionel


More information about the LibreOffice mailing list