[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: unexpected behavior when multiplying large matrices

**From**: |
Mike Miller |

**Subject**: |
Re: unexpected behavior when multiplying large matrices |

**Date**: |
Sun, 1 Dec 2002 23:11:38 -0600 (CST) |

On Sun, 1 Dec 2002, John W. Eaton wrote:
>* octave2.1:9> x = eye(1000);*
>* octave2.1:10> y = [1:1000]' * [1:1000];*
>* octave2.1:11> z = [1:1000]';*
>* octave2.1:12> tic; a = 2 * (x - ((x * z * z' * x)/((1/2) + z' * x * z))); *
>* toc*
>* ans = 2.1231*
>* octave2.1:13> tic; b = 2 * (y - ((y * z * z' * y)/((1/2) + z' * y * z))); *
>* toc*
>* ans = 2.0958*
>
>* The above results were obtained on a 1.4GHz Athlon system running Debian*
>* and Octave is linked with ATLAS:*
I'm running on a Sun Ultra 2 2200 under Solaris and I get results like
those of Joshua, but worse! (see my results below). My octave is not
linked to any BLAS, so maybe that has something to do with it.
octave:1> x = eye(1000);
octave:2> y = [1:1000]' * [1:1000];
octave:3> z = [1:1000]';
octave:4> tic; a = 2 * (x - ((x * z * z' * x)/((1/2) + z' * x * z))); toc
ans = 2.9595
octave:5> tic; b = 2 * (y - ((y * z * z' * y)/((1/2) + z' * y * z))); toc
ans = 464.83
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------