-
Notifications
You must be signed in to change notification settings - Fork 62
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
Quartic formula, no obvious bugs #187
Conversation
It would be nice to look into some numerical methods works and see if there is a comparison between using an explicit quartic formula and some other iterative algorithm. I suspect that the quartic formula will have cases with significant inaccuracy. I'm not saying not to include this, but it would also be nice to have appropriate iterative root finding methods and have a handle on when to use which. Also I agree with @jeffreyrosenbluth about style. Finally, the |
First of all, I think we're all being more nitpicky than usual for a commit this size. @Mathnerd314, it's because we're looking forward to lots more code from you that we want to talk about these style points immediately. (I'm very glad that folks are reading and commenting.) I really like the comment density. I always find this kind of numeric code hard to follow, but I think the comments make it about as coherent as possible. If you can take out a layer or two of nesting, as @jeffreyrosenbluth suggests, or assign names to some of the intermediate results, that will help even more. Otherwise, I agree with what others' have said. |
Oh, and I think someone should open a new ticket about some numerical root-finding method. It's probably not a high priority since we don't yet have any code that uses polynomials above cubic. |
I filed #188. |
-- | ||
----------------------------------------------------------------------------- | ||
module Diagrams.Solve | ||
( quadForm | ||
, cubForm | ||
, quartForm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should export cubForm'
and quartForm'
also. Otherwise, looks good to me.
Looks good to me. |
Add function to find roots of quartic polynomials
This should work. Tell me if I did anything wrong.