Peter Mitsis
83d00839ed
fvi: Refactor solution to quadratic formula
...
The classic solution to the quadratic equation ...
a*x*x + b*x + c = 0
is ...
-b +- sqrt(b*b - 4*ac)
x = ----------------------
2*a
This can be optimized by substituting b = 2*B.
-2*B +- sqrt((2*B)*(2*B) - 4*a*c)
x = ---------------------------------
2*a
This expands to ...
-2*B +- sqrt(4*B*B - 4*a*c)
x = ---------------------------
2*a
And simplifies to ...
-2*B +- 2*sqrt(B*B - 4*a*c)
x = ---------------------------
2*a
-B +- sqrt(B*B - a*c)
x = ---------------------
a
Signed-off-by: Peter Mitsis <[email protected] >
2015-07-15 09:18:47 -04:00
..
2015-07-11 22:04:41 +10:00
2015-07-04 23:20:18 +10:00
2015-07-06 23:32:36 +10:00
2015-04-24 15:03:59 +02:00
2015-07-11 22:30:12 +10:00
2015-05-06 10:40:45 -05:00
2015-04-29 23:21:49 -07:00
2010-12-20 04:28:01 +00:00
2011-11-05 08:12:04 +00:00
2015-06-17 10:11:57 -05:00
2013-11-10 18:28:55 +10:00
2015-07-11 22:15:49 +10:00
2015-05-20 17:15:15 -05:00
2013-09-26 18:51:33 +10:00
2015-07-06 23:04:25 +10:00
2015-06-17 10:11:57 -05:00
2010-05-29 15:53:18 +00:00
2012-11-02 17:30:17 +00:00
2012-11-02 17:30:17 +00:00
2015-05-02 14:35:37 -07:00
2015-06-23 14:39:43 +10:00
2015-07-01 23:07:17 +10:00
2014-06-02 18:29:59 +10:00
2015-07-05 17:01:37 +10:00
2013-12-22 19:05:16 +10:00
2015-06-03 17:44:37 -05:00
2015-05-29 16:31:41 +02:00
2015-07-11 20:18:34 +10:00
2015-07-11 21:58:07 +10:00
2015-07-05 16:57:35 +10:00
2014-06-14 20:29:36 +10:00
2015-05-10 21:45:25 +10:00
2013-09-26 18:51:33 +10:00
2015-05-30 19:24:15 -07:00
2015-07-06 21:14:45 +10:00
2015-05-13 20:38:17 -07:00
2015-04-28 19:36:30 +10:00
2015-07-15 09:18:47 -04:00
2015-07-04 16:22:59 +10:00
2015-07-06 21:12:11 +10:00
2015-07-06 19:51:45 +10:00
2005-07-13 03:26:00 +00:00
2015-05-24 09:00:30 -05:00
2015-07-11 22:47:25 +10:00
2015-07-06 23:01:21 +10:00
2015-07-06 21:30:27 +10:00
2015-07-11 22:08:52 +10:00
2013-12-15 12:23:01 +10:00
2015-05-27 00:31:08 +02:00
2015-06-15 16:12:22 -04:00
2015-06-23 10:16:59 +02:00
2015-05-02 14:35:37 -07:00
2013-09-26 18:51:33 +10:00
2014-10-29 18:47:04 +10:00
2014-12-16 19:57:49 +10:00
2014-06-14 20:29:36 +10:00
2013-09-26 18:51:33 +10:00
2014-10-15 18:22:57 +10:00
2015-03-29 11:05:02 +10:00
2015-05-02 14:35:37 -07:00
2015-07-05 00:04:05 +10:00
2015-07-11 11:36:21 +02:00
2015-04-24 15:03:59 +02:00
2015-05-30 19:24:15 -07:00
2015-06-13 13:16:56 -04:00
2013-09-26 18:51:33 +10:00
2015-03-29 11:05:02 +10:00
2015-07-04 15:55:15 +10:00
2015-04-30 14:36:20 +10:00
2013-10-16 19:46:01 +10:00
2015-06-23 14:52:58 +10:00