Message290948
I suggest changing the main docs to match the existing docstring, "Return e raised to the power of x."
The exp() function is a thin wrapper around the C math library and where it is documented as "compute e (the base of natural logarithms) raised to the power x" or "e raised to the power X (where e is the base of the natural system of logarithms, approximately 2.71828)." Our docs shouldn't make more or fewer promises than the upstream libraries are making.
Perhaps there can be a general note about reading too much into the math module implementation details. We expect some relationships to only be approximate: log(x)+1≈log1p(x), log2(x)≈log(x,2.0), exp(lgamma(x))≈gamma(x), sqrt(x)≈x**0.5, etc. These are floating point math library "facts of life".
* http://www.slac.stanford.edu/comp/unix/package/rtems/doc/html/libm/libm.info.exp.html
* https://www.gnu.org/software/libc/manual/html_node/Exponents-and-Logarithms.html |
|
Date |
User |
Action |
Args |
2017-03-31 23:11:58 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, belopolsky, stutzbach, docs@python, serhiy.storchaka |
2017-03-31 23:11:58 | rhettinger | set | messageid: <1491001918.93.0.431287346263.issue29956@psf.upfronthosting.co.za> |
2017-03-31 23:11:58 | rhettinger | link | issue29956 messages |
2017-03-31 23:11:58 | rhettinger | create | |
|