On Sat, Feb 28, 2009 at 9:16 PM, <[email protected]> wrote: > I'm new to J and I'm trying to work out an implementation of the inverse > error function using Taylor Expansion. In order to do this, I need to > calculate the coefficients of the series.
If you don't insist on using the Taylor expansion, the inverse error function has come up on this mailing list once. Look for the title "[Jprogramming] Inverse of Normal CDF" in the archives near Sep 8, 2008. The address is "http://jsoftware.com/pipermail/programming/2008-September/011978.html". Adapting the solution I recommended there, you'd get this definition, using a function from gsl (gnu scientific library). ui =: 'libgsl.so gsl_cdf_ugaussian_Pinv > d d'&(15!:0"_ 0) erfi =: %&(%:2)@:ui@:-:@:>: erfi 0.6038561 0.6 Note however that this implementation is inaccurate for values really close to zero. You might need to special such values (possibly even using the Taylor series near zero) if that's important in your application. Ambrus ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
