\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.0461303908572575 \cdot 10^{65}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le -3.896155291582558 \cdot 10^{-285}:\\
\;\;\;\;\left(\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{a}\\
\mathbf{elif}\;b_2 \le 2445759453.4737968:\\
\;\;\;\;\frac{1}{\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double f(double a, double b_2, double c) {
double r29177 = b_2;
double r29178 = -r29177;
double r29179 = r29177 * r29177;
double r29180 = a;
double r29181 = c;
double r29182 = r29180 * r29181;
double r29183 = r29179 - r29182;
double r29184 = sqrt(r29183);
double r29185 = r29178 + r29184;
double r29186 = r29185 / r29180;
return r29186;
}
double f(double a, double b_2, double c) {
double r29187 = b_2;
double r29188 = -1.0461303908572575e+65;
bool r29189 = r29187 <= r29188;
double r29190 = 0.5;
double r29191 = c;
double r29192 = r29191 / r29187;
double r29193 = r29190 * r29192;
double r29194 = 2.0;
double r29195 = a;
double r29196 = r29187 / r29195;
double r29197 = r29194 * r29196;
double r29198 = r29193 - r29197;
double r29199 = -3.896155291582558e-285;
bool r29200 = r29187 <= r29199;
double r29201 = -r29187;
double r29202 = r29187 * r29187;
double r29203 = r29195 * r29191;
double r29204 = r29202 - r29203;
double r29205 = sqrt(r29204);
double r29206 = r29201 + r29205;
double r29207 = 1.0;
double r29208 = r29207 / r29195;
double r29209 = r29206 * r29208;
double r29210 = 2445759453.473797;
bool r29211 = r29187 <= r29210;
double r29212 = r29201 - r29205;
double r29213 = r29212 / r29191;
double r29214 = r29207 / r29213;
double r29215 = -0.5;
double r29216 = r29215 * r29192;
double r29217 = r29211 ? r29214 : r29216;
double r29218 = r29200 ? r29209 : r29217;
double r29219 = r29189 ? r29198 : r29218;
return r29219;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.0461303908572575e+65Initial program 41.2
Taylor expanded around -inf 4.6
if -1.0461303908572575e+65 < b_2 < -3.896155291582558e-285Initial program 9.8
rmApplied div-inv10.0
if -3.896155291582558e-285 < b_2 < 2445759453.473797Initial program 25.6
rmApplied flip-+25.7
Simplified17.5
rmApplied *-un-lft-identity17.5
Applied associate-/r*17.5
Simplified14.3
rmApplied *-un-lft-identity14.3
Applied *-un-lft-identity14.3
Applied times-frac14.3
Applied *-un-lft-identity14.3
Applied times-frac14.3
Applied associate-/l*14.2
Simplified10.8
if 2445759453.473797 < b_2 Initial program 56.2
Taylor expanded around inf 4.9
Final simplification7.5
herbie shell --seed 2020059 +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))