On Mon, Dec 31, 2012 at 10:55 AM, Andrea Pescetti <pesce...@apache.org> wrote:
> Rob Weir wrote:
>>
>> For example, take the POWER() function.  POWER(x;y) == x^y.   So what
>> is POWER(0;0) ?   I'm sure boost returns something there.  But is it
>> the same as AOO 3.4.1 returns?  And does it conform to OpenFormula?
>
>
> Does OpenFormula provide test documents (I'm thinking of a .ods file with
> references to paragraphs from the standard) that can be used to check an
> implementation's behavior on edge cases?
>

When we started the OpenFormula specification we intended to provide a
full set of test cases for every function.  You can still see this in
the earlier drafts.  But we ended up removing all the test cases
before the standard was published.  Why did we do this?  It is
somewhat related to the old proverb, "Never go to sea with two
compasses.".   A standard should define behavior in one place and one
place only.  If you have two definitions (in the text and in test
cases) then you create an additional failure mode -- the definitions
could disagree.

This is not just a theoretical concern.  The OOXML formula
specification contained test cases and in several instances they
contradict the definition of the function.

So this is an example of where seems like a good idea to the engineer
is considered a problem for the standards editor.

That said, this was a controversial decision and there were good
arguments on both sides.

> If I recall correctly, OpenFormula allows a certain flexibility in some edge
> cases (i.e., the behavior is "implementation defined" and more than one
> possibility exists as long as it is consistent). But, if we had a test
> document like that, we could scan for differences also between versions of
> OpenOffice, in case we change Calc so that it still obeys the OpenFormula
> specification but gives different results.
>

I think I have something that might help, a test spreadsheet we used
in an ODF Plugfest a few years ago.  It is not complete, but could be
a start.  But it was more useful for the gross behavior of date,
logical and financial functions.  It was not intended to test
numerical accuracy of special mathematical functions.

Regards,

-Rob

> Regards,
>   Andrea.

Reply via email to