estimate_pi2: Estimation of Pi

Description Usage Arguments Value Examples

View source: R/pi.R

Description

Provide an estimation of the value of pi using simple probabilities. The internal procedure uses C++ code.

Usage

1
estimate_pi2(B = 5000, seed = 10)

Arguments

B

the number of points on which the estimation of pi is produced.

seed

the seed to be used for the random generation used in the procedure

Value

A list of the 'pi' class made of the estimated value of pi and the points on which this estimation is based. In particular:

estimated_pi

The estimated value of pi

points

A data frame with the points in the unit square on which the estimation is based and a dummy indicating whether the particular point is inside the unit circle or not.

Examples

1
estimate_pi(B=5000, seed=10)

fbaeriswyl/ptds2020hw4g0 documentation built on Sept. 15, 2020, 10:40 a.m.