buffon: Buffons needle

Description Usage Arguments Value Author(s) Examples

View source: R/buffon.R

Description

Estimating pi by throwing needles at lines, whcih is buffons experiment.

Usage

1
buffon(n=1000,l=1,d=1)

Arguments

n

Number of throwed needle

l

The length of the needle

d

The distance between the lines

Value

Return the number of hits and the estimated pi.

Author(s)

Steffan Leth Jensen
Department of mathematics and computer science (IMADA)
University of southern Denmark, SDU, Odense
steje14@student.sdu.dk

Examples

1
Lazzerini experiment: buffon(3408,2.5,3)

mrleth94/ST522ExamSteje14 documentation built on May 23, 2019, 7:37 a.m.