help-octave
[Top][All Lists]
Advanced

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

RE: strange problem


From: THOMAS Paul Richard
Subject: RE: strange problem
Date: Fri, 28 Nov 2003 10:46:22 +0100

Dear All,

The matrix multiplication gives zero for ans(1,1) in octave 2.1.49 (under
Cygwin)!  However, Matlab5 gives the same result as Gerald's.

Compiling the expression 1-(100*-1)/100 in g++ or intel C++ give 0.  I would
conclude that this is some peculiarity of BLAS that seems to have been
eliminated in later versions of Octave/BLAS.

It seems to me that Gerald's work-around might be to use 

function xout=clean(xin,prec);xout=xin.*(abs(xin)>prec);endfunction; 

so that

a=clean([1,100;0,1]*[1,0;(-1/100),1],1E-16);

a(1,1) yields 0

Paul

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/03
 



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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