https://bz.apache.org/bugzilla/show_bug.cgi?id=62121
Bug ID: 62121
Summary: Calculating the power of a negative number with a
fracture fails (for example -2^(1/3))
Product: POI
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 35735
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35735&action=edit
Excel that includes the formula that is giving the issue
The resolution of formula "=-2^(1/3)" happens in 2 steps:
1: Calculate 1/3
2: Calculate -2 ^ 0.333....
This calculation gets performed by the standard java util function
Math.pow(double a, double b). Math.pow returns NaN if a is a negative number
and b is a decimal number. Excel however can execute this.
The solution to this problem is to alter the calculation that happens. We can
alter the calculation is "-1 * (2 ^ 0.333..)" which is functionally the same
but is supported by Math.pow().
I will try to put together a patch somewhere this week to resolve this issue.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]