\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -2.852138444177435 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 7.803671648955123 \cdot 10^{+137}:\\
\;\;\;\;-\left(\frac{b_2}{a} + \frac{\sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a}\\
\end{array}double f(double a, double b_2, double c) {
double r839910 = b_2;
double r839911 = -r839910;
double r839912 = r839910 * r839910;
double r839913 = a;
double r839914 = c;
double r839915 = r839913 * r839914;
double r839916 = r839912 - r839915;
double r839917 = sqrt(r839916);
double r839918 = r839911 - r839917;
double r839919 = r839918 / r839913;
return r839919;
}
double f(double a, double b_2, double c) {
double r839920 = b_2;
double r839921 = -2.852138444177435e-54;
bool r839922 = r839920 <= r839921;
double r839923 = -0.5;
double r839924 = c;
double r839925 = r839924 / r839920;
double r839926 = r839923 * r839925;
double r839927 = 7.803671648955123e+137;
bool r839928 = r839920 <= r839927;
double r839929 = a;
double r839930 = r839920 / r839929;
double r839931 = r839920 * r839920;
double r839932 = r839924 * r839929;
double r839933 = r839931 - r839932;
double r839934 = sqrt(r839933);
double r839935 = r839934 / r839929;
double r839936 = r839930 + r839935;
double r839937 = -r839936;
double r839938 = -2.0;
double r839939 = r839938 * r839930;
double r839940 = r839928 ? r839937 : r839939;
double r839941 = r839922 ? r839926 : r839940;
return r839941;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -2.852138444177435e-54Initial program 53.4
rmApplied div-sub54.0
Taylor expanded around -inf 8.3
if -2.852138444177435e-54 < b_2 < 7.803671648955123e+137Initial program 12.6
rmApplied div-sub12.6
rmApplied *-un-lft-identity12.6
Applied add-sqr-sqrt12.6
Applied sqrt-prod12.8
Applied times-frac12.8
Simplified12.8
rmApplied sub-neg12.8
Simplified12.6
if 7.803671648955123e+137 < b_2 Initial program 53.1
rmApplied div-sub53.1
rmApplied div-inv53.2
Applied div-inv53.2
Applied distribute-rgt-out--53.2
Taylor expanded around 0 2.6
Final simplification9.7
herbie shell --seed 2019143 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))