Bug#419556: [Pkg-octave-devel] Bug#419556: ambigous results in matrix multipliication

Alois Schloegl alois.schloegl at gmx.net
Fri Apr 20 15:59:19 UTC 2007


-------- Original-Nachricht --------
Datum: Mon, 16 Apr 2007 21:38:12 +0200
Von: Thomas Weber <thomas.weber.mail at gmail.com>
An: Alois Schloegl <alois.schloegl at gmx.net>, 419556 at bugs.debian.org
Betreff: Re: [Pkg-octave-devel] Bug#419556: ambigous results in matrix multipliication

> Hi, 
> 
> Am Montag, 16. April 2007 17:32 schrieb Alois Schloegl:
> > One expects that a matrix multiplication (A*B)' gives the same result
> than
> > for (B'*A'). This is not the case for the debian octave package (tested
> > with 2.9.10-3 and 2.1.73-13)
> >
> > Here is the test script:
> >
> > repmat(0,2)*repmat(NaN,2)
> > repmat(NaN,2)*repmat(0,2)
> > repmat(0,2)*repmat(inf,2)
> > repmat(inf,2)*repmat(0,2)
> > version
> > octave_config_info('BLAS_LIBS')
> 
> I take it for granted that you didn't have ATLAS installed. Is this
> correct?

Actually, it was the same machine that I used for compiling Octave with Atlas. So atlas-base-dev (which requires also atlas-base) was installed when I tested Octave 2.9.10-3.


> 
> Unless I'm mistaken, the reference implementation of dgemm is supposed to
> do 
> exactly this, see
> http://velveeta.che.wisc.edu/octave/lists/bug-octave/2002/310

IMHO, this is a bug (and not a feature) of dgemm. Especially, because (A*B)' is not the same as (B'*A'). 

octave:16> [nan nan]*[0;0]
ans = 0
octave:17> [0,0]*[nan nan]'
ans = NaN

octave:20> [0,0]*[inf inf]'
ans = NaN
octave:21> [inf inf]*[0;0]
ans = 0


> 
> > The problem seems to be in the lapack or blas library. Because this
> problem
> > disappears (the result is always NaN) when I compile Octave from the
> > sources using Atlas. 
> 
> I guess the best "fix" for this problem is installing one of the atlas3-* 
> packages.
> 

Do you mean that installing atlas3-* besides the debian octave package solves the problem? I do not think so, because the machine I used had Atlas  installed.

If you mean, that atlas3-* should be installed when the Octave package is compiled for debian, yes I agree to that. Perhaps, the dependency between Octave and atlas-* need to be changed, such that atlas is mandatory instead of one of several alternatives. 


> Regards
> 	Thomas

Regards, 
   Alois 


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail




More information about the Pkg-octave-devel mailing list