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

Albert Thuswaldner albert.thuswaldner at gmail.com
Tue Jul 17 13:44:59 PDT 2012


Hi,

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).

I think it would be better to use the proposed workaround:

SIGN(X)*ABS(X)^(1/3)
or
SIGN(X)*POWER(ABS(X), 1/3)

this is more "honest" since you with this expression explicitly state
that you want the the real cubic root.

In the end I'm not an Calc core developer, I'm CC-ing the list, see
what the others have to say about this.

/Albert

> 2012/7/16 marlon orlando barahona alvarez <ingmarov at gmail.com>
>>
>> Oh, I forgot to mention that I tried with index (1/5), (1/7) and Calc work
>> perfectly.


More information about the LibreOffice mailing list