\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 5152.464935290847:\\
\;\;\;\;\frac{\frac{\frac{\sqrt{\mathsf{fma}\left(-4 \cdot a, c, b \cdot b\right)} \cdot \mathsf{fma}\left(-4 \cdot a, c, b \cdot b\right) - \left(b \cdot b\right) \cdot b}{\mathsf{fma}\left(b, b + \sqrt{\mathsf{fma}\left(-4 \cdot a, c, b \cdot b\right)}, \mathsf{fma}\left(-4 \cdot a, c, b \cdot b\right)\right)}}{a}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(\left(c \cdot \frac{\sqrt{a}}{\sqrt{b}}\right) \cdot \frac{\sqrt{a}}{\sqrt{b}}\right) \cdot -2}{a}}{2}\\
\end{array}double f(double a, double b, double c) {
double r1375112 = b;
double r1375113 = -r1375112;
double r1375114 = r1375112 * r1375112;
double r1375115 = 4.0;
double r1375116 = a;
double r1375117 = r1375115 * r1375116;
double r1375118 = c;
double r1375119 = r1375117 * r1375118;
double r1375120 = r1375114 - r1375119;
double r1375121 = sqrt(r1375120);
double r1375122 = r1375113 + r1375121;
double r1375123 = 2.0;
double r1375124 = r1375123 * r1375116;
double r1375125 = r1375122 / r1375124;
return r1375125;
}
double f(double a, double b, double c) {
double r1375126 = b;
double r1375127 = 5152.464935290847;
bool r1375128 = r1375126 <= r1375127;
double r1375129 = -4.0;
double r1375130 = a;
double r1375131 = r1375129 * r1375130;
double r1375132 = c;
double r1375133 = r1375126 * r1375126;
double r1375134 = fma(r1375131, r1375132, r1375133);
double r1375135 = sqrt(r1375134);
double r1375136 = r1375135 * r1375134;
double r1375137 = r1375133 * r1375126;
double r1375138 = r1375136 - r1375137;
double r1375139 = r1375126 + r1375135;
double r1375140 = fma(r1375126, r1375139, r1375134);
double r1375141 = r1375138 / r1375140;
double r1375142 = r1375141 / r1375130;
double r1375143 = 2.0;
double r1375144 = r1375142 / r1375143;
double r1375145 = sqrt(r1375130);
double r1375146 = sqrt(r1375126);
double r1375147 = r1375145 / r1375146;
double r1375148 = r1375132 * r1375147;
double r1375149 = r1375148 * r1375147;
double r1375150 = -2.0;
double r1375151 = r1375149 * r1375150;
double r1375152 = r1375151 / r1375130;
double r1375153 = r1375152 / r1375143;
double r1375154 = r1375128 ? r1375144 : r1375153;
return r1375154;
}



Bits error versus a



Bits error versus b



Bits error versus c
if b < 5152.464935290847Initial program 18.7
Simplified18.6
rmApplied flip3--18.8
Simplified18.1
Simplified18.1
if 5152.464935290847 < b Initial program 37.9
Simplified37.8
Taylor expanded around inf 15.1
rmApplied associate-/l*15.1
rmApplied *-un-lft-identity15.1
Applied add-sqr-sqrt15.2
Applied times-frac15.2
Applied add-sqr-sqrt15.2
Applied times-frac15.2
Simplified15.2
Simplified15.2
Final simplification16.6
herbie shell --seed 2019168 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, narrow range"
:pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))