bugGNU Octave - Bugs: bug #51650, Unclear warning issued for left...


bug #51650: Unclear warning issued for left division of scalar_integer_type \ matrix_data_type

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Thu 03 Aug 2017 10:12:44 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
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.


Mon 07 Aug 2017 03:27:53 PM UTC, comment #5:

Re-titling bug report. For this report, the problem is that a very unclear error message is printed for scalar_integer_type \ matrix_data_type operations.

For the other issue I filed a new bug report at bug #51682.

Rik <rik5>
Project Administrator
Mon 07 Aug 2017 09:26:47 AM UTC, comment #4:

yes, you are right, int64 is just an example.
I also agree, that the errors like
binary operator '\' not implemented for 'int8 matrix' by 'scalar' operations

are fully satisfactory.
As you say, the issue is the message for
scalar_integer_type \ matrix_data_type

The second issue is something different,
I think we need another bug report for this.
My point was the first one:
the bad error message "octave_base_value:: wrong type argument"
for scalar_integer_type \ matrix_data_type

Ernst Reissner <ernstreissner>
Fri 04 Aug 2017 11:38:26 PM UTC, comment #3:

It's not just int64 matrices. The left-division operator isn't implemented for any of the integer types. For example,

You can see that the error messages are reasonably precise about what is going on. Of course, for a scalar Octave could actually do this one piece of linear algebra. But is it worth it? Most likely not. In order to implement the operator Octave needs to generate functions and prototypes of each function for the C++ compiler that connect a known data type to every other data type. So there would be a routine for int8 \ int64, one for uint32 \ int16, another for uint8 \ int16, etc. This quickly gets out of control.

But there certainly is an issue with this particular operation

Instead of issuing a warning, as above, for "binary operator '\' not implemented", Octave issues the very unhelpful "octave_base_value:: wrong type argument".

The second issue, is that if the initial value is a floating point type such as a single or double then the operation proceeds, but gets the wrong answer (scalar vs. matrix). Using the matrix c defined above.

Rik <rik5>
Project Administrator
Fri 04 Aug 2017 08:30:03 AM UTC, comment #2:

Ceral, this is not the answer to my question:
It is not allowed to divide by something but a scalar.
But if you do that, you may write

b/int64(1) or int64(1)\b

which shall be equivalent.
This is the bug.

What you write about b\int64(1) is another point.

Ernst Reissner <ernstreissner>
Thu 03 Aug 2017 05:17:03 PM UTC, comment #1:

MATLAB 2016a

Ceral Paquet <octavebugs>
Thu 03 Aug 2017 10:12:44 AM UTC, original submission:

b=int64([1 0; 1 1])
the expression b/int64(1) is valid,
whereas int64(1)\b
error: octave_base_value::int64_scalar_value(): wrong type argument 'int64 matrix'

Ernst Reissner <ernstreissner>


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

Attach Files:

No files currently attached


Depends on the following items: None found

   bug dependencies.


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

    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.


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



    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Mon 07 Aug 2017 03:27:53 PM UTC rik5 Item GroupUnexpected Error => Missed Error or Warning
        Summaryleft-division operator not implemented for integer data types => Unclear warning issued for left division of scalar_integer_type \ matrix_data_type
    Mon 07 Aug 2017 03:27:05 PM UTC rik5 Dependencies- => bugs #51682 is dependent
    Fri 04 Aug 2017 11:38:26 PM UTC rik5 StatusNone => Confirmed
        Summaryb\int64(1) vs b/int64(1) => left-division operator not implemented for integer data types
    Thu 03 Aug 2017 10:12:44 AM UTC ernstreissner Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3