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 expect float32 to be able to represent
numbers with exponents as small as -127.

Thanks,
Dave Cook
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to