-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
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
Is there a reason quadratic-solutions only provides real solutions? #21
Comments
No reason, apart from nobody requesting that feature. Also I see that the naïve solution formula is used [1]. [1] https://github.com/racket/math/blob/master/math-lib/math/private/number-theory/quadratic.rkt#L19 |
More notes on the choice of formulas here: https://math.stackexchange.com/questions/866331/numerically-stable-algorithm-for-solving-the-quadratic-equation-when-a-is-very/2007723 |
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
@soegaard I forget where this comes from, I once implemented this in chicken scheme, and I think is supposed to be more numerically stable, as well as accepting complex coefficients. I think the source was a book titled something like "modern computer algebra", but I can't seem to find it at the moment. EDIT: The book is "Numerical recipes: the art of scientific computing" |
Looking over it again, I think my formula is the same as your PDF, except the check for which formula to use extends to complex numbers as well. |
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
- Also switch to potentially more numerically stable quadratic formulas - Closes racket#21
Why not
quadratic-solutions
providing all solutions, including complex, andquadratic-real-solutions
,quadratic-real-natural-solutions
, etc. or something like that?The text was updated successfully, but these errors were encountered: