\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.82289647433212 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - \frac{b_2}{a} \cdot 2\\
\mathbf{elif}\;b_2 \le 2.3930366094323856 \cdot 10^{-68}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot \frac{-1}{2}\\
\end{array}double f(double a, double b_2, double c) {
double r684453 = b_2;
double r684454 = -r684453;
double r684455 = r684453 * r684453;
double r684456 = a;
double r684457 = c;
double r684458 = r684456 * r684457;
double r684459 = r684455 - r684458;
double r684460 = sqrt(r684459);
double r684461 = r684454 + r684460;
double r684462 = r684461 / r684456;
return r684462;
}
double f(double a, double b_2, double c) {
double r684463 = b_2;
double r684464 = -4.82289647433212e+153;
bool r684465 = r684463 <= r684464;
double r684466 = 0.5;
double r684467 = c;
double r684468 = r684467 / r684463;
double r684469 = r684466 * r684468;
double r684470 = a;
double r684471 = r684463 / r684470;
double r684472 = 2.0;
double r684473 = r684471 * r684472;
double r684474 = r684469 - r684473;
double r684475 = 2.3930366094323856e-68;
bool r684476 = r684463 <= r684475;
double r684477 = r684463 * r684463;
double r684478 = r684467 * r684470;
double r684479 = r684477 - r684478;
double r684480 = sqrt(r684479);
double r684481 = r684480 - r684463;
double r684482 = r684481 / r684470;
double r684483 = -0.5;
double r684484 = r684468 * r684483;
double r684485 = r684476 ? r684482 : r684484;
double r684486 = r684465 ? r684474 : r684485;
return r684486;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -4.82289647433212e+153Initial program 60.9
Simplified60.9
Taylor expanded around inf 60.9
Simplified60.9
Taylor expanded around -inf 2.3
if -4.82289647433212e+153 < b_2 < 2.3930366094323856e-68Initial program 12.4
Simplified12.4
Taylor expanded around inf 12.4
Simplified12.4
if 2.3930366094323856e-68 < b_2 Initial program 52.2
Simplified52.2
Taylor expanded around inf 52.2
Simplified52.2
Taylor expanded around inf 9.0
Final simplification10.0
herbie shell --seed 2019142
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))