Newton's Method in C

  Рет қаралды 20,450

Tsoding Daily

Tsoding Daily

29 күн бұрын

Streamed Live on Twitch: / tsoding
Enable Subtitles for Twitch Chat
Panim Playlist: • Panim
References:
- en.wikipedia.org/wiki/Newton%...
- tsoding.github.io/dumb-sqrt/
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Pay for my VPS: zap-hosting.com/en/shop/donat...

Пікірлер: 92
@acriliqueofc
@acriliqueofc 27 күн бұрын
The Newton-Raphson method is probably the first thing I've seen in this channel that I already knew about. Felt smort for a few minutes
@spiritwolf448
@spiritwolf448 22 күн бұрын
yessss
@samuraijosh1595
@samuraijosh1595 27 күн бұрын
Tsoding should teach at my university.
@cookiecrumbzi
@cookiecrumbzi 27 күн бұрын
Tsoding should slide around the floor covered in mayonnaise
@flobuilds
@flobuilds 27 күн бұрын
​@@cookiecrumbzi did i miss somthin?
@petromudrievskyj
@petromudrievskyj 27 күн бұрын
You own a university?
@BboyKeny
@BboyKeny 26 күн бұрын
As long as Jeffrey Bezos gets the salary. It wouldn't be the same otherwise
@suvetar
@suvetar 25 күн бұрын
Tsoding just has the perfect attitude for us "Hands on" learners too ... I *can* learn by rote, but I absolutely hate it. Tsoding just grabs the bull by the horn and gets on with it.. "Can your *karate chops* University Professor */chops* do that?? 😀 @tsoding I love how you've adapted the "Rubber Ducking" method to making these awesome videos, you, Sir, are a Scholar and a Gentleman! The way you just embrace new stuff, new languages or fixing them to your satisfaction, or indeed just sitting there and writing your own as if you were writing "Hello World", it's amazing! Have you ever played around with the D language? there is a beta IDE for is (D-LandIDE) which has a nice feature of rendering to Console - giving a nice IDE like TUI! I'd also love to see you experiment with some different paradigms, Prolog for example!
@blackhaze3856
@blackhaze3856 27 күн бұрын
Tsoding featuring Pierre Beziér and Isaac Newton.
@ateam1453
@ateam1453 27 күн бұрын
You made us love the C program language again. It is clear that you are different from others thanks to your posts. Thank you for your effort. Greetings from Turkey
@luigidabro
@luigidabro 27 күн бұрын
What a coincidence! I am currently working on marching squares, and you drop this banger of a video!
@soyitiel
@soyitiel 27 күн бұрын
This guy usually works on exactly the thing I was thinking about at the moment. The big difference is he does the thing and I just watch him do it
@randomhunter47
@randomhunter47 27 күн бұрын
​@@soyitielaccurate 😂
@ShowierData9978
@ShowierData9978 23 күн бұрын
that has happened too me too, first with the .class parser, then the vtable
@Czeckie
@Czeckie 27 күн бұрын
this is so cool, I didn't expect it to converge that fast! And the way you can guide the seed value for each iteration such that the method chooses the different branch is very instructive. I'll be teaching numerical methods and this is a cool visualization I'll try to include
@_ahmetkar
@_ahmetkar 27 күн бұрын
Mr. Tsoding saving whole civilization with bunch of playlist !!
@aadishm5915
@aadishm5915 7 күн бұрын
NO WAY!. I am currently learning the newton's raphson method in college and literally taught of this. Just came and say your video!
@Marhaenism1930
@Marhaenism1930 27 күн бұрын
i love this series, pls continue
@AlgoFodder
@AlgoFodder 27 күн бұрын
Only time I had to drop everything just to drop a compliment for a video thumbnail. Out-f'n-standng!
@user-io4sr7vg1v
@user-io4sr7vg1v 26 күн бұрын
The animation is much snappier time. The overshoot period has been shortened. Beautiful animation. Very interesting that this sort of curve is used. I'm still not clear on the dll technique. I'll watch some more. Appreciate it as always.
@yrds96
@yrds96 26 күн бұрын
using the subtitles to put the chat history was a great move
@Software-sb1gx
@Software-sb1gx 27 күн бұрын
I remember creating this in excel for fun at home after I was taught it in school maths. was a great excersice both in terms of maths and Excel and one of the very very few things I did voluntarily as an extra to my curriculum lol
@bbq1423
@bbq1423 26 күн бұрын
40:24 Me trying to explain that the software is slow, while others thinking it's perfectly fast
@pudou_
@pudou_ 22 күн бұрын
This is fucking amazing and brilliant content. Thanks!
@RaineriDev
@RaineriDev 27 күн бұрын
Every video I realize I don't know anything
@randomhunter47
@randomhunter47 27 күн бұрын
I'm with you there man😂. I hope to be able to think at the level he does
@AquesticYT
@AquesticYT 27 күн бұрын
To be honest the newton-raphson method is well known. We learn it as 16-17 year olds in the uk.
@randomhunter47
@randomhunter47 27 күн бұрын
@AquesticYT good for you but not everyone's in the UK you know
@AquesticYT
@AquesticYT 27 күн бұрын
@@randomhunter47 I understand wasn't trying to seem that way. I recommend learning at least calc 1, it will help you out loads.
@potatopassingby1148
@potatopassingby1148 25 күн бұрын
wow pretty cool that you did this: "Enable Subtitles for Twitch Chat" How does that work? That's awesome
@dkaaakd
@dkaaakd 27 күн бұрын
I wonder if it is possible to do auto-differentiation in C nicely. In C++ it is easily achievable via operator overloading and functions overloads. Templating functions by type of the scalar makes it efficient (e.g. you can omit computing derivatives when not needed, etc) [one example of implementation is ceres/jet.h from ceres-solver library]. With automatic differentiation one could save 1h deriving derivatives (pun intended), and it works basically till you need to handle L'Hospital's rule. Constraining bezier functions to monothonic in x is pretty simple, one just need to check roots of derivative dx/dt (which is second-degree polynomial at most) when dragging points in editor.
@JamesSjaalman
@JamesSjaalman 27 күн бұрын
The inverse sqrt() trick is based on the ieee754 FP format. It basically just divides the exponent (correcting for the bias) using bit trickery, and optionally fiddles with the mantissa.
@rogo7330
@rogo7330 27 күн бұрын
You are talking about quake's quick inverse sqrt?
@user-io4sr7vg1v
@user-io4sr7vg1v 26 күн бұрын
describe this 'bit trickery' you speak of.
@JamesSjaalman
@JamesSjaalman 9 күн бұрын
@@user-io4sr7vg1v GIYF
@eugen_aa
@eugen_aa 27 күн бұрын
I'm in my last year of high school and we literally just learned this in math class like 2 weeks ago, what a coincidence.
@blackbeard3449
@blackbeard3449 27 күн бұрын
Should have used noq to differentiate that function!
@TsodingDaily
@TsodingDaily 27 күн бұрын
This comment gave me an idea. I need to implement some sort of LaTeX rendering support for Noq...
@juanmacias5922
@juanmacias5922 27 күн бұрын
40:07 LMFAO THIS HAD ME CACKLING...
@MrKevinontube
@MrKevinontube 27 күн бұрын
Newton's numerical analysis method? Tsoding lord is onto something big
@lolcat69
@lolcat69 27 күн бұрын
a_1 could also be just a/2 + x/2a if I ain't wrong, cuz a - (a²-x)/(2a) = a-(a²/2a - x/2a) = a-(a/2 - x/2a) = a-a/2+x/2a=a/2+x/2a
@Leonhart_93
@Leonhart_93 27 күн бұрын
I have watched several of your videos so far and I see that you engage in a lot of relatively complex short projects, just as experiments with the purpose of learning/teaching. Do you happen to also work right now on things where your abilities produce income? Of course other than the streaming and youtube income (that I imagine is still quite decent).
@yukijoou
@yukijoou 27 күн бұрын
afaik, youtube/twitch is his full time job
@Leonhart_93
@Leonhart_93 27 күн бұрын
@@yukijoou His knowledge and abilities are too well honed to just do this kind of stuff and nothing else. Like the speed of implementation on random new concepts. There are many engineers that have a 200k salary while being much worse than he is.
@apppples
@apppples 27 күн бұрын
​@@Leonhart_93 he refuses to work in industry as its soul sucking. he used to be a profesional developer for many years, though he'd job hop and just quit when he had enough money to live for awhile and enjoy his own projects. He also gets no money from streaming because of sanctions. No idea how he feeds himself.
@yukijoou
@yukijoou 27 күн бұрын
@@apppples yeah, many of the best developpers just get burned out by the industry itself also, i think he gets a bit of moeny through crypto, and likely doesn't spend much outside of housing and food, he's been using the same laptop for like 10 years now, and he has a referal link for people to pay for his server hosting
@Leonhart_93
@Leonhart_93 27 күн бұрын
@@apppples You do realize that the way you put is completely at odds with what most of us do for a living, right? Rather than look at it as a "soul sucking" activity, it's more like honing one's craft and getting paid for it. But he doesn't necessarily need to work for "the industry". There are many possible paths, work for a good startup, create his own startup, work in various research fields etc. I work for a startup for several years now and I have input in pretty much all the development decisions, it's pretty great.
@krishnachoubey8648
@krishnachoubey8648 18 күн бұрын
Bro the chat going crazy 💀💀
@pygmee6412
@pygmee6412 26 күн бұрын
1:26:50 you probably found out, but you used t=(x/AXIS_LENGTH), but you can't pass that to cubic_bezier_newton as x needs to be substracted as is from f(t). Conveniently I recall you normalize the coordinates when exporting, so AXIS_LENGTH is effectively 1 for panim and you can use t=x. It's only invalid for the editor.
@mohamedbadra295
@mohamedbadra295 2 күн бұрын
You can use Secant method, it is the same as newton's but it doesn't need the derivative
@andresconrado
@andresconrado 24 күн бұрын
Press F for ITS FUCKING OFF
@afterschool2594
@afterschool2594 27 күн бұрын
Fkkk, this is a very cool streamm Edit: also Newton is the goat scientists
@libcheet
@libcheet 27 күн бұрын
Jon Blow on video thumbnail image? Hmmmm :)
@berndeckenfels
@berndeckenfels 27 күн бұрын
1:09:00 I don’t think you need the vectors here, you can work only with x components
@rogo7330
@rogo7330 27 күн бұрын
I like when Tsoding jebaiting chat by omitting semicolons. It's like not finishing a sentence
@cacheman
@cacheman 27 күн бұрын
1:12:29 Starting beef with Carmack.
@multicoloredwiz
@multicoloredwiz 27 күн бұрын
I definitely agree with third owner of the channel zozen. I do think it's mostly carmack being in his mid(?) 50s but there's no doubting that Facebook world gave him permanent brain damage (by his own admission on that guys podcast)
@hubstrangers3450
@hubstrangers3450 24 күн бұрын
Thank you....
@programmingjobesch7291
@programmingjobesch7291 27 күн бұрын
13:10- facts
@mikesoylu
@mikesoylu 27 күн бұрын
Surprised you didn’t calculate the derivatives numerically given the beziers are pretty smooth
@kossboss
@kossboss 27 күн бұрын
beautiful end result.
@josefkaras7519
@josefkaras7519 27 күн бұрын
in the beginning, u probably meant f(x_i)
@KappaNone
@KappaNone 27 күн бұрын
You're good at programming, have you thought about streaming?🙃
@AndrieMC
@AndrieMC 27 күн бұрын
Bruuuuuh, THIS WAS STREAMED...
@thebirdhasbeencharged
@thebirdhasbeencharged 27 күн бұрын
​@@AndrieMCno it wasn't calm down, he should try streaming for real on twitch I think he'd do a good job.
@AndrieMC
@AndrieMC 27 күн бұрын
@@thebirdhasbeencharged are you trying to be funny or are you an idiot?
@juanmacias5922
@juanmacias5922 27 күн бұрын
@@thebirdhasbeencharged this was streamed on twitch...
@thebirdhasbeencharged
@thebirdhasbeencharged 27 күн бұрын
@@juanmacias5922 no it wasn’t, I was there when he was recording it last weekend. Tsoding doesn’t and has never streamed BUT he should, he’d be pretty good at it and he can upload the vods to KZbin after.
@sleeping.cat4
@sleeping.cat4 14 күн бұрын
Can you have a better microphone or increase the volume while editing? Because on KZbin it's hard to hear you clearly.
@artemiasalina1860
@artemiasalina1860 27 күн бұрын
I know it doesn't matter but my OCD is screaming at me: _s/cuber_/cubic_/g_
@c4llv07e
@c4llv07e 26 күн бұрын
Решил отдохнуть от подготовки к ЕГЭ, называется.
@acps8568
@acps8568 26 күн бұрын
Where is the sectioning Mr. Tsoding
@musikai2006
@musikai2006 20 күн бұрын
Make a video about typst (LaTex alternative in Rust)?
@multicoloredwiz
@multicoloredwiz 27 күн бұрын
man did no one in chat tell him to just dump the function into wolfram alpha lmao
@apenaswellignton
@apenaswellignton 27 күн бұрын
Pog
@siupa23
@siupa23 26 күн бұрын
Maybe for next project, you can make AI tool, that will take any math equation, simplify it and turns into C code :D
@user-tv9ev6bf9t
@user-tv9ev6bf9t 25 күн бұрын
Does your system use a self-compiled kernel?
@sukivirus
@sukivirus 18 күн бұрын
I love scientific programming :) I want to learn to do symbolic math.
@rogo7330
@rogo7330 27 күн бұрын
Are you streaming at 01:00 because of viewers? I can't done shit after midnight and at the same time I don't want to do anything any earlier. Посоветуй, что в чай подмешивать надо чтобы не спать на ходу, спасибо)
@p99chan99
@p99chan99 27 күн бұрын
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh....... what?
@user-io4sr7vg1v
@user-io4sr7vg1v 26 күн бұрын
Carmack got too rich.
@kubre
@kubre 27 күн бұрын
I did this in Java
@bbq1423
@bbq1423 26 күн бұрын
Waiting for quake inverse square root to be mentioned in the video edit: 1:11:11 😎
@rabbitzzzz7781
@rabbitzzzz7781 27 күн бұрын
Fuck that shit its for nerd says the nerd towards his nerd audience and students 😂
Lerp smoothing is broken
57:19
Freya Holmér
Рет қаралды 121 М.
Schools Don't Test Intelligence
0:46
Tsoding Daily
Рет қаралды 16 М.
Each found a feeling.#Short #Officer Rabbit #angel
00:17
兔子警官
Рет қаралды 7 МЛН
Её Старший Брат Настоящий Джентельмен ❤️
00:18
Глеб Рандалайнен
Рет қаралды 7 МЛН
Will Ada Replace C/C++?
44:57
Tsoding
Рет қаралды 84 М.
Ok, but can you do this in C?
3:15:56
Tsoding Daily
Рет қаралды 17 М.
Why I Like Programming in C.
3:16
Francisco Jinto Fox
Рет қаралды 22 М.
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 552 М.
Harder Than It Seems? 5 Minute Timer in C++
20:10
The Cherno
Рет қаралды 132 М.
The mathematically impossible ball that shouldn’t exist.
19:29
Stand-up Maths
Рет қаралды 294 М.
making mofongo
0:24
Frog202
Рет қаралды 80 М.
Karpamambathy 002
hu-po
Рет қаралды 22
Hacking Raylib
2:13:39
Tsoding Daily
Рет қаралды 17 М.
How Fast can Python Parse 1 Billion Rows of Data?
16:31
Doug Mercer
Рет қаралды 166 М.
China 🇨🇳 Phone 📱 Charger
0:42
Edit Zone 1.8M views
Рет қаралды 382 М.
📦Он вам не медведь! Обзор FlyingBear S1
18:26
Карточка Зарядка 📱 ( @ArshSoni )
0:23
EpicShortsRussia
Рет қаралды 786 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 36 МЛН