This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akira
Recipients akira
Date 2010-09-27.13:23:01
SpamBayes Score 5.3163753e-08
Marked as misclassified No
Message-id <1285593784.18.0.168096323949.issue9959@psf.upfronthosting.co.za>
In-reply-to
Content
$ python3.1 -c'import math; f = math.log(4,2); print(int(f), f.as_integer_ratio())'
2 (2, 1)

$ python3.2 -c'import math; f = math.log(4,2); print(int(f), f.as_integer_ratio())'
1 (9007199254740991, 4503599627370496)

Python 3.2a2+ (py3k:85028, Sep 27 2010, 16:46:11) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> f = math.log(32, 2)
>>> f
4.999999999999999
>>> int(f)
4
>>> f.as_integer_ratio()
(5629499534213119, 1125899906842624)

I'm not sure whether it is a bug, but it is an unexpected change in behavior between 3.1 and 3.2.
History
Date User Action Args
2010-09-27 13:23:04akirasetrecipients: + akira
2010-09-27 13:23:04akirasetmessageid: <1285593784.18.0.168096323949.issue9959@psf.upfronthosting.co.za>
2010-09-27 13:23:02akiralinkissue9959 messages
2010-09-27 13:23:01akiracreate