\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -9.088000531423294 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\frac{c}{b_2}, \frac{1}{2}, -2 \cdot \frac{b_2}{a}\right)\\
\mathbf{elif}\;b_2 \le 9.354082991670835 \cdot 10^{-125}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot \frac{-1}{2}\\
\end{array}double f(double a, double b_2, double c) {
double r384945 = b_2;
double r384946 = -r384945;
double r384947 = r384945 * r384945;
double r384948 = a;
double r384949 = c;
double r384950 = r384948 * r384949;
double r384951 = r384947 - r384950;
double r384952 = sqrt(r384951);
double r384953 = r384946 + r384952;
double r384954 = r384953 / r384948;
return r384954;
}
double f(double a, double b_2, double c) {
double r384955 = b_2;
double r384956 = -9.088000531423294e+152;
bool r384957 = r384955 <= r384956;
double r384958 = c;
double r384959 = r384958 / r384955;
double r384960 = 0.5;
double r384961 = -2.0;
double r384962 = a;
double r384963 = r384955 / r384962;
double r384964 = r384961 * r384963;
double r384965 = fma(r384959, r384960, r384964);
double r384966 = 9.354082991670835e-125;
bool r384967 = r384955 <= r384966;
double r384968 = r384955 * r384955;
double r384969 = r384958 * r384962;
double r384970 = r384968 - r384969;
double r384971 = sqrt(r384970);
double r384972 = r384971 - r384955;
double r384973 = r384972 / r384962;
double r384974 = -0.5;
double r384975 = r384959 * r384974;
double r384976 = r384967 ? r384973 : r384975;
double r384977 = r384957 ? r384965 : r384976;
return r384977;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -9.088000531423294e+152Initial program 60.5
Simplified60.5
rmApplied div-inv60.5
rmApplied associate-*r/60.5
Simplified60.5
Taylor expanded around -inf 1.5
Simplified1.5
if -9.088000531423294e+152 < b_2 < 9.354082991670835e-125Initial program 10.9
Simplified10.9
rmApplied div-inv11.0
rmApplied associate-*r/10.9
Simplified10.9
if 9.354082991670835e-125 < b_2 Initial program 49.8
Simplified49.8
rmApplied div-inv49.8
rmApplied associate-*r/49.8
Simplified49.8
Taylor expanded around inf 11.8
Final simplification10.3
herbie shell --seed 2019153 +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))