16.07.13 15:04, Chris Angelico написав(ла):
Piece of extreme oddity, this.
help(sys.float_info)
... lots of other info ...
| max_exp
| DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable
|
| min_exp
| DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a
normalized float
...
So it's technically correct. Followup question: Why is it off by one?
sys.float_info.max == sys.float_info.radix**sys.float_info.max_exp -
sys.float_info.radix**(sys.float_info.max_exp-sys.float_info.mant_dig)
--
http://mail.python.org/mailman/listinfo/python-list