[SciPy-User] understanding machine precision
Skipper Seabold
jsseabold@gmail....
Tue Dec 14 13:05:30 CST 2010
On Tue, Dec 14, 2010 at 1:47 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Tue, Dec 14, 2010 at 12:42, Keith Goodman <kwgoodman@gmail.com> wrote:
>> On Tue, Dec 14, 2010 at 9:42 AM, <josef.pktd@gmail.com> wrote:
>>> I thought that we get deterministic results, with identical machine
>>> precision errors, but I get (with some random a0, b0)
>>>
>>>>>> for i in range(5):
>>> x = scipy.linalg.lstsq(a0,b0)[0]
>>> x2 = scipy.linalg.lstsq(a0,b0)[0]
>>> print np.max(np.abs(x-x2))
>>>
>>>
>>> 9.99200722163e-016
>>> 9.99200722163e-016
>>> 0.0
>>> 0.0
>>> 9.99200722163e-016
>>
>> I've started a couple of threads in the past on repeatability. Most of
>> the discussion ends up being about ATLAS. I suggest repeating the test
>> without ATLAS.
>
> On OS X with numpy linked against the builtin Accelerate.framework
> (which is based off of ATLAS), I get the same result every time.
>
>
Windows 7, numpy 64 bit mkl binaries from Christoph, I get 0.0 every time.
Using 32 bit mkl binaries in IPython interpreter and from the command
line I do not get reproducible results. If I do astype(float32) I
seem to get 0.0 most of the times but more infrequently get something
like 3e-8.
Skipper
More information about the SciPy-User
mailing list