Average Error: 52.6 → 6.1
Time: 21.3s
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 r834637 = b;
        double r834638 = -r834637;
        double r834639 = r834637 * r834637;
        double r834640 = 4.0;
        double r834641 = a;
        double r834642 = r834640 * r834641;
        double r834643 = c;
        double r834644 = r834642 * r834643;
        double r834645 = r834639 - r834644;
        double r834646 = sqrt(r834645);
        double r834647 = r834638 + r834646;
        double r834648 = 2.0;
        double r834649 = r834648 * r834641;
        double r834650 = r834647 / r834649;
        return r834650;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r834651 = c;
        double r834652 = b;
        double r834653 = r834651 / r834652;
        double r834654 = -1.0;
        double r834655 = r834653 * r834654;
        return r834655;
}

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}{2}}{a}}\]
  3. Taylor expanded around inf 6.1

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

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

Reproduce

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