EDIT 1: I've figured it out! The reason why 11^6/17 didn't work was that it wasn't close enough! If we instead type 11^6/16.999999999995 (that's eleven 9s) we do indeed get a fractional multiple of pi. Obviously this is not an integer, but I'm sure if one tried hard enough they *could* find an integer that's close enough. Keep reading to see how I figured it out. I'm using the Casio fx-85GT PLUS, and I've noticed that there *is* in fact something special about the number 3600 (for a reason I don't understand). If we type a bunch of gibberish and divide it by 3600 (e.g. 4276161/3600), the calculator will return a bunch of gibberish (1187.8225), however if instead we multiply this gibberish by π (i.e. 4276161/3600 * π) the calculator does actually return a fractional multiple of π (475129/400 * π). If you try to divide by any number other than 3600 (say 3500), it won't work. Except that it does! This completely baffles me, but it also works with factors of 3600. Let's pick a random factor of 3600, say 240. 4276161/240 returns 17817.3375 4276161/240 * π returns 1425387/80 * π. As far as I could tell, the lowest denominator we can use is 15 (e.g. it works with 4572431/15 * π). All of this said, this still doesn't explain why the attempt where you divided by 3600 did not work. I'll keep trying, but in the meantime hopefully this helps in the quest to figure this out. BONUS: Just as I was proofreading this, I accidentally discovered that 3600 itself is a factor of an even bigger number that works, and that is 25200. So any factor of 25200 works! EDIT 2: Conclusion: If we want to find a number of the form a^b/c then we have to make sure that the result is approximately p/q * π, where q is a factor of 25200. If q is not a factor of 25200 then the calculator will never convert the answer to a fractional multiple of π.
This is an underrated post. Well done! Does this mean you've found another equation you can type into a casio and have it create a multiple of pi equivalent?
@@bryanandhallie Once you know that it's all about factors of 25200 generating solutions is somewhat trivial. You can try this on your own calculator. First, get a calculator that has more precision than the Casio (I just used the default Windows 10 calculator), then type a bunch of gibberish, divide it by a factor of 25200 and multiply by pi. Then type the exact figures that you obtain from the result into your Casio and it will return a fractional multiple of pi. This will not work if you divide by anything other than a factor of 25200! The only challenge at this point, if we want to go there, is to find some number in the form a^b/c which is close enough to one of these values.
Plot twist: It's a deliberate bug in the code to quickly check if a competitor just ripped Casio ROM and used it in their calculator. Similar to the non-existent streets on maps.
In the Casio underground lair: "We did it! We drove mathematicians insane!" "Were they not a little bonkers before already?" "Yes, but not like this. They now step out of the house and get lost in thought in the woods."
I asked for a shiny blue Casio Classwiz for Christmas and I must be the only person to get excited about that. Unboxings would make me feel less strange
Here's something to consider: if you compute both sides of the 11^6 / 13 equation in single-precision floating-point arithmetic, you get exactly the same 32-bit result. This doesn't happen with the 11^6 / 17 example. My suspicion is that it's a combination of this and the fact that the denominator is 3600, which is a fairly nice number, being a product of the three lowest primes.
PI in the result on CASIO fx-991ES PLUS 500*10/(22.977*10^-3) = 436382531/6300 * PI I found this while calculating how long would my device work with a 500mAh battery if I know it uses 22.977 uAh in 10s extracting pi=3.1415926535905471363222... 10 exact decimal places, or 11 if you round it there
Shout out to the care and effort put into these videos. The marker and paper setup is good too but i love seeing creators get excited about the production and have fun with it.
The only logical course of action is a Mission Impossible style operation where a team of mathematicians in tactical gear breaks in to Casio headquarters to steal the chip designs, CAD files and firmware code.
You can always pay for a teardown analysis. Or pull out the IDA tools to figure it out yourself. An old pocket calculator isn't going to be as complex (or as codelocked) as a modern smartphone.
@Etravagant Sobriquet - This is a special feature of Casio SYMBOLIC mode, which uses 25200 ( = 3600 * 7 ) as the original divisor. It is that simple ...
Are you kidding? I'm sending this directly to DrCap Disillisuion. How can there be two Matt'ses at once? And the whole calculator thing? looked straight up CGIed. This reeks I tell you.
Here are the priorities in the Casio program algorithm: 1. Display the result as a factor of pi, if any. 2. If the display is adequate, show this as a fractional number. If possible, show it as a fraction and associated with pi . Because when solving problems at school, show the result as pi related or fractional (or both). 3. It will give the result as Decimal when SD key is already pressed. In scientific machines with other Brand WriteView, the 1st priority usually gives a fractional result, if there is pi in the question, it gives a fractional result associated with pi. It gives decimal results with the SD key.
I've seen few college math professors that 'interrogated reality' with their maths, then promptly divorce themselves from reality because reality refused to capitulate to their views of what it should be. Looking back, I have to wonder if it had anything to do with them also being practising commi marxist types.
I love how people find out about floating point standards. As a programmer myself, I can tell you this: the explanation that requires the least work to implement, is the most likely to be right.
@@licht4808 is bcd not considered floarting point? I dunno coz I'm not a computer scientist or computer engineer, never took proper education in that field
@@minispinakins2034 With BCD you can directly represent 2 base ten digits in one byte. Four bits are used to hold each digit. For example 79 converted to BCD is 01111001. It can have advantages depending on what you are doing.
@@standupmaths it must be hardcoded. Now the question is, why? Surely there's some bit of math out there that uses some part of this anomaly to generate pi, and YOU MUST FIND IT WITH YOUR BRAINS AND WIT
I have a theory: When you tried the more accurate calculations, the calculator didn't do the same thing, as it only has pi stored to 10 decimal places, so it would've been further away!
My Casio fx-570c, that I've been using almost every day since 1989, also stores pi to only ten decimal places. In the original example, 11^6 ÷13 × 3600÷156158413 results in 3.141592654. If I divide that by the calculator's stored pi value, it gives 1 as the answer.
hmm... if you'd asked me out of context how I thought a calculator stored pi, I would say as a floating point binary constant, probably one of the standard IEEE widths, and not as some integer number of decimals. but then I would start to doubt myself because I have this vague recollection of calculators using some kind of BCD to avoid certain rounding errors without having to escalate the amount of internal precision too much. so I dunno. I guess it should be possible to come up with test cases to distinguish. if I'm ever really bored... (EDIT: I saw the pinned comment and it does seem somebody got to the bottom of this)
Tried all examples on an older fx260 solar and all of them resulted in a whole multiple of pi- maybe an older code section remained in the newer calculator
I did a little bit of research as I was curious, you can quite easily replicate this by just using an accurate rational approximation of PI. I used the Farey Algorithm to calculate approximate fractions and it turns out that 3126535 / 995207 is displayed as a decimal but 4272943 / 1360120 is displayed as pi (on the Casio FX-85GT Plus). These approximations were calculated using 322 iterations and 323 iterations respectively, so that should hopefully be a decent indicator of where the precision boundary lies.
Casio calculators store each number as 13 significant digits multiplied by a power of 10. I haven't checked, but I hypothesize that the first one you said stops equalling pi somewhere before the first 12 digits after the decimal (total of 13 digits including the leading 3.), but the second is equal to pi in at least the first 12, so as far as the calculator is concerned they are the exact same number.
Casio printing pi in mathprint mode is nothing new, problem is with the fraction before the pi, can we do that by some change in fractional input? EDIT:- That sounded rude I guess, but just everyone is bringing the pi thing up and no one is discussing the fractional part, just saw another comment and people believed it to be a mystery solved
Haven’t been able to get my Casio fx-82AU PLUS II to do it, although I did find this in its manual: “The range for calculation results that can be displayed in π form when using Natural Display is |x|
My 82AU Plus II and 100AU plus won't do it, but they also cannot find exact values because of NSW examination rules. Is yours one where it can find exact values?
Response from someone who has worked on similar calculation/approximation code, albeit not on an actual calculator: I'm gonna guess Casio is using IEEE floating-point math since it means they can use off-the-shelf components in their calculators. A really high-end calculator might use a custom solution with more bits or a different format, but this mass-market calculator probably doesn't. I imagine the issue here is that, in this particular case, the 64-bit floating-point result of 11⁶/13 actually matched the approximation 156158413π/3600 _exactly,_ bit-for-bit. Casio probably doesn't show the result as a multiple of π unless the bits match exactly, or perhaps with a one-bit epsilon to allow for rounding errors. Your other examples may have _seemed_ to match up to a certain _decimal_ place, but that doesn't mean they matched up to the very last _bit,_ or _binary_ place, of the floating-point result. It takes between 3 and 4 bits to represent a single decimal digit, so being off by one bit could result in rounding to the same last decimal digit while still being different in its last binary digit. If it helps to know, IEEE floating-point numbers are represented as *±1.m ⨯ 2ᵉ,* where *m* is the mantissa, a value somewhere from 0 up to, but not including, 1, and *e* is an exponent. How the sign and exponent are represented in memory isn't too important here, but the mantissa is: it is a finite number of bits (i.e. binary digits) that represent a fraction in the form *(0 … 2ⁿ-1) / 2ⁿ,* with *n* being the number of bits. Numbers are effectively always rational, and if you displayed them in binary, you would never get an endless string of digits like you do after you _try_ to represent them in decimal. Some quick examples: • 3 = 1.5 ⨯ 2¹ • 12 = 1.5 ⨯ 2³ • 48 = 1.75 ⨯ 2⁵ Same examples expressed in a simplistic 8-bit floating-point format, with 1 bit determining whether the integer portion of the expression is 1 or -1, 4 bits representing the mantissa, and 3 bits representing the exponent, and remember, all digits here are binary: • 3 = 1.1000 ⨯ 10⁰⁰¹ = 8-bit byte: [0|0 0 1|1 0 0 0] • 12 = 1.1000 ⨯ 10⁰¹¹ = 8-bit byte: [0|0 1 1|1 0 0 0] • 48 = 1.1100 ⨯ 10¹⁰¹ = 8-bit byte: [0|1 0 1|1 1 0 0] (Note: This is a simplified explanation that glosses over how 0 is treated as a special case, as it obviously can't be represented as 1.m ⨯ 2ᵉ, but that and negative exponents and other special cases like infinity, indefinite values, etc. are a story for a different time. If you're keen to know, I'm sure google can hook you up with reams of details.)
@@edgarbonet1 I went and tried it myself. I see what you mean. It could be they aren't using IEEE floats. The number of formats out there, at least historically, is kind of staggering, so it's possible. For a lot more detail, see here: www.quadibloc.com/comp/cp0201.htm I also read something that claimed Casio uses decimal floats, which I'm guessing means BCD floats? But the article didn't seem super clueful and may just have been empirical guessing based on what the calculator is willing to display on what little screen real estate it has, along with considerations for humans not usually familiar with the quirks of binary and IEEE floats.
Perhaps this is one of those intentional "mistakes" that any publisher would put in a textbook to see if another company copied them. Like how Genius sued Google for copying their lyrics. But in this case, Casio hard-coded this answer to test whether another calculator manufacturer copies their code.
@@Locutus This is the most pointless comment in youtube history. Even a broken pencil that hasn't been used since the second world war is less pointless than this comment. I feel bad for your parents, after celebrating the birth of you, that the child they treasure so much will, in the near future, make such a pointless remark.
So you argue that world will be better if we don't believe people online as correct, but you're one of the people online so the world wouldn't be better based on your logic. So we should do the opposite and believe people online to make the world better, but then if we believed you then we shouldn't believe people online... Error: StackOverflowException
What we need to know is the exact way the Casio calculator approximates and stores pi. My guess is that 11^6÷13 is special in this case, not because it's closest to actual pi, but because it's the only one that exactly nails the calculator's version of pi.
Most likely it just stores its value as a double, then when getting an answer, it also computes the error with the PI answer (if the resulting fraction has been simplified), if that error is under 1^-10, it takes the PI result.
This may well be a software "anti-theft" strategy, I use it a lot in my software... Thief: I didn't steal this your honour! Casio: Check 11^6/13 your honour!
Giving you a things up for the algorithm even though the word "theft" here represents an unethical and counterproductive line of thinking. Unfortunately, because this toxic idea is so pervasive, I believe you are correct in your guess as to Casio's motivation.
Isn't it true that paper towns like that specifically *don't* count legally to determine copies? Idk if it's different for code than books/maps though.
In the table at 8:37, it is worth noting that the "Pi" that you get out of the calculations 1 and 3 is the exact same number, hence we can conclude that the important difference is the way that the initial results (11^6/13 vs. 11^6/17) are rounded. No matter whether you use binary or decimal numbers, any non-integer fraction with a denominator of 13 or 17 is wrong when expressed with a finite number of digits, and it is wrong in different ways for both fractions. Since (and this aligns with the results that I got pushing my Casio FX-82 Solar to the limit as a kid) the internal accuracy of (I guess) any Casio is limited to around 10^(-12), you can seemingly get these results at random when the resulting Pi is within about 10^(-12) of the correct value - with two more points to add: 1) I'm pretty certain that you could reverse engineer the rounding algorithm that Casio used when you apply your test rounding algorithm to the initial fractions (i.e. 11^6/13) to find the one that makes this particular fraction a sufficiently precise fraction of Pi (and doesn't for the others). 2) I'm also pretty certain that Casio didn't implement a Farey algorithm, but simply defined a set of denominators that are most likely to appear as an exact value in front of an irrational number. So for example any fraction of 25,200 (as pointed out in another comment) = 2^4 * 3^2 * 5^2 * 7^2 - which includes any integer up to 10 plus virtually all degree values that commonly appear in geometric problems: 15, 30, 45, 60, 75, 90, 180, 360, 540, 720, ... - plus "round" values like 100, 1000 etc. is tested as the denominator (likely starting with the smallest), and if there is an EXACT match with the number of Pi stored this result is displayed. If you randomly generate fractions that are sufficiently close to Pi, I would think that around 3.5% (=2^(-40) / Pi * 10^11) of them do actually come up as a fraction of Pi, which is probably enough to make an adult scientist give up before he finds a second example. Tldr.: The Casio only displays a result as a fraction of Pi if its internal computation EXACTLY matches this fraction, with the error resulting from rounding the initial result with an infinite number of digits to an intermediary result with a finite number and the inherent accuracy limits of the calculator. A lot of denominators will never appear in a result containing Pi (or another constant) since they aren't part of a predefined set.
I think it depends on how open Casio are about their Intellectual Property. If they have a policy of not revealing too much, asking them would be useless.
@@thinboxdictator6720 they might give you a refund, but the customer support rep that deals with your complaint will either fob you off or give you a refund or some vouchers or something. It's not like it's even giving the wrong answer. It's correct to the precision required, it's just expressed in an unexpected way.
It seems you don't even have to type in the Equation: When I just Type 136273.923077 into my Casio fx-82es and hit [=], it will also tell me that it is 156158413/3600*pi. The same also works for 136273.9230769, but not 136273.9230768 or 136273.9230771. Yet again 136273.923077018 does work, while 136273.923077019 does not. After that I stopped trying.
i have a Casio fx-82MS and it does not use pi for any of these. This version has Chinese letters on the top and is from my Chinese friend (so its legit). Maybe! these are made in china.... and they slightly skew the ones they sell to the westerners?
Hey can you do the 11^6/13 calculation again, but when it gives you that fraction, hit the S D button to turn the answer into a decimal number, then scroll along and type down the answer to 50 decimal places unless it repeats then just say what it repeats please.
@@christosvoskresye i don't see that. it does say S-V.P.A.M. most just say vpam and aparently the S stands for Super so whatever super can do is what mine can do.
ANSWER your calculator is always comparing the results with the saved constant PI for example on a CASIO fx-991EX the number: 5419351 / 6900132 will give PI/4 because it is PI/4 precise to 14 decimal places but 4559545 / 5805393 will only give a decimal because its PI/4 precise only to 13 decimal places this is because this particular calculator stores its value of PI precise up to 14 decimal places (which can be checked in the user's guide) PS. I enjoyed the video, it got me curious, thanks! 😀
Oh! That’s an interesting theory. I suppose that, like a map, it would be very difficult to prove that your code had been copied if all you could show is that both calculators provide the correct answer for every calculation you tried. One thing though, and sorry for this terrible nitpick, but that’s not a trademark or a watermark - it’s a copyright trap. Trademark is a way of publicly branding yourself, and violating a trademark tends to be pretty obvious. If I was branding my calculators as KASIO, that would be a violation of Casio’s trademark. If I stole their calculator code and put it in my calculator, that’s a violation of their copyright. If I did that, and they could show that my calculator and their calculator gave the same unusual answer for a given input, and I couldn’t justify why my calculator does that, that can be used as evidence that I violated their copyright.
Given Smathlax's discovery of the relationship to 25200 and factors thereof, the circumstances required to produce this 'bug' feels too general (as in not-specific) to be a copyright trap. But I will concede that it is entirely possible that you are correct. My bet is some sort of strange coding error.
@@superdupergrover9857 Instead -- though this is a nifty suggestion that could be correct -- I bet it has to do with how the rational fraction discovery algorithm is implemented. I bet it's counting the amount of iterations, because that's what any sane engineer would do. And when I say counting, I don't mean actually counting, but instead the algorithm is limited in cycles, and if it doesn't yield a solution in a given amount of iterations, the operation is seen as futile, the solution is discarded and something else is tried instead, eventually falling back to displaying an irrational decimal number, which is a logical thing to do, given the inaccurate nature of floating point math in processors. This is the simplest explanation of what's going on (from the software engineer's point of view, and I am one), but to prove it we need the actual algorithm as it is implemented in Casio. Maybe someone could rev engineer it though, and I admire the host's effort in this direction, but he needs to be much more stubborn than that, and to think very low level. edit: In other words, he's obviously not a software engineer, but a mathematician. He fell into a trap of thinking the Casio must have surely compared the number to Pi, which is something you just never do, you never compare the two floating points naively. Not only it is unreliable, it is also incredibly slow. The numbers are internally represented in an IEEE 754 standard, which has nothing to do with how the digits are displayed in the decimal system, and you can't simply compare two base-2 sausages bit by bit and hope it works like plain text or integers would.
Wow, that fraction finding thing was enlightening. I have no idea how I’ve never seen that in all my days. This is why I love educational youtubes, it’s like a box of chocolates, never know what you’re going to get.
That's a really popular practice in math and computer science.. A binary search is a similar way of narrowing down to a result and there is an algrothim to find a root of a function which uses the same idea of discarding half the data every time
Ondřej Majerech not exactly, floating point numbers are represented in a different way in memory. Not even sure Casio use floating point but probably yes
One thing to consider with most floating point representations is that more digits in front of the decimal reduce the number of digits held after the decimal. In many attempts to recreate the bug it looked like there would have been less precision held in the registers after the decimal, so just comparing what the full number would be is not good enough to predict what would happen. You'd want to consider what intermediate rounding is taking place.
I tried to change the float on my ti-83 plus, as I had considered this a possibility as well.... I went from float up thru 9 (highest i can force it) and it didn't work.
@nuff sed is that what a real Easter egg is? And I suppose dying actual chicken eggs bright colors and hiding them in the yard for kids to find is an idea inspired by it?
Interesting video. I remember doing number processes at college (I did computer science, and have worked as a developer for 30 years) - as soon as I saw the mistake the calculator makes, I thought "this is down to binary coded decimal truncation" - and yes - the threads elsewhere go straight to the same conclusion. Bookmarking this one - it's interesting :) There are some great videos about the Sinclair calculator online, where the source code is broken down to show some of the mathematical gymnastics computers go through to do arithmetic operations. Anyway. Great video.
Not just average Joe. Also average engineer because they deal with practical matters and average scientist because they deal with precision limitations and significant digits, etc. BTW, we used to laugh at a physics professor who would always say things like "that results in 4.8, we'll call it 5, and then continues the problem with the 5."
@@OtherPony not when it isn't the final answer and even the it depends on the starting values as well. 9.8 could actually be the correct answer for a calculation if the starting values were precise enough (2.82 and 14 for example).
Such an interesting comment! How about, "The London Underground"? Investigate how much longer the outside rail of the Circle Line is than the inside rail, given that the gauge is 4 feet 8 and a half inches.
I've tested the bounds for Casio-π using their online emulator for the fx-82/85/350ES Plus. When entered directly, Casio-π symbol is displayed for any values in the range 3.14159265358918 and 3.14159265359042. The pre-defined stored value of Casio-π is the exact middle of these two values at: 3.1415926535898.
Okay so I thought of trying the reverse - take the approximation for the rational multiple of π (from 8:59), solve for π from it and see if you get π or its decimal approximation (Casio fx-991ES PLUS). The 4th and the 2nd in that list gave π, but the 3rd and (surprisingly) the 1st didn't give π; they just gave the decimal expansion. So the fact that the first one didn't give π really blows the whole theory of what the calculator is doing to dust! I have no clue what's going on, just thought I'd pop in with some additional data.
@@ethannguyen2754 just making a ratio like that isn't enough to make a number considered rational yknow. The two numbers must be WHOLE and coprime to each other
Very likely. It's almost an Easter egg. Companies do some strange things to protect intellectual property. Or it could just be an artifact of the floating point routines they used.
The answer might be in the manual: www.sciencestudio.co.uk/wp-content/uploads/2019/01/fx-83GTX_85GTX_EN.pdf Page 103: "The range for calculation results that can be displayed in π form when MathI/MathO is selected for Input/Output on the setup menu is |x| < 10^6. Note, however, that internal calculation error can make it impossible to display some calculation results in π form. It also can cause calculation results that should be in decimal form to appear in π form." Page 31&34 explain when the result (for fractions) is shown automatically as decimal or as fraction. Maybe that applies to the π-form also somehow.
@@Ikantspell4 They have a PC simulator of several calculators which exhibit the issue. That might be a reimplementation of the firmware or an emulator + ROM dump?
As a software developer, I’m willing to bet that the answer lies in different number representations between your Python code (likely floating point) and the Casio (perhaps fixed point) or perhaps both are floating point, but different implementations. The “Pi detector” is surely tuned to whatever the Casio’s representation’s most accurate representation of PI is. Switching the Python code to a different implementation floating point (perhaps 24/32/64 bit) or a fixed decimal package may shed some light on this.
I suspect you're right. It's easy to get different results on different hardware/software from the same calculation when floating point numbers are involved. IEEE-754 provides standard for floating point arithmetic that everyone can develop against so that you can at least be confident that two different pieces of hardware or software will provide the same answer but even then it's possible for both of them to be wrong. To see what happens when you do it poorly just look to the patriot missile system failure in the first gulf war. That mistake resulted in 28 soldiers dying.
To add to this, I also suspect that "pi" is represented within the calculator as a ratio of two integers that are "close enough", since it's impossible to actually store an irrational number. Maybe they just happened upon this exact ratio?
Ooo, I LOVE the Casio fx-83GT Plus! Best bloomin' calculator ever! I've had absolutely no need of it since graduating university (so I passed it on to a neighbour who was doing their GCSEs) but it's such a convenient way to input complicated calculations. OK, so now for the remaining 12 minutes of the video!
This might not be relevant but I have found that Casio calculators have more values that they tend to hide. For instance, when using pi, it only displays the first ten digits but actually uses fifteen digits for calculations. There is also weird stuff that happens when reversing a calculation you just did, to avoid losing accuracy, it makes sure the calculation gets the same result in reverse. So the square root of 9.999999999 x10^99 gets you 1 x10^50. If you square that again you just get the original 9.999 etc. But if you just take 1 x10^50^2 obviously you get 1 x10^100 which is just a math error. Casio’s are weird and do a lot of maths that they don’t show.
you seem to have greatly confused yourself about what the observed effects of base 10 display approximations would be - the number on display is nearly universally an approximation (unless its only factors are 2 and 5) in all cases - and the number of digits displayed is also disjoint from the value
I imagine some poor guy sitting in an office in China, writing the software for the new Gaxio. He is doing every possible calculation (all of them) on a Casio, and then hardcoding the result. Casio, you are so evil!
I was thinking the same thing. Perhaps it's a way to find out if somebody is building a calculator using stolen chip designs - or (more likely) stolen firmware. (Do these calculators run firmware? I would guess so, but I have no knowledge.)
I tried this on two calculators. My CASIO gives me the same strange result, my TI does not. CASIO fx-85ES: 156158413 / 3600 * \pi Texas Instruments TI-30XB: 136273.9231
I experienced the opposite of this. I used an integral to find the area of a circle with radius 1 and the calculator rounded the result so much that it no longer recognized it as pi
I think it has something to do with the trig function on the calculator. When you perform trig functions with the calculator in radian mode, such as the inverse sine of 0.5, it will give you the answer as a faction multiple of Pi. If you take the hyperbolic tan of the result from that calculation, you get 1 exactly. tanh(11^6÷13) = 1 That number must be in a trig lookup table in the calculator somewhere, causing it to present the fraction as a multiple of Pi as if you've just got the result of a trig calculation.
Interesting! Makes a lot of sense, since this is so far only shown for that one calculation. A lookup table also explains how it is able to calculate and represent these numbers so quicly on the weak Z80 hardware.
@@2inthemorning, @John Little: Exactly. The asymptote (1) is approached as an exponential decay, so it doesn't take such a big argument to make tanh extreeeemely close to 1. tanh(x) = sinh(x)/cosh(x) = [eˣ - e⁻ˣ]/[eˣ + e⁻ˣ] = [e²ˣ - 1]/[e²ˣ + 1] = 1 - 2/[e²ˣ + 1] ≈ 1 - 2e⁻²ˣ Fred
I was thinking we could hook up some test leads to the circuit and try to record the outputs so that we can single step through the calculations. Or is that cheating?
@@ottobass9193 If you get thrown into an existential crisis every time your code gives the wrong result for no apparent reason, you might have picked the wrong career :D
Almost lost my sleep here. I've tested on an Casio emulator and the same result here. But the answer is quite simple. It happens due to an float point error. 1771561.0000004253462538723213146 stored as a float is = 1771561 There are other ways to see the error in the calculator. Like if you get your result with PI and divide by PI the answer in the display is 43377.33694 Try to save that answer to a variable A for instance and subtract 43377.33694 The answer won´t be zero.
Are you sure it is using floats ? How can someone design a calculator that computes using floating point numbers instead of algebraic manipulations ? this is insane
Edwin Vital In general it’s best to calculate with floats, because it’s pointless to care about the difference between 10^80 and 10^80+1, while you do care about the difference between 1 and 2.
@@calvindang7291 Floats are intended for runtime performance uses-cases where approximation is good enough. A calculation device is meant to provide exact answers with plenty of time (like dozens of miliseconds plenty) to do so. The problem is not a minor detail as you seem to believe because errors add up, so you can easily get wrong results on complex expressions even with small integer litterals. Which is why I doubt any good engineer would even consider that an acceptable option in that use case. There is a thing called "exact computation" and there are libraries for that.
5:28 Hey wait a minute, that's not fancy math, that's just how you use a wrench set. If your 1/2 is too big and your 1/4 is too small try 3/8, and if that doesn't fit you know whether you need 5/16 or 7/16.
What you're describing is a different algorithm, binary search. It's not really possible to use the algorithm from the video on socket wrenches, because it will generate socket sizes that don't exist. For instance, you would need to go to a 1/3 socket after the 1/2 and 1/4 failed. Then to either a 2/5 or a 2/7.
fx-991EX CLASSWIZ same results, seeing as it’s the same on most Casio models (if not all models) then this is likely to be a limitation with the hardware that causes the software to express that one sum as a multiple of pi instead of a decimal
pretty useless approximation of pi. First you have to calculate 11^6, then you have to divide that by 13 and you still have the number 15615813/3600 (which is hard to remember on it's own) so that you can divide the result by it. And what do you get for that hour of work? Less places of pi than what I can memorise in 10 minutes.
This is a perfectly executed video. The retreat to the forest for contemplating a universe's weight of the philosophy behind a cryptic response to a reasonably simple quandary made this as epic as this run-on sentence is long. I imagine scores of your predecessors taking a nature hike for much the same reaon. Newton, Huygens, Socrates, Pythagoras, et cetera... and now Parker. Briliant.
I'm reminded of that scene in 'The Office' when Gareth makes a mistake on an order, and rather than admitting his mistake, blames his calculator, then telephones the manufacturer. His side of the conversation is: "I just got a complaint from a very important client saying that, uh, the figures I gave him were wrong and... yeah, well, great, all other possibilities, ya know, it's come down to the calculator. Well, I don't know, circuitry? Sorry, who is this I'm talking to?...Alright, alright, you give me sum then. No, no, you give me a sum, I'll try it out, alright, yeah, plus 52 equals 141. Alright you win that one, that time it was correct."
Maybe try a couple of different algorithms and check how many iterations until convergence. There must be a sweet spot of accuracy vs computation time. You're other example may have been better approximations, but maybe the calculator only runs say 100 iterations
It's a binary search algorithm. In every iteration of the calculation you roughly divide the error of your approximation in half. This means that your approximation approaches the desired value at an exponential rate. As the amount of digits you want to match increases (let's call that "n"), the amount of steps you need to execute grows roughly like "log(n)". Algorithms with that "complexity" as it is called, typically do not need to weigh accuracy versus computation time. The limiting factor is most likely precision of the number they can store in memory, and not the time it takes to calculate the approximation.
This is only helpful if the Casio does not calculate this in floating point arithmetic, which I am 90% it is... It seems more likely it converts a floating point result to a fraction...
@@jonassattler4489 it does, thats what was said. It first does the decimal version (using floating point arithmetic) and then to a fraction and multiple of pi and maybe some others im not immediately thinking of. We are talking about the method it uses to convert to a multiple of pi.
I don't have a casio with fractions, but I can assume somethings about it to answer at least a little bit, if anyone can confirm any of this please answer: 1 - doing some research casio calculators use a 15 digit internal representation for calculations ( this might be hard to confirm) 2 - again same research says they use truncation as a way to round things 3 - the pi constant they use seems to be 13 digits accurate ( at least with mine simple cassio) 4 - it might be that it's not an approximate answer in the calculator eyes, it might be exact when rounding so it trips up To confirm my theory we have to find an approximation with 12 digits that when the fraction is expanded has the same amount of "zeroes" on the end.
My messing about with this exact calculator in lessons does seem to suggest that 3.141592653589 is the calculator's internal value for pi. I also think 15 digits is the limit but I'm not sure on the truncation.
It's probably a copyright trap so that Casio can show that their Intellectual Property was stolen if someone rips off the firmware (microcode) from the calculator. Copyright traps are common, for instance all maps contain deliberate errors so if people copy them the owners of the copyright can show that their maps have been stolen. There was a famous case where the Ordnance Survey took the AA to court for stealing their maps. There was also a case where a map maker a long time ago created a village that never existed on his map. You can trace this fictional village through maps for several centuries.
Maps need copyright traps to prove that their property was stolen because all maps are mostly the same otherwise (and you can't copyright nature). This is not necessary for a Casio calculator because a copy calculator is easily identified as a copy. Although most protection for electronic design is simply done by making the copying process massively expensive.
@@johnsmith34 It's not the calculator you are protecting from copying it is the algorithms that calculate the answers as well as the software they are converted into. It is believed that programmes such as Excel have copyright traps built into them. The difficult part is hiding them and if people do accidentally find them which is a pretty rare occurrence that they don't give the wrong answer so your product does not gain a reputation for wrong answers. You may not remember but the early versions of the HP35 calculator failed when asked to do some calculation - I think the algorithm they used failed to converge for certain values from memory. HP ended up offering a free replacement to all the users even though the probability of a user experiencing the error in normal use was very low.
@@meneerjansen00 bug in the code. I'm not good with math but I am good with tech and until given a better explanation it makes the most sense. Digital watermarking makes pretty good sense too except for that's what patents and copyright are for, and people rely on calculators for important and precision numbers and a bad number could potentially put them at risk of a lawsuit. (lawsuit where an engineering structure fails and someone dies for instance) I wouldn't call it a deliberate choice for that purpose. If so it's incredibly wreckless.
@@lokeshchandak3660 the downside is that there's like no way to have all the functions in these packages memorized so then you end up finding out about these things after you've already made a program with poor code and now you wanna change it but you're lazy to so you end up getting bad code. (this is a joke comment btw I'm just salty that I didn't know about "bisect" earlier)
EDIT 1: I've figured it out! The reason why 11^6/17 didn't work was that it wasn't close enough! If we instead type 11^6/16.999999999995 (that's eleven 9s) we do indeed get a fractional multiple of pi. Obviously this is not an integer, but I'm sure if one tried hard enough they *could* find an integer that's close enough. Keep reading to see how I figured it out.
I'm using the Casio fx-85GT PLUS, and I've noticed that there *is* in fact something special about the number 3600 (for a reason I don't understand). If we type a bunch of gibberish and divide it by 3600 (e.g. 4276161/3600), the calculator will return a bunch of gibberish (1187.8225), however if instead we multiply this gibberish by π (i.e. 4276161/3600 * π) the calculator does actually return a fractional multiple of π (475129/400 * π).
If you try to divide by any number other than 3600 (say 3500), it won't work.
Except that it does! This completely baffles me, but it also works with factors of 3600. Let's pick a random factor of 3600, say 240.
4276161/240 returns 17817.3375
4276161/240 * π returns 1425387/80 * π.
As far as I could tell, the lowest denominator we can use is 15 (e.g. it works with 4572431/15 * π).
All of this said, this still doesn't explain why the attempt where you divided by 3600 did not work. I'll keep trying, but in the meantime hopefully this helps in the quest to figure this out.
BONUS: Just as I was proofreading this, I accidentally discovered that 3600 itself is a factor of an even bigger number that works, and that is 25200. So any factor of 25200 works!
EDIT 2: Conclusion: If we want to find a number of the form a^b/c then we have to make sure that the result is approximately p/q * π, where q is a factor of 25200. If q is not a factor of 25200 then the calculator will never convert the answer to a fractional multiple of π.
Congratulations!
This is an underrated post. Well done! Does this mean you've found another equation you can type into a casio and have it create a multiple of pi equivalent?
I'm just spitting but
1x2x3x4x5x5x6x7 = 25200. Maybe that has something to do with how Pi is approximated
Or more likely product of odd numbers, like 3×5×7×9...
Looked up approximations of pi lol
@@bryanandhallie Once you know that it's all about factors of 25200 generating solutions is somewhat trivial. You can try this on your own calculator. First, get a calculator that has more precision than the Casio (I just used the default Windows 10 calculator), then type a bunch of gibberish, divide it by a factor of 25200 and multiply by pi. Then type the exact figures that you obtain from the result into your Casio and it will return a fractional multiple of pi. This will not work if you divide by anything other than a factor of 25200!
The only challenge at this point, if we want to go there, is to find some number in the form a^b/c which is close enough to one of these values.
Plot twist: It's a deliberate bug in the code to quickly check if a competitor just ripped Casio ROM and used it in their calculator. Similar to the non-existent streets on maps.
This answer is good and funny as it avoid admitting they use a buggy algorithm or implementation of it. Bad engineers with good excuses.
@@GildasCotomale 'bad engineers with good excuses' is basically just programming lol
Or dictionaries with imaginary words!
@@GildasCotomale eww linux
This!
That one Casio engineer laughing after they intentionally added it.
That's how you know it's a genuine Casio
@@Nupetiet yea i think it was an easter egg too, designed for several applications of science
Well it's kinda cool tho
Wow, the 314th like, pi like
It could have been intentional, like a trap for other devs.
In the Casio underground lair:
"We did it! We drove mathematicians insane!"
"Were they not a little bonkers before already?"
"Yes, but not like this. They now step out of the house and get lost in thought in the woods."
they actually touch grass
On the subject, calculator unboxings need to come back
Yes!
Yes!! For the sake of the calculator cult.
I asked for a shiny blue Casio Classwiz for Christmas and I must be the only person to get excited about that. Unboxings would make me feel less strange
HP 32SII!
what da haill
Even stranger, dividing the answer by pi makes the calculator give a decimal answer instead of the fractional coefficient.
The correct answer?
Did you multiply that decimal number by pi to see if it shows the original surprise answer again? It *should* but sounds like it won't.
@@KarstenJohansson It will, I checked it!
@@KarstenJohansson It shows the surprise you mentioned.
@@monnamonstathanks for reporting back!
Here's something to consider: if you compute both sides of the 11^6 / 13 equation in single-precision floating-point arithmetic, you get exactly the same 32-bit result. This doesn't happen with the 11^6 / 17 example. My suspicion is that it's a combination of this and the fact that the denominator is 3600, which is a fairly nice number, being a product of the three lowest primes.
This sounds like an answer, folks! So casios use 32-bit floats, good to know.
How can we find other pairs of numbers that have the same 32-bit result to verify that?
PI in the result on CASIO fx-991ES PLUS
500*10/(22.977*10^-3) = 436382531/6300 * PI
I found this while calculating how long would my device work with a 500mAh battery if I know it uses 22.977 uAh in 10s
extracting pi=3.1415926535905471363222...
10 exact decimal places, or 11 if you round it there
@@timh.6872 32-bit float is only 6 significant digits of precision. This calculator has significantly more than that (12-15).
Perhaps something about the 3600 is yelling "CIRCLE" to the calculator? Given it's 360*10. In combination with this, perhaps 🤷♀️
Shout out to the care and effort put into these videos. The marker and paper setup is good too but i love seeing creators get excited about the production and have fun with it.
agreed. its such a lovely wholesome dorkiness for him to add the bits where he's rumaging through a forest in despair. makes me smile.
The conclusion here is that Casio should publish their source code
The only logical course of action is a Mission Impossible style operation where a team of mathematicians in tactical gear breaks in to Casio headquarters to steal the chip designs, CAD files and firmware code.
You can always pay for a teardown analysis. Or pull out the IDA tools to figure it out yourself.
An old pocket calculator isn't going to be as complex (or as codelocked) as a modern smartphone.
I figured Matt would just go ask them.
Like a242 vs. 232
@Etravagant Sobriquet - This is a special feature of Casio SYMBOLIC mode, which uses 25200 ( = 3600 * 7 ) as the original divisor. It is that simple ...
This is like a dramatic math version of captain disillusion and I love it. Really appreciate the quality of these videos
Are you kidding? I'm sending this directly to DrCap Disillisuion. How can there be two Matt'ses at once? And the whole calculator thing? looked straight up CGIed. This reeks I tell you.
I did not expect this to be a cliffhanger. Now I got a hole in my soul.
well it says so in the title
It does say in the title, "(We don't know!)"
Pi is always a cliffhanger.
Here are the priorities in the Casio program algorithm:
1. Display the result as a factor of pi, if any.
2. If the display is adequate, show this as a fractional number. If possible, show it as a fraction and associated with pi . Because when solving problems at school, show the result as pi related or fractional (or both).
3. It will give the result as Decimal when SD key is already pressed.
In scientific machines with other Brand WriteView, the 1st priority usually gives a fractional result, if there is pi in the question, it gives a fractional result associated with pi. It gives decimal results with the SD key.
source?
@@TymexComputing for now the source is "trust me bro"
The fact that the denominator is 3600 just screams that it tries an approximation in RADIANS.
He already tried another calculation that results in a multiple of pi with a denominator of 3600.
@@maddyschad6649 it was not precise enough. see the pinned comment
@@DukeBG 25200 has nothing to do with the radians, though?
@@KuK137 Just run around in circles.
a degree is ¹/₁₈₀π or ¹⁴⁰/₂₅₂₀₀π radians
You know you're a true mathematician when you interrogate your calculator. ...and then have a breakup with it. lol
That can be true aswell
Not mathematicians. It's the calculator fanciers who do that.
Somewhat obsessive compulsive .
HaHa LOL
I've seen few college math professors that 'interrogated reality' with their maths, then promptly divorce themselves from reality because reality refused to capitulate to their views of what it should be.
Looking back, I have to wonder if it had anything to do with them also being practising commi marxist types.
I love how people find out about floating point standards. As a programmer myself, I can tell you this: the explanation that requires the least work to implement, is the most likely to be right.
Not floating point but BCD. Still good comment
@@licht4808 is bcd not considered floarting point? I dunno coz I'm not a computer scientist or computer engineer, never took proper education in that field
Occam’s razor
No, when it's too simple it won't work and when it's too complicated it won't work either
@@minispinakins2034 With BCD you can directly represent 2 base ten digits in one byte. Four bits are used to hold each digit. For example 79 converted to BCD is 01111001. It can have advantages depending on what you are doing.
the bit where he says "i thought i knew my casio" and then sad piano music starts is a fun moment for people who play casio pianos
I am playing a casio piano, can confirm it was funny
I do prefer a Gaxio calculator personally.
It is the only logical choice.
Yeah, what were those Casio copycats thinking?!
only because you've not tried the Kadio yet.
Texas Instruments 👍🏻
@@standupmaths it must be hardcoded. Now the question is, why? Surely there's some bit of math out there that uses some part of this anomaly to generate pi, and YOU MUST FIND IT WITH YOUR BRAINS AND WIT
This Matt Parker's math(s) puzzle seems harder than usual.
I have a theory: When you tried the more accurate calculations, the calculator didn't do the same thing, as it only has pi stored to 10 decimal places, so it would've been further away!
My Casio fx-570c, that I've been using almost every day since 1989, also stores pi to only ten decimal places. In the original example, 11^6 ÷13 × 3600÷156158413 results in 3.141592654. If I divide that by the calculator's stored pi value, it gives 1 as the answer.
hmm... if you'd asked me out of context how I thought a calculator stored pi, I would say as a floating point binary constant, probably one of the standard IEEE widths, and not as some integer number of decimals. but then I would start to doubt myself because I have this vague recollection of calculators using some kind of BCD to avoid certain rounding errors without having to escalate the amount of internal precision too much. so I dunno. I guess it should be possible to come up with test cases to distinguish. if I'm ever really bored... (EDIT: I saw the pinned comment and it does seem somebody got to the bottom of this)
Tried all examples on an older fx260 solar and all of them resulted in a whole multiple of pi- maybe an older code section remained in the newer calculator
I did a little bit of research as I was curious, you can quite easily replicate this by just using an accurate rational approximation of PI. I used the Farey Algorithm to calculate approximate fractions and it turns out that 3126535 / 995207 is displayed as a decimal but 4272943 / 1360120 is displayed as pi (on the Casio FX-85GT Plus). These approximations were calculated using 322 iterations and 323 iterations respectively, so that should hopefully be a decent indicator of where the precision boundary lies.
I got the same result on a fx-991EX
This makes me curious. Can you multiply the numerator by 2 and get 2*pi? Or multiply the denominator by 2 and get 1/2*pi?
@@OMGclueless This is what I want to know too
Casio calculators store each number as 13 significant digits multiplied by a power of 10. I haven't checked, but I hypothesize that the first one you said stops equalling pi somewhere before the first 12 digits after the decimal (total of 13 digits including the leading 3.), but the second is equal to pi in at least the first 12, so as far as the calculator is concerned they are the exact same number.
Casio printing pi in mathprint mode is nothing new, problem is with the fraction before the pi, can we do that by some change in fractional input?
EDIT:- That sounded rude I guess, but just everyone is bringing the pi thing up and no one is discussing the fractional part, just saw another comment and people believed it to be a mystery solved
Haven’t been able to get my Casio fx-82AU PLUS II to do it, although I did find this in its manual: “The range for calculation results that can be displayed in π form when using Natural Display is |x|
My 82AU Plus II and 100AU plus won't do it, but they also cannot find exact values because of NSW examination rules. Is yours one where it can find exact values?
@@zachst3r_773 elaborate on the examination rules, I don't get what you mean by that, why wouldn't it give the exact value (I am also a NSW student)
Documented bug = feature
fx-350TL (from about 20 years ago) doesn't get it either
@@lindsaytang1017 NSW syllabus makes you find exact values by yourself, hence why they dont want calculators to do it for you
Response from someone who has worked on similar calculation/approximation code, albeit not on an actual calculator:
I'm gonna guess Casio is using IEEE floating-point math since it means they can use off-the-shelf components in their calculators. A really high-end calculator might use a custom solution with more bits or a different format, but this mass-market calculator probably doesn't.
I imagine the issue here is that, in this particular case, the 64-bit floating-point result of 11⁶/13 actually matched the approximation 156158413π/3600 _exactly,_ bit-for-bit. Casio probably doesn't show the result as a multiple of π unless the bits match exactly, or perhaps with a one-bit epsilon to allow for rounding errors. Your other examples may have _seemed_ to match up to a certain _decimal_ place, but that doesn't mean they matched up to the very last _bit,_ or _binary_ place, of the floating-point result. It takes between 3 and 4 bits to represent a single decimal digit, so being off by one bit could result in rounding to the same last decimal digit while still being different in its last binary digit.
If it helps to know, IEEE floating-point numbers are represented as *±1.m ⨯ 2ᵉ,* where *m* is the mantissa, a value somewhere from 0 up to, but not including, 1, and *e* is an exponent. How the sign and exponent are represented in memory isn't too important here, but the mantissa is: it is a finite number of bits (i.e. binary digits) that represent a fraction in the form *(0 … 2ⁿ-1) / 2ⁿ,* with *n* being the number of bits. Numbers are effectively always rational, and if you displayed them in binary, you would never get an endless string of digits like you do after you _try_ to represent them in decimal.
Some quick examples:
• 3 = 1.5 ⨯ 2¹
• 12 = 1.5 ⨯ 2³
• 48 = 1.75 ⨯ 2⁵
Same examples expressed in a simplistic 8-bit floating-point format, with 1 bit determining whether the integer portion of the expression is 1 or -1, 4 bits representing the mantissa, and 3 bits representing the exponent, and remember, all digits here are binary:
• 3 = 1.1000 ⨯ 10⁰⁰¹ = 8-bit byte: [0|0 0 1|1 0 0 0]
• 12 = 1.1000 ⨯ 10⁰¹¹ = 8-bit byte: [0|0 1 1|1 0 0 0]
• 48 = 1.1100 ⨯ 10¹⁰¹ = 8-bit byte: [0|1 0 1|1 1 0 0]
(Note: This is a simplified explanation that glosses over how 0 is treated as a special case, as it obviously can't be represented as 1.m ⨯ 2ᵉ, but that and negative exponents and other special cases like infinity, indefinite values, etc. are a story for a different time. If you're keen to know, I'm sure google can hook you up with reams of details.)
Mantissa.
Haven't heard that word in years.
The two numbers, float64(11^6/13) and float64(float64(156158413*float64(pi))/3600), differ by exactly 1125 units in the last place.
As a computer programmer, am suspecting something along this line of thought.
I feel like you are a better authority on this topic and thus should commence making math videos.
@@edgarbonet1 I went and tried it myself. I see what you mean. It could be they aren't using IEEE floats. The number of formats out there, at least historically, is kind of staggering, so it's possible. For a lot more detail, see here: www.quadibloc.com/comp/cp0201.htm
I also read something that claimed Casio uses decimal floats, which I'm guessing means BCD floats? But the article didn't seem super clueful and may just have been empirical guessing based on what the calculator is willing to display on what little screen real estate it has, along with considerations for humans not usually familiar with the quirks of binary and IEEE floats.
He almost has an existential crisis because he found the last digit of π
???
Like the guy that found the Lost Chord.
Perhaps this is one of those intentional "mistakes" that any publisher would put in a textbook to see if another company copied them. Like how Genius sued Google for copying their lyrics. But in this case, Casio hard-coded this answer to test whether another calculator manufacturer copies their code.
SirVataqun nah, its computer science
A "paper calculation" I guess...
Or it could have been an accidental miscoding in the initial creation before mass disribution.
You beat me to it. Could well be a "copyright trap".
@@sunnohh like a map street! some roads are on maps which don't actually exist for copyright reasons.
Honestly I just enjoy Matt using the exact same calculator I used for my GCSES like 8 years ago. Once a classic, always a classic
GCSEs not GCSES. I take it you failed your GCSE English.
@@Locutus This is the most pointless comment in youtube history. Even a broken pencil that hasn't been used since the second world war is less pointless than this comment. I feel bad for your parents, after celebrating the birth of you, that the child they treasure so much will, in the near future, make such a pointless remark.
@@kpp28 You're wasting your time challenging him - resistance is futile.
We still use them now at my school
Locutus dude calm down
"I don't think the people online are correct"
Oh how much better a world we would live in if everyone thought that way!
says a person online ;)
Is thi videos streaming in a TV?
"If it's in a book it's gotta be true!" - The Simpsons (pre-Internet)
So you argue that world will be better if we don't believe people online as correct, but you're one of the people online so the world wouldn't be better based on your logic. So we should do the opposite and believe people online to make the world better, but then if we believed you then we shouldn't believe people online...
Error: StackOverflowException
"I'll just type up a short reply correcting them."
What we need to know is the exact way the Casio calculator approximates and stores pi. My guess is that 11^6÷13 is special in this case, not because it's closest to actual pi, but because it's the only one that exactly nails the calculator's version of pi.
This. It's not finding Pi by accident, it's finding the calculator's approximation of Pi by accident.
Most likely it just stores its value as a double, then when getting an answer, it also computes the error with the PI answer (if the resulting fraction has been simplified), if that error is under 1^-10, it takes the PI result.
This sounds like a good excuse to bring back your calculator review series
Parker: doing tons of iterations of Farey Algorithm to get 1213/3600
Me: the first two decimal points are 0.33 so imma just call it 1/3.
Same
I was even lazier. I figured 1213=1200
So it's 1/3
No it's called 33/100
Pfff, it is bigger than 0, I can just approximate it to 1
@@eduardlopezplans5814 Third
Nah. It’s 1 % x > 0 so call it x - (1 % x)
This may well be a software "anti-theft" strategy, I use it a lot in my software...
Thief: I didn't steal this your honour!
Casio: Check 11^6/13 your honour!
we've found the maths version of paper towns. this is casio's Algoe.
Giving you a things up for the algorithm even though the word "theft" here represents an unethical and counterproductive line of thinking. Unfortunately, because this toxic idea is so pervasive, I believe you are correct in your guess as to Casio's motivation.
Isn't it true that paper towns like that specifically *don't* count legally to determine copies? Idk if it's different for code than books/maps though.
Ooooooh, a paper calculation! That's a new one for me
Oh yeah. It's big brain time.
In the table at 8:37, it is worth noting that the "Pi" that you get out of the calculations 1 and 3 is the exact same number, hence we can conclude that the important difference is the way that the initial results (11^6/13 vs. 11^6/17) are rounded. No matter whether you use binary or decimal numbers, any non-integer fraction with a denominator of 13 or 17 is wrong when expressed with a finite number of digits, and it is wrong in different ways for both fractions.
Since (and this aligns with the results that I got pushing my Casio FX-82 Solar to the limit as a kid) the internal accuracy of (I guess) any Casio is limited to around 10^(-12), you can seemingly get these results at random when the resulting Pi is within about 10^(-12) of the correct value - with two more points to add:
1) I'm pretty certain that you could reverse engineer the rounding algorithm that Casio used when you apply your test rounding algorithm to the initial fractions (i.e. 11^6/13) to find the one that makes this particular fraction a sufficiently precise fraction of Pi (and doesn't for the others).
2) I'm also pretty certain that Casio didn't implement a Farey algorithm, but simply defined a set of denominators that are most likely to appear as an exact value in front of an irrational number. So for example any fraction of 25,200 (as pointed out in another comment) = 2^4 * 3^2 * 5^2 * 7^2 - which includes any integer up to 10 plus virtually all degree values that commonly appear in geometric problems: 15, 30, 45, 60, 75, 90, 180, 360, 540, 720, ... - plus "round" values like 100, 1000 etc. is tested as the denominator (likely starting with the smallest), and if there is an EXACT match with the number of Pi stored this result is displayed.
If you randomly generate fractions that are sufficiently close to Pi, I would think that around 3.5% (=2^(-40) / Pi * 10^11) of them do actually come up as a fraction of Pi, which is probably enough to make an adult scientist give up before he finds a second example.
Tldr.: The Casio only displays a result as a fraction of Pi if its internal computation EXACTLY matches this fraction, with the error resulting from rounding the initial result with an infinite number of digits to an intermediary result with a finite number and the inherent accuracy limits of the calculator. A lot of denominators will never appear in a result containing Pi (or another constant) since they aren't part of a predefined set.
Can't you get a casio contact for this? I'm sure they have an engineer who knows
I’ve been asking around but nothing yet!
I think it depends on how open Casio are about their Intellectual Property. If they have a policy of not revealing too much, asking them would be useless.
@@TheLastWizardOfTheCentury-u7o maybe file a complaint?
demand money back or something?
@@thinboxdictator6720 If you ask for a refund expecting a technical explanation of the bug, you're going to be very disappointed.
@@thinboxdictator6720 they might give you a refund, but the customer support rep that deals with your complaint will either fob you off or give you a refund or some vouchers or something.
It's not like it's even giving the wrong answer. It's correct to the precision required, it's just expressed in an unexpected way.
It seems you don't even have to type in the Equation: When I just Type 136273.923077 into my Casio fx-82es and hit [=], it will also tell me that it is 156158413/3600*pi.
The same also works for 136273.9230769, but not 136273.9230768 or 136273.9230771. Yet again 136273.923077018 does work, while 136273.923077019 does not. After that I stopped trying.
i have a Casio fx-82MS and it does not use pi for any of these. This version has Chinese letters on the top and is from my Chinese friend (so its legit).
Maybe! these are made in china.... and they slightly skew the ones they sell to the westerners?
Hey can you do the 11^6/13 calculation again, but when it gives you that fraction, hit the S D button to turn the answer into a decimal number, then scroll along and type down the answer to 50 decimal places unless it repeats then just say what it repeats please.
@@cocorico128 It works on a range. not any higher. but as low as 136273.923076900, maybe further but I'm not messing with it any more.
@@christosvoskresye i don't see that. it does say S-V.P.A.M. most just say vpam and aparently the S stands for Super so whatever super can do is what mine can do.
@@kal9001 i put tons of digits into it and couldn't get it to ever show pi
If you look closely, you can see other Matt waving in the distant background from behind the tree at the end.
ANSWER
your calculator is always comparing the results with the saved constant PI
for example on a CASIO fx-991EX the number:
5419351 / 6900132 will give PI/4 because it is PI/4 precise to 14 decimal places
but
4559545 / 5805393 will only give a decimal because its PI/4 precise only to 13 decimal places
this is because this particular calculator stores its value of PI precise up to 14 decimal places (which can be checked in the user's guide)
PS.
I enjoyed the video, it got me curious, thanks! 😀
it is possible that is a trademark to see if their tech has been stolen by another company like a waterstamp
Oh! That’s an interesting theory. I suppose that, like a map, it would be very difficult to prove that your code had been copied if all you could show is that both calculators provide the correct answer for every calculation you tried.
One thing though, and sorry for this terrible nitpick, but that’s not a trademark or a watermark - it’s a copyright trap. Trademark is a way of publicly branding yourself, and violating a trademark tends to be pretty obvious. If I was branding my calculators as KASIO, that would be a violation of Casio’s trademark. If I stole their calculator code and put it in my calculator, that’s a violation of their copyright. If I did that, and they could show that my calculator and their calculator gave the same unusual answer for a given input, and I couldn’t justify why my calculator does that, that can be used as evidence that I violated their copyright.
Given Smathlax's discovery of the relationship to 25200 and factors thereof, the circumstances required to produce this 'bug' feels too general (as in not-specific) to be a copyright trap. But I will concede that it is entirely possible that you are correct. My bet is some sort of strange coding error.
Or this might be the pirate one. ;-P
@@superdupergrover9857 Instead -- though this is a nifty suggestion that could be correct -- I bet it has to do with how the rational fraction discovery algorithm is implemented. I bet it's counting the amount of iterations, because that's what any sane engineer would do.
And when I say counting, I don't mean actually counting, but instead the algorithm is limited in cycles, and if it doesn't yield a solution in a given amount of iterations, the operation is seen as futile, the solution is discarded and something else is tried instead, eventually falling back to displaying an irrational decimal number, which is a logical thing to do, given the inaccurate nature of floating point math in processors.
This is the simplest explanation of what's going on (from the software engineer's point of view, and I am one), but to prove it we need the actual algorithm as it is implemented in Casio. Maybe someone could rev engineer it though, and I admire the host's effort in this direction, but he needs to be much more stubborn than that, and to think very low level.
edit:
In other words, he's obviously not a software engineer, but a mathematician. He fell into a trap of thinking the Casio must have surely compared the number to Pi, which is something you just never do, you never compare the two floating points naively. Not only it is unreliable, it is also incredibly slow. The numbers are internally represented in an IEEE 754 standard, which has nothing to do with how the digits are displayed in the decimal system, and you can't simply compare two base-2 sausages bit by bit and hope it works like plain text or integers would.
So any calculator that gets the right answer didn't steal from them. Clever.
Matt: Look at this! And it only works with this one combination!
Casio: Oh crap... they found it! Change the launch codes!! NOW!!!!!!!!!!
Lol I'm laughing so hard
Reverse engineering someone else's code is hard enough when you have the code in front of you...
Fetching machine code is enough if you have descent tools. But they might have set up encrypted and protected boot to prevent dumping binaries.
Reverse engineering MY OWN code from last year is hard enough :p
@@suokkos Highly doubt that for a calculator though
Wow, that fraction finding thing was enlightening. I have no idea how I’ve never seen that in all my days.
This is why I love educational youtubes, it’s like a box of chocolates, never know what you’re going to get.
That's a really popular practice in math and computer science.. A binary search is a similar way of narrowing down to a result and there is an algrothim to find a root of a function which uses the same idea of discarding half the data every time
Two things to consider:
- Binary Representation
- Easter Egg
I didn't see the Easter egg but the binary representation is closer for pi
pi in binary?
Ondřej Majerech not exactly, floating point numbers are represented in a different way in memory. Not even sure Casio use floating point but probably yes
This is a 32 bit representation 00111111101101010011110100010101
I vote for easter egg: cheap/easy to implement & gives maths nerds something to talk about.
I love your description of the MATH output... "before it shows that to you it has a think". Great video and a great quirk!
I've got a TI-83 from 1996 and it gave me the correct decimal result right away. I think your Casio just decided to be pi-curious.
i loved the pi-curious pun, amazing
I have a Ti-30X IIS
It gave me the correct answer
TI is clearly the superior calculation device... I have a sibling TI-83 from the same timeframe.
I have the fx-82 AU Plus II, it also gave the correct answer
My Casio fx-9750GII gave me the correct answer.
One thing to consider with most floating point representations is that more digits in front of the decimal reduce the number of digits held after the decimal. In many attempts to recreate the bug it looked like there would have been less precision held in the registers after the decimal, so just comparing what the full number would be is not good enough to predict what would happen. You'd want to consider what intermediate rounding is taking place.
I tried to change the float on my ti-83 plus, as I had considered this a possibility as well.... I went from float up thru 9 (highest i can force it) and it didn't work.
Back in the day, this kind of thing would be called an easter egg
@nuff sed or an easter boob
@nuff sed is that what a real Easter egg is? And I suppose dying actual chicken eggs bright colors and hiding them in the yard for kids to find is an idea inspired by it?
Once the Easter Egg... now just the merengue on Casio's lemon-Pi.
No? Easter Eggs are supposed to be intentional.
@@kingacrisius Oopster Eggs
I love finding out about crazy functions or proofs that are blindly stumbled across and are weirdly interesting.
Here i go again, watching RUclips videos about weird maths problems past 10pm.
Switch over to ,how to make Pastrami like they did in the old days.
tirns out to be 11:02 for me would be neat to see how many watch during the same time frame
LMAO it’s literally 10:11 rn and I’m thinking that exact thjng
3:28am, welp
Af least it isn’t 4am 🥲
Interesting video. I remember doing number processes at college (I did computer science, and have worked as a developer for 30 years) - as soon as I saw the mistake the calculator makes, I thought "this is down to binary coded decimal truncation" - and yes - the threads elsewhere go straight to the same conclusion. Bookmarking this one - it's interesting :) There are some great videos about the Sinclair calculator online, where the source code is broken down to show some of the mathematical gymnastics computers go through to do arithmetic operations. Anyway. Great video.
This is not a "mistake". This is a feature of the Casio, when in SYMBOLIC Mode. In Decimal mode, you will get the value that you want to see ...
@@MrSummitville yes - bad wording - a feature in the classic sense of unexpected outcomes :)
Calculator: *gives answer accurate to 12 decimal places*
Average Joe: That's way more accuracy than I need.
Mathematician: Not good enough!
Not just average Joe. Also average engineer because they deal with practical matters and average scientist because they deal with precision limitations and significant digits, etc.
BTW, we used to laugh at a physics professor who would always say things like "that results in 4.8, we'll call it 5, and then continues the problem with the 5."
@@justinjames3028 but wait, aren't we indeed supposed to approximate 4.8 with 5 and 9.8 with 10 in physics? hmmmm
Me, uses 3
truth is binary..
@@OtherPony not when it isn't the final answer and even the it depends on the starting values as well. 9.8 could actually be the correct answer for a calculation if the starting values were precise enough (2.82 and 14 for example).
As we always say: Pi pops up in the darndest places!
Such an interesting comment! How about, "The London Underground"? Investigate how much longer the outside rail of the Circle Line is than the inside rail, given that the gauge is 4 feet 8 and a half inches.
**3Blue1Brown has entered the chat**
Exactly the type of content that'll see me through this pandemic. Thanks, Matt!
IRsPheErBj8
@@davetoms1 No.
I've tested the bounds for Casio-π using their online emulator for the fx-82/85/350ES Plus.
When entered directly, Casio-π symbol is displayed for any values in the range 3.14159265358918 and 3.14159265359042.
The pre-defined stored value of Casio-π is the exact middle of these two values at: 3.1415926535898.
can you do (pi_exact - pi_min)/eps(pi_exact) and (pi_max -pi_exact)/eps(pi_exact), where eps(x) returns the smallest value that can be added to x?
Okay so I thought of trying the reverse - take the approximation for the rational multiple of π (from 8:59), solve for π from it and see if you get π or its decimal approximation (Casio fx-991ES PLUS).
The 4th and the 2nd in that list gave π, but the 3rd and (surprisingly) the 1st didn't give π; they just gave the decimal expansion.
So the fact that the first one didn't give π really blows the whole theory of what the calculator is doing to dust! I have no clue what's going on, just thought I'd pop in with some additional data.
"bUt Pi Is IrRaTiOnaL" resonating through my brain
Pi = circumference/diameter
=> Pi is rational
Q.E.D.
I see absolutely no problems
Because remember, it isn't a root of any polynomial with rational coefficients.
Lol
Jesus Christ is God and is the only way
@@ethannguyen2754 just making a ratio like that isn't enough to make a number considered rational yknow. The two numbers must be WHOLE and coprime to each other
I wonder if it’s deliberate like fake roads on maps to catch out people trying to clone the calculator.
Very likely. It's almost an Easter egg. Companies do some strange things to protect intellectual property. Or it could just be an artifact of the floating point routines they used.
I was thinking the same thing.
like paper towns?
Going by the weirdly specific rules the guy found in the pinned post, I'm sure you're right. It had to be programmed in.
Beautiful cinematography in that take in the woods
*SAD PIANO* :(
The answer might be in the manual: www.sciencestudio.co.uk/wp-content/uploads/2019/01/fx-83GTX_85GTX_EN.pdf
Page 103:
"The range for calculation results that can be displayed in π form when MathI/MathO is selected for Input/Output on the setup menu is |x| < 10^6. Note, however, that internal calculation error can make it impossible to display some calculation results in π form. It also can cause calculation results that should be in decimal form to appear in π form."
Page 31&34 explain when the result (for fractions) is shown automatically as decimal or as fraction. Maybe that applies to the π-form also somehow.
This sounds like it's relevant, but you'd probably need to look at the actual internal logic for what form to display in order to figure it out.
Ah, a classic case of RTFM.
Never wanted to so badly look at calculator source code as I do now.
@@Ikantspell4 They have a PC simulator of several calculators which exhibit the issue. That might be a reimplementation of the firmware or an emulator + ROM dump?
@@NeatNit Who knew that reading the fine manual could be so illuminating?
those monologues in the forest were hilarious! and an educational video :D thanks so much for making this im genuinely intrigued why they do.
As a software developer, I’m willing to bet that the answer lies in different number representations between your Python code (likely floating point) and the Casio (perhaps fixed point) or perhaps both are floating point, but different implementations.
The “Pi detector” is surely tuned to whatever the Casio’s representation’s most accurate representation of PI is.
Switching the Python code to a different implementation floating point (perhaps 24/32/64 bit) or a fixed decimal package may shed some light on this.
I suspect you're right. It's easy to get different results on different hardware/software from the same calculation when floating point numbers are involved. IEEE-754 provides standard for floating point arithmetic that everyone can develop against so that you can at least be confident that two different pieces of hardware or software will provide the same answer but even then it's possible for both of them to be wrong. To see what happens when you do it poorly just look to the patriot missile system failure in the first gulf war. That mistake resulted in 28 soldiers dying.
To add to this, I also suspect that "pi" is represented within the calculator as a ratio of two integers that are "close enough", since it's impossible to actually store an irrational number. Maybe they just happened upon this exact ratio?
Ooo, I LOVE the Casio fx-83GT Plus! Best bloomin' calculator ever! I've had absolutely no need of it since graduating university (so I passed it on to a neighbour who was doing their GCSEs) but it's such a convenient way to input complicated calculations. OK, so now for the remaining 12 minutes of the video!
Matt, you've really taken these videos up a notch recently. Well done.
that calculator is perfect for you. it almost always gives correct answers like a true Parker calculator.
i went looking for a "parker calculator" or "parker approximation" comment. thank you
Why didn't Matt ask a Casio engineer? That would've been fun to watch.
Hugo Gonzmart My guess would be that’s confidential information they can’t share.
My guess is that he has tried but has been unsuccessful in contacting them.
I see what you did there.
Matt used number of digits as a limit for the search of the fraction, maybe instead Casio uses a recursion depth limit for the search
That is left as an exercise for the reader.
This might not be relevant but I have found that Casio calculators have more values that they tend to hide. For instance, when using pi, it only displays the first ten digits but actually uses fifteen digits for calculations. There is also weird stuff that happens when reversing a calculation you just did, to avoid losing accuracy, it makes sure the calculation gets the same result in reverse. So the square root of 9.999999999 x10^99 gets you 1 x10^50. If you square that again you just get the original 9.999 etc. But if you just take 1 x10^50^2 obviously you get 1 x10^100 which is just a math error. Casio’s are weird and do a lot of maths that they don’t show.
you seem to have greatly confused yourself about what the observed effects of base 10 display approximations would be - the number on display is nearly universally an approximation (unless its only factors are 2 and 5) in all cases - and the number of digits displayed is also disjoint from the value
Perhaps it's a proprietary phenomenon like the "paper towns" that exist only on maps.
That's a neat idea
I imagine some poor guy sitting in an office in China, writing the software for the new Gaxio. He is doing every possible calculation (all of them) on a Casio, and then hardcoding the result.
Casio, you are so evil!
Genius!
Is that like a trap street?
en.wikipedia.org/wiki/Trap_street
I was thinking the same thing. Perhaps it's a way to find out if somebody is building a calculator using stolen chip designs - or (more likely) stolen firmware. (Do these calculators run firmware? I would guess so, but I have no knowledge.)
One theory: Like cartographers put deliberate mistakes in their maps, perhaps this is a way for Casio to tell if anyone is stealing their code?
It just feels like too easy a calculation to make
I think I should point out, that reading further, it turns out that SirVataqun said this first.
@@andypughtube Well, instead of posting, you could've liked his post? Makes comments more compact to read.
I tried this on two calculators. My CASIO gives me the same strange result, my TI does not.
CASIO fx-85ES: 156158413 / 3600 * \pi
Texas Instruments TI-30XB: 136273.9231
Hit the S D button to change the answer to decimal. NO ONE knows this for some reason
@Grant Grant Such as?
@@prich0382 wdym everyone is taught this in school aren't they?
My TI-30X-IIS gave same answer as Dr Nereos' TI answer
@@prich0382 what does that button do? I don't have that on my TI
I experienced the opposite of this. I used an integral to find the area of a circle with radius 1 and the calculator rounded the result so much that it no longer recognized it as pi
I thoroughly enjoyed the cutaways to the woods. Hilarious
What if this was a unique Easter Egg, coded in by some engineer as their favourite approximation for pi? That would explain why the others don't work.
This is what I was thinking too, tbh.
No
Some people may have their favorite sports teams, but Matt Parker has his favorite calculator.
He's not alone. Though I prefer Sharp vs Casio, personally.
I've had the same TI-30Xa since high school and wouldn't trade it for anything. Nerdy to say, but I love it.
Don't know if it has been mentioned, but there is a common approximation that the number of seconds in a year is \pi\times 10^7.
The existential crises really make this video great.
I think it has something to do with the trig function on the calculator. When you perform trig functions with the calculator in radian mode, such as the inverse sine of 0.5, it will give you the answer as a faction multiple of Pi.
If you take the hyperbolic tan of the result from that calculation, you get 1 exactly.
tanh(11^6÷13) = 1
That number must be in a trig lookup table in the calculator somewhere, causing it to present the fraction as a multiple of Pi as if you've just got the result of a trig calculation.
tanh(any big number) ≈ 1
Good connection though
Interesting! Makes a lot of sense, since this is so far only shown for that one calculation. A lookup table also explains how it is able to calculate and represent these numbers so quicly on the weak Z80 hardware.
This makes a lot of sense. If it is a look up table, there should be more values in it, otherwise more than a lookup table is a bug ^_^
tanh x tends to 1 quickly as x increases, my calculator gives 1 for anything greater than 11, let alone 130,000.
@@2inthemorning, @John Little: Exactly. The asymptote (1) is approached as an exponential decay, so it doesn't take such a big argument to make tanh extreeeemely close to 1.
tanh(x) = sinh(x)/cosh(x) = [eˣ - e⁻ˣ]/[eˣ + e⁻ˣ] = [e²ˣ - 1]/[e²ˣ + 1] = 1 - 2/[e²ˣ + 1] ≈ 1 - 2e⁻²ˣ
Fred
Surely, SOMEONE has a contact at Casio that could clarify this process??
i doubt casio is itching to tell random internet people how their products work
i almost landed a job there a few months ago, now I wish I did so I could just ask around if someone knows ahahahah
They probably don't know themselves, though.
They can analyze the code and figure it out, but I doubt they'd go to the trouble.
Tech support in the US is 1-800-435-7732. Give 'em a call; ya never know...
I was thinking we could hook up some test leads to the circuit and try to record the outputs so that we can single step through the calculations. Or is that cheating?
as someone who's used the fx-83GT PLUS for the past 6 years almost every day of my life, it felt so nostalgic when you took it out.
How to throw a mathematician into an existential crisis: Give him a problem his calculator fails at gloriously for no apparent reason.
It’s an existential crisis for programmers too
@@ottobass9193 If you get thrown into an existential crisis every time your code gives the wrong result for no apparent reason, you might have picked the wrong career :D
@@welltypedwitch Am programmer. Can confirm.
I mean it depends what you mean by fail. Technically the calculator got as close as it needs to
@@welltypedwitch that's right 😂
8:27 That's an interesting way to pronounce "eleven"
Rounding error. LOL!
Might be due to his Australian accent. They have some weird pronunciations down there.
Parker eleven?
It's a baker's eleven
Also an interesting way to pronounce 3600 at about 8:50.
Almost lost my sleep here.
I've tested on an Casio emulator and the same result here.
But the answer is quite simple. It happens due to an float point error.
1771561.0000004253462538723213146 stored as a float is = 1771561
There are other ways to see the error in the calculator.
Like if you get your result with PI and divide by PI the answer in the display is 43377.33694
Try to save that answer to a variable A for instance and subtract 43377.33694
The answer won´t be zero.
Don't Casio calculators use decimal floating point? That would change things slightly
Are you sure it is using floats ? How can someone design a calculator that computes using floating point numbers instead of algebraic manipulations ? this is insane
I agree, my intuition tells me its a floating point issue.
Edwin Vital In general it’s best to calculate with floats, because it’s pointless to care about the difference between 10^80 and 10^80+1, while you do care about the difference between 1 and 2.
@@calvindang7291 Floats are intended for runtime performance uses-cases where approximation is good enough. A calculation device is meant to provide exact answers with plenty of time (like dozens of miliseconds plenty) to do so. The problem is not a minor detail as you seem to believe because errors add up, so you can easily get wrong results on complex expressions even with small integer litterals. Which is why I doubt any good engineer would even consider that an acceptable option in that use case.
There is a thing called "exact computation" and there are libraries for that.
We just found the most elaborate easter egg in a place where we didn't know easter eggs could even exist
5:28 Hey wait a minute, that's not fancy math, that's just how you use a wrench set. If your 1/2 is too big and your 1/4 is too small try 3/8, and if that doesn't fit you know whether you need 5/16 or 7/16.
What you're describing is a different algorithm, binary search. It's not really possible to use the algorithm from the video on socket wrenches, because it will generate socket sizes that don't exist.
For instance, you would need to go to a 1/3 socket after the 1/2 and 1/4 failed. Then to either a 2/5 or a 2/7.
or go get your goddamn metric wrenches!
This is the answer to: "But Miss! When am I going to use this stuff?"
@@havocproltd Look, I can buy all the metric tools I want but that doesn't stop the idiot who designs it with imperial bolts.
@@johnladuke6475 ...I was just saying, these days..... hope your week ahead is as good as mine! ACB
Same result with a Casio fx-115ES Plus. TI-83+ doesn't output fractions, so it just output the decimal.
TI-30XIIS also gives no PI
Same with Casio fx-991ES PLUS
Same with Casio fx-991ES (not plus)
I like bread
fx-991EX CLASSWIZ same results, seeing as it’s the same on most Casio models (if not all models) then this is likely to be a limitation with the hardware that causes the software to express that one sum as a multiple of pi instead of a decimal
My theory: The programmer who wrote the Casio firmware put this in as an easter egg. It just happens to be his favourite approximation of π.
pretty useless approximation of pi. First you have to calculate 11^6, then you have to divide that by 13 and you still have the number 15615813/3600 (which is hard to remember on it's own) so that you can divide the result by it. And what do you get for that hour of work? Less places of pi than what I can memorise in 10 minutes.
11/6/17 could be someone's birthday. Maybe that's why they did it if they did do it.
@@airkami born in 2017 or 1917? Or maybe 2011/1911
I agree. It's just an easter egg.
@@lazarx804 That's why there is ISO 8601: YYYY-MM-DD. Use it, people!
This is a perfectly executed video. The retreat to the forest for contemplating a universe's weight of the philosophy behind a cryptic response to a reasonably simple quandary made this as epic as this run-on sentence is long. I imagine scores of your predecessors taking a nature hike for much the same reaon. Newton, Huygens, Socrates, Pythagoras, et cetera... and now Parker. Briliant.
This could possibly be a "trap street" on the chip to catch copies.
Is this like how the map companies make up towns and cities to stop people copying there maps?
Paper towns!
remember that kid in school that had a weird calculator and was always confused?
well, we all got the same calculaor. So everyone was always confused.
Teacher: Alright everyone press [long string of buttons] on your Casio
Me: What's that on a TI ?
Teacher:
Me:
That moment when you are messing around on your calculator and you find an Easter egg.
Works on my fx-991ES casio calculator I use for my engineering degree. Totally going to show this to all my friends now!
I'm reminded of that scene in 'The Office' when Gareth makes a mistake on an order, and rather than admitting his mistake, blames his calculator, then telephones the manufacturer. His side of the conversation is:
"I just got a complaint from a very important client saying that, uh, the figures I gave him were wrong and... yeah, well, great, all other possibilities, ya know, it's come down to the calculator. Well, I don't know, circuitry? Sorry, who is this I'm talking to?...Alright, alright, you give me sum then. No, no, you give me a sum, I'll try it out, alright, yeah, plus 52 equals 141. Alright you win that one, that time it was correct."
Maybe try a couple of different algorithms and check how many iterations until convergence. There must be a sweet spot of accuracy vs computation time. You're other example may have been better approximations, but maybe the calculator only runs say 100 iterations
I do believe this could be a lead to the answer.
Interesting point, I think that might be it
It's a binary search algorithm. In every iteration of the calculation you roughly divide the error of your approximation in half. This means that your approximation approaches the desired value at an exponential rate. As the amount of digits you want to match increases (let's call that "n"), the amount of steps you need to execute grows roughly like "log(n)". Algorithms with that "complexity" as it is called, typically do not need to weigh accuracy versus computation time. The limiting factor is most likely precision of the number they can store in memory, and not the time it takes to calculate the approximation.
This is only helpful if the Casio does not calculate this in floating point arithmetic, which I am 90% it is...
It seems more likely it converts a floating point result to a fraction...
@@jonassattler4489 it does, thats what was said. It first does the decimal version (using floating point arithmetic) and then to a fraction and multiple of pi and maybe some others im not immediately thinking of. We are talking about the method it uses to convert to a multiple of pi.
I don't have a casio with fractions, but I can assume somethings about it to answer at least a little bit, if anyone can confirm any of this please answer:
1 - doing some research casio calculators use a 15 digit internal representation for calculations ( this might be hard to confirm)
2 - again same research says they use truncation as a way to round things
3 - the pi constant they use seems to be 13 digits accurate ( at least with mine simple cassio)
4 - it might be that it's not an approximate answer in the calculator eyes, it might be exact when rounding so it trips up
To confirm my theory we have to find an approximation with 12 digits that when the fraction is expanded has the same amount of "zeroes" on the end.
My messing about with this exact calculator in lessons does seem to suggest that 3.141592653589 is the calculator's internal value for pi. I also think 15 digits is the limit but I'm not sure on the truncation.
@Donot Riply Is it supposed to do that?
Same with my casio btw
@@magnus7857 obviously not, it's correct to 12 decimal places though (at least according to python, so double precision IEEE floating point numbers)
@@drearyplane8259 sin(3* that) didn't give me 0. Had to add a 7 at the end. (fx-991DE)
My favorite approximation for pi is the fourth root of 2143/22. It is accurate to nine decimal places and easy to remember.
It's cool, but not really useful, right? It's just about as easy to remember the 9 decimal places
The dramatic reflection in the forest is high quality comedy!
It's probably a copyright trap so that Casio can show that their Intellectual Property was stolen if someone rips off the firmware (microcode) from the calculator. Copyright traps are common, for instance all maps contain deliberate errors so if people copy them the owners of the copyright can show that their maps have been stolen. There was a famous case where the Ordnance Survey took the AA to court for stealing their maps. There was also a case where a map maker a long time ago created a village that never existed on his map. You can trace this fictional village through maps for several centuries.
Sounds like the only logical explanation to me. It's like an Easter Egg.
That's a farking awesome reply. Makes sense.
Maps need copyright traps to prove that their property was stolen because all maps are mostly the same otherwise (and you can't copyright nature). This is not necessary for a Casio calculator because a copy calculator is easily identified as a copy. Although most protection for electronic design is simply done by making the copying process massively expensive.
@@johnsmith34 It's not the calculator you are protecting from copying it is the algorithms that calculate the answers as well as the software they are converted into. It is believed that programmes such as Excel have copyright traps built into them. The difficult part is hiding them and if people do accidentally find them which is a pretty rare occurrence that they don't give the wrong answer so your product does not gain a reputation for wrong answers.
You may not remember but the early versions of the HP35 calculator failed when asked to do some calculation - I think the algorithm they used failed to converge for certain values from memory. HP ended up offering a free replacement to all the users even though the probability of a user experiencing the error in normal use was very low.
@@meneerjansen00 bug in the code. I'm not good with math but I am good with tech and until given a better explanation it makes the most sense. Digital watermarking makes pretty good sense too except for that's what patents and copyright are for, and people rely on calculators for important and precision numbers and a bad number could potentially put them at risk of a lawsuit. (lawsuit where an engineering structure fails and someone dies for instance) I wouldn't call it a deliberate choice for that purpose. If so it's incredibly wreckless.
Python has the faction package which has a function "limit_denominator", might be helpfull in the future :-)
What exactly does python NOT have a package for? I am somewhat new, and would like to see something where py sucks.
@@lokeshchandak3660 as an interpreted language, python is bad for speed in large scale programs.
@@lokeshchandak3660 the downside is that there's like no way to have all the functions in these packages memorized so then you end up finding out about these things after you've already made a program with poor code and now you wanna change it but you're lazy to so you end up getting bad code. (this is a joke comment btw I'm just salty that I didn't know about "bisect" earlier)
@@bobmarly8782 You see, but python + compiled libraries. 😍
@@bobmarly8782 Python can do many fast large programs thanks to stuff like numpy and pandas.
after all these years you mister are still the best!!!!
Saddest character arc I've seen in all of anime. I could really feel the despair and disbelieve. Heartbreaking.
The "I thought I knew you," bits remind me of that Gotye song from a few years back.
Now you're just some calculator that I used to know.
“You can get addicted to a certain kind of fraction...“
Calculator: *is accurate for the first 12 significant digits*
13th significant digit: *You didn't have to cuuuuut me oooooff*
@@SillyTalent2 😂😂
Sounds like someone needs to reverse engineer the firmware on that Casio calc.
Nahh check code parade's answer he solved it
It’s my first time watching one of your videos. You explained everything really well!
I think if people put "(we dont know)" or "(we dont know why)" after most titles on youtube then everything would somehow make more sense.