\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.5961406266953245 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 3.1115579814291686 \cdot 10^{+29}:\\
\;\;\;\;\frac{1}{\frac{a}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a}\\
\end{array}double f(double a, double b_2, double c) {
double r2718601 = b_2;
double r2718602 = -r2718601;
double r2718603 = r2718601 * r2718601;
double r2718604 = a;
double r2718605 = c;
double r2718606 = r2718604 * r2718605;
double r2718607 = r2718603 - r2718606;
double r2718608 = sqrt(r2718607);
double r2718609 = r2718602 - r2718608;
double r2718610 = r2718609 / r2718604;
return r2718610;
}
double f(double a, double b_2, double c) {
double r2718611 = b_2;
double r2718612 = -1.5961406266953245e-58;
bool r2718613 = r2718611 <= r2718612;
double r2718614 = -0.5;
double r2718615 = c;
double r2718616 = r2718615 / r2718611;
double r2718617 = r2718614 * r2718616;
double r2718618 = 3.1115579814291686e+29;
bool r2718619 = r2718611 <= r2718618;
double r2718620 = 1.0;
double r2718621 = a;
double r2718622 = -r2718611;
double r2718623 = r2718611 * r2718611;
double r2718624 = r2718615 * r2718621;
double r2718625 = r2718623 - r2718624;
double r2718626 = sqrt(r2718625);
double r2718627 = r2718622 - r2718626;
double r2718628 = r2718621 / r2718627;
double r2718629 = r2718620 / r2718628;
double r2718630 = -2.0;
double r2718631 = r2718611 / r2718621;
double r2718632 = r2718630 * r2718631;
double r2718633 = r2718619 ? r2718629 : r2718632;
double r2718634 = r2718613 ? r2718617 : r2718633;
return r2718634;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.5961406266953245e-58Initial program 53.4
Taylor expanded around -inf 8.1
if -1.5961406266953245e-58 < b_2 < 3.1115579814291686e+29Initial program 14.7
Taylor expanded around -inf 14.7
Simplified14.7
rmApplied *-un-lft-identity14.7
Applied associate-/l*14.8
if 3.1115579814291686e+29 < b_2 Initial program 34.4
Taylor expanded around -inf 34.4
Simplified34.4
rmApplied *-un-lft-identity34.4
Applied associate-/l*34.5
rmApplied associate-/r/34.5
Taylor expanded around 0 6.5
Final simplification10.5
herbie shell --seed 2019134 +o rules:numerics
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))