Message117444
$ 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. |
|
Date |
User |
Action |
Args |
2010-09-27 13:23:04 | akira | set | recipients:
+ akira |
2010-09-27 13:23:04 | akira | set | messageid: <1285593784.18.0.168096323949.issue9959@psf.upfronthosting.co.za> |
2010-09-27 13:23:02 | akira | link | issue9959 messages |
2010-09-27 13:23:01 | akira | create | |
|