[SciPy-User] understanding machine precision

josef.pktd@gmai... josef.pktd@gmai...
Tue Dec 14 11:42:40 CST 2010


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

>>> a0.shape
(100, 10)
>>> b0.shape
(100, 3)

Why is the result not always the same? just curious

Josef


More information about the SciPy-User mailing list