Amazon Suggestions

Friday, February 8, 2008

Week 1 - Zari

These are the solutions for the Part 1, 2 and 5a. Please notice that for the proper operation of the two first random functions all of their variables should be integers, especially when the correction for the overflow is needed. Also in the function from the numerical recipes the seed must be a negative integer.

From the results we can observe that the best function is the first one (although this shouldn't be the case).


Zari with normal mod use without overflow




Zari using overflow correction
Zari using the ran1 function from Numerical Recipes



No comments: