Mark Dickinson <dicki...@gmail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31980>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to