Posts

Showing posts from September, 2020

I just passed an impossible test on Facebook!

We've all seen those status updates from friends stating that they got 9 out of 10 answers right to a so-called impossible test claiming that " Nobody will get more than 60% of these right!" or something similar, haven't we? Let's look at how these things work, what they do and why they do it. Before going any further, help yourself to a decent dollop of cynicism or you're going to be very disappointed in social media. Remember the golden rule: if it looks too good to be true, then the chances are that it is not true. If there is the remotest possibility that something happening on social media could be something other than what it looks like, then it is not what it looks like and someone is trying to pull a fast one for profit in some way. Are the people setting these quizzes doing it out of the goodness of their hearts for the enrichment of the human race? Of course not. They're doing it to make money . So how do they make their money? What is their

Using random numbers to compute the value of π

Image
This is a little foray into number theory and presents one method of calculating the value of \(\pi\). It involves using a program to perform iterative calculations, so in order to minimise the impact of compounded rounding errors, it makes sense to use a computing device that operates with sufficient precision. I chose the SwissMicros DM42 for this because it uses Thomas Okken's Free42 Decimal under the hood, which offers around 34 digits of precision. The DM42 is also extremely fast, particularly so if connected to a USB port while operating because it more than triples the CPU clock compared to battery-powered operation. Back in 1735, the Swiss mathematician, astronomer (and a few other things besides) Leonhard Euler stated, and proved in 1741, that as the number \(n\) tends towards \(\infty\), the probability that two natural numbers \(a\) and \(b\) less than or equal to \(n\) are coprime, i.e. that \(a\) and \(b\) share no common divisor other than \(1\), tends towards