On Wed, Jul 16, 2008 at 11:04 AM, nirinA raseliarison <[EMAIL PROTECTED]> wrote: > Daniel Stutzbach wrote: >> http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/newlib/libm/math/s_erf.c?rev=1.1.1.1&cvsroot=src > > a personnal view here. i'm always perplex when there > are many magic numbers in some code. unless i know how > to compute these numbers.
The comments in the code *do* explain how to compute the numbers, albeit tersely. Most of the numbers are coefficients in a Taylor series expansion. The code is a few hundred lines because numeric methods for these functions that are accurate in the range [a,b] tend not to be accurate outside the range [a,b]. Ergo, robust implementations include several different methods so that they are accurate over the entire range of the function. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com