Brian Schott wrote:
> 
> [...]
> 
> normalrand3=: 3 : 0
> n =. >. -: y
> y{.,((2&o.,.1&o.) +: o. rand01 n) *"1 0 %: - +: ^. rand01 n
> )
> 
> [...]
> 

I have rewritten a bit your Box-Mueller code into:

normalrand4=:({.,)(2 1&o."1 [EMAIL PROTECTED]:@[EMAIL PROTECTED] * [:%:[EMAIL 
PROTECTED]:@[EMAIL PROTECTED])@>[EMAIL PROTECTED]:

by making it tacit and using  
  2 1&o."1 0 and *   
instead of  
  (2&o.,.1&o.) and *"1 0
-- 
View this message in context: 
http://www.nabble.com/generating-standard-normal-variates-tp18898408s24193p18907354.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to