[issue1534] sys.maxfloat patch

Christian Heimes report at bugs.python.org
Sat Dec 1 02:22:16 CET 2007

New submission from Christian Heimes:

Currently Python has no information about the maximum and minimum value
of a float. The patch adds a dict with all important information to sys:

>>> pprint.pprint(sys.maxfloat)
{'dig': 15,
 'epsilon': 2.2204460492503131e-16,
 'mant_dig': 53,
 'max': 1.7976931348623157e+308,
 'max_10_exp': 308,
 'max_exp': 1024,
 'min': 2.2250738585072014e-308,
 'min_10_exp': -307,
 'min_exp': -1021,
 'radix': 2,
 'rounds': 1}

The patch compiles on Linux and Windows.

components: Interpreter Core
files: trunk_maxfloat.patch
keywords: patch, py3k
messages: 58037
nosy: tiran
priority: normal
severity: normal
status: open
title: sys.maxfloat patch
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file8840/trunk_maxfloat.patch

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunk_maxfloat.patch
Type: text/x-diff
Size: 1650 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071201/331b7dd6/attachment.patch 

More information about the Python-bugs-list mailing list