bugGNU Octave - Bugs: bug #42238, Matrix multiplication incorrect on...

 
 

bug #42238: Matrix multiplication incorrect on large matrix

Submitter:  None
Submitted:  Tue 29 Apr 2014 10:24:33 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Kevin Stone Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 25 Sep 2014 02:09:42 AM UTC, comment #3: 

No further information or comments after several months, closing as working and unconfirmed.

Mike Miller <mtmiller>
Group Member
Wed 30 Apr 2014 01:49:12 AM UTC, comment #2: 

Works for me also on Ubuntu 14.04 with 3.8.1-1ubuntu1 installed from Ubuntu repos.

Mike Miller <mtmiller>
Group Member
Tue 29 Apr 2014 11:20:29 PM UTC, comment #1: 

Works for me using current dev 4.1.0+
And Fedora 20 on x86_64 (Intel)

octave:16> assert(ones(4*1024*1024+1,2)*[1 1]',2*ones(4*1024*1024+1,1));
octave:17> version
ans = 4.1.0+
octave:18>

Michael Godfrey <godfrey>
Group Member
Tue 29 Apr 2014 10:24:33 PM UTC, original submission:  

Matrix multiplication is incorrect for a large matrix.

Specifically: A*B
A dim of 4*1024*1024+1 x 2
B dim of 2 x 1
assert(ones(4*1024*1024,2)*[1 1]',2*ones(4*1024*1024,1)); % failure

The same multiple is correct for the following dimensions:
A dim of 4*1024*1024 x 2
B dim of 2 x 1
assert(ones(4*1024*1024,2)*[1 1]',2*ones(4*1024*1024,1)); % success


The following is on an HP z820 running Ubuntu 14.04, Octave 3.8.1 (from default repo) with no extra octave packages installed.


kevinstone@kevin-z820:~$ octave
GNU Octave, version 3.8.1
Copyright (C) 2014 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1> assert(ones(4*1024*1024,2)*[1 1]',2*ones(4*1024*1024,1));
octave:2> assert(ones(4*1024*1024+1,2)*[1 1]',2*ones(4*1024*1024+1,1));
error: ASSERT errors for:  assert (ones (4 * 1024 * 1024 + 1, 2) * [1, 1]',2 * ones (4 * 1024 * 1024 + 1, 1))

  Location  |  Observed  |  Expected  |  Reason
    (1)           4            2         Abs err 2 exceeds tol 0
 (2097153)        0            2         Abs err 2 exceeds tol 0
octave:2>


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 mtmiller (Posted a comment)
  • -email is unavailable- added by godfrey (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-25 mtmiller Open/ClosedOpen Closed
    2014-04-30 mtmiller StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code