Skip to content

Parallel implementation of the dartboard algorithm to approximate pi

License

Notifications You must be signed in to change notification settings

esteban-gasan/monte-carlo-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Montecarlo pi

A parallel implementation of the Montecarlo method known as dartboard algorithm to approximate pi (π).

Installation

Install gcc compiler:

sudo apt install gcc

Usage

  • Execute the bash script to run the tests:

    bash run.sh
  • To execute a single file, cd into bin/ and run any of the following commands:

    ./dart_seq {exponent}
    ./dart_th {exponent} {threads}
    ./dart_th_off {exponent} {threads}

    Replace {exponent} with a number from 0 to 11 and {threads} with the number of threads to use. For example, if you pass 7, then the program will raise 10 to the power of 7, which will calculate 10,000,000 throws.

About

Parallel implementation of the dartboard algorithm to approximate pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published