Conversation started Mar 2, 2018 at 10:49.
Mar 2, 2018 10:49
you can also calculate pi using the needle trick during the exam
In mathematics, Buffon's needle problem is a question first posed in the 18th century by Georges-Louis Leclerc, Comte de Buffon: Suppose we have a floor made of parallel strips of wood, each the same width, and we drop a needle onto the floor. What is the probability that the needle will lie across a line between two strips? Buffon's needle was the earliest problem in geometric probability to be solved; it can be solved using integral geometry. The solution, in the case where the needle length is not greater than the width of the strips, can be used to design a Monte Carlo method for approximating...
tfw you forgot the value of pi while writing an exam so you borrow the teacher's matchbox to do a quick nee--- fucking hell
@BalarkaSen Buffon's needle is sloooooooooooooooooow
Anonymous
If someone forgets the value of pi during a math exam, I doubt they would have any idea about Buffon's needle :P
In geometric probability, the problem of Buffon's noodle is a variation on the well-known problem of Buffon's needle, named after Georges-Louis Leclerc, Comte de Buffon who lived in the 18th century. That problem solved by Buffon was the earliest geometric probability problem to be solved. == Buffon's needle == Suppose there exist an infinite number of equally spaced parallel lines, and we were to randomly toss a needle whose length is less than or equal to the distance between adjacent lines. What is the probability that the needle will cross a line? The formula is P ...
even more delicious
Mar 2, 2018 10:50
you'll be throwing matches all day just to get to three significant figures
I did it with 30 matches and some standard ruling and got 3.15 I think
@BalarkaSen You could probably calculate the probability of that happening. Doesn't prove that it doesn't take all day to be sure of three significant figures.
Maybe I got ze lucky. I don't know what the standard deviation of that experiment is.
@Slereah what if you do Buffon's noodle with a Hilbert space-filling curve?
@DawoodibnKareem Jesus christ let me finish
Y'all are sniping me hard
rages in the background
Mar 2, 2018 10:53
Sorry, I'll be careful not to talk while you're in the room, and likely to talk yourself.
I was being facetious
I wonder what's the quickest way to derive pi to at least 10 d.p. ?
You're right, of course. I don't actually know what the standard deviation is.
Mar 2, 2018 10:54
@Secret System.out.println(Math.PI);
that's cheating!
Anonymous
265
Q: What is the fastest way to get the value of π?

Chris Jester-YoungSolutions are welcome in any language. :-) I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically I'm using ways that don't involve using #defined constants like M_PI, or hard-coding the number in. The program below tests the various ways I know of. ...

Hm, how fast does Wallis product converge?
@Secret Get a polygon with enough sides find the perimeter and do a thing?
Cause I'm basic
@CooperCape I thought that was too slow...
Mar 2, 2018 10:55
Oh fair enough...
Faster than the Riemann sum
Also if you use the wrong Riemann sum you'll converge to 4
Anonymous
The bisection method is still the fastest by hand
Anonymous
I think
@Secret there are series that converge very fast to pi. Offhand I can't remember them, but a quick Google should find the details.
Anonymous
Others are too complicated
Mar 2, 2018 10:56
what is the slowest method to get pi, though
@BalarkaSen Yes, that's called squaring the circle.
Anonymous
@Slereah That doesn't converge
@JohnRennie There are series acceleration algorithms which accelerate speed of convergence of serieses, IIRC
@Slereah the Euler series converges very slowly as I recall.
@JohnRennie I know one: 1, 2, 3, pi, pi, pi, pi, pi, pi, pi, ...
Mar 2, 2018 10:57
@Slereah is there even a slowest thing in a linear order set of algorithms? -_-
Hah @Dawood
Gotteem
(To read the above sentence, make "even" higher pitched)
265
Q: What is the fastest way to get the value of π?

Chris Jester-YoungSolutions are welcome in any language. :-) I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically I'm using ways that don't involve using #defined constants like M_PI, or hard-coding the number in. The program below tests the various ways I know of. ...

Anonymous
@Secret Do you think he's being serious :P
@Secret Look up Cohen-Villegas-Zagier acceleration
Mar 2, 2018 10:57
I remember reading a paper about the slowest sorting algorithm
slower than bogosort
Anonymous
@JohnRennie Ninja'd already :)
Anonymous
^
Too many snips and ninjas, but thanks guys
@Slereah arrange the elements in a random order. Check if they're sorted. If not rinse and repeat :-)
Mar 2, 2018 10:58
bookmarks conversation
very inefficient
Anonymous
I always wanted a ninja costume
@JohnRennie that's bogosort :p
This one is even slower
Ah ...
statistically, anyway
Bogosort's average sorting time is $O(n!)$, but its worst case is $O(\infty)$
Mar 2, 2018 10:59
bogusort
what the fuck does O(\infty) mean
well the sorting time can be arbitrarily long
if truly random
Is that what you use to denote that? Fucking physicists
Anonymous
Lol. "Quantum Bogosort"
Anonymous
Just google it
Anonymous
122
A: Are there any worse sorting algorithms than Bogosort (a.k.a Monkey Sort)?

BioGeekQuantum Bogosort A sorting algorithm that assumes that the many-worlds interpretation of quantum mechanics is correct: Check that the list is sorted. If not, destroy the universe. At the conclusion of the algorithm, the list will be sorted in the only universe left standing. This algorithm t...

Mar 2, 2018 11:01
@BalarkaSen that's what Sam uses :-)
Physicists don't believe in infinity anyway
It uses up a lot of universes though. That must piss off the inhabitants somewhat.
"This is obviously the best sorting algorithm, not the worst."
Though I'm willing to believe the universe is unbounded. Whether that makes it infinite or not (in mathematician's terms) I neither know nor care :-)
It depends how long it takes to check whether the list is sorted, as many times as there are universes.
@JohnRennie It's hella large at the very least :)
Hella large is technically infinite
The adjective "hella" is important
 
Conversation ended Mar 2, 2018 at 11:04.