fix solveCubic
The original solution did not handle correctly when delta = 0, resulting as nan errors. I also wrote a test case to test solving equation x^3 = 0 after fixing.
Showing
Please
register
or
sign in
to comment
The original solution did not handle correctly when delta = 0, resulting as nan errors. I also wrote a test case to test solving equation x^3 = 0 after fixing.