speed issue in simulating a stochastic process
<SNIP>
On Thu, Nov 6, 2014 at 2:05 PM, Matteo Richiardi <matteo.richiardi at gmail.com
wrote:
<SNIP>
Final question: in your code you have mean(M[t-1L,]): what is the 'L' for? I removed it at apparently the code produces the same output...
<SNIP> The constant "1L" is stored as an integer; the constant "1" is stored as double precision. This sometimes makes no difference and sometimes makes a huge difference (especially in the context of numerical comparisons). If something is supposed to be an integer it is safer to use the "L" form. See ?NumericConstants. cheers, Rolf Turner
Rolf Turner Technical Editor ANZJS