2^.50^10
56.4386

Might be a problem as according to
http://en.wikipedia.org/wiki/Floating_point there are only 53 bits in the
mantissa of a 64 bit float number. Unless you're running J64. Then 50^10
should remain integer. In that case you could do 11 at a time.

On Sun, Apr 25, 2010 at 10:30 PM, David Ward Lambert <[email protected]
> wrote:

> A faster implementation in a compiled language uses all the bits of the
> random number generator, division with remainder being quicker than a
> rng call.  In a Monte-Carlo simulation I'd arrange the sizes for shift
> and mask.
>
>   ts'1...@#50'
> 0.057766 8.39027e6
>
>   ts'(10#50)#:(1e6%10)?...@#50^10' NB. 10 at a time
> 0.042978 9.44051e6
>
>   <. 10 ^. 2 50 ^ 63 10  NB. j64-602
> 18 16
>
> > Message: 5
> > Date: Sun, 25 Apr 2010 07:18:15 -0700
> > From: Roger Hui <[email protected]>
> > Subject: Re: [Jprogramming] Random Numbers with interation
> > To: Programming forum <[email protected]>
> > Message-ID: <[email protected]>
> > Content-Type: text/plain; charset=iso-8859-1
> >
> > Slightly more economical to do 1...@#50 or 1...@$50
> > instead of ?1e6#50 .
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to