\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 -9.139254247068609 \cdot 10^{+140}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 9.931313556234952 \cdot 10^{-296}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{a} \cdot \frac{1}{2}\\
\mathbf{elif}\;b \le 6.523631550102089 \cdot 10^{+89}:\\
\;\;\;\;\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 r4047994 = b;
double r4047995 = -r4047994;
double r4047996 = r4047994 * r4047994;
double r4047997 = 4.0;
double r4047998 = a;
double r4047999 = r4047997 * r4047998;
double r4048000 = c;
double r4048001 = r4047999 * r4048000;
double r4048002 = r4047996 - r4048001;
double r4048003 = sqrt(r4048002);
double r4048004 = r4047995 + r4048003;
double r4048005 = 2.0;
double r4048006 = r4048005 * r4047998;
double r4048007 = r4048004 / r4048006;
return r4048007;
}
double f(double a, double b, double c) {
double r4048008 = b;
double r4048009 = -9.139254247068609e+140;
bool r4048010 = r4048008 <= r4048009;
double r4048011 = c;
double r4048012 = r4048011 / r4048008;
double r4048013 = a;
double r4048014 = r4048008 / r4048013;
double r4048015 = r4048012 - r4048014;
double r4048016 = 9.931313556234952e-296;
bool r4048017 = r4048008 <= r4048016;
double r4048018 = r4048008 * r4048008;
double r4048019 = r4048011 * r4048013;
double r4048020 = 4.0;
double r4048021 = r4048019 * r4048020;
double r4048022 = r4048018 - r4048021;
double r4048023 = sqrt(r4048022);
double r4048024 = r4048023 - r4048008;
double r4048025 = r4048024 / r4048013;
double r4048026 = 0.5;
double r4048027 = r4048025 * r4048026;
double r4048028 = 6.523631550102089e+89;
bool r4048029 = r4048008 <= r4048028;
double r4048030 = -2.0;
double r4048031 = r4048011 * r4048030;
double r4048032 = r4048023 + r4048008;
double r4048033 = r4048031 / r4048032;
double r4048034 = -r4048012;
double r4048035 = r4048029 ? r4048033 : r4048034;
double r4048036 = r4048017 ? r4048027 : r4048035;
double r4048037 = r4048010 ? r4048015 : r4048036;
return r4048037;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -9.139254247068609e+140Initial program 55.8
Simplified55.8
Taylor expanded around -inf 1.6
if -9.139254247068609e+140 < b < 9.931313556234952e-296Initial program 8.7
Simplified8.7
rmApplied *-un-lft-identity8.7
Applied associate-/l*8.9
rmApplied *-un-lft-identity8.9
Applied *-un-lft-identity8.9
Applied distribute-lft-out--8.9
Applied times-frac8.8
Applied add-sqr-sqrt8.8
Applied times-frac8.8
Simplified8.8
Simplified8.7
if 9.931313556234952e-296 < b < 6.523631550102089e+89Initial program 32.6
Simplified32.6
rmApplied *-un-lft-identity32.6
Applied associate-/l*32.6
rmApplied flip--32.7
Applied associate-/r/32.8
Applied *-un-lft-identity32.8
Applied times-frac32.8
Simplified16.4
Taylor expanded around inf 9.3
rmApplied un-div-inv9.2
if 6.523631550102089e+89 < b Initial program 58.7
Simplified58.7
Taylor expanded around inf 2.6
Simplified2.6
Final simplification6.6
herbie shell --seed 2019112
(FPCore (a b c)
:name "Quadratic roots, full range"
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))