Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. C code for fourth degree polynomials

C code for fourth degree polynomials

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_14177668
    wrote on last edited by
    #1

    Hello, I wanted to find the roots for 4th degree polynomials(aX^4 + bX^3 + cX^2 + dX + e = 0). Can anyone please help me, How to write C code or formula for this? Thanks in advance, Regards, Harsha

    V L 2 Replies Last reply
    0
    • M Member_14177668

      Hello, I wanted to find the roots for 4th degree polynomials(aX^4 + bX^3 + cX^2 + dX + e = 0). Can anyone please help me, How to write C code or formula for this? Thanks in advance, Regards, Harsha

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Understanding the algorithm would be a good start! [Quartic function - Wikipedia](https://en.wikipedia.org/wiki/Quartic\_function)

      1 Reply Last reply
      0
      • M Member_14177668

        Hello, I wanted to find the roots for 4th degree polynomials(aX^4 + bX^3 + cX^2 + dX + e = 0). Can anyone please help me, How to write C code or formula for this? Thanks in advance, Regards, Harsha

        L Offline
        L Offline
        leon de boer
        wrote on last edited by
        #3

        For maths, numerical recipes and wolfram is always the goto GitHub - sasamil/Quartic: Solving algebric equation of 4th order. Fast and efficient. C++ implementation.[^] Read the docx file to understand it but it sort of follow this form Math Forum - Ask Dr. Math[^] The code isn't great like returning an allocated memory block ... I would rework it. You can solve them online on wolfram .. try an example like solve x^4 + 12*x^3 + 7*x^2 + 2*x + 12 = 0 https://www.wolframalpha.com/input/?i=solve+x%5E4+%2B+12*x%5E3+%2B+7*x%5E2+%2B+2*x+%2B+12+%3D+0[^] It's useful to check your code

        In vino veritas

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups