[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some questions on the interval package
From: |
Joel Dahne |
Subject: |
Re: Some questions on the interval package |
Date: |
Wed, 16 Aug 2017 08:36:31 +0000 |
Oliver Heimlich writes:
> On 15.08.2017 16:03, Joel Dahne wrote:
>> Oliver Heimlich writes:
>>> On 15.08.2017 14:58, Joel Dahne wrote:
>>>> Oliver Heimlich writes:
>>>>> On 15.08.2017 12:36, Oliver Heimlich wrote:
>>>>>>>> Given the recent hints on the mailing list regarding bug #46603, I have
>>>>>>>> added support for “format compact” myself. It has been a little bit
>>>>>>>> complicated to come up with a solution that doesn't use internal
>>>>>>>> functions, doesn't rely on deprecated features, and doesn't break old
>>>>>>>> versions of Octave.
>>>>>>>
>>>>>>> It is indeed a bit complicated. I doesn't work for Octave version 4.2.1,
>>>>>>> which uses __compactformat__ for this. I have attached a patch that
>>>>>>> fixes it for me. But please double check that it works for you as well.
>>>>>
>>>>> Ok, done. However, during my tests in Octave 3.8.2 I have found out
>>>>> that “get (0, "FormatSpacing")” is broken and always returns "loose".
>>>>>
>>>>> - In Octave < 4.0 there is no way to query that information correctly.
>>>>> - In Octave 4.0.x we have __compactformat__ and get (0, "FormatSpacing")
>>>>> - In Octave 4.2.x we have only __compactformat__
>>>>> - In Octave > 4.3.x we have only [~, spacing] = format ()
>
>>>>> Looking through the other BISTs on Octave 3.8.2 (see attachement), I
>>>>> observe:
>>>>>
>>>>> - several warnings because of automatic broadcasting (these warning are
>>>>> disabled in Octave >= 4.0.0 by default)
>>>>
>>>> Most likely I'm the cause for some of these. I have never tested if for
>>>> < 4.0.
>
>>>>> - errors in the postpad and prepad functions
>>>>
>>>> Why would that be? It doesn't really use any odd functions.
>>>
>>> The old builtin *-pad functions do not allow to increase the number of
>>> dimensions of an array. The following kind of test tries to do that:
>>>
>>> postpad (infsup (0), 10, 0, 3)
>>>
>>> We would need add “if (compare_versions (OCTAVE_VERSION …” around the
>>> test code.
>
>>>>> I guess it's time to drop support for Octave < 4.0.0 in the interval
>>>>> package.
>
>>> My current impression is that the package would still work rather nicely
>>> in 3.8.2 with the following drawbacks:
>>> - some tests for *-pad functions are broken
>>> - “format compact” not supported
>>> - several unnecessary warnings because of broadcasting
>>> - doctest'ing for the manual is not possible
>
>> Is it a problem if some tests fail? Somehow it reflects things that they
>> can not use (at least for *-pad functions). That the doctest fails seems
>> like even less of a problem. I think very few users run the doctests
>> themselves.
>>
>> The most annoying problem is probably the broadcasting warnings. That
>> "format compact" does not work seems like a minor problem since we just
>> implemented it so no one is used to using it.
>
> I have fixed the “format compact” detection for Octave 3.8.2, added
> conditional skips for the *-pad tests, and suppressed the broadcasting
> warning, which have been observerd during testing. Now, all BISTs and
> all doctests for function docstrings pass in Octave 3.8.2.
>
> We are back to full support for Octave 3.8.x :-) IMHO, all tests must
> pass for any supported version of Octave. Otherwise, it would not be
> possible to easily check correctness of the package for the user.
>
> Regarding the postpad and prepad functions it is okay to reflect the
> features of core Octave in the respective version.
I like you workaround for detecting "format compact". Great that you
could get everything to work.
I have not yet pushed the change I had to do to the Makefile for it to
work. That is changing "source (file)" to "source (file{:})" on line
367. Does it work for you without that change? If so, why?
I'm continuing to work on the Taylor package. It seems to be a great way
to find bugs in the Interval package!
Best,
Joel
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/14
- Message not available
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/15
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/15
- Re: Some questions on the interval package, Joel Dahne, 2017/08/15
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/15
- Re: Some questions on the interval package, Joel Dahne, 2017/08/15
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/15
- Re: Some questions on the interval package,
Joel Dahne <=
- Re: Some questions on the interval package, Oliver Heimlich, 2017/08/16
- Re: Some questions on the interval package, Daniel J Sebald, 2017/08/15