----- Messaggio originale -----
> Da: Rob Weir
>
> On Sun, Dec 30, 2012 at 3:49 PM, Pedro Giffuni wrote:
>>
>>
>> ----- Messaggio originale -----
>>> Da: Rob Weir
>> ...
>>>>
>>>> Please feel free to contribute a spreadsheet that calculates the
> edge
>>>> cases. Any contribution of that kind is welcome, and that's
> why this
>>> list
>>>> exists.
>>>>
>>>
>>> Well, what does boost use for its own testing? They must do some sort
>>> of testing? Is there something we can easily convert into a
>>> spreadsheet? That would help in two ways. since we could test the
>>> existing implementation against the same test cases, to see if there
>>> actually are any issues. I assume that would be good to know.
>>>
>>
>> This is not something one checks by grabbing someone else's testsuite,
>> it depends on the specific function you want to test.
>>
>> Please check the excellent boost documentation:
>>
> http://www.boost.org/doc/libs/1_52_0/libs/math/doc/sf_and_dist/html/index.html
>>
>>
>> I don't think we have equivalent studies over our native versions :(.
>>
>>>
>>> More bugs come from overconfidence than from a respectful humility and
>>> realization that the work we do is critical for millions of users and
>>> that we should do everything possible to ensure that our code is
>>> tested by more than just our own personal feelings of satisfaction.
>>> IMHO.
>>>
>>
>> Rather than overconfidence we are having respectful humility and
> realization
>> that our homebrew implementations don't really compare against the
> boost
>> versions.
>>
>
> So there are two things here:
>
> 1) All the junk out to the 12th decimal place that might matter to a
> few people and which might be improved by moving to boost
>
> 2) The edge stuff where we can very well break real world spreadsheets
> if we're not careful.
>
> This is not entirely about the 12th decimal place. I was one of the
> co-authors of the OpenFormula specification used in ODF. There is
> more there than just mathematical fact. There are a lot of
> conventions, purely pragmatic conventions, involved in spreadsheet
> formulas, and we need to get those right as well.
>
> 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?
>
> Another example. We have ISERR() and ISNA() functions. We make a
> distinction between "Not a number" (the result of 0/0) and other
> errors. A spreadsheet user may have error handling logic that is
> sensitive to this. So we need to make sure that changing in
> implementation don't introduce changes in what errors are returned.
> Again, this is a convention, not a mathematical fact that we can just
> assume boost gets right.
>
> So we need to be very careful about how things interact at the level
> of range and domain errors. NaN, etc. It is possible that AOO 3.4.1
> works correctly in some cases purely by accident, because the system
> routines "do the right thing". Then we switch to a different library
> and it breaks, even though the library is justifiably correct.
>
Please check the boost documentation regarding Policy.
Pedro.