Problem 42987. Roots of a quadratic equation.
Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.
Solution Stats
Problem Comments
-
6 Comments
Please supply more than one test case and check each and every problem before posting. The current test suite has the wrong answer for the only case and can, therefore, not be properly solved.
awful task!
Test case 4 answer is wrong
Please modify the test case 4. It is wrong.
This problem has been fixed and is now solvable.
Applied a tolerance, which is crucial, since tiny variations in the least significant bits due to floating point arithmetic can cause a valid solution to fail.
Solution Comments
Show commentsProblem Recent Solvers65
Suggested Problems
-
Back to basics 8 - Matrix Diagonals
910 Solvers
-
Find the largest value in the 3D matrix
1477 Solvers
-
Set the array elements whose value is 13 to 0
1343 Solvers
-
628 Solvers
-
Replace every 3rd element in a vector with 4
238 Solvers
More from this Author8
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!