https://issues.apache.org/ooo/show_bug.cgi?id=114430

--- Comment #21 from Pedro Giffuni <[email protected]> ---
(In reply to comment #20)
> (In reply to comment #19)
> > I check again the IEEE 754 - 2008 documentation and the result of
> > 
> > > 0 ^ -2 = indeterminate
> > 
> > follows the standard, so I won't change that.
> 
> That's because mathematically, 0^-2 = 1/(0^2) = 1/0.  "indeterminate" is
> fine.
> 

Yeah! .. I am forgetting my basic math :(.

> The tricky case is (-3)^1.5 and any situation where the POWER(a,b) algorithm
> determines that exp(log(a)*b) is the calculation to use and it happens that
> a <= 0.  OpenFormula leaves the case where a <=0 and b is not an integer to
> be implementation-defined.  
> 
> I notice Excel 2013 (Preview) produces #NUM! for POWER(-3,1.5).  There
> should certainly be an error for Calc, whatever its particular code is.

Nice catch!

According to the standard we *should* return NaN (invalid operation).

In my system it returns -3, but it is a system dependent bug:
the wrapper uses the systems libc pow() and we are assuming C99
- IEEE 754 compliance.

I will add a check to fix it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to