buffon.needle: Buffon's needle

Description Usage Arguments Value Author(s) Examples

Description

This function takes 3 arguments to simulate Buffon's experiment to estimate pi.

Usage

1
buffon.needle(n=10, l=1, d=1)

Arguments

n

is a positive integer value that specifies how many needles that are tossed in the simulation.

l

is a positive number that specifies the length of the needles tossed in the simulation.

d

is a positive number that specifies the distance between the stripes on the floor in the simulation.

Value

returns pi estimated by simulating Buffon's experiment.

Author(s)

Nguyen Khanh Le Ho & Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk
ngho14@student.sdu.dk

Examples

1
buffon.needle(n=3408, l=2.5,d=3)

Chaiji/LemilExamST522 documentation built on May 6, 2019, 9:55 a.m.