bugGNU Octave - Bugs: bug #48871, type conversion in matrix building

 
 

bug #48871: type conversion in matrix building

Submitted by:  Matthias Jüschke <maju>
Submitted on:  Tue 23 Aug 2016 03:04:43 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 23 Aug 2016 03:08:37 PM UTC, comment #1:

Thank you for your bug report. This is the correct type conversion rules for Octave (and Matlab). The default data type is double. A double combined in some way (arithmetic or matrix concatenation) with an integer type results in an integer type. The leftmost integer type is used when more than one integer type is combined.

The correct type of the first expression is a uint8, the second is an int8, and the third is a uint16.

Mike Miller <mtmiller>
Project Administrator
Tue 23 Aug 2016 03:04:43 PM UTC, original submission:

while building a matrix with different types, not the "highest" type is chosen.

Matthias Jüschke <maju>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by maju (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 23 Aug 2016 03:08:37 PM UTCmtmillerStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1