\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -2.221067196710922123169723133116561516447 \cdot 10^{149}:\\
\;\;\;\;\mathsf{fma}\left(-2, \frac{b_2}{a}, \frac{c}{b_2} \cdot \frac{1}{2}\right)\\
\mathbf{elif}\;b_2 \le 3.142311858008121469027865121070306475283 \cdot 10^{-35}:\\
\;\;\;\;\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double f(double a, double b_2, double c) {
double r726635 = b_2;
double r726636 = -r726635;
double r726637 = r726635 * r726635;
double r726638 = a;
double r726639 = c;
double r726640 = r726638 * r726639;
double r726641 = r726637 - r726640;
double r726642 = sqrt(r726641);
double r726643 = r726636 + r726642;
double r726644 = r726643 / r726638;
return r726644;
}
double f(double a, double b_2, double c) {
double r726645 = b_2;
double r726646 = -2.221067196710922e+149;
bool r726647 = r726645 <= r726646;
double r726648 = -2.0;
double r726649 = a;
double r726650 = r726645 / r726649;
double r726651 = c;
double r726652 = r726651 / r726645;
double r726653 = 0.5;
double r726654 = r726652 * r726653;
double r726655 = fma(r726648, r726650, r726654);
double r726656 = 3.1423118580081215e-35;
bool r726657 = r726645 <= r726656;
double r726658 = -r726645;
double r726659 = r726645 * r726645;
double r726660 = r726651 * r726649;
double r726661 = r726659 - r726660;
double r726662 = sqrt(r726661);
double r726663 = r726658 + r726662;
double r726664 = r726663 / r726649;
double r726665 = -0.5;
double r726666 = r726665 * r726652;
double r726667 = r726657 ? r726664 : r726666;
double r726668 = r726647 ? r726655 : r726667;
return r726668;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -2.221067196710922e+149Initial program 62.3
Simplified62.3
Taylor expanded around -inf 2.7
Simplified2.7
if -2.221067196710922e+149 < b_2 < 3.1423118580081215e-35Initial program 14.5
Simplified14.5
rmApplied add-sqr-sqrt14.5
Applied sqrt-prod14.7
Applied fma-neg14.7
rmApplied fma-udef14.7
Simplified14.5
if 3.1423118580081215e-35 < b_2 Initial program 54.4
Simplified54.4
Taylor expanded around inf 7.3
Final simplification10.5
herbie shell --seed 2019171 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))