Пікірлер
@yewo.m
@yewo.m 4 күн бұрын
Unfortunately, the setup was just a bit too complicated here
@yewo.m
@yewo.m 4 күн бұрын
Back when I was first learning to program (using C++), I was so enthusiastic that I wanted to make my own command-line calculator. At first I made it using just basic arithmetic operations. And then later on I added trig functions (along with the other typical math functions). But at the time I didn't know the standard library already provided built-in sine/cosine/tangent functions, so I ended up writing my own rudimentary ones using Taylor's series approximations 😅
@mihaleben6051
@mihaleben6051 4 күн бұрын
Nope. I give up. Ill never get trig
@mihaleben6051
@mihaleben6051 4 күн бұрын
Not even clarity makes me get it
@mihaleben6051
@mihaleben6051 4 күн бұрын
Wait this looks like physics diagram... Oh. Oh my god. Anyways, its a/theta. It came to me in a dream today around 6:00 at morning.
@mihaleben6051
@mihaleben6051 4 күн бұрын
Nah imma just use ((n-2)*180°)/2 For my angles. Oh, rotation? Just multiply the variable
@Antagon666
@Antagon666 9 күн бұрын
7:30, well multiplication speed is relative. In x86 floating point multiplication takes the same number of cycles as addition.
@YourMom-rg5jk
@YourMom-rg5jk 29 күн бұрын
W VIDEO
@umedmaru4445
@umedmaru4445 Ай бұрын
Quick question. I was wondering if computers could use the complex plane to rotate points(by multiplying complex numbers), instead of using a rotation matrix. Is there a reason this isn't used?
@CesarGrossmann
@CesarGrossmann Ай бұрын
Very interesting. Is that how scientific calculators do this kind of calculations? Like the venerable TI-30?
@rudypieplenbosch6752
@rudypieplenbosch6752 2 ай бұрын
In the old days, i calculated the Arctan in assembler using a the CORDIC. There is a mathematical proof of the CORDIC somewhere.
@yolamontalvan9502
@yolamontalvan9502 3 ай бұрын
Thank you for this lesson. I learned something beyond my capability. You forgot to mention the software you use to make those circles and triangles.
@yolamontalvan9502
@yolamontalvan9502 3 ай бұрын
This is cool stuff. Highly advanced for rocket engineers.
@zxborg9681
@zxborg9681 3 ай бұрын
Super interesting, I always wondered how CORDIC worked. Question, though, at 12:19, I'm not sure that the ratio of a[n+1]/a[n] is really sufficient to prove convergence, since the latter terms of the harmonic series (1/2 + 1/3 + 1/4 + ...) satisfies that test but still doesn't converge. Maybe I'm missing something though. Anyways, great video!
@bobater
@bobater 3 ай бұрын
Thanks for watching! The key with the ratio test is that we’re evaluating the ratio as a limit as we approach infinity. For the harmonic series, that ratio approaches 1 as we approach infinity. Since the ratio isn’t less than 1, the test does not tell us that the terms of the harmonic series are shrinking relative to each other at the limit, and therefore doesn’t imply that the harmonic series converges, which is why there is no contradiction in using the test
@BB-mr3vy
@BB-mr3vy 3 ай бұрын
how do you keep track of what theta is in order to compare it to the target angle? i understand how you track the x and y coordinates, but not the angle.
@bobater
@bobater 3 ай бұрын
Good question! We can store the total angle that we’ve rotated by in memory. Each time we iterate the algorithm, we can add or subtract the angle that we’ve just rotated by with our total angle so that we know what angle we are currently at and can compare it with the target angle.
@BB-mr3vy
@BB-mr3vy 3 ай бұрын
thanks for your response. my confusion was more about how you actually know what angle you're adding, since we only know them as arctan of 2^{-k}, not an approximate decimal value which we could sum and keep track of. do you just start by calculating decimal approximations of arctan(2^{-k}) in some other way for a sufficiently large number of values of k, and then storing them for use in the CORDIC algorithm?@@bobater
@bobater
@bobater 3 ай бұрын
Yep that’s exactly right! We can pre calculate the angles using some other method and then store them in a lookup table in memory which we can reference while using the algorithm
@chrisd561
@chrisd561 4 ай бұрын
I've been trying to find this. Thanks!
@user-pd2lx8fb3n
@user-pd2lx8fb3n 5 ай бұрын
This video is AWESOME
@augustodufloth1578
@augustodufloth1578 5 ай бұрын
Multiplication is not repetitive sum
@gigantopithecus8254
@gigantopithecus8254 6 ай бұрын
i found my own method for calculating cos(x) 1.choose accuracy n 2. divide the input number by 2^n-1 3.square the number and subtract 2from that 4. repeat 3 n times 5.divide the answer by two this works due to the double angle formula and chebesev polinomials
@kafel4796
@kafel4796 6 ай бұрын
not well explaind. There are other videos with this topic and much easier explaind.
@wesleytaylor-rendal5648
@wesleytaylor-rendal5648 7 ай бұрын
I'm really impressed. I'm currently implementing a cordic calculation in an FPGA. Both HLS and HDL implementations for two separate projects, but i have to admit this was a great refresher. Please keep it up. You're doing gods work.
@MrSilversMathSheets
@MrSilversMathSheets 8 ай бұрын
I was disappointed that this did not receive a mention in the final announcement. I hope you continue to make videos though.
@nomzz8106
@nomzz8106 8 ай бұрын
can you make one explaining how a logarithm is calculated? ive always wanted to know
@damyan_theSquareRoot
@damyan_theSquareRoot 8 ай бұрын
13:10 technically this statement is incorrect and the harmonic series is a popular counter example. Awesome video though!
@Lavamar
@Lavamar 8 ай бұрын
Ahhhh this video was so confusing! 1. At 7:18, you say that because we have the rotation matrix, "we have a way to rotate vectors and get their x and y coordinates after we rotate them" (correct) "...that gives us our sine and cosine" BUT the rotation matrix requires that we calculate sine and cosine! I don't understand why we're any better off at this point. 2. Was the motivation behind why we're adding successively smaller angles to an initial 45° ever explained? I don't see what doing that is giving us and I feel like it's probably a crucial part of this algorithm. Is it that you precalculate the terms of the summation AND their sines and cosines? Then you can just store those in a list and easily plug them into the rotation matrix? I appreciate the video but feel that this key point could have been explained a little more in depth.
@bobater
@bobater 8 ай бұрын
Really appreciate your feedback. This was my first real attempt at making a video explaining a topic not many people had seen before. When I made this video, I had about 6 subscribers, so the amount of people I expected it to reach and the quality standards I set for myself were somewhat low. If I have time, I might make another version of this video with all of the feedback I got and mistakes I made in mind, but I am pretty busy right now so I’m not sure if/when that will happen.
@ddognine
@ddognine 8 ай бұрын
Warning: unless you've had a Calculus II class (infinite series, product sums, l'Hopital's Rule, etc.), this will be over your head. Otherwise, this is a good video.
@WolfgangBrehm
@WolfgangBrehm 8 ай бұрын
Shrinking terms is not sufficient. Look at sum(1/n,n,1,m) ≈ log(m)+g
@katefick4246
@katefick4246 8 ай бұрын
This is awesome and so are you!!! Excellent graphics and clear explanation!
@user-vf2lx5eo6p
@user-vf2lx5eo6p 8 ай бұрын
Thanks.
@redf1sh
@redf1sh 9 ай бұрын
I didn't understand how should we get tan(x) values? Have we a precalculated table of tan(45), tan(22.5) ... ?
@kaustubhpandey1395
@kaustubhpandey1395 9 ай бұрын
Really cool entry P.S. love the effort in the 8 bit computer you made. I have seen ben's series on it
@qqw1-101
@qqw1-101 9 ай бұрын
did anyone else find it hard to follow, or am i just dumb
@donaldhobson8873
@donaldhobson8873 9 ай бұрын
If K is constant, start at (K,0) and remove one multiplication.
@JohnDlugosz
@JohnDlugosz 9 ай бұрын
16:44 The numbers on the right don't match the drawing on the left. That's more like 1 or 2 degrees, not 36 (I assume you mean degrees here but it's not indicated)
@bobater
@bobater 9 ай бұрын
The number on the right is actually the total angle we've rotated the vector by up until this point, not the current angle the vector makes with the x-axis. Also yes, this is measured in degrees not radians.
@anon_y_mousse
@anon_y_mousse 9 ай бұрын
One that's fun to play with is base64, since you can use different dictionaries to do the translation. The standard dictionary for internet communications just seems wrong to me, so for my own personal use, as in it doesn't need to be decoded by anyone else, I'll use [0-9a-zA-Z\-+] which are even safer for URL encoding due to the lack of a /. Note that I don't use a \ literally, it's escaping the -. Now I'm going to play with some math and see if I can finally understand how sine and cosine were derived generically.
@anon_y_mousse
@anon_y_mousse 9 ай бұрын
I think you've just given me the insight I needed to figure out how the equations were derived in the first place. Taking the simple ratios of a unit circle and making them more complicated by stepping makes so much sense I don't know why I didn't think of it before, but hopefully I'll build up a better understanding of math because of this.
@roger7341
@roger7341 9 ай бұрын
CORDIC rotations first used in HP35 calculator?
@vladimirbenrath6646
@vladimirbenrath6646 8 ай бұрын
No, many years ago before: in 1956 in DIVIC.
@RisetotheEquation
@RisetotheEquation 10 ай бұрын
Hey Bobater, great job! I was wondering if any of this might help explain the super cool phenomenon of tan 89, tan 89.9, tan 89.99, etc. Why they keep going up by factors of 10 has always been something I've been curious about.
@Noname-67
@Noname-67 8 ай бұрын
It's easier to see when you convert them contangents using the fact that cot x = tan(90-x). This results in cot 1, cot 0.1, cot 0.01. They approximately scales by factor of 10 is because cot x is close to 1/x for small x, using sin x ≈ x and cos x ≈ 1.
@nikita_x44
@nikita_x44 10 ай бұрын
in practice, if you alredy have microcomputer capable of simple operations then you should use polynomial approximation of sin/cos up to 5th power for sine(3 terms) and 4th for cosine(constant + 2 terms). it is pretty fast and uses only couple multiplications and additions.
@bobater
@bobater 10 ай бұрын
Yes if you have access to fast hardware multiplication it’s usually better to use a polynomial based method rather than CORDIC. CORDIC is a better method on computers without access to fast hardware multiplication.
@Stakodron
@Stakodron 10 ай бұрын
Very good Video really. But out of the eye of a newbie to Math and Computersince i would like to know why we need to do it this way. So why is this such a big problem for Computers in the first place ;) .
@bobater
@bobater 10 ай бұрын
Well, think about it. How would you go about computing sin(x) if you had to do it yourself? Since sin(x) is a transcendental function, we need to use something like an infinite series or some approximation to actually calculate it. We can’t actually add infinite terms though, and often the terms of the series are expensive to compute. This is where the challenge lies and what led to the development of algorithms like CORDIC and other approximations.
@MrSilversMathSheets
@MrSilversMathSheets 10 ай бұрын
This is a really nice video. I am excited about the content on this channel because it corresponds well to the content on my new channel. Your video is very professional and easy to understand - a feat considering the content. One quibble: the part about convergence misses a really important point - you need to cover all possible values. It turns out that the atan(.5^n) basis works, but not because the rate of converge is 0.5. For example, tan (pi/4*(.5^n)) would have the same asymptotic rate of convergence but leaves the range of computable values a Swiss cheese of holes. The property you need is sum of all remaining basis numbers must equal or exceed the last included basis number.
@bobater
@bobater 9 ай бұрын
Good point. I'll admit this is something I missed when researching the video, but it makes intuitive sense as to why that property needs to be satisfied. Thanks for bringing this up.
@loszhor
@loszhor 10 ай бұрын
Thank you for the information.
@oceannuclear
@oceannuclear 10 ай бұрын
Thanks for this! I've been meaning to understand CORDIC for a while but there's just too much fluff/ computer science background that I couldn't be bothered to read into. This cuts right through all the fluff (especially the (1/2)^n series at the beginning of the video) and helps me understand it!
@bobater
@bobater 10 ай бұрын
That was exactly my goal in making this video, to just present the ideas and motives behind CORDIC without going too far into the technicalities of it. Glad you liked it!
@OmegaQuark
@OmegaQuark 10 ай бұрын
Glad to be here before this channel blows up. Such amazing visuals and intuitions are a scarce thing
@Nim2
@Nim2 11 ай бұрын
Kudos. This is one of my favorites of this SoMe so far.
@tracyh5751
@tracyh5751 11 ай бұрын
12:24 this is simply not true. Just because the terms of a series go to zero, this does not mean the series converges (consider the harmonic series). The reason why the ratio test works is that the ratio of consecutive terms being less than 1 enables you to do a comparison to a geometric series (after some manipulation). The ratio being less than 1 means that the geometric series you are comparing to converges.
@gorgonwiesel8768
@gorgonwiesel8768 11 ай бұрын
nerd
@kindlin
@kindlin 11 ай бұрын
I left this video pretty confused, and the example at the end left me mystified. The point of this whole thing, is that every matrix shown 15:00 to 16:00 is actually a matrix of just 1's 2' and other powers of 2. So this allows the bit shifting talked about earlier to come into play. I'm still not sure exactly what is getting bit shifted, or what is adding to what, but I'm closer.
@bobater
@bobater 11 ай бұрын
To clarify, it might be easier to separate the matrix multiplication into two separate equations for x’ and y’. When you do that, you can see that the x’ = x - y*tan(a_n) and y’ = x*tan(a_n) + y. We know tan(a_n) = +/- 2^-n, so when we calculate the new x we subtract the old y bitshifted n times to the right, and for the new y we add the old x bitshifted n times to the right. Note that this is if a_n is positive. If it were negative, we would just replace adding with subtracting and vice versa. Basically, you can think of it as storing variables for a_n, x, y, x’, y’, and z, which is the total angle we’ve rotated by. Then, we do the calculations from the equations I wrote which just involve bitshifts and additions with x and y, in order to get our new x’ and y’.
@kindlin
@kindlin 11 ай бұрын
@@bobater OK, thank you, that helped me a lot. Maybe it was just one bit too abstracted for me to fully grasp the first time through. couldn't
@RealMusicHype
@RealMusicHype 11 ай бұрын
00:24 Very good!
@martinnguyen9720
@martinnguyen9720 11 ай бұрын
Pretty good video and lots of good feedback in the comments. A few expanded explanations (now covered in the comments but would be better in the video itself) and slowing down the pacing a tad would be greatly beneficial. Great job!
@bobater
@bobater 11 ай бұрын
Thanks for the feedback! This is only my 2nd video so obviously there is still a lot to learn and improve, but all things I can do better on in my next video.