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.
Back to basics 21 - Matrix replicating
Set the array elements whose value is 13 to 0
Number of Horns on a unicorn!
Output any real number that is neither positive nor negative
Create a constant offset.
Sum of cubes
Number of primes
Display negative numbers
Energy of an object
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