\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}:\\
\;\;\;\;1 \cdot \left(\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\right)\\
\mathbf{elif}\;b_2 \le 6.385814412780331293336851171468331234192 \cdot 10^{98}:\\
\;\;\;\;1 \cdot \left(\frac{1}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot c\right)\\
\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 r20646 = b_2;
double r20647 = -r20646;
double r20648 = r20646 * r20646;
double r20649 = a;
double r20650 = c;
double r20651 = r20649 * r20650;
double r20652 = r20648 - r20651;
double r20653 = sqrt(r20652);
double r20654 = r20647 + r20653;
double r20655 = r20654 / r20649;
return r20655;
}
double f(double a, double b_2, double c) {
double r20656 = b_2;
double r20657 = -4.706781135059312e-92;
bool r20658 = r20656 <= r20657;
double r20659 = 1.0;
double r20660 = 0.5;
double r20661 = c;
double r20662 = r20661 / r20656;
double r20663 = r20660 * r20662;
double r20664 = 2.0;
double r20665 = a;
double r20666 = r20656 / r20665;
double r20667 = r20664 * r20666;
double r20668 = r20663 - r20667;
double r20669 = r20659 * r20668;
double r20670 = 6.385814412780331e+98;
bool r20671 = r20656 <= r20670;
double r20672 = -r20656;
double r20673 = r20656 * r20656;
double r20674 = r20665 * r20661;
double r20675 = r20673 - r20674;
double r20676 = sqrt(r20675);
double r20677 = r20672 - r20676;
double r20678 = r20659 / r20677;
double r20679 = r20678 * r20661;
double r20680 = r20659 * r20679;
double r20681 = -0.5;
double r20682 = r20681 * r20662;
double r20683 = r20659 * r20682;
double r20684 = r20671 ? r20680 : r20683;
double r20685 = r20658 ? r20669 : r20684;
return r20685;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -4.706781135059312e-92Initial program 26.6
rmApplied flip-+55.2
Simplified54.8
rmApplied *-un-lft-identity54.8
Applied *-un-lft-identity54.8
Applied times-frac54.8
Simplified54.8
Simplified54.6
rmApplied *-un-lft-identity54.6
Applied times-frac54.6
Simplified54.6
Simplified54.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 *-un-lft-identity16.3
Applied times-frac16.3
Simplified16.3
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
rmApplied flip-+59.2
Simplified32.6
rmApplied *-un-lft-identity32.6
Applied *-un-lft-identity32.6
Applied times-frac32.6
Simplified32.6
Simplified32.5
rmApplied *-un-lft-identity32.5
Applied times-frac32.5
Simplified32.5
Simplified30.3
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))