C code for fourth degree polynomials
-
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
-
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
Understanding the algorithm would be a good start! [Quartic function - Wikipedia](https://en.wikipedia.org/wiki/Quartic\_function)
-
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
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