Raymond Hettinger added the comment:

> Is math.exp(x) always more accurate than math.e ** x? 

It is usually at least as accurate, but we can't really guarantee anything 
because math.exp does whatever the underlying C math library does (so good 
libary -> good result, bad library -> bad result).

Rather than gum-up the math library docs, I suggest having a FAQ entry or wiki 
entry somewhere.  Getting extreme accuracy is a nebulous topic in general and 
even more so in Python (where there is very little you can do to prevent double 
rounding and whatnot).  

In addition to extreme accuracy issues, there are also performance issues which 
will vary from implementation to implementation and from release to release.

Historically, the docs have tried to rise above the fray and make very few if 
any promises about accuracy or speed.  This should be doubly true when it comes 
to numerical methods which are a mix of art, science, and dark art (and where 
the answers to "what is best" may change depending on the range of input 
values).

----------

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

Reply via email to