Average Error: 52.5 → 6.2
Time: 22.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 r798329 = b;
        double r798330 = -r798329;
        double r798331 = r798329 * r798329;
        double r798332 = 4.0;
        double r798333 = a;
        double r798334 = r798332 * r798333;
        double r798335 = c;
        double r798336 = r798334 * r798335;
        double r798337 = r798331 - r798336;
        double r798338 = sqrt(r798337);
        double r798339 = r798330 + r798338;
        double r798340 = 2.0;
        double r798341 = r798340 * r798333;
        double r798342 = r798339 / r798341;
        return r798342;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r798343 = c;
        double r798344 = b;
        double r798345 = r798343 / r798344;
        double r798346 = -2.0;
        double r798347 = r798345 * r798346;
        double r798348 = 2.0;
        double r798349 = r798347 / r798348;
        return r798349;
}

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

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

    \[\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.2

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

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

Reproduce

herbie shell --seed 2019141 
(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)))