\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.285761821828269498914963771383359026418 \cdot 10^{115}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le 4.089744618622775294902023307017914843593 \cdot 10^{-73}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double f(double a, double b_2, double c) {
double r23521 = b_2;
double r23522 = -r23521;
double r23523 = r23521 * r23521;
double r23524 = a;
double r23525 = c;
double r23526 = r23524 * r23525;
double r23527 = r23523 - r23526;
double r23528 = sqrt(r23527);
double r23529 = r23522 + r23528;
double r23530 = r23529 / r23524;
return r23530;
}
double f(double a, double b_2, double c) {
double r23531 = b_2;
double r23532 = -1.2857618218282695e+115;
bool r23533 = r23531 <= r23532;
double r23534 = 0.5;
double r23535 = c;
double r23536 = r23535 / r23531;
double r23537 = r23534 * r23536;
double r23538 = 2.0;
double r23539 = a;
double r23540 = r23531 / r23539;
double r23541 = r23538 * r23540;
double r23542 = r23537 - r23541;
double r23543 = 4.089744618622775e-73;
bool r23544 = r23531 <= r23543;
double r23545 = r23531 * r23531;
double r23546 = r23539 * r23535;
double r23547 = r23545 - r23546;
double r23548 = sqrt(r23547);
double r23549 = r23548 - r23531;
double r23550 = r23549 / r23539;
double r23551 = -0.5;
double r23552 = r23551 * r23536;
double r23553 = r23544 ? r23550 : r23552;
double r23554 = r23533 ? r23542 : r23553;
return r23554;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.2857618218282695e+115Initial program 50.7
Simplified50.7
Taylor expanded around -inf 3.2
if -1.2857618218282695e+115 < b_2 < 4.089744618622775e-73Initial program 12.6
Simplified12.6
rmApplied clear-num12.7
rmApplied add-cube-cbrt12.7
Applied associate-/l*12.7
Simplified12.7
rmApplied div-inv12.7
Simplified12.6
if 4.089744618622775e-73 < b_2 Initial program 53.3
Simplified53.3
rmApplied clear-num53.3
rmApplied add-cube-cbrt53.3
Applied associate-/l*53.3
Simplified53.3
rmApplied div-inv53.3
Simplified53.3
Taylor expanded around inf 9.0
Final simplification9.8
herbie shell --seed 2019305
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))