buffon: Buffon's Neddle experiment

Description Usage Arguments Value Author(s) Examples

View source: R/buffon.R

Description

This function estimates the probability of a needle to hit a line, P(hit), and pi by performing Buffon's experiment.

Usage

1
buffon(N,l,d)

Arguments

N

number of needles to be thrown on the floor.

l

length of the needle.

d

distance between the stripes on the floor.

Value

P(hit)
pi

Author(s)

Katrine Eriksen and Katrine Bach
Department of mathematics and computer science (IMADA)
University of Southern Denmark
kater13@student.sdu.dk and kabac13@student.sdu.dk

Examples

1
buffon(1000,1,1)

Katrinebch/ExamST516 documentation built on May 7, 2019, 12:29 p.m.