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
Show
3 older comments
Neha Singh
on 20 Sep 2016
Please modify the test case 4. It is wrong.
goc3
on 30 Sep 2016
This problem has been fixed and is now solvable.
John D'Errico
on 2 Oct 2016
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 Solvers69
Suggested Problems
-
17190 Solvers
-
Convert a vector into a number
603 Solvers
-
07 - Common functions and indexing 4
412 Solvers
-
Add a row of zeros on top of a matrix
254 Solvers
-
find a specific element from an matrix
115 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!