In reply to Sophie Collingborn.

Only the first STREAMINIT call is used to set the random number seed, as I mention in this article and explain further in a second article. You can (and should) delete the second call to STREAMINIT. The result will be the same.

I will also mention that the call rand("Normal", 0, 0.00) will always return 0, so it is better to write lghr=0.