\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.369694371126339229257094016308893237032 \cdot 10^{-83}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le 1.503298990987190001354942629806677715055 \cdot 10^{53}:\\
\;\;\;\;\frac{1}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot \frac{\frac{\sqrt[3]{a}}{\frac{1}{c}}}{\sqrt[3]{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double f(double a, double b_2, double c) {
double r23001 = b_2;
double r23002 = -r23001;
double r23003 = r23001 * r23001;
double r23004 = a;
double r23005 = c;
double r23006 = r23004 * r23005;
double r23007 = r23003 - r23006;
double r23008 = sqrt(r23007);
double r23009 = r23002 + r23008;
double r23010 = r23009 / r23004;
return r23010;
}
double f(double a, double b_2, double c) {
double r23011 = b_2;
double r23012 = -1.3696943711263392e-83;
bool r23013 = r23011 <= r23012;
double r23014 = 0.5;
double r23015 = c;
double r23016 = r23015 / r23011;
double r23017 = r23014 * r23016;
double r23018 = 2.0;
double r23019 = a;
double r23020 = r23011 / r23019;
double r23021 = r23018 * r23020;
double r23022 = r23017 - r23021;
double r23023 = 1.50329899098719e+53;
bool r23024 = r23011 <= r23023;
double r23025 = 1.0;
double r23026 = -r23011;
double r23027 = r23011 * r23011;
double r23028 = r23019 * r23015;
double r23029 = r23027 - r23028;
double r23030 = sqrt(r23029);
double r23031 = r23026 - r23030;
double r23032 = r23025 / r23031;
double r23033 = cbrt(r23019);
double r23034 = r23025 / r23015;
double r23035 = r23033 / r23034;
double r23036 = r23035 / r23033;
double r23037 = r23032 * r23036;
double r23038 = -0.5;
double r23039 = r23038 * r23016;
double r23040 = r23024 ? r23037 : r23039;
double r23041 = r23013 ? r23022 : r23040;
return r23041;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.3696943711263392e-83Initial program 26.1
Taylor expanded around -inf 12.3
if -1.3696943711263392e-83 < b_2 < 1.50329899098719e+53Initial program 24.2
rmApplied flip-+27.0
Simplified17.7
rmApplied *-un-lft-identity17.7
Applied associate-/r*17.7
Simplified16.0
rmApplied add-cube-cbrt16.7
Applied div-inv16.8
Applied add-cube-cbrt16.1
Applied times-frac16.3
Applied times-frac14.1
Simplified14.1
if 1.50329899098719e+53 < b_2 Initial program 57.4
Taylor expanded around inf 4.1
Final simplification10.7
herbie shell --seed 2019362 +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))