double f(double a, double b, double c) {
double r6049172 = b;
double r6049173 = -r6049172;
double r6049174 = r6049172 * r6049172;
double r6049175 = 4.0;
double r6049176 = a;
double r6049177 = r6049175 * r6049176;
double r6049178 = c;
double r6049179 = r6049177 * r6049178;
double r6049180 = r6049174 - r6049179;
double r6049181 = sqrt(r6049180);
double r6049182 = r6049173 + r6049181;
double r6049183 = 2.0;
double r6049184 = r6049183 * r6049176;
double r6049185 = r6049182 / r6049184;
return r6049185;
}
double f(double a, double b, double c) {
double r6049186 = b;
double r6049187 = -4.3671561050226844e+101;
bool r6049188 = r6049186 <= r6049187;
double r6049189 = c;
double r6049190 = r6049189 / r6049186;
double r6049191 = a;
double r6049192 = r6049186 / r6049191;
double r6049193 = r6049190 - r6049192;
double r6049194 = 5.6646816643665726e-285;
bool r6049195 = r6049186 <= r6049194;
double r6049196 = -r6049186;
double r6049197 = r6049186 * r6049186;
double r6049198 = 4.0;
double r6049199 = r6049198 * r6049191;
double r6049200 = r6049189 * r6049199;
double r6049201 = r6049197 - r6049200;
double r6049202 = sqrt(r6049201);
double r6049203 = r6049196 + r6049202;
double r6049204 = 1.0;
double r6049205 = 2.0;
double r6049206 = r6049191 * r6049205;
double r6049207 = r6049204 / r6049206;
double r6049208 = r6049203 * r6049207;
double r6049209 = 2.8546456093447043e+107;
bool r6049210 = r6049186 <= r6049209;
double r6049211 = r6049189 * r6049205;
double r6049212 = r6049196 - r6049202;
double r6049213 = r6049211 / r6049212;
double r6049214 = r6049190 * r6049191;
double r6049215 = r6049214 - r6049186;
double r6049216 = r6049205 * r6049215;
double r6049217 = r6049211 / r6049216;
double r6049218 = r6049210 ? r6049213 : r6049217;
double r6049219 = r6049195 ? r6049208 : r6049218;
double r6049220 = r6049188 ? r6049193 : r6049219;
return r6049220;
}
\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.3671561050226844 \cdot 10^{+101}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 5.6646816643665726 \cdot 10^{-285}:\\
\;\;\;\;\left(\left(-b\right) + \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\right) \cdot \frac{1}{a \cdot 2}\\
\mathbf{elif}\;b \le 2.8546456093447043 \cdot 10^{+107}:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{2 \cdot \left(\frac{c}{b} \cdot a - b\right)}\\
\end{array}


Bits error versus a



Bits error versus b



Bits error versus c
if b < -4.3671561050226844e+101Initial program 44.7
rmApplied div-inv44.8
Taylor expanded around -inf 3.8
if -4.3671561050226844e+101 < b < 5.6646816643665726e-285Initial program 9.6
rmApplied div-inv9.7
if 5.6646816643665726e-285 < b < 2.8546456093447043e+107Initial program 33.4
rmApplied div-inv33.5
rmApplied flip-+33.6
Applied associate-*l/33.6
Simplified16.0
Taylor expanded around 0 8.7
if 2.8546456093447043e+107 < b Initial program 59.5
rmApplied div-inv59.5
rmApplied flip-+59.6
Applied associate-*l/59.6
Simplified32.0
Taylor expanded around 0 31.4
Taylor expanded around inf 6.5
Simplified2.1
Final simplification6.7
herbie shell --seed 2019102 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, full range"
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))