There are some hidden tricks I did not realize:

for erf   =: (1 H. 1.5)@*: * 2p_0.5&* % ^@:*:
and erf2 =: ] * 2p_0.5 * [: 0.5 H.1.5 [: - *:

erf i.10
0 0.842701 0.995322 0.999978 1 1 1 1 1 1

erf2 i.10
0 0.842701 0.995322 0.999978 1 1 0.998693 _814.656 _3.47366e9 1.69158e17

erf2 blows up for big inputs.  is this well known?





________________________________
 From: elton wang <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Saturday, May 11, 2013 4:36 PM
Subject: Re: hypergeometric function in J 
 


Henry and Roger,
Thanks very much your kindly help. Just learned that there is relation between 
m H. n and (n-m) H. n. The erf function
erf   =: (1 H. 1.5)@*: * 2p_0.5&* % ^@:*:

may be rewritten to 
 erf2 =: ] * 2p_0.5 * [: 0.5 H.1.5 [: - *:, which is the one on 
http://en.wikipedia.org/wiki/Confluent_hypergeometric_function. 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to