Average Error: 52.6 → 6.1
Time: 16.8s
Precision: 64
\[4.930380657631324 \cdot 10^{-32} \lt a \lt 2.028240960365167 \cdot 10^{+31} \land 4.930380657631324 \cdot 10^{-32} \lt b \lt 2.028240960365167 \cdot 10^{+31} \land 4.930380657631324 \cdot 10^{-32} \lt c \lt 2.028240960365167 \cdot 10^{+31}\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\frac{c}{b} \cdot -2}{2}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{\frac{c}{b} \cdot -2}{2}
double f(double a, double b, double c) {
        double r721439 = b;
        double r721440 = -r721439;
        double r721441 = r721439 * r721439;
        double r721442 = 4.0;
        double r721443 = a;
        double r721444 = r721442 * r721443;
        double r721445 = c;
        double r721446 = r721444 * r721445;
        double r721447 = r721441 - r721446;
        double r721448 = sqrt(r721447);
        double r721449 = r721440 + r721448;
        double r721450 = 2.0;
        double r721451 = r721450 * r721443;
        double r721452 = r721449 / r721451;
        return r721452;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r721453 = c;
        double r721454 = b;
        double r721455 = r721453 / r721454;
        double r721456 = -2.0;
        double r721457 = r721455 * r721456;
        double r721458 = 2.0;
        double r721459 = r721457 / r721458;
        return r721459;
}

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.6

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

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

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

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

Reproduce

herbie shell --seed 2019163 
(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 a) c)))) (* 2 a)))