Techniques in Theoretical Physics
Assignment for Lab 1: Random
Write a C code for:
Generating a sequence of N random numbers in the region (0,1)
using linear congruential method with the following parameters:
a=6364136223846793005, m=264, c=1
Compute the average of these random numbers.
Compile and run this code on a Digital workstation to generate
a sequence of 50 random numbers and compute their average.
Plot these random numbers as a bar graph using Matlab.
Do the same thing using the C standard random number function.
Compare the average with that determined by the first approach.