[docs] [issue37454] Clarify docs for math.log1p()

Mark Dickinson report at bugs.python.org
Mon Jul 1 03:00:32 EDT 2019


Mark Dickinson <dickinsm at gmail.com> added the comment:

> however, for x < 0.0 it is always worse

That's quite surprising. Which platform? And can you give some example inputs and outputs? With a good math library, I'd expect `log1p(x)` to almost always be at least as accurate as `log(1 + x)`, and substantially _more_ accurate for small x (say abs(x) < 1e-5). If that's not happening, we may want to substitute our own implementation for the system implementation on some platforms (in the same was as we did for lgamma, erf, and friends).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37454>
_______________________________________


More information about the docs mailing list