How commas broke the Pokémon calculator but fixed an exchange rate.

198,947
0
Published 2022-11-23
Comma, comma, comma, comma, comma calculation.

Check out Tom’s video over on @TomRocksMaths    • The Pokédex is WEIRD (with @standupma...  

Let me know if you find a better currency pair which swaps 1:1000 and ,:.

And do send in your Pokémon calculator theories.

PS This is my second channel. Main channel videos are over here: youtube.com/standupmaths

Various filming and editing done by Nico Turner, Alex Genn-Bash and Matt Parker; none of whom finished the job to their usual high professional standards.

All Comments (21)
  • @Naftoreiclag
    Commas can dramatically change the meaning of a sentence:
    "I like to eat fruit." becomes "I like to eat commas."
    Very different meaning.
  • This is the closest we've been to another episode of calculator unboxing/review
  • @lydianlights
    Dont worry Matt, we all know this video just now came out because it took a year for your Python code to finish running 🤣
  • @tharsis
    Here's a little fact. Braille gets around the dot/comma issue for decimal separators by simply using a third symbol that's (usually) different from the others (same for the thousands separator if it's used). There's also the fact that strings of numbers in braille are first marked by a special universal symbol (Unless you're from France, which uses a different symbol and characters for numbers. French Canadian braille does use the universal numbering system which is extra fun to deal with.) This symbol essentially 'switches modes', meaning that after it, each symbol you read should be interpreted as a number until you're told to return back to text (This can be implicitly indicated by a space). This means that while our Western Arabic numerals are pretty standard across the planet, braille has even greater universality. Unless you're from France. Or Luxembourg.
  • @IcyMidnight
    When I was in Japan it was pretty close to 100 JPY to 1 USD, so I just treated the yen as US cents. It was very convenient and illustrated to me that you don't really gain anything by having two tiers of currency.
  • @Peter_1986
    In Sweden it is convention to use the comma as a decimal, and this is extremely annoying whenever we do online tests of any kind, because we always have to keep in mind that those online tests read commas as decimals, which is completely different from how our university course books - which tend to mostly be in English - do it.
  • A similar thing happened to me when I went to Kyrgyzstan. The exchange rate between the Euro and the kyrgyz Som happened to be 1 to 100. The kyrgyz Som’s abbreviation is a capital S. But, because Cyrillic is used in Kyrgyzstan the S is written as a C, that’s also the abbreviation of the Euro cent, sometimes. So for me, every price tag in Kyrgyzstan was written in Euro cents and no conversion was needed.
  • @Yossus
    As a maths and physics teacher, the decimal dot/comma thing is a source of great befuddlement to my students. In Germany, we use the comma as the decimal separator, but the GeoGebra app we use as a calculator these days has the English decimal dot. Not only that, but there's a comma right there in the interface to separate coordinates! Only you end up with imaginary numbers if you use it for maths.
  • I think why this and the Casio rational pi one you did a while back are so compelling is that it hurts to see a friend who is broken and throwing up question marks. We need to figure out what is wrong.
  • @TrimutiusToo
    Oooh... I was born in Russia where comma is used as decimal separator and then moved to Canada where dot is used... it was confusing at first indeed... The most annoying thing about it is Excel really, as depending on which language I choose it swaps about separators too...
  • I'm from Peru and it was so funny hearing Matt pronounce "huevo sol" which would mean sun eggs hahaha it's actually "nuevo sol" which is new sun, I like the name of our currency :) like I'm buying things in exchange for stars.
  • @ColMcWillis
    Matt: "The humble comma, full stop"
    Me: those are two different things
  • The last scenario, where the number jumps around when typing in a comma -- they attempted to type 2.3654 and the numbers as displayed were 2, 3.3, 6.36, 5.365, 4.3654. You'll notice that for each of these, the whole number matches the last decimal entered. It's assigning the user input as a new decimal value, AND as the whole number value. It would make sense that this could somehow be again related to the comma separator, maybe the way the program reads the user input searches for a decimal specifically and when there is no period (because it's a comma) there's some kind of overlap in the function for assigning new decimal digits as well as the leading whole number digit.

    Conjecture town, population plus one.
  • @xizar0rg
    Back when I was stationed in Japan, the exchange rate was pretty close to 1 penny to 1 yen, which made price conversions fairly trivial.
  • @wobaguk
    Im faintly disappointed that we got through an entire video about commas casuing computer errors and there wasnt a single mention of a CSV file.
  • @mondoke
    Fun fact: The Latin American localized version of Excel separates decimals using commas and thousands using points. Now, it does one more change. It separates CSV files using semicolons.
  • @damymetzke514
    My guess is that the original code would take a float and directly draw it to the calculator. Then localization was added which converted the float into a string, localized the string, and then converted the result back into a float. The conversion may have originally introduced a bug, which was later resolved without checking other regions. Or they may have been using a programming language which does this automatically so no one noticed. But I'm betting that localization being added after the calculator was programmed is what broke it.
  • A few years ago, 1 GBP cost 100 RUB. I was in a store that used price tags in pence. Therefore, I did not need to convert not only numbers, but also units of measurement. Since 1p = 1р, where the first 'p' is a Latin letter, and the second 'р' is a Cyrillic letter.
  • @patsen29
    In the old Roller Coaster Tycoon games, you could select your currency of choice in the game in the preferences, and it mostly worked without really changing the prices. The trick? Every exchange rate was a power of 10. Which means any currency on the order of magnitude to the dollar/pound/euro will convert to the South Korean Won at a rate of exactly 1000 to 1.