https://bugs.documentfoundation.org/show_bug.cgi?id=148488
Bug ID: 148488
Summary: Cals reporting an erroneous result in a formula
comprising a fractional power of a negative number
Product: LibreOffice
Version: 7.1.4.2 release
Hardware: x86-64 (AMD64)
OS: macOS (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
if you enter the following formula
=(-5)^x where x is 0.2 the reported result is 1.3797297..., which is wrong. The
true value is 1.116225 + 0.810985*i (a complex number)
The wrong result is reported for any negative number, provided the exponent is
0.2 (or 1/5). For any other exponent, Calc reports #NUM! error message, which
is OK, as the result is a complex number.
The error persists as long as the "y" in y^x is a negative number.
Steps to Reproduce:
1. Open calc and enter the following formula into any cell
2. =(-5)^0.2 1.3797297... is reported as a result
3. =(-5)^0.33
Actual Results:
2. 1.3797297... wrong
3. #NUM! correct (A result is a complex number)
Expected Results:
2. #NUM! (the formula evaluates to a complex number1.116225 + 0.810985*i and
only a real number can be displayed in the cell unless complex arithmetics is
used)
3. #NUM!
Reproducible: Always
User Profile Reset: No
Additional Info:
There's exactly the same bug in Excel (Excel 365, v. 16.57)
Google Sheets handle the calculation properly #NUM! with an explanatory note
"POWER evaluates to an imaginary number."
The number reported by Calc and Excel with exponent 0.2 is the absolute value
of the complex result.
--
You are receiving this mail because:
You are the assignee for the bug.