We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI! Instead of using (-b+-sqrt(d))/2/a you can use this formulae to get rid of 0/0 division in case a->0:
sqD = sqrt(d); x1 = b > 0 ? (2 * c / (-b - sqD)) : (2 * c / (-b + sqD)); x2 = -b / a - x1;
Thanx.
The text was updated successfully, but these errors were encountered:
A good point indeed, thank you. There are even more things to take into account as described in https://people.csail.mit.edu/bkph/articles/Quadratics.pdf
I am not sure when I have time time for this change but I shall accept a pull request if you dare to change the code yourself (tests are welcome too).
Sorry, something went wrong.
Fixed in v0.0.4
No branches or pull requests
HI! Instead of using (-b+-sqrt(d))/2/a you can use this formulae to get rid of 0/0 division in case a->0:
Thanx.
The text was updated successfully, but these errors were encountered: