bugGNU Octave - Bugs: bug #48861, interval package: fix exception...

 
 

bug #48861: interval package: fix exception handling of constructors

Submitter:  Oliver Heimlich <oheim>
Submitted:  Mon 22 Aug 2016 10:41:50 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Oliver Heimlich Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Nov 2016 12:50:32 AM UTC, comment #3: 

Work is done and changes have been pushed.

I did not implement number 5 from the first comment, but don't care for that topic now.

Please close this bug.

Oliver Heimlich <oheim>
Thu 15 Sep 2016 07:00:52 PM UTC, comment #2: 

Quick status update: I got the constructor for decorated intervals (infsupdec) working again. Now I have to fix any regressions in arithmetic functions and documentation.

Oliver Heimlich <oheim>
Sun 11 Sep 2016 10:53:07 PM UTC, comment #1: 

The infsup constructor has been rewritten from scratch with several improvements.

Next, I will modify the infsupdec constructor to be compatible again (plus other constructors and intervalpart). The new version of infsup allows for [NaI] intervals which are not scalar. That is, a decorated interval matrix may have [NaI] entries together with common interval entries. For example, the new constructor is already able to do the following:


>> infsup ("happy 42 hacking")
warning: Invalid call to parsedouble
warning: called from
    infsup at line 733 column 13
warning: Invalid call to parsedouble
warning: Invalid call to parsedouble
warning: Invalid call to parsedouble
ans = 1×3 interval vector

   [Empty]   [42]   [Empty]


Checking IEEE Std 1788-2015, there is no need to suppress warnings when calling infsup from infsupdec.

As a third step, all bare interval functions have to be revised to not produce warnings by calling infsup (l, u) with l = +inf, u = -inf. Therefore it should be possible to use warning ("off", "interval:UndefinedOperation", "local").

As a forth step, all decorated interval functions have to be revised to correctly handle [NaI] intervals if they are allowed in interval matrices.

As soon as this refactoring is done and unit tests are passing again, I will push my changes to the repository and prepare a new major release (version 2.0.0) due to the subtle incompatibility changes.

(file #38479)

Oliver Heimlich <oheim>
Mon 22 Aug 2016 10:41:50 PM UTC, original submission:  

The exceptions defined by IEEE Std 1788-2015, which occur during failed calls of constructors, shall not prevent the return of a result. For example, infsup ("happy hacking") shall return an empty interval whilst signaling the UndefinedOperation “exception”.

1. In Octave, this can be implemented with the native warning mechanism. It is already implemented for the decorated interval constructor `infsupdec`, but not for the bare interval constructor `infsup`. Idea: Turn errors in `infsup` into warnings. If `infsupdec` calls `infsup` internally, it may put the warning IDs into error state locally, catch the error, propagate a warning and return a NaI (similar to current implementation).

2. If the `infsup` constructor doesn't fail anymore on invalid input, it can be made standards conforming on NaN input and (+inf, -inf) input where it must return [empty] in both cases whilst signaling the UndefinedOperation “exception”.

3. In infsupdec the warning ID interval:NaI may shadow the interval:UndefinedOperation warning ID, which should be preserved. interval:NaI should not be visible outside of the constructors.

4. The warning/error ID InvalidOperand should not be used for illegal interval literals in constructors. Use UndefinedOperation instead.

Similar issues:
5. The exactToInterval constructor does not differ from textToInterval in a 754-conforming inf-sup context. Thus, the exactToInterval operation may be discarded/deprecated in the package.

6. intervalpart (nai) shall return an empty interval whilst signaling the IntvlPartOfNaI “exception”. Therefore, the current Octave error can be turned into a warning.

Oliver Heimlich <oheim>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #38479:  infsup.m added by oheim (45KiB - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by oheim (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-18 mtmiller StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2016-09-11 oheim Attached File- Added infsup.m, #38479
    2016-08-23 siko1056 StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code