Template:ROOT/Exercises/Trying Interactive ROOT

Exercise
On an interactive ROOT session: Fill an array of 100 000 000 64Bit floating point numbers of the machine independent ROOT type  with random numbers. Compute the mean of the array and print it to the console. Note the computation time.

Hint: You can get random real numbers by creating a pointer to an instance of the  class. (The constructor takes one arbitrary integer as initialization.) Then you can call the method  to get a simple pseudo random number uniformly distributed between 0 and 1. For example:

Solution
/Exercises