The Golden Mile Conversion
An aesthetic and coincidental alignment between distances
A previous essay explored the delightful coincidence that π mph ≈ e kt. Where Euler’s identity is fundamental, this alignment between two different measurement systems (statute miles and nautical miles) via the proportions of the two most well-known transcendental numbers (π, the circle constant, and e, the base of natural logarithms) is accidental.
This time I want to dive into the similarly delightful and coincidental relation that ϕ km ≈ 1 mi, i.e., the ratio of statute miles to kilometres, 1 mi:1 km ≈ ϕ:1, is approximated by the golden ratio.
Accidental alchemy
I mentioned this approximation in a previous essay about back-of-the-envelope calculations:
A convenient conversion coincidence is that miles to kilometres is roughly φ, the golden ratio, which is ~1.618 (the actual conversion is ~1.609).
The golden ratio is φ (phi, /faɪ/) or φ:1. It is classically defined as
the ratio of a line segment cut into two pieces of different lengths such that the ratio of the whole segment to that of the longer segment is equal to the ratio of the longer segment to the shorter segment
Put another way, φ is a/b such that a is to b as a+b is to a. Algebraically, it is defined as φ² = φ + 1. This quadratic equation has the solutions φ = ½(1 ± √5), from which we take the positive solution φ = ½(1 + √5).
>>> 0.5 * (1 + 5**0.5)
1.618033988749895
The exact conversion from a statute mile to a kilometre is 1.609344, which is within ~0.5% of φ.
Like π and e, φ is irrational, so unlike the Python calculation shown it has an infinite number of places following the decimal point. Unlike π and e, however, φ is an algebraic number rather than a transcendental number. That is, we can express it as the solution to a polynomial equation, in this case φ² − φ − 1 = 0, restating and rearranging the equation from above.
It is common for the significance of the golden ratio in relation to aesthetics and beauty (and the universe) to be overstated. It is indeed a pleasing ratio, and one prized by many — hence its ‘golden’ value. But it turns out people are just as happy with the supergolden ratio (ψ³ = ψ² + 1, ψ ≈ 1.46557…), the Lichtenberg ratio (√2:1), the Academy ratio (1.375:1), the HDTV ratio (16:9) and a whole host of other ratios, from metallic to photographic.
A measure of the world
In the same essay I first mentioned the golden mile conversion, I also said that
The original definition of the metre was one ten millionth of the distance from the equator to the North pole over the Earth’s surface, i.e., whether longitude or latitude, north to south, east to west, the distance from 0° to 90° is around 10 000 km. Therefore, a great circle circumnavigation of the globe is, to within 0.2%, a 40 000 km trip.
While any relationship between the kilometre and statute mile is a matter of coincidence, that’s not as true for the kilometre and the nautical mile. These two measures of distance historically share a common basis, with the nautical mile based on “one minute around the polar circumference, thus 60 nautical miles to a degree of latitude”.
The definitions of the kilometre and the nautical mile also share some similarity in their shift of perspective from the mish-mashed plethora of customary units scattered across cultures, nations and disciplines to something literally more global and unifying. They come from a time when the relationship of the world to its people was changing significantly.
Historically, we had measured the world against ourselves — the foot, the cubit, the distance one could plough or march — but were moving to measure ourselves against the world and beyond— the nautical mile, the kilometre, the distance from the Sun to the Earth. In this reframing, we are fractions of the world rather than the world being multiples of us.
From zero
The desire for systems of measurement that were more convenient to work with arithmetically follows the adoption of a system for writing numbers that was also more convenient to work with. The Roman Empire led to the common use of Roman numerals across Europe in the first millennium CE. This numeral system reigned until soon after the fall of the Eastern Empire in the 15th century.
Alongside it, sexagesimal (base 60) systems were also used in a number of domains, from mathematics to astronomy to cartography. Sexagesimal systems have perhaps proven to be more enduring in our everyday lives than Roman numerals. You still see their imprint in the 60 seconds of a minute and the 60 minutes of an hour, for example. Sexagesimal is ultimately why a nautical mile corresponds to one minute of latitude.
What we now call the Hindu–Arabic numeral system emerged in India in the early first millennium CE. From there it headed west, where it was extended to represent decimal fractions during the Golden Age of Islam. The number system then took trade routes to Europe from the 10th century onwards. It moved beyond trade into European mathematics when Leonardo of Pisa promoted its use in the 13th century. Accompanying the positional method of writing digits — which were themselves evolving in form — was the concept and notation of zero. The Hindu–Arabic numeral system can be considered to have become mainstream in Europe during the 16th century, during which time it also acquired the decimal point.
Calculating with this system is far easier than with Roman numerals, and far more consistent than the various fractional conversions needed for the sexagesimal systems of the time. The fractional issues are compounded when dealing with the mish mash of incommensurate units history offered up for daily use — some were based on units of 12, some 16, some 14, some 3, some 10, some 60, some 40, etc. Think of a number between, say, 2 and 144 and there’s a good chance somewhere, somewhen, someone created a unit or system of measurement based on it.
So, to simplify things, what if everything were to be based around 10? By the 17th century in Europe, base 10 dominated how numbers were written and spoken. The 16th-century Flemish mathematician Simon Stevin is generally credited with being the first person to propose leaning into this fully with the use of decimal measures of different kinds, from length to weight to coinage.
A matter of definition
One of the more complete pre-metric decimal systems was constructed by John Wilkins, a founding member of the Royal Society, Bishop of Chester and Oliver Cromwell’s brother-in-law, among other things. In 1668 he proposed a decimal system of length, volume and weight measures. At 997 mm his definition of a standard length is very close to the metre. He proposed subdivisions and multiples of units based on powers of ten but, with the notable exception of standard, preferred to reuse existing terms rather than create new ones, e.g., 1 foot would be ⅒ standard (1 decimetre, i.e., 1 centimetre), 1 inch would be ⅒ foot (1 centimetre), 1 furlong would be 100 standards (1 hectometre, i.e., 100 metres) and 1 mile would be 1000 standards (i.e., 1 kilometre).
The reason for this closeness to the modern metre is Wilkins based the length of the standard on pendulum measurements by the Dutch polymath Christiaan Huygens, specifically one pendulum 997 mm in length. The period of a pendulum depends on gravitational acceleration and the length of the pendulum, making it a reasonably reliable measure. A metre-length pendulum has a period of close to 2 seconds (<0.5%), so it takes about 1 second to swing from one side to the other.
During the 17th and 18th centuries the pendulum method was considered a strong contender for defining linear measures. The problem, however, is that gravity is not the constant people like to think it is. Although there is a definition of standard gravity (g, g₀ or gₙ), it is an average rather than a true constant. The actual value varies over the surface of the Earth. I don’t mean it varies wildly and suddenly for dramatic if somewhat unexplained effect in a sci-fi drama, but that depending where in the world you are you will find a difference of ~0.5% from its highest to its lowest value. Not much use as a standard-bearer — something in need of standardisation rather than something that can be used for standardisation. (Note that g should not be confused with G, the gravitational constant, which actually is a constant. Scientific formulae are case sensitive, which works fine on a board, a screen, a printed page or a notebook, but not so much when spoken aloud.)
When the time came for the metre to finally take to the world stage, the French National Assembly in 1790 called for a length standard based on the quarter meridian through Paris. The name mètre is based on µέτρον (/mɛtrɒn/), the Ancient Greek for measure. In 1792, to better know the metre, astronomers Pierre Méchain and Jean Baptiste Joseph Delambre set out from Paris on a seven-year mission of measurement.
All other things being equal, the relationship between the classic definitions of kilometre and nautical mile is precise and non-arbitrary. Taking the distance from equator to pole as 10 000 km, this is equal to 5 400 NM (90 degrees × 60 minutes), which simplifies to an exact ratio of 50:27.
>>> 10000 / 5400
1.8518518518518519
Although 50/27 is a rational number, it expands to an infinitely recurring number in decimal form: 1.8̅5̅1, which is truncated to 16 decimal places in the Python shown. (Note that although the digits of both recurring numbers and irrational numbers extend infinitely beyond the decimal point, the distinction is that irrational numbers do not repeat and their expansion remains infinite regardless of base.)
Imprecisions, imperfections and international relations mean these classic definitions no longer hold precisely, although their accuracy is still good enough for many purposes. In 1929, the nautical mile was rounded up and defined to be precisely 1852 m. The polar circumference of the Earth is around 40 008 km, so a difference of only ~8 km or ~0.2% from the original French National Assembly definition. The metre is no longer defined by a fraction of the Earth’s circumference, or a metal bar kept under lock and key and exacting environmental conditions on the outskirts of Paris, or a number of wavelengths of the orange-red emission line of krypton-86 (⁸⁶Kr). Since 1983 the metre has been defined in terms of the speed of light.
The metre is the length of the path travelled by light in vacuum during a time interval of 1/299 792 458 of a second.
This means the speed of light c (from celeritas, the Latin for speed or quickness) is defined to be precisely 299 792 458 m/s. In the unlikely event that lightspeed were to change tomorrow, so would the metre. (If that were to happen, however, it’s likely such a rent in reality would render this little nugget of metrology far less interesting or significant than the cosmic cataclysm formerly known as tomorrow.)
Fool’s gold mine
Back from our globetrotting historical detour, let’s return to the essay about back-of-the-envelope calculations where I previously mentioned the golden mile conversion. The complete observation is that
A convenient conversion coincidence is that miles to kilometres is roughly φ, the golden ratio, which is ~1.618 (the actual conversion is ~1.609). This means that, after skipping the first few values, successive pairs in the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21…) offer a fairly good conversion (3 mi ≈ 5 km).
Leonardo of Pisa is better known nowadays as Leonardo Fibonacci. In addition to using Hindu–Arabic numeral system in his book, Liber Abaci, he also investigated the number sequence that came to bear his name.
Fibonacci number n is defined as Fₙ = Fₙ₋₁ + Fₙ₋₂, where F₀ = 0 and F₁ = 1. In other words, the sum of the preceding two numbers, seeded with 0 and 1. Ignoring non-natural numbers, this definition in terms of itself leads to a direct recursive encoding:
def fibonacci(n):
return fibonacci(n - 1) + fibonacci(n - 2) if n > 1 else n
Given this function definition in Python, we can easily calculate the first few values of Fₙ:
>>> [fibonacci(n) for n in range(18)]
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597]
Of more interest and relevance, we can calculate the ratio between successive values:
>>> for n in range(2, 18): print(fibonacci(n) / fibonacci(n - 1))
1.0
2.0
1.5
1.6666666666666667
1.6
1.625
1.6153846153846154
1.619047619047619
1.6176470588235294
1.6181818181818182
1.6179775280898876
1.6180555555555556
1.6180257510729614
1.6180371352785146
1.618032786885246
1.618034447821682
The ratio of a number to its predecessor zigzaggingly converges on φ, i.e., Fₙ:Fₙ₋₁ tends to φ as n tends to infinity. By the time we reach F₁₂/F₁₁ (144/89) the value is already good to 3 decimal places (1.618). By the time we hit F₁₇/F₁₆ (1597/987) it’s good to 6 decimal places (1.618034).
In practice, from 5 onwards the predecessor ratio is good enough for most conversion uses: 3 mi = 5 km (within 4%), 5 mi = 8 km (within 0.6%), 8 mi = 13 km (within 1%), 13 mi = 21 km (within 0.4%). Note that ascending the sequence converts miles to kilometres and descending it converts kilometres to miles, e.g., 5 km ≈ 3 mi and 5 mi ≈ 8 km.
Cache in hand
If you’re only here for ratios and not code, skip ahead to the wrap-up. If, however, programming is something you care about, you may also care about the lurking performance issue.
Elegant as that recursive definition is, except for the 0 and 1 cases, each call to fibonacci involves two further calls to fibonacci that are almost identical. This gets exponentially out hand. To a squintable approximation the number of recursive calls doubles with each successive value. More accurately, the recursive calls increase by around φ for each successive n, i.e., the growth follows φⁿ rather than 2ⁿ.
Given that almost all the calls are recalculations — calculating Fₙ involves calculating both Fₙ₋₂ and Fₙ₋₁, which itself involves recalculating Fₙ₋₂, and so on — this is staggeringly inefficient. While mathematical definitions consume no time or energy (except, perhaps, on the part of the student), computation exists in the finite physical realm of SI units and human patience.
The usual way to deal with this problem is to chop the recursive call tree down to loop lumber:
def fibonacci(n):
if n > 1:
previous, result = 0, 1
for i in range(2, n + 1):
previous, result = result, previous + result
return result
else:
return n
Perhaps not as elegant, but certainly more efficient.
But we can go further.
The Fibonacci sequence is immutable and eternal. That is, the nth value will always be the nth value. Once calculated, in theory we need never calculate it again. We can memoize each call, remembering previous results in a cache. The next time fibonacci is called for a previously cached result, that value is used instead of performing the calculation; for previously unseen calls, the calculation is performed and its results are cached for later use. To do this in Python we can decorate the fibonacci function definition with cache from the functools module:
@cache
def fibonacci(n):
return fibonacci(n - 1) + fibonacci(n - 2) if n > 1 else n
Such caching is often implicit in declarative programming languages, but must be instrumented explicitly in imperative languages, such as Python.
In the end
Whether you prefer to think about it in terms of the golden ratio or — with readymade numbers to hand — the Fibonacci sequence, the golden mile conversion is a fun and diverting coincidence you can use when confronted with a need to go between statute miles and kilometres.
As with any coincidence, don’t read too much into it. There’s nothing magical about the golden ratio (in general) and nothing profound about the approximation. As well as convenience, it offers us an opportunity to meander through some calculations and bits of history.