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

 
 

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

Submitted by:  Oliver Heimlich <oheim>
Submitted on:  Mon 22 Aug 2016 10:41:50 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Oliver HeimlichOpen/Closed: Closed
Release: otherOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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:

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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by oheim (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Nov 2016 12:55:08 AM UTCmtmillerStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 11 Sep 2016 10:53:07 PM UTCoheimAttached File-=>Added infsup.m, #38479
    Tue 23 Aug 2016 05:57:40 AM UTCsiko1056StatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1