I didn't imply there is a bug in J.

? depends on the side effect of updating the internal state of RNG.
each call to ?^:3[10000 and ?^:2[10000 is expected to produce different
results.

In your example, if the intended usage was smoutput or count, then the
current behavior would be unexpected.

Пнд, 11 Июл 2011, Roger Hui писал(а):
> Side effects?  What's that?
> 
> 
> 
> ----- Original Message -----
> From: bill lam <[email protected]>
> Date: Monday, July 11, 2011 16:51
> Subject: Re: [Jprogramming] total number of invocations of  v in v^:(1 2)
> To: [email protected]
> 
> > I think optimization is usually good, but pitfall is it does not 
> > work for 
> > side effect. eg.
> >    ?^: 3 2 2 2 3 3]10000
> > 1988 2019 2019 2019 1988 1988
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to