KNOWLEDGEBASE - ARTICLE #1649

Bug: Simulations provoked by a Recalc script command can create the same results repeatedly.

 Every time that Prism recalculates a simulation "analysis", it resets the random number generator based on the time of day to the nearest millisecond. On a fast computer, the script can loop so fast that less than a millisecond elapses between loops, so the same random numbers are generated.

We have fixed the problem in Prism 5.04 and 5.0d. 

To bypass the problem with earlier versions, slow down the script. One way is to put a  CreateLog command at the beginning of the script, so Prism has to write a line to the log file for each script line it runs. Another way would be to put in some extra script lines. For example:

 

Goto L

Goto G

Goto L

Goto G

Goto R



Keywords: generate random number rnd() randomize

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.