Message305898
Also, prec_log would need significant work to make it handle all the corner cases sensibly. For example:
Python 3.6.3 (default, Oct 5 2017, 23:34:28)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> def prec_log(x, y):
... a = math.log(x, y)
... return a + math.log(x / math.pow(y, a), y)
...
>>> math.log(3**1000, 3)
999.9999999999999
>>> prec_log(3**1000, 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in prec_log
OverflowError: math range error |
|
Date |
User |
Action |
Args |
2017-11-08 20:12:18 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, stutzbach, serhiy.storchaka |
2017-11-08 20:12:18 | mark.dickinson | set | messageid: <1510171938.35.0.213398074469.issue31980@psf.upfronthosting.co.za> |
2017-11-08 20:12:18 | mark.dickinson | link | issue31980 messages |
2017-11-08 20:12:18 | mark.dickinson | create | |
|