Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.
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.
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.
Who has power to do everything in this world?
03 - Matrix Variables 4
03 - Matrix Variables 5
MATLAB Basic: rounding IV
Sum of cubes
Number of primes
Energy of an object
Determine the roots of a cubic equation
Create a constant offset.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office