\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.706781135059311758856471716413486308072 \cdot 10^{-92}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le 6.385814412780331293336851171468331234192 \cdot 10^{98}:\\
\;\;\;\;\frac{1}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot c\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double f(double a, double b_2, double c) {
double r20239 = b_2;
double r20240 = -r20239;
double r20241 = r20239 * r20239;
double r20242 = a;
double r20243 = c;
double r20244 = r20242 * r20243;
double r20245 = r20241 - r20244;
double r20246 = sqrt(r20245);
double r20247 = r20240 + r20246;
double r20248 = r20247 / r20242;
return r20248;
}
double f(double a, double b_2, double c) {
double r20249 = b_2;
double r20250 = -4.706781135059312e-92;
bool r20251 = r20249 <= r20250;
double r20252 = 0.5;
double r20253 = c;
double r20254 = r20253 / r20249;
double r20255 = r20252 * r20254;
double r20256 = 2.0;
double r20257 = a;
double r20258 = r20249 / r20257;
double r20259 = r20256 * r20258;
double r20260 = r20255 - r20259;
double r20261 = 6.385814412780331e+98;
bool r20262 = r20249 <= r20261;
double r20263 = 1.0;
double r20264 = -r20249;
double r20265 = r20249 * r20249;
double r20266 = r20257 * r20253;
double r20267 = r20265 - r20266;
double r20268 = sqrt(r20267);
double r20269 = r20264 - r20268;
double r20270 = r20263 / r20269;
double r20271 = r20270 * r20253;
double r20272 = -0.5;
double r20273 = r20272 * r20254;
double r20274 = r20262 ? r20271 : r20273;
double r20275 = r20251 ? r20260 : r20274;
return r20275;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -4.706781135059312e-92Initial program 26.6
Taylor expanded around -inf 12.8
if -4.706781135059312e-92 < b_2 < 6.385814412780331e+98Initial program 26.4
rmApplied flip-+28.7
Simplified17.8
rmApplied *-un-lft-identity17.8
Applied *-un-lft-identity17.8
Applied times-frac17.8
Simplified17.8
Simplified16.3
rmApplied clear-num16.2
Simplified12.5
rmApplied div-inv12.6
Applied add-cube-cbrt12.6
Applied times-frac12.4
Simplified12.4
Simplified12.3
if 6.385814412780331e+98 < b_2 Initial program 59.2
Taylor expanded around inf 2.5
Final simplification10.0
herbie shell --seed 2019353 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))