[HN Gopher] Using Fibonacci numbers to convert from miles to kil...
       ___________________________________________________________________
        
       Using Fibonacci numbers to convert from miles to kilometers and
       vice versa
        
       Author : thunderbong
       Score  : 140 points
       Date   : 2024-08-28 13:48 UTC (2 days ago)
        
 (HTM) web link (catonmat.net)
 (TXT) w3m dump (catonmat.net)
        
       | noman-land wrote:
       | This is amazing.
        
       | drivingmenuts wrote:
       | Well, there's my new bar trick.
        
       | _hao wrote:
       | Pretty neat!
        
       | OutOfHere wrote:
       | The article shows:
       | 
       | fn(n miles to km) [?] next_fib(n)
       | 
       | fn(n km to miles) [?] prev_fib(n)
       | 
       | ---
       | 
       | Similarly,
       | 
       | fn(n kg to lbs) [?] prev_fib(n) + next_fib(n)
       | 
       | fn(n lbs to kg) [?] (prev_fib(n) - prev_fib(prev_fib(n))) * 2
       | 
       | fn(fib(i) lbs to kg) [?] fib(i-1) - fib(i-4) # Alternate formula
        
         | madcaptenor wrote:
         | This is basically multiplying by sqrt(5) ~ 2.236, and 1 kg =
         | 2.204 lb. Not bad!
        
       | seanhunter wrote:
       | Fun Fibonacci facts:
       | 
       | - the first published use of the term "golden section" (which
       | later became more commonly known as the "golden ratio") to
       | describe the number phi[1] was by Martin Ohm, the brother of
       | Georg Ohm who the unit is named after.
       | 
       | - Binet's closed form series solution for the Fibonacci
       | numbers[2] is really cool because it involves three irrational
       | numbers yet every term of the resulting series is of course an
       | integer.
       | 
       | [1] (1+sqrt(5))/2
       | 
       | [2] F(n)=(phi^n - psi^n)/ sqrt(5) (n=0,1,2,...) where
       | phi=(1+sqrt(5))/2 and psi=(1-sqrt(5))/2
        
       | LegionMammal978 wrote:
       | Those are some amazingly spammy "Top Posts" at the bottom of the
       | page. From the same blog, I thought at first that the "left-pad
       | as a service" [0] was a parody, but the whole collection of
       | Online Tools websites is so elaborate that it might truly be in
       | earnest.
       | 
       | Also, this should be (2010). The "last updated 3 weeks ago" is
       | likely not real at all, every page on this blog was allegedly
       | updated in a similar timeframe. (Maybe it counts every change to
       | the list of links? Or maybe it's just bogus SEO nonsense.)
       | 
       | [0] https://catonmat.net/1000-paying-left-pad-users
        
         | hluska wrote:
         | Why be a hater? It doesn't make you look smart. It just bores
         | the rest of us.
        
           | LegionMammal978 wrote:
           | Because they've allegedly gotten hundreds to thousands of
           | people to pay up to $9 per month for basic string utilities
           | as a subscription service, just about all of which are
           | offered for free by a dozen other websites. Either they're
           | padding out their subscriber count by a lot, they have some
           | impressive functionality they aren't advertising, or these
           | subscribers are getting ripped off. Also, comparing to
           | archived versions of the pricing page, they've been
           | ratcheting up the price over time.
           | 
           | Meanwhile, they're making some dubious claims about the
           | security and privacy of their cloud browser service. Sure,
           | _your_ ISP might not see which websites you 're visiting on
           | it, but now _they_ can go snoop on your browsing however they
           | 'd like, and read off all your passwords and whatnot.
        
           | gjm11 wrote:
           | I don't see any hate. I do see useful information. Looking at
           | the linked page for myself, and seeing a list of "Top posts"
           | all of which are obviously ad-infested SEO gunge, I
           | immediately learn that I cannot trust whoever made the page,
           | because getting eyeballs onto their advertisements is more
           | important to them than truth.
           | 
           | This doesn't have any particular implications for this
           | particular page, and the "lucky 10,000" who had never before
           | encountered the idea of converting between miles and
           | kilometres using Fibonacci numbers will have learned
           | something fun, which is great. But seeing the SEO bullshit
           | tells me immediately that I am not going to want to (e.g.)
           | add this blog to my feed aggregator[1].
           | 
           | [1] Does anyone else actually use these any more? I feel a
           | bit of a dinosaur.
           | 
           | The grandparent of this comment was useful to me. Your "why
           | be a hater?" was not.
        
           | akira2501 wrote:
           | > It just bores the rest of us.
           | 
           | Yet you take the time to reply. This always baffles me.
        
         | bawolff wrote:
         | Surely its a parody. Like people can put lots of effort into a
         | parody.
         | 
         | Regardless, even if it wasn't, its at worst silly. Its not like
         | he is scamming people out of money.
         | 
         | Edit: after looking at a few more pages, now im not sure what
         | to think. Maybe im wrong. The untracked browser stuff seems
         | like it could be an actual scam on those who dont know what
         | they are doing. Its all so much more extreme than i thought.
         | 
         | Maybe this all is an attempt to link farm in order to get SEO
         | to scam people. In which case it makes me feel complicit.
        
         | a57721 wrote:
         | I thought that the page about a service for padding strings was
         | some kind of satire ("I promise I won't put it on npm, won't
         | unpublish it, and I definitely won't rewrite it in Rust"), but
         | apparently the website tries to sell such services, and overall
         | it's a dumpster full of SEO spam and amateur JS coding
         | exercises. Not a great link to see on HN.
        
       | bena wrote:
       | There's a slightly quicker way that they kind of stumble upon,
       | but never outright say. miles * 8/5 = km and km * 5/8 = miles.
       | 
       | How many km in 100 miles? 100/5 = 20, 20 * 8 = 160.
       | 
       | How many miles in 400km? 400/8 = 50, 50 * 5 = 250.
       | 
       | And 8/5 is 1.6 exactly, which is close to the "golden ratio".
        
         | j0057 wrote:
         | When driving in the UK, I found myself practicing my 16-table a
         | lot: when seeing a 50 mph max speed sign, I'd multiply 5 by 16
         | to get 80 km/h.
        
         | gjm11 wrote:
         | If you want _real_ accuracy, note that the actual mile /km
         | ratio is almost exactly half way between 1.6 and (1+sqrt(5))/2.
         | So do both conversions and take the average.
         | 
         | (You won't get results as accurate as that suggests, of course,
         | because doing the Zeckendorff + Fibonacci-shift thing only
         | gives you an approximation to multiplying by (1+sqrt(5))/2.)
        
       | tcdent wrote:
       | > A pure coincidence that the Golden ratio is almost the same as
       | kilometers in a mile.
       | 
       | Is it really just a coincidence? Genuinely curious.
        
         | plorkyeran wrote:
         | Yes, of course.
        
         | delecti wrote:
         | Considering pre-metric France didn't use the mile, and the
         | meter was originally meant to be 1/10,000,000 of the distance
         | from the north pole to the equator, it seems almost impossible
         | that it's intentional.
        
         | ikawe wrote:
         | The current "mile", the "International Mile", is very close to
         | the 1593 "statute mile", going through a lot of history, but
         | ultimately coming from 1,000 (a "mil") paces.
         | 
         | The kilometer: As part of the widespread rationalization that
         | occurred during the French revolution, the meter was defined in
         | 1791 as 1 ten millionth the distance of a line drawn from the
         | equator to the north pole, through Paris.
         | 
         | Golden ratio: 1.618... km / mile ratio: 1.609...
         | 
         | So, seems like just a coincidence.
         | 
         | But these are fun:
         | 
         | https://en.wikipedia.org/wiki/Mile
         | https://en.wikipedia.org/wiki/Kilometre
        
           | akira2501 wrote:
           | > as 1 ten millionth the distance of a line drawn from the
           | equator to the north pole, through Paris.
           | 
           | Rationalized but nearly unrealizable.
        
         | renewiltord wrote:
         | Yes, of course. There are lots of these. pi ~= sqrt(g). Common
         | trick to make period of pendulum approx = 2*sqrt(l) which is
         | easy to calculate.
        
           | madcaptenor wrote:
           | But this one isn't a coinicidence - the idea of having the
           | unit of length be the length of a seconds pendulum predates
           | the meter we have. (It doesn't work because the period of a
           | pendulum depends on your latitude.)
        
             | renewiltord wrote:
             | You're kidding me! That's a fact I had no idea about. I
             | thought I was damned clever for having figured out the
             | thing as a child and then found out all the other kids knew
             | it too. I never thought to check the origin. Made my day.
             | Thank you.
        
               | umanwizard wrote:
               | There was an HN post about the pi^2=g connection not too
               | long ago.
        
         | crdrost wrote:
         | So it is, but the way that these units connect together is much
         | closer than you'd think and amounts to a sort of mass
         | distribution on the leg.
         | 
         | The _kilometer_ is a thousand meters of course. And a _meter_
         | was defined the way it was to match the length of a pendulum
         | with a period of 2 seconds.
         | 
         | The _mile_ was defined the way it was to match a different
         | thousand: _a thousand Roman paces, measured as two steps_.
         | (They didn 't like the fact that if you go from left foot to
         | right foot the measurement is slightly diagonal, so they
         | measured from left foot to left foot.) So if you figure that a
         | Roman had a leg length, measured from the ball of the hip joint
         | to the heel, say, as 80cm, and you figure that they marched
         | like equilateral triangles, then the full pace is about 160 cm
         | or 1.6 m, and the Roman mile is then ~1.6 km.
         | 
         | But, my point is, these two numbers are not totally
         | disconnected like it seems at first. So the second is a precise
         | fraction of a day which has no direct connection to a person's
         | leg. But, the decision to use this precise fraction is in part
         | because when someone was looking at the 12 hours on the clock
         | and placed the minutes and seconds, 5 subdivisions of the 24th
         | part of the day looked and "sounded right." It is somewhat
         | likely that this in part sounded right due to the standard
         | Roman marching cadence, which was 120bpm (between footsteps) or
         | 60bpm (left-foot-to-left-foot), set by your drummer, chosen
         | presumably to maximize average efficiency among the whole unit.
         | 
         | So then if we treat everyone's legs as a pendulum that is being
         | driven slightly off-resonance, then the period of this leg
         | motion is ~1 second and the leg behaves like a pendulum that is
         | ~25cm long. And this kind of tracks! Measuring from the hip
         | socket down 25cm gets near most folks' knees, the thigh is
         | heavier than the calf so one would expect the center of mass to
         | be up a little from the kneecap.
         | 
         | So then you get that the leg is 80cm long from hip-socket to
         | tip, but 25cm long from hip-socket to center-of-mass, and so
         | you get some pure geometric ratio 2.2:1 that describes the mass
         | distribution in the human leg, and that mass distribution
         | indirectly sets the 1.6 conversion factor between km and miles.
         | 
         | If we could only connect the human leg's evolutionary design to
         | the Golden Ratio! Alas, this very last part fails. The golden
         | ratio can appear in nature with things need to be laid out on a
         | spiral but look maximally spread out given that constraint (the
         | famous example is sunflower seeds), but all of the Vitruvian
         | Man and "the golden ratio appears in the Acropolis" and
         | whatever else aesthetics is kind of complete bunk, and there
         | doesn't seem to be any reason for the universe to use the
         | golden ratio to distribute the mass of the muscles of a leg. So
         | you get like 98% of the way there only to fail at the very last
         | 2% step.
        
       | bloopernova wrote:
       | If you find this neat, look into all the different calculations
       | you can do on a Slide Rule:
       | 
       | PDF link: https://www.sliderulemuseum.com/SR_Class/OS-
       | ISRM_SlideRuleSe...
        
       | sorokod wrote:
       | "just express the original number as a sum of Fibonacci numbers"
       | 
       | This is aways possible, see Zeckendorf's theorem.
       | 
       | https://en.m.wikipedia.org/wiki/Zeckendorf%27s_theorem
        
         | actinium226 wrote:
         | As amusing as this is, I could not tell you offhand how to
         | express 121 as a sum of fibonacci numbers. I mean I could
         | figure it out, but I could also either multiply by 1.5 (121mi
         | ~180km) or by 2/3 (121km ~80mi) and it would probably be a
         | little bit faster than the fibonacci way.
        
           | sorokod wrote:
           | As suggested elsewhere, this is more of a party trick then a
           | practical approach to convert between km and miles.
           | 
           | The Wikipedia entry does suggest a greedy algorithm (at each
           | step choosing the largest fib number that fits) though, using
           | that we have
           | 
           | 121 = 89 + 21 + 8 + 3
        
       | yegle wrote:
       | Call me snarky but instead of just multiply/devide by 1.6, you
       | rather prefer remembering the Fibonacci numbers up to, I don't
       | know, 200 to be useful?
        
         | nrr wrote:
         | In practice, at least in my experience, only up to 13. (Though,
         | I have the sequence memorized up to 21 because of a sign
         | outside Chattanooga[0], which is what gave me my "hey, wait"
         | moment about this.)
         | 
         | A combination of both the fundamental theorem of algebra and
         | Zeckendorf's theorem has allowed me to fill in the rest so far.
         | For example, 25 mi = 5 * 5 mi, which yields 5 * 8 km = 40 km.
         | As it turns out, that is how far Cleveland, TN, lies from
         | Chattanooga.
         | 
         | 0: https://usma.org/metric-signs/tennessee
        
         | battles wrote:
         | That's what I was thinking. I good example of over-engineering
         | though.
        
         | jmholla wrote:
         | Yea, and since it's the golden ratio, the division is roughly
         | the same as multiply by 60%. So you can just remember to take
         | 60% and add it to the original or treat it as the answer
         | depending on if you're going to or from the smaller
         | measurement.
        
         | btilly wrote:
         | The list isn't that long. 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,
         | and 144.
         | 
         | I memorized this almost by accident. I was doing hand rolled
         | spaced repetition system for conditioning myself to fix some
         | bad habits, and they came up often enough that it was
         | memorized.
        
         | jraph wrote:
         | It's art. It's possibly not very useful (who knows, though?),
         | but some will find beauty, joy, entertainment, surprise,
         | amazement, incredulity, anger, disdain, indignation, fear,
         | nostalgia in this. Others will feel the deepest and purest
         | indifference.
        
       | starktyping wrote:
       | this has Rube Goldberg energy if you have seen the Golden Ratio
       | connection or derived Binet's formula before - my first thought
       | was "yeah because the conversion and the golden ratio are both
       | 1.6ish"
        
       | pg_bot wrote:
       | A mile is 5,280 feet and a kilometer is approximately 3,280 feet.
       | 
       | If you need to do rough conversions just think of a kilometer as
       | slightly more than 3/5ths of a mile.
        
         | namrog84 wrote:
         | If remembering a fraction or number. I always felt like it was
         | easier to remember 100kph is 62mph or basically close to a mile
         | a minute.
        
         | riccardomc wrote:
         | > just think of a kilometer as slightly more than 3/5ths of a
         | mile.
         | 
         | I can confidently assure you that right about now there are a
         | bunch of Europeans reading your message multiple times, trying
         | to figure out what 3/5ths of a mile even means, asking
         | themselves if this is satire.
        
           | thechao wrote:
           | It's the same ratio as 28 3/4 tsp to a cup.
        
         | theendisney wrote:
         | You are doing it wrong.
         | 
         | A kilo meter is 1000 meter like a kilo gram is 1000 gram.
         | 
         | A land mile is 1609.344 meter.
         | 
         | 16 is easy to remember as a symbol of immaturity but you do get
         | to drive in the us. Not in the eu _nein_
        
       | dwe3k wrote:
       | I find it interesting, but I question how practical it is for
       | regular use.
       | 
       | On a recent trip, I was driving in Canada in a car bought in the
       | United States that did not have the metric values on the
       | speedometer. But all of the posted speed limits were in values of
       | 5 kph. Once you get that (roughly) 100 kph = 62 mph and 10 kph =
       | 6 mph, there are some simple quick divisions or subtractions to
       | convert the speed limit to close enough.
       | 
       | - 50 kph = (100 kph) / 2 = 62 mph / 2 = 31 mph
       | 
       | - 80 kph = 100 kph - 2 * 10 kph = 62 mph - 2 * 6 mph = 50 mph
        
         | Taek wrote:
         | I use the fib conversions quite regularly.
         | 
         | Both of your examples are actually easy Fibonacci numbers.
         | 
         | 50kph - 5 is a fib number, and the previous number is 3. I can
         | go 50->30 without any math at all.
         | 
         | And 80kph, well 8 is also a fib number. And the previous is 5.
         | I can go 80->50 without any math at all.
         | 
         | 120kph is close to 13, so I know 120kph is somewhere below
         | 80mph. I always divide any remainder by 2, so I would quick
         | math my way to 120->75. That's accepatably close to the real
         | answer of 74.4
         | 
         | Same thing with 110kph. That's close to 13, so I'd quick math
         | to 70 mph (130->80, remainder is 20, subtract half the
         | remainder). That's acceptably close to the real answer of 68.2
        
         | function_seven wrote:
         | I always just use either 6/10 or 2/3, depending on which one is
         | easiest to do in my head.
         | 
         | Yes, this means both 90 and 100 km/h both covert to 60mph.
         | Close enough!
        
       | mikewarot wrote:
       | Tangentially - If it weren't for the arbitrary decision of Carl
       | Johansson, converting lathes from metric to imperial units
       | wouldn't be exact. Thanks to him, an inch == 2.54 cm exactly.[1]
       | 
       | This means you can use a 50 and 127 tooth gear pair to do
       | conversions and make metric threads accurately on an imperial
       | lathe, and vice versa.
       | 
       | [1]
       | https://en.wikipedia.org/wiki/Carl_Edvard_Johansson#Johansso...
        
       | cryptonector wrote:
       | I do this all the time.
        
       ___________________________________________________________________
       (page generated 2024-08-30 23:00 UTC)