Average Error: 52.3 → 6.4
Time: 20.7s
Precision: 64
\[4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt a \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt b \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt c \lt 20282409603651670423947251286016\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{c}{b} \cdot -1\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{c}{b} \cdot -1
double f(double a, double b, double c) {
        double r910194 = b;
        double r910195 = -r910194;
        double r910196 = r910194 * r910194;
        double r910197 = 4.0;
        double r910198 = a;
        double r910199 = r910197 * r910198;
        double r910200 = c;
        double r910201 = r910199 * r910200;
        double r910202 = r910196 - r910201;
        double r910203 = sqrt(r910202);
        double r910204 = r910195 + r910203;
        double r910205 = 2.0;
        double r910206 = r910205 * r910198;
        double r910207 = r910204 / r910206;
        return r910207;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r910208 = c;
        double r910209 = b;
        double r910210 = r910208 / r910209;
        double r910211 = -1.0;
        double r910212 = r910210 * r910211;
        return r910212;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 52.3

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
  2. Simplified52.3

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2}}{a}}\]
  3. Taylor expanded around inf 6.4

    \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
  4. Final simplification6.4

    \[\leadsto \frac{c}{b} \cdot -1\]

Reproduce

herbie shell --seed 2019192 
(FPCore (a b c)
  :name "Quadratic roots, wide range"
  :pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))