Talk:Roots of a quadratic function

From Rosetta Code
Revision as of 14:28, 16 September 2010 by rosettacode>NevilleDNZ ("I wonder why noone spotted this earlier!" => Basically all the test cases had a = 1. :-))

I clearly see come of programs (Ada, and some marked as "translation of Ada") use (b^2-4ac)/2*a, there correct way is (b^2-4ac)/(2*a). I wonder why noone spotted this earlier!

Forsythe, Michael Malcolm and Cleve Mole suggest to try it on a=1, b=-105, c=1, but Ada sample code uses -10e5, which is indeed -1e6 (-106), if I was not wrong since I knew the "e" notation... --ShinTakezou 21:24, 22 June 2009 (UTC)

Basically all the test cases had a = 1, :-) So I added some test cases especially where a ≠ 1, hence 2*a ≠ 2/a.... NevilleDNZ 14:28, 16 September 2010 (UTC)

J example

Dumontier, hope you don't mind me replacing your example code. I understood that you were trying to illustrate the generality of p. however your example used a quadratic, that had already been shown above. If you were trying to illustrate some other point I apologise! --Tikkanz 23:14, 14 October 2009 (UTC)