I am sorry, there are two typos in the code (which do not affect the 
calculation). The first is

println( "i/10^6 = ", div( i, 10^6 ), " pi_mc=", pi_mc )

So all the output should read as "i/10^6 = ...". The other is

if abs( pi_mc - pi ) > 0.001

where I used a smaller threshold (0.001) to catch the sudden change in the 
output.
Hope there are no more typos...

Best regards

Reply via email to