Can someone explain what is going on here?
In [153]:
small = ones(1, dtype='float32')
In [154]:
small
Out[154]:
array([ 1.], dtype=float32)
In [155]:
small*1e-45
Out[155]:
array([ 1.40129846e-45], dtype=float32)
In [156]:
small*1e-46
Out[156]:
array([ 0.], dtype=float32)
I would
Hi,
On Wed, Oct 2, 2013 at 6:00 PM, Dave Cook dav...@gmail.com wrote:
Can someone explain what is going on here?
In [153]:
small = ones(1, dtype='float32')
In [154]:
small
Out[154]:
array([ 1.], dtype=float32)
In [155]:
small*1e-45
Out[155]:
array([ 1.40129846e-45],
On Wed, Oct 2, 2013 at 6:06 PM, Matthew Brett matthew.br...@gmail.comwrote:
Is it possible you are thinking of 2**-126 rather than 10**-126?
Yup, brainfart...
In [3]: print np.finfo(np.float32)
Machine parameters for float32