\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.0366436397824178 \cdot 10^{68}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le -8.21218726880377109 \cdot 10^{-92}:\\
\;\;\;\;\frac{\frac{\left({b_2}^{2} - {b_2}^{2}\right) + a \cdot c}{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}}{a}\\
\mathbf{elif}\;b_2 \le -4.05237835825691163 \cdot 10^{-102}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 5.34931179548294658 \cdot 10^{30}:\\
\;\;\;\;\frac{\left(-b_2\right) + \left(-\sqrt{b_2 \cdot b_2 - a \cdot c}\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\end{array}double code(double a, double b_2, double c) {
return ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a);
}
double code(double a, double b_2, double c) {
double temp;
if ((b_2 <= -1.0366436397824178e+68)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= -8.212187268803771e-92)) {
temp_1 = ((((pow(b_2, 2.0) - pow(b_2, 2.0)) + (a * c)) / (-b_2 + sqrt(((b_2 * b_2) - (a * c))))) / a);
} else {
double temp_2;
if ((b_2 <= -4.052378358256912e-102)) {
temp_2 = (-0.5 * (c / b_2));
} else {
double temp_3;
if ((b_2 <= 5.349311795482947e+30)) {
temp_3 = ((-b_2 + -sqrt(((b_2 * b_2) - (a * c)))) / a);
} else {
temp_3 = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
}
temp_2 = temp_3;
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.0366436397824178e+68 or -8.212187268803771e-92 < b_2 < -4.052378358256912e-102Initial program 57.1
Taylor expanded around -inf 4.6
if -1.0366436397824178e+68 < b_2 < -8.212187268803771e-92Initial program 42.4
rmApplied add-cube-cbrt44.7
Applied fma-neg45.3
rmApplied fma-udef44.7
Simplified42.4
rmApplied flip-+42.4
Simplified15.8
Simplified15.8
if -4.052378358256912e-102 < b_2 < 5.349311795482947e+30Initial program 13.0
rmApplied add-cube-cbrt13.1
Applied fma-neg13.1
rmApplied fma-udef13.1
Simplified13.0
if 5.349311795482947e+30 < b_2 Initial program 35.5
Taylor expanded around inf 6.4
Final simplification9.6
herbie shell --seed 2020049 +o rules:numerics
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))