\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -5.571206846913461 \cdot 10^{+106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{b_2}{a}, -2, \frac{1}{2} \cdot \frac{c}{b_2}\right)\\
\mathbf{elif}\;b_2 \le 3.821014310434392 \cdot 10^{-21}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - 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 r615109 = b_2;
double r615110 = -r615109;
double r615111 = r615109 * r615109;
double r615112 = a;
double r615113 = c;
double r615114 = r615112 * r615113;
double r615115 = r615111 - r615114;
double r615116 = sqrt(r615115);
double r615117 = r615110 + r615116;
double r615118 = r615117 / r615112;
return r615118;
}
double f(double a, double b_2, double c) {
double r615119 = b_2;
double r615120 = -5.571206846913461e+106;
bool r615121 = r615119 <= r615120;
double r615122 = a;
double r615123 = r615119 / r615122;
double r615124 = -2.0;
double r615125 = 0.5;
double r615126 = c;
double r615127 = r615126 / r615119;
double r615128 = r615125 * r615127;
double r615129 = fma(r615123, r615124, r615128);
double r615130 = 3.821014310434392e-21;
bool r615131 = r615119 <= r615130;
double r615132 = r615119 * r615119;
double r615133 = r615122 * r615126;
double r615134 = r615132 - r615133;
double r615135 = sqrt(r615134);
double r615136 = r615135 - r615119;
double r615137 = r615136 / r615122;
double r615138 = -0.5;
double r615139 = r615127 * r615138;
double r615140 = r615131 ? r615137 : r615139;
double r615141 = r615121 ? r615129 : r615140;
return r615141;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -5.571206846913461e+106Initial program 46.4
Simplified46.4
Taylor expanded around inf 46.4
Simplified46.4
Taylor expanded around -inf 3.6
Simplified3.6
if -5.571206846913461e+106 < b_2 < 3.821014310434392e-21Initial program 14.7
Simplified14.7
Taylor expanded around inf 14.7
Simplified14.7
if 3.821014310434392e-21 < b_2 Initial program 54.7
Simplified54.7
Taylor expanded around inf 54.7
Simplified54.7
Taylor expanded around inf 6.8
Final simplification10.3
herbie shell --seed 2019149 +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))