Any built-in function for smallest positive floating point number?

Xavier Ho contact at xavierho.com
Wed Aug 12 03:42:36 CEST 2009


I got it to work with Python 2.6.2.

>>> import struct
>>> struct.unpack('d', struct.pack('Q', 1))[0]
4.9406564584124654e-324

Python 3.1 will print 5e-324, which is fair enough.

Cheers,
Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090812/cfffe063/attachment.html>


More information about the Python-list mailing list