buffon.needle: Buffon's Needle

Description Usage Arguments Value Author(s) Examples

Description

The function estimates pi by simulating a throw with needles.

Usage

1
buffon.needle(N = 1000, l = 1, d = 1)

Arguments

N

the number of needles thrown

l

the length of the needle

d

the distance between the stripes on the floor

Value

Estimated pi and the probability of hit

Author(s)

Nina Louise Pedersen
Institute of Mathematics and Computer Science (IMADA)
University of Sourthern Denmark, (SDU)
npede14@student.sdu.dk

Examples

1
buffon.needle(3000,l = 2, d = 4)

ninalpedersen/Temp2 documentation built on May 23, 2019, 7:05 p.m.