This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' listing 6: pi_mp.py | |
Multiprocessing based code to estimate the value of PI | |
using monte carlo sampling | |
Ref: http://math.fullerton.edu/mathews/n2003/montecarlopimod.html | |
Uses workers: | |
http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool | |
''' | |
import random |