\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\begin{array}{l}
\mathbf{if}\;b \le -5.089942740476039 \cdot 10^{+37}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 1.1606217053284985 \cdot 10^{-301}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{a \cdot 2}\\
\mathbf{elif}\;b \le 1.9653089193303188 \cdot 10^{+135}:\\
\;\;\;\;\frac{c \cdot -2}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r4727146 = b;
double r4727147 = -r4727146;
double r4727148 = r4727146 * r4727146;
double r4727149 = 4.0;
double r4727150 = a;
double r4727151 = r4727149 * r4727150;
double r4727152 = c;
double r4727153 = r4727151 * r4727152;
double r4727154 = r4727148 - r4727153;
double r4727155 = sqrt(r4727154);
double r4727156 = r4727147 + r4727155;
double r4727157 = 2.0;
double r4727158 = r4727157 * r4727150;
double r4727159 = r4727156 / r4727158;
return r4727159;
}
double f(double a, double b, double c) {
double r4727160 = b;
double r4727161 = -5.089942740476039e+37;
bool r4727162 = r4727160 <= r4727161;
double r4727163 = c;
double r4727164 = r4727163 / r4727160;
double r4727165 = a;
double r4727166 = r4727160 / r4727165;
double r4727167 = r4727164 - r4727166;
double r4727168 = 1.1606217053284985e-301;
bool r4727169 = r4727160 <= r4727168;
double r4727170 = r4727160 * r4727160;
double r4727171 = r4727163 * r4727165;
double r4727172 = 4.0;
double r4727173 = r4727171 * r4727172;
double r4727174 = r4727170 - r4727173;
double r4727175 = sqrt(r4727174);
double r4727176 = r4727175 - r4727160;
double r4727177 = 2.0;
double r4727178 = r4727165 * r4727177;
double r4727179 = r4727176 / r4727178;
double r4727180 = 1.9653089193303188e+135;
bool r4727181 = r4727160 <= r4727180;
double r4727182 = -2.0;
double r4727183 = r4727163 * r4727182;
double r4727184 = r4727175 + r4727160;
double r4727185 = r4727183 / r4727184;
double r4727186 = -r4727164;
double r4727187 = r4727181 ? r4727185 : r4727186;
double r4727188 = r4727169 ? r4727179 : r4727187;
double r4727189 = r4727162 ? r4727167 : r4727188;
return r4727189;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -5.089942740476039e+37Initial program 34.9
Simplified34.9
rmApplied div-inv35.0
Taylor expanded around -inf 6.3
if -5.089942740476039e+37 < b < 1.1606217053284985e-301Initial program 10.3
Simplified10.3
rmApplied div-inv10.4
rmApplied un-div-inv10.3
if 1.1606217053284985e-301 < b < 1.9653089193303188e+135Initial program 34.6
Simplified34.6
rmApplied div-inv34.6
rmApplied flip--34.7
Applied associate-*l/34.7
Simplified14.7
Taylor expanded around 0 8.3
if 1.9653089193303188e+135 < b Initial program 61.2
Simplified61.2
rmApplied div-inv61.2
Taylor expanded around inf 2.1
Simplified2.1
Final simplification7.1
herbie shell --seed 2019121
(FPCore (a b c)
:name "Quadratic roots, full range"
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))