bugGNU Octave - Bugs: bug #51682, No error issued for left division...

 
 

bug #51682: No error issued for left division of scalar_double_type \ integer_matrix_type, also wrong answer

Submitted by:  Rik <rik5>
Submitted on:  Mon 07 Aug 2017 03:26:37 PM UTC  
 
Category:  Interpreter Severity:  4 - Important
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 08 Mar 2018 11:34:04 PM UTC, comment #4:

Works for me! Closing report.

And yes, we do need better test coverage. For fundamental operators like this something in the test/ directory would be appropriate.

Rik <rik5>
Project Administrator
Thu 08 Mar 2018 10:54:29 PM UTC, comment #3:

It turns out that this was a one-line fix for a likely cut and paste error. I pushed the following changeset to stable and merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/dfc017e465f2

Now I see:

and so on for other integer types.

Am I missing something, or do we not have a set of tests for integer arithmetic? Maybe we can do something systematic and cover a large set of cases at once in one of the code sprints next week.

Please close this report if the problem is fixed for you.

John W. Eaton <jwe>
Project Administrator
Tue 08 Aug 2017 04:29:51 PM UTC, comment #2:

So for compatibility, Octave could support scalar_double \ scalar_int, scalar_float \ scalar_int, scalar_double \ int_matrix, scalar_float \ int_matrix if someone finds the time.

Rik <rik5>
Project Administrator
Tue 08 Aug 2017 12:39:33 PM UTC, comment #1:

For reference, in Matlab 2016b

Anonymous
Mon 07 Aug 2017 03:26:37 PM UTC, original submission:

Left division incorrectly returns a scalar type, rather than a matrix type, for scalar_double \ integer_matrix.

Example code:

Since left-division isn't implemented for integer data types (see bug #51650) this case should also just throw an error about an unimplemented operator rather than calculating a value which is misleading.

Rik <rik5>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-08 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-03-08 jwe StatusConfirmed => Ready For Test
    2017-08-07 rik5 Dependencies- => Depends on bugs #51650

    Back to the top


    Powered by Savane 3.3