\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -8.7237121667270365 \cdot 10^{113}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 1.51349304478110011 \cdot 10^{-103}:\\
\;\;\;\;\frac{1}{\frac{1}{c} \cdot \left(\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\end{array}double f(double a, double b_2, double c) {
double r79474 = b_2;
double r79475 = -r79474;
double r79476 = r79474 * r79474;
double r79477 = a;
double r79478 = c;
double r79479 = r79477 * r79478;
double r79480 = r79476 - r79479;
double r79481 = sqrt(r79480);
double r79482 = r79475 - r79481;
double r79483 = r79482 / r79477;
return r79483;
}
double f(double a, double b_2, double c) {
double r79484 = b_2;
double r79485 = -8.723712166727036e+113;
bool r79486 = r79484 <= r79485;
double r79487 = -0.5;
double r79488 = c;
double r79489 = r79488 / r79484;
double r79490 = r79487 * r79489;
double r79491 = 1.5134930447811e-103;
bool r79492 = r79484 <= r79491;
double r79493 = 1.0;
double r79494 = r79493 / r79488;
double r79495 = r79484 * r79484;
double r79496 = a;
double r79497 = r79496 * r79488;
double r79498 = r79495 - r79497;
double r79499 = sqrt(r79498);
double r79500 = r79499 - r79484;
double r79501 = r79494 * r79500;
double r79502 = r79493 / r79501;
double r79503 = 0.5;
double r79504 = r79503 * r79489;
double r79505 = 2.0;
double r79506 = r79484 / r79496;
double r79507 = r79505 * r79506;
double r79508 = r79504 - r79507;
double r79509 = r79492 ? r79502 : r79508;
double r79510 = r79486 ? r79490 : r79509;
return r79510;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -8.723712166727036e+113Initial program 60.6
Taylor expanded around -inf 2.2
if -8.723712166727036e+113 < b_2 < 1.5134930447811e-103Initial program 26.8
rmApplied flip--28.5
Simplified17.0
Simplified17.0
rmApplied *-un-lft-identity17.0
Applied *-un-lft-identity17.0
Applied times-frac17.0
Applied associate-/l*17.2
Simplified16.4
rmApplied clear-num16.4
Simplified12.1
if 1.5134930447811e-103 < b_2 Initial program 25.7
Taylor expanded around inf 12.4
Final simplification10.0
herbie shell --seed 2020021
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))