octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42238] Matrix multiplication incorrect on lar


From: anonymous
Subject: [Octave-bug-tracker] [bug #42238] Matrix multiplication incorrect on large matrix
Date: Tue, 29 Apr 2014 22:24:34 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0

URL:
  <http://savannah.gnu.org/bugs/?42238>

                 Summary: Matrix multiplication incorrect on large matrix
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 29 Apr 2014 10:24:33 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Kevin Stone
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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.


address@hidden:~$ 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> 





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42238>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]