Bug 136387 - POWER function in Calc computes 0^0=1
Summary: POWER function in Calc computes 0^0=1
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 22:14 UTC by tsoukup
Modified: 2020-09-02 10:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tsoukup 2020-09-01 22:14:11 UTC
Description:
POWER function in Calc computes 0^0=1. In math, the computation 0^0 is undefined, it should be an error in result. It is math error. Let "a" to be a real number. If a!=0, then a^0=1.

Steps to Reproduce:
Use function =POWER(0;0)

Actual Results:
1

Expected Results:
an error


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
an error for this case
Comment 1 Regina Henschel 2020-09-02 08:52:27 UTC
The ODF standard says:
"POWER(0,0) is implementation-defined, but shall be one of 0,1, or an Error."
6.16.46, Part4, ODF 1.3

The term "implementation-defined" means, that the exact behavior is not specified, but the application has must document, which of the choices it uses.

From the beginning in OpenOffice 1, POWER(0;0) returned 1. Therefore I would not change it, because it would break existing documents.

But the documentation of the behavior of LibreOffice is missing. The page https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_implementation-defined_items#Functions is so designed, that the implementation-defined aspects of functions have to be documented in the online help. But that is missing for the function POWER. Therefore I set this as bug to component Documentation.

[BTW: It would be good to check, whether the other "implementation-defined" aspects of functions are documented.]
Comment 2 Commit Notification 2020-09-02 10:33:13 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/d9d73c9fcb86892de84ae870e09f380555a6fd5f

tdf#136387 POWER(0,0) = 1