Smallest float different from 0.0?

Paul McGuire ptmcg at austin.rr.com
Mon Sep 7 11:09:03 EDT 2009


On Sep 7, 9:47 am, kj <no.em... at please.post> wrote:
> Is there some standardized way (e.g. some "official" module of such
> limit constants) to get the smallest positive float that Python
> will regard as distinct from 0.0?
>
> TIA!
>
> kj

You could find it for yourself:

>>> for i in range(400):
...    if 10**-i == 0:
...       print i
...       break
...
324

-- Paul



More information about the Python-list mailing list