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

nirinA: thanks for the erf patch.  It's fine as far as it goes;  the main 
technical issue is that the series development only converges at a 
sensible rate for smallish x;  for larger x something more is needed.

Here's a prototype patch for the erf and erfc functions that uses a power 
series (not quite the same as the series nirinA used;  by pulling out a 
factor of exp(-x*2) you can make all coefficients in the remaining series 
positive, which is good for the numerics) for small x, and a continued 
fraction expansion for larger x.   The erf and erfc functions are 
currently written in Python.  I'll do some more testing (and possibly 
tweaking) of this patch and then translate the Python to C.

----------
Added file: http://bugs.python.org/file15539/erf.patch

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

Reply via email to