bugGNU Octave - Bugs: bug #29465, cat(3, [], x) behaves strangely

 
 

bug #29465: cat(3, [], x) behaves strangely

Submitter:  None
Submitted:  Wed 07 Apr 2010 10:36:13 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Heikki Kallasjoki Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.3.51
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 08 Apr 2010 10:56:15 AM UTC, comment #2: 

Fixed in development sources:
http://hg.savannah.gnu.org/hgweb/octave/rev/8615b55b5caf
Replaced some more dirty macro stuff by templates in the process. Cool!

thanks for the report + best regards

Jaroslav Hajek <highegg>
Thu 08 Apr 2010 09:48:44 AM UTC, comment #1: 

Confirmed on tip.

Jaroslav Hajek <highegg>
Wed 07 Apr 2010 10:36:13 PM UTC, original submission:  

On at least octave 3.3.51, 3.2.3 and 3.0.5 (but not 3.0.1), the built-in "cat" function behaves strangely when the first argument is the empty matrix [], and dimension is larger than 2.  Examples below.

3.3.51:


octave:2> version
ans = 3.3.51
octave:3> cat(3, [], [1 2; 3 4])
ans =
   6.9320e-310   2.1220e-314
   2.0830e-316   1.2207e-306

octave:4> cat(3, [], [1 2; 3 4])
ans =
   6.9320e-310   1.9998e-316
   2.2249e-316   4.9407e-324


(Note that the output is even not always the same.)

3.2.3:


octave:2> version
ans = 3.2.3
octave:3> cat(3, [], [0.1 0.2 0.3; 0.4 0.5 0.6])
ans =
    0.0000e+00   2.1220e-314   6.0600e+233
   1.1364e-322   4.7413e+170   1.3544e-306

octave:4> cat(3, [0.1 0.2 0.3; 0.4 0.5 0.6], [])
ans =

   0.10000   0.20000   0.30000
   0.40000   0.50000   0.60000


(If the order of the arguments is reversed, the result is as expected.)

On 3.0.5:


octave:2> version
ans = 3.0.5
octave:3> cat(3, [], [1 2; 3 4])
ans =
    0.0000e+00    0.0000e+00
   1.2484e-312   4.9407e-324


However, on 3.0.1:


octave:1> version
ans = 3.0.1
octave:2> cat(3, [], [1 2; 3 4])
ans =
   1   2
   3   4


(No problems there.)

All the examples were from various x86-64 GNU/Linux systems.  Apologies if this has been reported earlier or fixed in the hg tip; a quick search on "cat" in the bug tracker found no hits, and I don't have the proper tools installed to build the latest development code.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by highegg (Posted a comment)
  • -email is unavailable- added by None (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
    2010-04-08 highegg StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2010-04-08 highegg StatusNone In Progress
        Assigned toNone highegg

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code