\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 -4.91962817906715367126033645969528543778 \cdot 10^{153}:\\
\;\;\;\;\left(\frac{c}{b} - \frac{b}{a}\right) \cdot 1\\
\mathbf{elif}\;b \le 2.071930020515770918527743961403466592109 \cdot 10^{-74}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r36207 = b;
double r36208 = -r36207;
double r36209 = r36207 * r36207;
double r36210 = 4.0;
double r36211 = a;
double r36212 = r36210 * r36211;
double r36213 = c;
double r36214 = r36212 * r36213;
double r36215 = r36209 - r36214;
double r36216 = sqrt(r36215);
double r36217 = r36208 + r36216;
double r36218 = 2.0;
double r36219 = r36218 * r36211;
double r36220 = r36217 / r36219;
return r36220;
}
double f(double a, double b, double c) {
double r36221 = b;
double r36222 = -4.919628179067154e+153;
bool r36223 = r36221 <= r36222;
double r36224 = c;
double r36225 = r36224 / r36221;
double r36226 = a;
double r36227 = r36221 / r36226;
double r36228 = r36225 - r36227;
double r36229 = 1.0;
double r36230 = r36228 * r36229;
double r36231 = 2.071930020515771e-74;
bool r36232 = r36221 <= r36231;
double r36233 = r36221 * r36221;
double r36234 = 4.0;
double r36235 = r36234 * r36226;
double r36236 = r36235 * r36224;
double r36237 = r36233 - r36236;
double r36238 = sqrt(r36237);
double r36239 = r36238 - r36221;
double r36240 = 2.0;
double r36241 = r36240 * r36226;
double r36242 = r36239 / r36241;
double r36243 = -1.0;
double r36244 = r36243 * r36225;
double r36245 = r36232 ? r36242 : r36244;
double r36246 = r36223 ? r36230 : r36245;
return r36246;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -4.919628179067154e+153Initial program 63.8
Simplified63.8
rmApplied clear-num63.8
rmApplied *-un-lft-identity63.8
Applied add-cube-cbrt63.8
Applied times-frac63.8
Simplified63.8
Simplified63.8
rmApplied pow163.8
Applied pow163.8
Applied pow-prod-down63.8
Simplified63.8
Taylor expanded around -inf 2.1
Simplified2.1
if -4.919628179067154e+153 < b < 2.071930020515771e-74Initial program 12.8
Simplified12.8
rmApplied clear-num13.0
rmApplied *-un-lft-identity13.0
Applied add-cube-cbrt13.0
Applied times-frac13.0
Simplified13.0
Simplified12.9
rmApplied pow112.9
Applied pow112.9
Applied pow-prod-down12.9
Simplified12.8
if 2.071930020515771e-74 < b Initial program 53.2
Simplified53.2
rmApplied clear-num53.2
rmApplied *-un-lft-identity53.2
Applied add-cube-cbrt53.2
Applied times-frac53.2
Simplified53.2
Simplified53.2
rmApplied pow153.2
Applied pow153.2
Applied pow-prod-down53.2
Simplified53.2
Taylor expanded around inf 9.2
Final simplification10.3
herbie shell --seed 2019208
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))