Yeah, this example produced a sequence with double the frequency of the Fibonacci sequence. You could use this trick with other numbers though (including complex numbers).
@@pihedronyea that's how i thought you were going to solve it..why didn't you do this way just curious? And wpuld you agree most ppl will not think to write 1 as x^0. Thanks for sharing.
I'm not sure how you expected me to solve it. The way you solve powers of phi is using this same technique, but I realised this can be used for other binomials as well. It just happened that the expression I chose for this video was phi squared. I agree writing 1 as x ^ 0 is uncommon but for me it made sense because from a programming perspective, polynomials are just a list of coefficients for x ^ 0 + x ^ 1 + x ^ n and so on. This view helped quite a bit with calculus.
There is actually a way to solve these with computers. It works the same ways as a complex number : instead of storing a + b√5 as a float in memory, store it as two integers (a, b). Multiplication is as follows (a, b) * (c, d) = (ac + 5bd, ad + bc). Now just do 7 repeated multiplications (or implement fastexp), and print the result (m, n) as m + n√5. No precision loss ! As a bonus, this can compute fib(n) with O(lg n) complexity. It's very useful.
Yeah, I recently wrote an algorithm that can generate the nth Fibonacci and Lucas number in O(log n). So, it's possible to do phi^n in O(log n) without loss of precision. It's on GitHub if you're curious.
Calculators "get it wrong" because of floating point arithmetic... e-15 is high accuracy, no? Wolframalpha got the precise answer because it is made for dealing with radicals. Ordinary calculators aren't.
Yeah, computers work with limited precision, so some values will get rounded during calculations. Adding first and multiplying second may not give exactly the same result as multiplying first and adding second. Imagine if you only had one digit of precision. We know that 1.4 + 1.4 should equal 2.8 and therefore round to 3, but if the inputs are rounded to 1 ahead of time the result becomes 2. Rounding errors are inevitable unless you do completely symbolic calculations.
Even Wolfram didn't get it "precise", just more precise than Google's calculator. It's still has to approximate at some point, because the answer is irrational.
@jursamaj If you paid close attention to the alternate forms, you can see that Wolfram gives a precise answer in symbolic form. Computers aren't limited to just FP approximations. Rational data types do exist. Wolfram has the tools necessary to do algebra.
Fast algorithm I used: Note the (a+b√5)^2=(a^2+5b^2)+2ab√5. Perform this calculation 3 times, recursively, to get x^8. Now put x over x^8. Multiply numerator and denominator by the "conjugate" of x^8 (that is, flip the '+' in x^8 to a '-'). The denominator simplifies to an integer, while the numerator becomes another number in the form a+b√5. If you really don't want to do that division, you can use the simple (a+b√5)(c+d√5)=(ac+5db)+(ad+bc)√5 to calculate x^2, the x^3, then x^4, then multiple those 3 together to get x^7. Then simplify "conjugate" of x over (x times "conjugate" of x).
So I had a different approach before seeing your solution and please correct me if I am wrong!!so (3+√5/2)^-7 can be written as (2/3+√5)^7 and i rationalised the denominator my multiplying and dividing by 3-√5 and so I got {2(3-√5)/1)^7 and 2^7 is 128 and we can use binomial expansion There's also another faster way from the start i took 1/2^-7 out which is just 128 and then took 3 common from (3+√5)^-7 getting 3^-7 which is 1/2187 and then we have (1+√5/3)^-7 which can be approximated as 1-7√5/3 and soo on the further we go the better
You could use binomial expansion, but you would have to make 7 rows of Pascal's triangle. From an algorithm perspective, this is too slow because it's O(n^2) whereas recursion is O(n). It's faster to multiply and add subtract 7 times each than it is to add 21 times, multiply 6 times, and exponentiate 14 times. The speed difference becomes more obvious when you raise binomials to the power of large prime numbers.
4:46 Calculators don't get it "wrong", they just operate with a given precision. Changing the order of operations can get a slightly different result. That -2e-15 is a difference in the last 2 out of 53 bits of precision. Neither of the 2 terms you subtracted are precise beyond that point, so it's not like one is "right" and the other is "wrong". They're both approximations of the real result.
I'm glad you understand FPA, but that wasn't the point of the video. I cut that part of the video because it was boring. If the result is not accurate, it's still considered wrong. The point of the video is to devise a method for getting the EXACT answer and bring awareness to the limitations of calculators.
@@pihedron It's not even a limitation of calculators themselves, unless you include *any* method of calculating a numeric result, including pencil & paper. *Any* answer not in the symbolic form of a+b√5 will have to be rounded off it some point. Of course, you can't do anything in the real world with √5. You *have* to turn it into an approximate number for it to be any use. Also, accuracy is not a binary, but a measure of *how* accurate it is. In approximating π, 3 is not very accurate. 22/7 is more accurate, and 3.1415926536 more accurate yet.
"Any answer not in the symbolic form of a+b√5 will have to be rounded off it some point." This is exactly the limitation associated with some calculators. They are approximating. Plus there's no denying that the symbolic answer given in the video is better or more "right" than the answer given by the calculator. When I said "not accurate", I meant "not 100% accurate" or "not accurate enough". It's perfectly reasonable to reject an approximation as an answer no matter how good it is. 4:46 is a warning for people who may blindly use a calculator to verify their answer and get surprised. The explanation as to why this error happens is left as an exercise for the viewer. I hope this clarifies anything you misunderstood.
For real advice this is poorly explained and for me to understand this need to do your work for myself So recommend making the video longer yet explain each bit thoroughly I still understand it myself ( mainly because I understand the concept which you did great in explaining)
As this is my best video so far, if you want to see me do a cursed version of this (complex numbers), make sure to like this comment.
i saw the thumbnail and realised it was φ squared cause I fool around on the calculator all the time... no wonder f(n) were all fibonacci numbers
Yeah, this example produced a sequence with double the frequency of the Fibonacci sequence. You could use this trick with other numbers though (including complex numbers).
@@pihedronyea that's how i thought you were going to solve it..why didn't you do this way just curious? And wpuld you agree most ppl will not think to write 1 as x^0. Thanks for sharing.
I'm not sure how you expected me to solve it. The way you solve powers of phi is using this same technique, but I realised this can be used for other binomials as well. It just happened that the expression I chose for this video was phi squared. I agree writing 1 as x ^ 0 is uncommon but for me it made sense because from a programming perspective, polynomials are just a list of coefficients for x ^ 0 + x ^ 1 + x ^ n and so on. This view helped quite a bit with calculus.
"Put the table on the food."💀
this channel is so underrated! it deserves more reconization!
There is actually a way to solve these with computers. It works the same ways as a complex number :
instead of storing a + b√5 as a float in memory, store it as two integers (a, b). Multiplication is as follows (a, b) * (c, d) = (ac + 5bd, ad + bc).
Now just do 7 repeated multiplications (or implement fastexp), and print the result (m, n) as m + n√5. No precision loss !
As a bonus, this can compute fib(n) with O(lg n) complexity. It's very useful.
Yeah, I recently wrote an algorithm that can generate the nth Fibonacci and Lucas number in O(log n). So, it's possible to do phi^n in O(log n) without loss of precision. It's on GitHub if you're curious.
Calculators "get it wrong" because of floating point arithmetic... e-15 is high accuracy, no?
Wolframalpha got the precise answer because it is made for dealing with radicals. Ordinary calculators aren't.
Yeah, computers work with limited precision, so some values will get rounded during calculations. Adding first and multiplying second may not give exactly the same result as multiplying first and adding second.
Imagine if you only had one digit of precision. We know that 1.4 + 1.4 should equal 2.8 and therefore round to 3, but if the inputs are rounded to 1 ahead of time the result becomes 2. Rounding errors are inevitable unless you do completely symbolic calculations.
Even Wolfram didn't get it "precise", just more precise than Google's calculator. It's still has to approximate at some point, because the answer is irrational.
@jursamaj If you paid close attention to the alternate forms, you can see that Wolfram gives a precise answer in symbolic form. Computers aren't limited to just FP approximations. Rational data types do exist. Wolfram has the tools necessary to do algebra.
@@pihedron I was referring to the value it printed with dozens of digits.
HiPER scientific calculator for android gets this right
Fast algorithm I used: Note the (a+b√5)^2=(a^2+5b^2)+2ab√5. Perform this calculation 3 times, recursively, to get x^8. Now put x over x^8. Multiply numerator and denominator by the "conjugate" of x^8 (that is, flip the '+' in x^8 to a '-'). The denominator simplifies to an integer, while the numerator becomes another number in the form a+b√5.
If you really don't want to do that division, you can use the simple (a+b√5)(c+d√5)=(ac+5db)+(ad+bc)√5 to calculate x^2, the x^3, then x^4, then multiple those 3 together to get x^7. Then simplify "conjugate" of x over (x times "conjugate" of x).
or just use the binomial theorem?
I don’t understand now but hopefully someday I get better at this
Don't worry, you will.
So I had a different approach before seeing your solution and please correct me if I am wrong!!so (3+√5/2)^-7 can be written as (2/3+√5)^7 and i rationalised the denominator my multiplying and dividing by 3-√5 and so I got {2(3-√5)/1)^7 and 2^7 is 128 and we can use binomial expansion
There's also another faster way from the start i took 1/2^-7 out which is just 128 and then took 3 common from (3+√5)^-7 getting 3^-7 which is 1/2187 and then we have (1+√5/3)^-7 which can be approximated as 1-7√5/3 and soo on the further we go the better
While you need better notation , it is technically correct answer but is inefficient
You could use binomial expansion, but you would have to make 7 rows of Pascal's triangle. From an algorithm perspective, this is too slow because it's O(n^2) whereas recursion is O(n). It's faster to multiply and add subtract 7 times each than it is to add 21 times, multiply 6 times, and exponentiate 14 times. The speed difference becomes more obvious when you raise binomials to the power of large prime numbers.
Great Video! Very nice animations
Thanks!
Cool video! Did you use pack that 3b1b uses? The python library that name I forgot?
Yeah, it's called Manim.
1 ÷ by (3+√5)/2 for 7 times
4:46 Calculators don't get it "wrong", they just operate with a given precision. Changing the order of operations can get a slightly different result. That -2e-15 is a difference in the last 2 out of 53 bits of precision. Neither of the 2 terms you subtracted are precise beyond that point, so it's not like one is "right" and the other is "wrong". They're both approximations of the real result.
I'm glad you understand FPA, but that wasn't the point of the video. I cut that part of the video because it was boring. If the result is not accurate, it's still considered wrong. The point of the video is to devise a method for getting the EXACT answer and bring awareness to the limitations of calculators.
@@pihedron It's not even a limitation of calculators themselves, unless you include *any* method of calculating a numeric result, including pencil & paper. *Any* answer not in the symbolic form of a+b√5 will have to be rounded off it some point.
Of course, you can't do anything in the real world with √5. You *have* to turn it into an approximate number for it to be any use.
Also, accuracy is not a binary, but a measure of *how* accurate it is. In approximating π, 3 is not very accurate. 22/7 is more accurate, and 3.1415926536 more accurate yet.
"Any answer not in the symbolic form of a+b√5 will have to be rounded off it some point."
This is exactly the limitation associated with some calculators. They are approximating. Plus there's no denying that the symbolic answer given in the video is better or more "right" than the answer given by the calculator. When I said "not accurate", I meant "not 100% accurate" or "not accurate enough". It's perfectly reasonable to reject an approximation as an answer no matter how good it is. 4:46 is a warning for people who may blindly use a calculator to verify their answer and get surprised. The explanation as to why this error happens is left as an exercise for the viewer. I hope this clarifies anything you misunderstood.
hidden gem fr
how you do your maths edit plz
I use Manim.
Great video! I think I'll use the calculator for this one. Me is dumb
Great channel ❤
Great everything expect the last last
WTF💀💀💀💀💀💀💀
Okay
Instantly knew it, φ^2.
It also applies to numbers besides the powers of phi by the way.
For real advice this is poorly explained and for me to understand this need to do your work for myself
So recommend making the video longer yet explain each bit thoroughly
I still understand it myself ( mainly because I understand the concept which you did great in explaining)
I subscribed and liked , now I want more food.😐
I'm in the process of making a potentially longer video but I also have my SAT exam coming up soon. I'll try my best to release a video next week.
1 / (1 + golden ratio) ^ 7
you're not wrong but you can further simplify this to be 1/(golden ratio)^14
1brown3blue ahh video
I'm 0blue4brown.
W channel #make contents on other stuff as well
{21+35}/14=56/14=4 (x ➖ 4x+4).