[Numpy-discussion] Different results from repeated calculation

Charles R Harris charlesr.harris at gmail.com
Sat Jan 27 17:00:33 CST 2007


On 1/27/07, Stefan van der Walt <stefan at sun.ac.za> wrote:
>
> On Sat, Jan 27, 2007 at 03:11:58PM -0700, Charles R Harris wrote:
> >     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.
>
> Interesting!  I don't see it on
>
> Linux alpha 2.6.17-10-386 #2 Fri Oct 13 18:41:40 UTC 2006 i686 GNU/Linux
> vendor_id       : AuthenticAMD
> model name      : AMD Athlon(tm) XP 2400+
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
>
>
> but I do see it on
>
>
> Linux voyager 2.6.17-10-generic #2 SMP Fri Oct 13 18:45:35 UTC 2006 i686
> GNU/Linux
> processor       : 0
> vendor_id       : GenuineIntel
> model name      : Genuine Intel(R) CPU           T2300  @ 1.66GHz
> processor       : 1
> vendor_id       : GenuineIntel
> model name      : Genuine Intel(R) CPU           T2300  @ 1.66GHz
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni
> monitor vmx est tm2 xtpr
>
> Both machines are running Ubuntu Edgy, exact same software versions.


Hmmm, and your problem machine is running smp linux. As is mine; fedora uses
smp even on single processor machines these days. I think we could use more
data here comparing

OSX
Linux (single, smp)
Window

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


More information about the Numpy-discussion mailing list