Newton's Method in C

Поділитися
Вставка

КОМЕНТАРІ • 94

  • @acriliqueofc
    @acriliqueofc 8 місяців тому +50

    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

  • @samuraijosh1595
    @samuraijosh1595 8 місяців тому +109

    Tsoding should teach at my university.

    • @cookiecrumbzi
      @cookiecrumbzi 8 місяців тому +27

      Tsoding should slide around the floor covered in mayonnaise

    • @flobuilds
      @flobuilds 8 місяців тому +4

      ​@@cookiecrumbzi did i miss somthin?

    • @petromudrievskyj
      @petromudrievskyj 8 місяців тому +3

      You own a university?

    • @BboyKeny
      @BboyKeny 8 місяців тому +1

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

    • @suvetar
      @suvetar 8 місяців тому +5

      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!

  • @4xl45cd
    @4xl45cd 8 місяців тому +8

    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

  • @Iuigi_t
    @Iuigi_t 8 місяців тому +17

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

    • @soyitiel
      @soyitiel 8 місяців тому +8

      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 8 місяців тому +5

      ​@@soyitielaccurate 😂

    • @ShowierData9978
      @ShowierData9978 8 місяців тому

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

  • @Czeckie
    @Czeckie 8 місяців тому +9

    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

  • @aadishm5915
    @aadishm5915 7 місяців тому +2

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

  • @blackhaze3856
    @blackhaze3856 8 місяців тому +17

    Tsoding featuring Pierre Beziér and Isaac Newton.

  • @_ahmetkar
    @_ahmetkar 8 місяців тому +4

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

  • @Marhaenism1930
    @Marhaenism1930 8 місяців тому +2

    i love this series, pls continue

  • @AlgoFodder
    @AlgoFodder 8 місяців тому +1

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

  • @JayDee-b5u
    @JayDee-b5u 8 місяців тому +1

    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.

  • @rogo7330
    @rogo7330 8 місяців тому +1

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

  • @pygmee6412
    @pygmee6412 8 місяців тому +2

    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.

  • @Software-sb1gx
    @Software-sb1gx 8 місяців тому +1

    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

  • @mohamedbadra295
    @mohamedbadra295 7 місяців тому +1

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

  • @krishnachoubey8648
    @krishnachoubey8648 8 місяців тому +1

    Bro the chat going crazy 💀💀

  • @bbq1423
    @bbq1423 8 місяців тому +1

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

  • @juanmacias5922
    @juanmacias5922 8 місяців тому +3

    40:07 LMFAO THIS HAD ME CACKLING...

  • @birutb2
    @birutb2 8 місяців тому +1

    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.

  • @RaineriDev
    @RaineriDev 8 місяців тому +17

    Every video I realize I don't know anything

    • @randomhunter47
      @randomhunter47 8 місяців тому +5

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

    • @AquesticYT
      @AquesticYT 8 місяців тому

      To be honest the newton-raphson method is well known. We learn it as 16-17 year olds in the uk.

    • @randomhunter47
      @randomhunter47 8 місяців тому

      @AquesticYT good for you but not everyone's in the UK you know

    • @AquesticYT
      @AquesticYT 8 місяців тому

      @@randomhunter47 I understand wasn't trying to seem that way. I recommend learning at least calc 1, it will help you out loads.

  • @blackbeard3449
    @blackbeard3449 8 місяців тому +7

    Should have used noq to differentiate that function!

    • @TsodingDaily
      @TsodingDaily  8 місяців тому +10

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

  • @cacheman
    @cacheman 8 місяців тому +3

    1:12:29 Starting beef with Carmack.

    • @multicoloredwiz
      @multicoloredwiz 8 місяців тому

      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)

  • @jacquesboubou
    @jacquesboubou 4 місяці тому

    Thumbs up for the thumbnail logo!

  • @pudou_
    @pudou_ 8 місяців тому

    This is fucking amazing and brilliant content. Thanks!

  • @berndeckenfels
    @berndeckenfels 8 місяців тому

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

  • @lolcat69
    @lolcat69 8 місяців тому +1

    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

  • @MrKevinontube
    @MrKevinontube 8 місяців тому

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

  • @potatopassingby
    @potatopassingby 8 місяців тому

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

  • @afterschool2594
    @afterschool2594 8 місяців тому +1

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

  • @libcheet
    @libcheet 8 місяців тому +4

    Jon Blow on video thumbnail image? Hmmmm :)

  • @sleeping.cat4
    @sleeping.cat4 7 місяців тому

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

  • @Leonhart_93
    @Leonhart_93 8 місяців тому +4

    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 8 місяців тому

      afaik, youtube/twitch is his full time job

    • @Leonhart_93
      @Leonhart_93 8 місяців тому +1

      @@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 8 місяців тому +1

      ​@@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 8 місяців тому

      @@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 8 місяців тому

      @@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
    @dkaaakd 8 місяців тому

    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.

  • @multicoloredwiz
    @multicoloredwiz 8 місяців тому

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

  • @mikesoylu
    @mikesoylu 8 місяців тому

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

  • @acps8568
    @acps8568 8 місяців тому

    Where is the sectioning Mr. Tsoding

  • @josefkaras7519
    @josefkaras7519 8 місяців тому +1

    in the beginning, u probably meant f(x_i)

  • @JamesSjaalman
    @JamesSjaalman 8 місяців тому +2

    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 8 місяців тому +1

      You are talking about quake's quick inverse sqrt?

    • @JayDee-b5u
      @JayDee-b5u 8 місяців тому +1

      describe this 'bit trickery' you speak of.

    • @JamesSjaalman
      @JamesSjaalman 7 місяців тому

      @@JayDee-b5u GIYF

  • @c4llv07e
    @c4llv07e 8 місяців тому +1

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

  • @hiYouareaclown
    @hiYouareaclown 8 місяців тому

    Does your system use a self-compiled kernel?

  • @andresconrado
    @andresconrado 8 місяців тому

    Press F for ITS FUCKING OFF

  • @marcellomarianetti1770
    @marcellomarianetti1770 4 місяці тому

    That derivative took ages 😂

  • @musikai2006
    @musikai2006 8 місяців тому

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

  • @programmingjobesch7291
    @programmingjobesch7291 8 місяців тому

    13:10- facts

  • @rogo7330
    @rogo7330 8 місяців тому

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

  • @hubstrangers3450
    @hubstrangers3450 8 місяців тому

    Thank you....

  • @KappaNone
    @KappaNone 8 місяців тому +10

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

    • @AndrieMC
      @AndrieMC 8 місяців тому +1

      Bruuuuuh, THIS WAS STREAMED...

    • @thebirdhasbeencharged
      @thebirdhasbeencharged 8 місяців тому +2

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

    • @AndrieMC
      @AndrieMC 8 місяців тому

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

    • @juanmacias5922
      @juanmacias5922 8 місяців тому

      @@thebirdhasbeencharged this was streamed on twitch...

    • @thebirdhasbeencharged
      @thebirdhasbeencharged 8 місяців тому

      @@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 UA-cam after.

  • @kossboss
    @kossboss 8 місяців тому

    beautiful end result.

  • @artemiasalina1860
    @artemiasalina1860 8 місяців тому +2

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

  • @siupa23
    @siupa23 8 місяців тому

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

  • @bbq1423
    @bbq1423 8 місяців тому +4

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

  • @JayDee-b5u
    @JayDee-b5u 8 місяців тому +1

    Carmack got too rich.

  • @sukivirus
    @sukivirus 8 місяців тому

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

  • @nyyakko
    @nyyakko 8 місяців тому

    Pog

  • @p99chan99
    @p99chan99 8 місяців тому

    uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh....... what?

  • @rabbitzzzz7781
    @rabbitzzzz7781 8 місяців тому +3

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

  • @kubre
    @kubre 8 місяців тому

    I did this in Java