\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 -3.794505329565205 \cdot 10^{+146}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 1.6194276288860963:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(c \cdot \left(a \cdot -4\right)\right)\right)} - b}{\frac{a}{\frac{1}{2}}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r1208522 = b;
double r1208523 = -r1208522;
double r1208524 = r1208522 * r1208522;
double r1208525 = 4.0;
double r1208526 = a;
double r1208527 = r1208525 * r1208526;
double r1208528 = c;
double r1208529 = r1208527 * r1208528;
double r1208530 = r1208524 - r1208529;
double r1208531 = sqrt(r1208530);
double r1208532 = r1208523 + r1208531;
double r1208533 = 2.0;
double r1208534 = r1208533 * r1208526;
double r1208535 = r1208532 / r1208534;
return r1208535;
}
double f(double a, double b, double c) {
double r1208536 = b;
double r1208537 = -3.794505329565205e+146;
bool r1208538 = r1208536 <= r1208537;
double r1208539 = c;
double r1208540 = r1208539 / r1208536;
double r1208541 = a;
double r1208542 = r1208536 / r1208541;
double r1208543 = r1208540 - r1208542;
double r1208544 = 1.6194276288860963;
bool r1208545 = r1208536 <= r1208544;
double r1208546 = -4.0;
double r1208547 = r1208541 * r1208546;
double r1208548 = r1208539 * r1208547;
double r1208549 = fma(r1208536, r1208536, r1208548);
double r1208550 = sqrt(r1208549);
double r1208551 = r1208550 - r1208536;
double r1208552 = 0.5;
double r1208553 = r1208541 / r1208552;
double r1208554 = r1208551 / r1208553;
double r1208555 = -r1208540;
double r1208556 = r1208545 ? r1208554 : r1208555;
double r1208557 = r1208538 ? r1208543 : r1208556;
return r1208557;
}



Bits error versus a



Bits error versus b



Bits error versus c
if b < -3.794505329565205e+146Initial program 58.0
Simplified58.0
rmApplied div-inv58.0
Applied associate-/l*58.0
Simplified58.0
Taylor expanded around -inf 3.1
if -3.794505329565205e+146 < b < 1.6194276288860963Initial program 15.0
Simplified15.0
rmApplied div-inv15.0
Applied associate-/l*15.0
Simplified15.0
if 1.6194276288860963 < b Initial program 54.4
Simplified54.4
rmApplied div-inv54.4
Applied associate-/l*54.4
Simplified54.4
Taylor expanded around inf 5.9
Simplified5.9
Final simplification10.6
herbie shell --seed 2019129 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, full range"
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))