Newton's Method in C

  Рет қаралды 18,678

Tsoding Daily

Tsoding Daily

16 күн бұрын

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...

Пікірлер: 89
@acriliqueofc
@acriliqueofc 14 күн бұрын
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 9 күн бұрын
yessss
@samuraijosh1595
@samuraijosh1595 14 күн бұрын
Tsoding should teach at my university.
@cookiecrumbzi
@cookiecrumbzi 14 күн бұрын
Tsoding should slide around the floor covered in mayonnaise
@flobuilds
@flobuilds 14 күн бұрын
​@@cookiecrumbzi did i miss somthin?
@petromudrievskyj
@petromudrievskyj 14 күн бұрын
You own a university?
@BboyKeny
@BboyKeny 13 күн бұрын
As long as Jeffrey Bezos gets the salary. It wouldn't be the same otherwise
@suvetar
@suvetar 12 күн бұрын
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 14 күн бұрын
Tsoding featuring Pierre Beziér and Isaac Newton.
@ateam1453
@ateam1453 14 күн бұрын
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
@Czeckie
@Czeckie 14 күн бұрын
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
@luigidabro
@luigidabro 14 күн бұрын
What a coincidence! I am currently working on marching squares, and you drop this banger of a video!
@soyitiel
@soyitiel 14 күн бұрын
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 14 күн бұрын
​@@soyitielaccurate 😂
@ShowierData9978
@ShowierData9978 10 күн бұрын
that has happened too me too, first with the .class parser, then the vtable
@_ahmetkar
@_ahmetkar 14 күн бұрын
Mr. Tsoding saving whole civilization with bunch of playlist !!
@yrds96
@yrds96 13 күн бұрын
using the subtitles to put the chat history was a great move
@user-io4sr7vg1v
@user-io4sr7vg1v 13 күн бұрын
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.
@Marhaenism1930
@Marhaenism1930 14 күн бұрын
i love this series, pls continue
@AlgoFodder
@AlgoFodder 14 күн бұрын
Only time I had to drop everything just to drop a compliment for a video thumbnail. Out-f'n-standng!
@Software-sb1gx
@Software-sb1gx 14 күн бұрын
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
@JamesSjaalman
@JamesSjaalman 14 күн бұрын
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 14 күн бұрын
You are talking about quake's quick inverse sqrt?
@user-io4sr7vg1v
@user-io4sr7vg1v 13 күн бұрын
describe this 'bit trickery' you speak of.
@pudou_
@pudou_ 9 күн бұрын
This is fucking amazing and brilliant content. Thanks!
@RaineriDev
@RaineriDev 14 күн бұрын
Every video I realize I don't know anything
@randomhunter47
@randomhunter47 14 күн бұрын
I'm with you there man😂. I hope to be able to think at the level he does
@AquesticYT
@AquesticYT 14 күн бұрын
To be honest the newton-raphson method is well known. We learn it as 16-17 year olds in the uk.
@randomhunter47
@randomhunter47 14 күн бұрын
@AquesticYT good for you but not everyone's in the UK you know
@AquesticYT
@AquesticYT 14 күн бұрын
@@randomhunter47 I understand wasn't trying to seem that way. I recommend learning at least calc 1, it will help you out loads.
@bbq1423
@bbq1423 13 күн бұрын
40:24 Me trying to explain that the software is slow, while others thinking it's perfectly fast
@eugen_aa
@eugen_aa 14 күн бұрын
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.
@potatopassingby1148
@potatopassingby1148 12 күн бұрын
wow pretty cool that you did this: "Enable Subtitles for Twitch Chat" How does that work? That's awesome
@dkaaakd
@dkaaakd 14 күн бұрын
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.
@Leonhart_93
@Leonhart_93 14 күн бұрын
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 14 күн бұрын
afaik, youtube/twitch is his full time job
@Leonhart_93
@Leonhart_93 14 күн бұрын
@@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 14 күн бұрын
​@@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 14 күн бұрын
@@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 14 күн бұрын
@@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.
@juanmacias5922
@juanmacias5922 14 күн бұрын
40:07 LMFAO THIS HAD ME CACKLING...
@sleeping.cat4
@sleeping.cat4 Күн бұрын
Can you have a better microphone or increase the volume while editing? Because on KZfaq it's hard to hear you clearly.
@pygmee6412
@pygmee6412 14 күн бұрын
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.
@libcheet
@libcheet 14 күн бұрын
Jon Blow on video thumbnail image? Hmmmm :)
@krishnachoubey8648
@krishnachoubey8648 5 күн бұрын
Bro the chat going crazy 💀💀
@MrKevinontube
@MrKevinontube 14 күн бұрын
Newton's numerical analysis method? Tsoding lord is onto something big
@berndeckenfels
@berndeckenfels 14 күн бұрын
1:09:00 I don’t think you need the vectors here, you can work only with x components
@lolcat69
@lolcat69 14 күн бұрын
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
@blackbeard3449
@blackbeard3449 14 күн бұрын
Should have used noq to differentiate that function!
@TsodingDaily
@TsodingDaily 14 күн бұрын
This comment gave me an idea. I need to implement some sort of LaTeX rendering support for Noq...
@mikesoylu
@mikesoylu 14 күн бұрын
Surprised you didn’t calculate the derivatives numerically given the beziers are pretty smooth
@rogo7330
@rogo7330 14 күн бұрын
I like when Tsoding jebaiting chat by omitting semicolons. It's like not finishing a sentence
@cacheman
@cacheman 14 күн бұрын
1:12:29 Starting beef with Carmack.
@multicoloredwiz
@multicoloredwiz 14 күн бұрын
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)
@acps8568
@acps8568 13 күн бұрын
Where is the sectioning Mr. Tsoding
@afterschool2594
@afterschool2594 14 күн бұрын
Fkkk, this is a very cool streamm Edit: also Newton is the goat scientists
@andresconrado
@andresconrado 11 күн бұрын
Press F for ITS FUCKING OFF
@user-tv9ev6bf9t
@user-tv9ev6bf9t 12 күн бұрын
Does your system use a self-compiled kernel?
@hubstrangers3450
@hubstrangers3450 11 күн бұрын
Thank you....
@multicoloredwiz
@multicoloredwiz 14 күн бұрын
man did no one in chat tell him to just dump the function into wolfram alpha lmao
@kossboss
@kossboss 14 күн бұрын
beautiful end result.
@josefkaras7519
@josefkaras7519 14 күн бұрын
in the beginning, u probably meant f(x_i)
@programmingjobesch7291
@programmingjobesch7291 14 күн бұрын
13:10- facts
@apenaswellignton
@apenaswellignton 14 күн бұрын
Pog
@musikai2006
@musikai2006 7 күн бұрын
Make a video about typst (LaTex alternative in Rust)?
@KappaNone
@KappaNone 14 күн бұрын
You're good at programming, have you thought about streaming?🙃
@AndrieMC
@AndrieMC 14 күн бұрын
Bruuuuuh, THIS WAS STREAMED...
@thebirdhasbeencharged
@thebirdhasbeencharged 14 күн бұрын
​@@AndrieMCno it wasn't calm down, he should try streaming for real on twitch I think he'd do a good job.
@AndrieMC
@AndrieMC 14 күн бұрын
@@thebirdhasbeencharged are you trying to be funny or are you an idiot?
@juanmacias5922
@juanmacias5922 14 күн бұрын
@@thebirdhasbeencharged this was streamed on twitch...
@thebirdhasbeencharged
@thebirdhasbeencharged 14 күн бұрын
@@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 KZfaq after.
@rabbitzzzz7781
@rabbitzzzz7781 14 күн бұрын
Fuck that shit its for nerd says the nerd towards his nerd audience and students 😂
@c4llv07e
@c4llv07e 13 күн бұрын
Решил отдохнуть от подготовки к ЕГЭ, называется.
@artemiasalina1860
@artemiasalina1860 14 күн бұрын
I know it doesn't matter but my OCD is screaming at me: _s/cuber_/cubic_/g_
@rogo7330
@rogo7330 14 күн бұрын
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. Посоветуй, что в чай подмешивать надо чтобы не спать на ходу, спасибо)
@sukivirus
@sukivirus 5 күн бұрын
I love scientific programming :) I want to learn to do symbolic math.
@siupa23
@siupa23 13 күн бұрын
Maybe for next project, you can make AI tool, that will take any math equation, simplify it and turns into C code :D
@p99chan99
@p99chan99 14 күн бұрын
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh....... what?
@user-io4sr7vg1v
@user-io4sr7vg1v 13 күн бұрын
Carmack got too rich.
@kubre
@kubre 14 күн бұрын
I did this in Java
@bbq1423
@bbq1423 13 күн бұрын
Waiting for quake inverse square root to be mentioned in the video edit: 1:11:11 😎
Can C actually do Perfect Bézier Curves?
2:17:22
Tsoding Daily
Рет қаралды 17 М.
Will Ada Replace C/C++?
44:57
Tsoding
Рет қаралды 79 М.
КАХА и Джин 2
00:36
К-Media
Рет қаралды 4,1 МЛН
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 10 МЛН
Signals. I spent 2 years to understand this part.
21:24
kimylamp
Рет қаралды 158 М.
Harder Than It Seems? 5 Minute Timer in C++
20:10
The Cherno
Рет қаралды 89 М.
Why is Raylib becoming so popular?
9:24
Chris_PHP
Рет қаралды 14 М.
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 168 М.
Trying Jai Language for the First Time
2:09:22
Tsoding Daily
Рет қаралды 87 М.
unlock the lowest levels of coding
7:05
Low Level Learning
Рет қаралды 223 М.
The mathematically impossible ball that shouldn’t exist.
19:29
Stand-up Maths
Рет қаралды 263 М.
Ryan Dahl introduces JSR at DevWorld 2024
29:13
Deno
Рет қаралды 86 М.
Async Engine in C
3:12:16
Tsoding Daily
Рет қаралды 38 М.
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 23 МЛН
3.5.A Solar Mobile 📱 Charger
0:39
Gaming zone
Рет қаралды 320 М.
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 2,9 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 908 М.
Топ-3 суперкрутых ПК из CompShop
1:00
CompShop Shorts
Рет қаралды 333 М.