The Student Room Group

Using random numbers to generate constants?

Hi, I've been told to use random numbers to generate approximations for some common constants.
I've been playing around with it for a while, and have managed to generate answers for, PI and sqrt(x).
I've then moved on to exp, and I've not a clue how. I've tried using the exp(ix)=cos(x)+isin(x) identity, with no success.
Wondering if anyone could point me in the right direction.

Edit *This was meant to have an undergrad tag*

Cheers
(edited 8 years ago)
Reply 1
What exactly are you doing? Series expansions?
Reply 2
Original post by B_9710
What exactly are you doing? Series expansions?


Using random numbers, specifically, the rand() function in excel to calculate approximate values for constants.
Original post by Snedss
Hi, I've been told to use random numbers to generate approximations for some common constants.
I've been playing around with it for a while, and have managed to generate answers for, PI and sqrt(x).
I've then moved on to exp, and I've not a clue how. I've tried using the exp(ix)=cos(x)+isin(x) identity, with no success.
Wondering if anyone could point me in the right direction.


It would be helpful if you could describe something of what you have done already, as it's not clear what method you are expected to use here.

What it sound like to me is that you've been asked to construct various different Buffon machines. These generalize the classical Buffon's needle technique where random numbers are used to simulate the dropping of a needle on a parallel strip pattern. The geometry of the situation allows one to infer a value of π\pi. The more general case is where you use a uniform random number generator to simulate the "dropping" of one geometric shape on a pattern or grid, such that other mathematical constants can be inferred.

Is that it? Or something else?

Quick Reply

Latest