[issue3439] math.frexp and obtaining the bit size of a large integer

Raymond Hettinger report at bugs.python.org
Thu Jul 24 23:39:58 CEST 2008

Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Another reason to leave frexp() untouched  is that it is tightly 
coupled to ldexp() as its inverse, for a lossless roundtrip:

  assert ldexp(*frexp(pi)) == pi

This relationship is bound to get mucked-up or confused if frexp starts 
accepting large integers that are no exactly representable as floats 
(i.e. 2**100+1).

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list