Anybody interested in a Quadratic Solver?

Jhevon

MHF Helper
Feb 2007
11,681
4,225
New York, USA
I programmed one. Simple, i know, but it does the job :D

Download it here

Let me know what you guys think of it.
it can't find complex roots
 

janvdl

MHF Hall of Fame
Apr 2007
1,630
923
Meh
it can't find complex roots
No it uses the \(\displaystyle \frac{ -b \pm \sqrt{b^2 - 4ac} }{2a}\) formula.

I guess only kids in lower grades might find it useful then... *sigh*
 

Jhevon

MHF Helper
Feb 2007
11,681
4,225
New York, USA
No it uses the \(\displaystyle \frac{ -b \pm \sqrt{b^2 - 4ac} }{2a}\) formula.

I guess only kids in lower grades might find it useful then... *sigh*
i realize that you used the quadratic formula. couldn't you alter the code to recognize complex roots though?
 

janvdl

MHF Hall of Fame
Apr 2007
1,630
923
Meh
i realize that you used the quadratic formula. couldn't you alter the code to recognize complex roots though?
Expand on that?
 

Jhevon

MHF Helper
Feb 2007
11,681
4,225
New York, USA
Expand on that?
as in tell the program that if it gets \(\displaystyle \sqrt{-2}\) for example, it should interpret it as \(\displaystyle \sqrt{2}~i\). would that be too hard?

i never checked, how does it deal with double roots? that is, when what's under the square root sign is zero?
 

janvdl

MHF Hall of Fame
Apr 2007
1,630
923
Meh
as in tell the program that if it gets \(\displaystyle \sqrt{-2}\) for example, it should interpret it as \(\displaystyle \sqrt{2}~i\). would that be too hard?

i never checked, how does it deal with double roots? that is, when what's under the square root sign is zero?
You started this idea, so you're going to help me put it to work :D
 

Jhevon

MHF Helper
Feb 2007
11,681
4,225
New York, USA
You started this idea, so you're going to help me put it to work :D
i don't know what programming language you are using, and chances are, even if i did, i wouldn't know it
 

janvdl

MHF Hall of Fame
Apr 2007
1,630
923
Meh
i don't know what programming language you are using, and chances are, even if i did, i wouldn't know it
Oh no, you're just going to do the maths... :D
 

janvdl

MHF Hall of Fame
Apr 2007
1,630
923
Meh
Okay, i got it to calculate complex roots. :cool:

I was wondering if i could put a link to MHF up on it? Would that be okay?

EDIT: I guess everyone would like to see first. See the attached pic :D
 

Attachments

  • Like
Reactions: colby2152