help-octave
[Top][All Lists]
Advanced

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

Re: Possible loss of accuracy


From: louis scott
Subject: Re: Possible loss of accuracy
Date: Thu, 16 May 2013 08:28:42 +0100

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 way
N = 2100; A = rand(N);
tic, det(A*inv(A)), toc
ans = Inf
Elapsed time is 1.6111 seconds.

N = 2000; A = rand(N);
tic, det(A*inv(A)), toc
ans =  1.0000
Elapsed time is 1.436 seconds.

-------------------------------------------------------
version
ans = 3.6.4
OS: 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.txt
make
# Octave configure includes:
configured --with-blas="-lptcblas -lptf77blas -latlas"




On Thu, May 16, 2013 at 7:34 AM, Marco Caliari <address@hidden> wrote:
On Wed, 15 May 2013, Jordi Gutiérrez Hermoso wrote:

On 15 May 2013 10:27, Jordi Gutiérrez Hermoso <address@hidden> wrote:
I believed older versions of gcc turned on or off -ffloat-store at
some optimisation levels, but I don't think newer versions affect
-ffloat-store anymore.

I'd be curious to see the output for the following bash snippet with
your version of gcc:

for i in 0 1 2 3; do echo "O$i"; gcc -Q -O$i --help=optimizers | grep
store; done

O0
  -ffloat-store                         [disabled]
  -ftree-store-ccp                      [disabled]
O1
  -ffloat-store                         [disabled]
  -ftree-store-ccp                      [disabled]
O2
  -ffloat-store                         [disabled]
  -ftree-store-ccp                      [enabled]
O3
  -ffloat-store                         [disabled]
  -ftree-store-ccp                      [enabled]

I confirm that the trick exp(2^50*log(1-2^-50)) works. What should I try next, a newer gcc compiler or a newer glibc (I have 2.6.1 installed)? Or both?

Thanks,

Marco

_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



reply via email to

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