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

 


Help: OASIS Mailing Lists Help | MarkMail Help

oic message

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


Subject: "Principled Assessment" applied to YEARFRAC


On the last OIC TC call, I talked about how I did not find the "test" cases that are included in working drafts of the OpenFormula (ODF 1.2 Part 2) specification to be very good as tests.  I talked about preference for principled tests that are intended to reveal deviations from clearly-understandable results.  Such tests, because what they reveal is understandable in a straightforward way, also are useful to users and experts in determining where implementations drift from the expected and should not be considered reliable in those areas.  I am thinking about recognizing where perfectly-understandable implementation limitations begin to deviate or break down beyond the range of expected use where the results are as reliable as intended. 

I want to stop talking about testing and talk about assessment instead, especially in the context of a possible event to assess OpenFormula itself while it is in Committee Draft and perhaps Public Review.

The upload of NumCheck-0.10 illustrates how spreadsheets can be fashioned to allow the kind of principled assessment I have in mind.

APPLICATION TO YEARFRAC

Here is how I would build an assessment for the handling of YEARFRAC in all of the places where it shows up directly and indirectly.

1. I would want to make some simple calculations for every basis and where the start date is December 31 and the end date is January 1.  The cases should include December 31 for leap years, January 1 for leap years, and cases where neither is in a leap year.  This simple test reveals a number of conditions:

   a. Which year the single day in the span December 31 is assumed to be in
   b. How many days that year is assumed to have (by computing 1/YEARFRAC(December31date;January1date)
   c. How precisely the one-day fraction is determined (might take more work)

2. I would be interested in simple cases for exact whole year intervals, both from December 31 to the December 31 one year later (with the usual leap-year variations), and also from January 1 to January 1 one year later (ditto).  These are supposed to be exactly one in all of the YEARFRAC cases I am aware of.

3. There are some experiments that can be done by sliding the window through different end-of-month and start-of-month dates (with curiosity around February 29 in one year and February 28 in another).

4. With regard to ranges of strict integers, one should be able to use Int Precision results (from NumCheck) to determine where YEARFRAC might break down because the exact number of years, months, or days is not representable or because the implementation of serial days and their correspondence to the Gregorian Calendar are constrained.  (Actually, a principled assessment on calendar dates should be done separately and its results used to discern how any revealed constraints on an implementation's coverages appear to influence YEARFRAC results.)

5. There are other tests, but they rapidly become non-understandable.  An understandable set that interests me involves additive consistency.  Is there some apparent principle by which a period can be broken into understandable parts and the individual YEARFRAC results for the sub-intervals related to the YEARFRAC result for the whole interval handled in a single YEARFRAC span.

6. One value of a principled assessment is that it has two valuable outcomes:

  a. It grounds what OpenFormula specifies for the result, where an implementation offers reliable coverage, and where the OpenFormula provisions are out of reach.

  b. It reveals to users, experts, and other interested parties whether the OpenFormula definition for a function meets their expectation or whether they need to consider how to adjust their use of OpenFormula functions (such as YEARFRAC) in order to obtain the result they need while being able to count on how OpenFormula is specific.

FURTHER DISCUSSION

There are a great variety of ways that these principles can be applied in the context of OpenFormula operations and functions.

I hope this is an useful way for us to look at how we could do an assessfest and even a codefest such as the one Rob Weir suggested about people coming up with reference implementations of interesting OpenFormula functions and see how well it is possible to do that from the definitions in the OpenFormula specification and appropriate reference materials.

 - Dennis

-----Original Message-----
From: dennis.hamilton@acm.org [mailto:dennis.hamilton@acm.org] 
Sent: Monday, March 01, 2010 07:54
To: oic@lists.oasis-open.org
Subject: [oic] Groups - NumCheck 0.10 Assessment for OpenFormula Basic Numerical Provisions (NumCheck-0.10-2010-02-26-1833.zip) uploaded

[ ... ]

This initial version simply demonstrates some characteristics around the
exact, precise, and strict representations of integers and functions on
such integers in typical support for Numerical type data.

Although the spreadsheets include tabulations of some comparative results,
the purpose is not to compare implementations but to assess the OpenFormula
provisions and see how clearly those provisions fit with discretionary
variations among implementations.

The file NumCheck-0.10.txt within the package provides more details on the
approach and how to use the current versions of the spreadsheet documents.

View Document Details:
http://www.oasis-open.org/committees/document.php?document_id=36616

Download Document:  
http://www.oasis-open.org/committees/download.php/36616/NumCheck-0.10-2010-02-26-1833.zip


PLEASE NOTE:  If the above links do not work for you, your email application
may be breaking the link into two pieces.  You may be able to copy and paste
the entire link address into the address field of your web browser.

-OASIS Open Administration



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