Newton's Method in C

Ғылым және технология

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
    @acriliqueofc28 күн бұрын

    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

    23 күн бұрын

    yessss

  • @samuraijosh1595
    @samuraijosh159528 күн бұрын

    Tsoding should teach at my university.

  • @cookiecrumbzi

    @cookiecrumbzi

    28 күн бұрын

    Tsoding should slide around the floor covered in mayonnaise

  • @flobuilds

    @flobuilds

    28 күн бұрын

    ​@@cookiecrumbzi did i miss somthin?

  • @petromudrievskyj

    @petromudrievskyj

    28 күн бұрын

    You own a university?

  • @BboyKeny

    @BboyKeny

    26 күн бұрын

    As long as Jeffrey Bezos gets the salary. It wouldn't be the same otherwise

  • @suvetar

    @suvetar

    26 күн бұрын

    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
    @blackhaze385628 күн бұрын

    Tsoding featuring Pierre Beziér and Isaac Newton.

  • @ateam1453
    @ateam145327 күн бұрын

    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
    @Czeckie28 күн бұрын

    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
    @luigidabro28 күн бұрын

    What a coincidence! I am currently working on marching squares, and you drop this banger of a video!

  • @soyitiel

    @soyitiel

    28 күн бұрын

    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

    28 күн бұрын

    ​@@soyitielaccurate 😂

  • @ShowierData9978

    @ShowierData9978

    23 күн бұрын

    that has happened too me too, first with the .class parser, then the vtable

  • @yrds96
    @yrds9627 күн бұрын

    using the subtitles to put the chat history was a great move

  • @_ahmetkar
    @_ahmetkar28 күн бұрын

    Mr. Tsoding saving whole civilization with bunch of playlist !!

  • @Marhaenism1930
    @Marhaenism193027 күн бұрын

    i love this series, pls continue

  • @user-io4sr7vg1v
    @user-io4sr7vg1v27 күн бұрын

    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.

  • @aadishm5915
    @aadishm59157 күн бұрын

    NO WAY!. I am currently learning the newton's raphson method in college and literally taught of this. Just came and say your video!

  • @Software-sb1gx
    @Software-sb1gx28 күн бұрын

    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

  • @AlgoFodder
    @AlgoFodder28 күн бұрын

    Only time I had to drop everything just to drop a compliment for a video thumbnail. Out-f'n-standng!

  • @potatopassingby1148
    @potatopassingby114825 күн бұрын

    wow pretty cool that you did this: "Enable Subtitles for Twitch Chat" How does that work? That's awesome

  • @bbq1423
    @bbq142327 күн бұрын

    40:24 Me trying to explain that the software is slow, while others thinking it's perfectly fast

  • @RaineriDev
    @RaineriDev28 күн бұрын

    Every video I realize I don't know anything

  • @randomhunter47

    @randomhunter47

    28 күн бұрын

    I'm with you there man😂. I hope to be able to think at the level he does

  • @AquesticYT

    @AquesticYT

    28 күн бұрын

    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.

  • @Leonhart_93
    @Leonhart_9328 күн бұрын

    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

    28 күн бұрын

    afaik, youtube/twitch is his full time job

  • @Leonhart_93

    @Leonhart_93

    28 күн бұрын

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

    28 күн бұрын

    ​@@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

    28 күн бұрын

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

    28 күн бұрын

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

  • @dkaaakd
    @dkaaakd28 күн бұрын

    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
    @JamesSjaalman28 күн бұрын

    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

    28 күн бұрын

    You are talking about quake's quick inverse sqrt?

  • @user-io4sr7vg1v

    @user-io4sr7vg1v

    27 күн бұрын

    describe this 'bit trickery' you speak of.

  • @JamesSjaalman

    @JamesSjaalman

    10 күн бұрын

    @@user-io4sr7vg1v GIYF

  • @pudou_
    @pudou_22 күн бұрын

    This is fucking amazing and brilliant content. Thanks!

  • @libcheet
    @libcheet28 күн бұрын

    Jon Blow on video thumbnail image? Hmmmm :)

  • @eugen_aa
    @eugen_aa28 күн бұрын

    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.

  • @MrKevinontube
    @MrKevinontube28 күн бұрын

    Newton's numerical analysis method? Tsoding lord is onto something big

  • @blackbeard3449
    @blackbeard344928 күн бұрын

    Should have used noq to differentiate that function!

  • @TsodingDaily

    @TsodingDaily

    28 күн бұрын

    This comment gave me an idea. I need to implement some sort of LaTeX rendering support for Noq...

  • @mohamedbadra295
    @mohamedbadra2953 күн бұрын

    You can use Secant method, it is the same as newton's but it doesn't need the derivative

  • @juanmacias5922
    @juanmacias592228 күн бұрын

    40:07 LMFAO THIS HAD ME CACKLING...

  • @lolcat69
    @lolcat6928 күн бұрын

    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

  • @pygmee6412
    @pygmee641227 күн бұрын

    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.

  • @mikesoylu
    @mikesoylu27 күн бұрын

    Surprised you didn’t calculate the derivatives numerically given the beziers are pretty smooth

  • @berndeckenfels
    @berndeckenfels28 күн бұрын

    1:09:00 I don’t think you need the vectors here, you can work only with x components

  • @acps8568
    @acps856826 күн бұрын

    Where is the sectioning Mr. Tsoding

  • @user-tv9ev6bf9t
    @user-tv9ev6bf9t25 күн бұрын

    Does your system use a self-compiled kernel?

  • @krishnachoubey8648
    @krishnachoubey864818 күн бұрын

    Bro the chat going crazy 💀💀

  • @afterschool2594
    @afterschool259428 күн бұрын

    Fkkk, this is a very cool streamm Edit: also Newton is the goat scientists

  • @sleeping.cat4
    @sleeping.cat415 күн бұрын

    Can you have a better microphone or increase the volume while editing? Because on KZread it's hard to hear you clearly.

  • @josefkaras7519
    @josefkaras751928 күн бұрын

    in the beginning, u probably meant f(x_i)

  • @cacheman
    @cacheman28 күн бұрын

    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)

  • @rogo7330
    @rogo733027 күн бұрын

    I like when Tsoding jebaiting chat by omitting semicolons. It's like not finishing a sentence

  • @KappaNone
    @KappaNone28 күн бұрын

    You're good at programming, have you thought about streaming?🙃

  • @AndrieMC

    @AndrieMC

    28 күн бұрын

    Bruuuuuh, THIS WAS STREAMED...

  • @thebirdhasbeencharged

    @thebirdhasbeencharged

    28 күн бұрын

    ​@@AndrieMCno it wasn't calm down, he should try streaming for real on twitch I think he'd do a good job.

  • @AndrieMC

    @AndrieMC

    28 күн бұрын

    @@thebirdhasbeencharged are you trying to be funny or are you an idiot?

  • @juanmacias5922

    @juanmacias5922

    28 күн бұрын

    @@thebirdhasbeencharged this was streamed on twitch...

  • @thebirdhasbeencharged

    @thebirdhasbeencharged

    28 күн бұрын

    @@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 KZread after.

  • @musikai2006
    @musikai200621 күн бұрын

    Make a video about typst (LaTex alternative in Rust)?

  • @andresconrado
    @andresconrado25 күн бұрын

    Press F for ITS FUCKING OFF

  • @programmingjobesch7291
    @programmingjobesch729128 күн бұрын

    13:10- facts

  • @multicoloredwiz
    @multicoloredwiz27 күн бұрын

    man did no one in chat tell him to just dump the function into wolfram alpha lmao

  • @hubstrangers3450
    @hubstrangers345025 күн бұрын

    Thank you....

  • @artemiasalina1860
    @artemiasalina186028 күн бұрын

    I know it doesn't matter but my OCD is screaming at me: _s/cuber_/cubic_/g_

  • @kossboss
    @kossboss27 күн бұрын

    beautiful end result.

  • @rogo7330
    @rogo733028 күн бұрын

    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. Посоветуй, что в чай подмешивать надо чтобы не спать на ходу, спасибо)

  • @apenaswellignton
    @apenaswellignton28 күн бұрын

    Pog

  • @c4llv07e
    @c4llv07e27 күн бұрын

    Решил отдохнуть от подготовки к ЕГЭ, называется.

  • @siupa23
    @siupa2327 күн бұрын

    Maybe for next project, you can make AI tool, that will take any math equation, simplify it and turns into C code :D

  • @sukivirus
    @sukivirus18 күн бұрын

    I love scientific programming :) I want to learn to do symbolic math.

  • @user-io4sr7vg1v
    @user-io4sr7vg1v27 күн бұрын

    Carmack got too rich.

  • @p99chan99
    @p99chan9928 күн бұрын

    uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh....... what?

  • @kubre
    @kubre28 күн бұрын

    I did this in Java

  • @bbq1423
    @bbq142327 күн бұрын

    Waiting for quake inverse square root to be mentioned in the video edit: 1:11:11 😎

  • @rabbitzzzz7781
    @rabbitzzzz778128 күн бұрын

    Fuck that shit its for nerd says the nerd towards his nerd audience and students 😂

Келесі