Skip to content
forked from kiwenlau/MPI_PI

Calculate PI using MPI with 3 different methods

Notifications You must be signed in to change notification settings

DiRAC-HPC/MPI_PI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPI_PI

Caculate PI using MPI with 3 differend methods

Author: KiwenLau

Method 1: using trapezoid rule

f(x)=(1-x^2)^0.5, so PI/4 is the integral of f(x) from 0 to 1. Then PI can be easily caculated using trapezoid rule.

Method 2: using trapezoid rule

f(x)=4/(1+x^2), so PI is the integral of f(x) from 0 to 1. Then PI can be easily caculated using trapezoid rule.

Method 3: using Monte Carlo method

About

Calculate PI using MPI with 3 different methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 70.5%
  • Shell 29.5%