[Numpy-discussion] Different results from repeated calculation

Charles R Harris charlesr.harris at gmail.com
Sat Jan 27 16:11:58 CST 2007


On 1/27/07, Stefan <stefan at sun.ac.za> wrote:
>
> I can't reproduce this under Linux, r3510.  Output is
>
> test1:  0  differences
> test2:  0  differences
> test3:  0  differences
>
> Does anyone else see this happening?


Yes,

test1:  0  differences
test2:  51  differences
test3:  0  differences

 Oddly, the relative error is always the same:

98 z different 2.0494565872e-16
99 z different 2.0494565872e-16

Which is nearly the same as the double precision 2.2204460492503131e-16, the
difference being due to the fact that the precision is defined relative to
1, and the error in the computation are in a number relatively larger (more
bits set, but not yet 2).

So this looks like an error in the LSB of the floating number. Could be
rounding, could be something not reset quite right. I'm thinking possibly
hardware at this time, maybe compiler.

Linux fedora 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 19:28:18 EST 2007 i686
athlon i386 GNU/Linux

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 12
model name      : AMD Athlon(tm) 64 Processor 2800+
stepping        : 0
cpu MHz         : 1808.786
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow up
ts fid vid ttp
bogomips        : 3618.83
Athlon 64 running 32 bit linux.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070127/d9fe50e9/attachment.html 


More information about the Numpy-discussion mailing list