Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Expected behaviour of constructors (was Re: Motion P1788.1/M005 to avoid non-conforming interval standards)



Thanks Dima and Oliver,

     walter.

On Wed, Aug 17, 2016 at 7:12 PM, Oliver Heimlich <oheim@xxxxxxxxx> wrote:
On 17.08.2016 13:10, Oliver Heimlich wrote:
> Am 17. August 2016 09:47:20 MESZ, schrieb Walter Mascarenhas <walter.mascarenhas@xxxxxxxxx>:
>> Dear all,
>>
>>  I plan to finish an implementation of 1788.1 "soon", and it would be
>> helpful to have an explicit list of test cases describing the expected
>> behaviour of constructors with arguments of the form
>>
>>                strings for for inf and sup  +
>>       expected result (including exceptions raised)
>>            mathematical relation between inf and sup
>>
>> [ regular _expression_ for inf, regular _expression_ for sup]        this
>> for
>> bare intervals, that for decorated intervals
>>                         +
>>       a bit of math involving inf and sup
>>
>> could you please provide me such a list? The more comprehensive the
>> better.
>>
>>             regards,
>>
>>                      walter.
> Walter,
>
> I guess that I can prepare something for you tonight.
>
> In the meantime, you could work on an ITF1788 plugin for your implementation.
>
> https://github.com/oheim/ITF1788
>
> Best
> Oliver
>

On 17.08.2016 13:20, Dmitry Nadezhin wrote:
> Dear Walter,
>
> You can take much code from the reference implementation of 1788 written
> by Marco Nehmeier. It is on github:
> https://github.com/nehmeier/libieeep1788
> The code for constructor with regular expressions for interval literal
> is at line 610 of
>
https://github.com/nehmeier/libieeep1788/blob/master/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_io_impl.hpp
> I/O tests are here
>
https://github.com/nehmeier/libieeep1788/blob/master/test/p1788/flavor/infsup/setbased/test_mpfr_bin_ieee754_flavor_io.cpp
>
> Of course, this code needs modification to be suitable for 1788.1 .

Please find attached some examples, which have been taken from IEEE Std
1788-2015. They can be tested using the ITF1788 framework mentioned
before. I plan to also make constructor unit tests from libieeep1788
available in that format. Find more unit tests for arithmetic operations
here (they can be applied depending on the accuracy of your implementation):
https://sourceforge.net/p/octave/interval/ci/default/tree/test/

Checking for raised exceptions / signals is a feature that is still
missing in ITF1788. Also, as mentioned by Dmitry, you have to watch out
for differences regarding 1788.1.

Best
Oliver