[email protected] wrote:

> The particular issue I'm having is trying to come up with a way to
> calculate equation 18 on http://mathworld.wolfram.com/InverseErf.html

A straightforward solution (I am sure it can be done much better) is given by

c=:3 : 0"0 M.
n=.y
if. y=0 do. 1x
else.
  k=.i.n
  +/(c k)*(c n-(1+k))%(k+1)*(1+2*k)
end.
)

a=:c % 1 + 2 * ]

   a 3
127r630

If you want floating point, make c return 1 rather than 1x.

Best wishes,

John


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to