double f(double a, double b_2, double c) {
double r1176915 = b_2;
double r1176916 = -r1176915;
double r1176917 = r1176915 * r1176915;
double r1176918 = a;
double r1176919 = c;
double r1176920 = r1176918 * r1176919;
double r1176921 = r1176917 - r1176920;
double r1176922 = sqrt(r1176921);
double r1176923 = r1176916 + r1176922;
double r1176924 = r1176923 / r1176918;
return r1176924;
}
double f(double a, double b_2, double c) {
double r1176925 = b_2;
double r1176926 = -4.1061641587957725e+142;
bool r1176927 = r1176925 <= r1176926;
double r1176928 = 0.5;
double r1176929 = a;
double r1176930 = c;
double r1176931 = r1176925 / r1176930;
double r1176932 = r1176929 / r1176931;
double r1176933 = -2.0;
double r1176934 = r1176925 * r1176933;
double r1176935 = fma(r1176928, r1176932, r1176934);
double r1176936 = r1176935 / r1176929;
double r1176937 = 5.6646816643665726e-285;
bool r1176938 = r1176925 <= r1176937;
double r1176939 = r1176925 * r1176925;
double r1176940 = r1176929 * r1176930;
double r1176941 = r1176939 - r1176940;
double r1176942 = sqrt(r1176941);
double r1176943 = r1176942 - r1176925;
double r1176944 = r1176943 / r1176929;
double r1176945 = 1.4653326993720654e+110;
bool r1176946 = r1176925 <= r1176945;
double r1176947 = r1176942 + r1176925;
double r1176948 = r1176930 / r1176947;
double r1176949 = -r1176948;
double r1176950 = -r1176930;
double r1176951 = r1176929 / r1176925;
double r1176952 = r1176930 * r1176951;
double r1176953 = -0.5;
double r1176954 = 2.0;
double r1176955 = r1176925 * r1176954;
double r1176956 = fma(r1176952, r1176953, r1176955);
double r1176957 = r1176950 / r1176956;
double r1176958 = r1176946 ? r1176949 : r1176957;
double r1176959 = r1176938 ? r1176944 : r1176958;
double r1176960 = r1176927 ? r1176936 : r1176959;
return r1176960;
}
\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.1061641587957725 \cdot 10^{+142}:\\
\;\;\;\;\frac{(\frac{1}{2} \cdot \left(\frac{a}{\frac{b_2}{c}}\right) + \left(b_2 \cdot -2\right))_*}{a}\\
\mathbf{elif}\;b_2 \le 5.6646816643665726 \cdot 10^{-285}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{elif}\;b_2 \le 1.4653326993720654 \cdot 10^{+110}:\\
\;\;\;\;-\frac{c}{\sqrt{b_2 \cdot b_2 - a \cdot c} + b_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-c}{(\left(c \cdot \frac{a}{b_2}\right) \cdot \frac{-1}{2} + \left(b_2 \cdot 2\right))_*}\\
\end{array}


Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -4.1061641587957725e+142Initial program 56.5
Simplified56.5
Taylor expanded around -inf 10.9
Simplified2.7
if -4.1061641587957725e+142 < b_2 < 5.6646816643665726e-285Initial program 9.0
Simplified9.0
if 5.6646816643665726e-285 < b_2 < 1.4653326993720654e+110Initial program 33.5
Simplified33.5
rmApplied div-inv33.5
rmApplied flip--33.6
Applied associate-*l/33.6
Simplified15.8
rmApplied sub0-neg15.8
Applied distribute-frac-neg15.8
Simplified8.6
if 1.4653326993720654e+110 < b_2 Initial program 59.7
Simplified59.7
rmApplied div-inv59.7
rmApplied flip--59.8
Applied associate-*l/59.8
Simplified32.3
rmApplied sub0-neg32.3
Applied distribute-frac-neg32.3
Simplified31.7
Taylor expanded around inf 6.4
Simplified2.0
Final simplification6.5
herbie shell --seed 2019102 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))