Viktor,

        Yes, your version seems clean. On my computer (which
is an old Mac running OSX) normalrand4 takes only 1/4 the
space of normalrand, but takes upwards of 5 times as much
time. Go figure?

On Sat, 9 Aug 2008, Viktor Cerovski wrote:

+
+ 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
+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to