OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: 0^0 in OpenFormula and OOXML


While on the road I have started compiling a rough comparison of 
OpenFormula and OOXML operator and functions definitions.

It didn't take long to reach "^" and we report in the notes in 
OpenFormula that Excel returns #NUM!, which may well still be true, I 
don't have it on my laptop, but I was interested to find that OOXML says 
in EXP, in its examples that EXP (0) results in 1.

And: "However, if x is too large for the result to be representable, 
#NUM! is returned."

So, I would not think that "0^0" would violate that rule.

I did find POWER ( x, y ) which does say that if:

"x is zero and y is less than or equal to zero, #DIV/0! is returned."

(Note the ambiguous use of "whole number" in the preceding list item: 
"The value of x is negative and y is not a whole number, #NUM! is 
returned." Hard to say if that includes or excludes 0.)

Even though our note will be hidden, its best not to have 
misapprehensions about what others have in fact said.

In this particular case, it appears to me that OOXML has:

Failed to define the result for the case of 0^0 for the exponent 
operator ^ other than perhaps by implication from POWER but 
then that would contradict the definition of ^ ( EXP) which 
clearly allows 0 as both components. (It wasn't just the example that 
was the tip off. If you run the regex to ground you find that 0 is 
accepted in both positions.)

On the other hand, OpenFormula has failed to account for the result 
"#DIV/0!" That is assuming OpenFormula should be recording the current 
results of spreadsheet behavior as a "standard" in a rather loose sense 
of the word.

And, note that OpenFormula under 6.15.45 Power, fails to define the 
result in the case of POWER ( 0; 0).

Interesting that the two standards fail to make the same definition but 
at opposite locations and leave it only implied to implementers, 
assuming they have read closely enough to realize there is an issue.

Hope everyone is having a great day!


PS: It seems to me that we need to answer the question of if and where 
OpenFormula differs from OOXML and why? We can either answer that now or 
we can wait for it to come up upon submission of ODF 1.2 to ISO. From an 
editor's point of view I would prefer now.

Patrick Durusau 
Chair, V1 - US TAG to JTC 1/SC 34 
Convener, JTC 1/SC 34/WG 3 (Topic Maps) 
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]