\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -6.6114837319571935 \cdot 10^{38}:\\
\;\;\;\;1 \cdot \left(\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\right)\\
\mathbf{elif}\;b_2 \le 2.8340580980410285 \cdot 10^{-68}:\\
\;\;\;\;1 \cdot \frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\frac{-1}{2} \cdot \frac{c}{b_2}\right)\\
\end{array}double f(double a, double b_2, double c) {
double r15506 = b_2;
double r15507 = -r15506;
double r15508 = r15506 * r15506;
double r15509 = a;
double r15510 = c;
double r15511 = r15509 * r15510;
double r15512 = r15508 - r15511;
double r15513 = sqrt(r15512);
double r15514 = r15507 + r15513;
double r15515 = r15514 / r15509;
return r15515;
}
double f(double a, double b_2, double c) {
double r15516 = b_2;
double r15517 = -6.6114837319571935e+38;
bool r15518 = r15516 <= r15517;
double r15519 = 1.0;
double r15520 = 0.5;
double r15521 = c;
double r15522 = r15521 / r15516;
double r15523 = r15520 * r15522;
double r15524 = 2.0;
double r15525 = a;
double r15526 = r15516 / r15525;
double r15527 = r15524 * r15526;
double r15528 = r15523 - r15527;
double r15529 = r15519 * r15528;
double r15530 = 2.8340580980410285e-68;
bool r15531 = r15516 <= r15530;
double r15532 = r15516 * r15516;
double r15533 = r15525 * r15521;
double r15534 = r15532 - r15533;
double r15535 = sqrt(r15534);
double r15536 = r15535 - r15516;
double r15537 = r15536 / r15525;
double r15538 = r15519 * r15537;
double r15539 = -0.5;
double r15540 = r15539 * r15522;
double r15541 = r15519 * r15540;
double r15542 = r15531 ? r15538 : r15541;
double r15543 = r15518 ? r15529 : r15542;
return r15543;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -6.6114837319571935e+38Initial program 36.8
rmApplied div-inv36.9
rmApplied *-un-lft-identity36.9
Applied associate-*l*36.9
Simplified36.8
Taylor expanded around -inf 6.6
if -6.6114837319571935e+38 < b_2 < 2.8340580980410285e-68Initial program 15.0
rmApplied div-inv15.1
rmApplied *-un-lft-identity15.1
Applied associate-*l*15.1
Simplified15.0
if 2.8340580980410285e-68 < b_2 Initial program 53.9
rmApplied div-inv54.0
rmApplied *-un-lft-identity54.0
Applied associate-*l*54.0
Simplified53.9
Taylor expanded around inf 8.2
Final simplification10.6
herbie shell --seed 2020039 +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))