help-octave
[Top][All Lists]
Advanced

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

Re: Possible loss of accuracy


From: Sergei Steshenko
Subject: Re: Possible loss of accuracy
Date: Thu, 16 May 2013 01:59:35 -0700 (PDT)


--- On Thu, 5/16/13, Sergei Steshenko <address@hidden> wrote:

> From: Sergei Steshenko <address@hidden>
> Subject: Re: Possible loss of accuracy
> To: "address@hidden" <address@hidden>, "louis scott" <address@hidden>
> Date: Thursday, May 16, 2013, 1:51 AM
> 
> --- On Thu, 5/16/13, louis scott <address@hidden>
> wrote:
> 
> From: louis scott <address@hidden>
> Subject: Re: Possible loss of accuracy
> To: "address@hidden"
> <address@hidden>
> Date: Thursday, May 16, 2013, 12:28 AM
> 
> Here is another.  I suspect this is one for the numerical
> analysts here.  This thread also reminds me of an earlier
> help request regarding numerical solution of planetary
> orbits - the results from octave diverged faster than those
> in another package.  The consensus was that the dynamics
> are chaotic, but one would still hope that the precision
> would be high enough so that the divergence agreed with his
> other (more precise) results.
> 
> Secondly, this makes use of ATLAS' multi core capabilities:
> % getting to 1 the hard wayN = 2100; A = rand(N);tic,
> det(A*inv(A)), tocans = Inf
> Elapsed time is 1.6111 seconds.
> N = 2000; A = rand(N);tic, det(A*inv(A)), tocans =
>  1.0000Elapsed time is 1.436 seconds.
> -------------------------------------------------------
> versionans = 3.6.4OS: Linux Mint 13 (Ubuntu 12.04) 64
> bit.Octave compiled with ATLAS 3.10.1# ATLAS
> Configure../configure -b 64 -t 4 -D c -DPentiumCPS=3100 -Fa
> alg -fPIC \
>    --prefix=/usr/local/atlas-3.10.1 \ 
>  --with-netlib-lapack-tarfile=../../../Downloads/lapack-3.4.2.tgz
> 2>&1 | tee output.txtmake# Octave configure
> includes:
> configured --with-blas="-lptcblas -lptf77blas -latlas"
> 
> -----------------------------------------------------------------------
> 
> 
> Not every matrix is invertible - have a look at the
> session:
> 
> "
> octave:10> N = 2012; A = rand(N);
> octave:11> tic, det(A*inv(A)), toc
> ans = Inf
> Elapsed time is 38.278 seconds.
> ...
> octave:13> N = 2012; A = rand(N);
> octave:14> tic, det(A*inv(A)), toc
> ans =  1.0000
> ".
> 
> Regards,
>   Sergei.
> 
> 
> 

Another example of the same kind:

"octave:22> N = 2050; A = rand(N);tic, det(A*inv(A)), toc
ans = Inf
Elapsed time is 35.98 seconds.
octave:23> N = 2050; A = rand(N);tic, det(A*inv(A)), toc
ans = Inf
Elapsed time is 35.36 seconds.
octave:24> N = 2050; A = rand(N);tic, det(A*inv(A)), toc
ans =  1.00000
Elapsed time is 38.756 seconds.
octave:25>         
".

Regards,
  Sergei.



reply via email to

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