\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\begin{array}{l}
\mathbf{if}\;b \le -2.185192396950695672251895649876633904734 \cdot 10^{101}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\mathsf{fma}\left(2, \frac{a}{\frac{b}{c}}, -2 \cdot b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(2, \frac{a}{\frac{b}{c}}, -2 \cdot b\right)}\\
\end{array}\\
\mathbf{elif}\;b \le -3.200573489739562245809246032581319999588 \cdot 10^{-310}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;e^{\log \left(\frac{\mathsf{fma}\left(2, \frac{a \cdot c}{b}, -2 \cdot b\right)}{2 \cdot a}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\\
\mathbf{elif}\;b \le 87537227540251800037021545535125898395650:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(2, \frac{a \cdot c}{b}, -2 \cdot b\right)}\\
\end{array}\\
\mathbf{elif}\;b \ge 0.0:\\
\;\;\;\;\frac{\mathsf{fma}\left(2, \frac{\sqrt[3]{c} \cdot \sqrt[3]{c}}{\sqrt{b}} \cdot \frac{a}{\frac{\sqrt{b}}{\sqrt[3]{c}}}, -2 \cdot b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}double f(double a, double b, double c) {
double r36411 = b;
double r36412 = 0.0;
bool r36413 = r36411 >= r36412;
double r36414 = -r36411;
double r36415 = r36411 * r36411;
double r36416 = 4.0;
double r36417 = a;
double r36418 = r36416 * r36417;
double r36419 = c;
double r36420 = r36418 * r36419;
double r36421 = r36415 - r36420;
double r36422 = sqrt(r36421);
double r36423 = r36414 - r36422;
double r36424 = 2.0;
double r36425 = r36424 * r36417;
double r36426 = r36423 / r36425;
double r36427 = r36424 * r36419;
double r36428 = r36414 + r36422;
double r36429 = r36427 / r36428;
double r36430 = r36413 ? r36426 : r36429;
return r36430;
}
double f(double a, double b, double c) {
double r36431 = b;
double r36432 = -2.1851923969506957e+101;
bool r36433 = r36431 <= r36432;
double r36434 = 0.0;
bool r36435 = r36431 >= r36434;
double r36436 = 2.0;
double r36437 = a;
double r36438 = c;
double r36439 = r36431 / r36438;
double r36440 = r36437 / r36439;
double r36441 = -2.0;
double r36442 = r36441 * r36431;
double r36443 = fma(r36436, r36440, r36442);
double r36444 = r36436 * r36437;
double r36445 = r36443 / r36444;
double r36446 = r36436 * r36438;
double r36447 = r36446 / r36443;
double r36448 = r36435 ? r36445 : r36447;
double r36449 = -3.20057348973956e-310;
bool r36450 = r36431 <= r36449;
double r36451 = r36437 * r36438;
double r36452 = r36451 / r36431;
double r36453 = fma(r36436, r36452, r36442);
double r36454 = r36453 / r36444;
double r36455 = log(r36454);
double r36456 = exp(r36455);
double r36457 = -r36431;
double r36458 = r36431 * r36431;
double r36459 = 4.0;
double r36460 = r36459 * r36437;
double r36461 = r36460 * r36438;
double r36462 = r36458 - r36461;
double r36463 = sqrt(r36462);
double r36464 = r36457 + r36463;
double r36465 = r36446 / r36464;
double r36466 = r36435 ? r36456 : r36465;
double r36467 = 8.75372275402518e+40;
bool r36468 = r36431 <= r36467;
double r36469 = r36457 - r36463;
double r36470 = r36469 / r36444;
double r36471 = r36446 / r36453;
double r36472 = r36435 ? r36470 : r36471;
double r36473 = cbrt(r36438);
double r36474 = r36473 * r36473;
double r36475 = sqrt(r36431);
double r36476 = r36474 / r36475;
double r36477 = r36475 / r36473;
double r36478 = r36437 / r36477;
double r36479 = r36476 * r36478;
double r36480 = fma(r36436, r36479, r36442);
double r36481 = r36480 / r36444;
double r36482 = r36435 ? r36481 : r36465;
double r36483 = r36468 ? r36472 : r36482;
double r36484 = r36450 ? r36466 : r36483;
double r36485 = r36433 ? r36448 : r36484;
return r36485;
}



Bits error versus a



Bits error versus b



Bits error versus c
if b < -2.1851923969506957e+101Initial program 30.7
Taylor expanded around inf 30.7
Simplified30.7
rmApplied associate-/l*30.7
Taylor expanded around -inf 6.7
Simplified2.4
if -2.1851923969506957e+101 < b < -3.20057348973956e-310Initial program 9.3
Taylor expanded around inf 9.3
Simplified9.3
rmApplied add-exp-log9.3
Applied add-exp-log9.3
Applied prod-exp9.3
Applied add-exp-log9.3
Applied div-exp9.3
Simplified9.3
if -3.20057348973956e-310 < b < 8.75372275402518e+40Initial program 9.9
Taylor expanded around -inf 9.9
Simplified9.9
if 8.75372275402518e+40 < b Initial program 36.5
Taylor expanded around inf 11.0
Simplified11.0
rmApplied associate-/l*6.5
rmApplied add-cube-cbrt6.5
Applied add-sqr-sqrt6.5
Applied times-frac6.5
Applied *-un-lft-identity6.5
Applied times-frac6.5
Simplified6.5
Final simplification7.3
herbie shell --seed 2019323 +o rules:numerics
(FPCore (a b c)
:name "jeff quadratic root 1"
:precision binary64
(if (>= b 0.0) (/ (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) (/ (* 2 c) (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))))))