Average Error: 52.9 → 5.9
Time: 33.0s
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{\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 r742146 = b;
        double r742147 = -r742146;
        double r742148 = r742146 * r742146;
        double r742149 = 4.0;
        double r742150 = a;
        double r742151 = r742149 * r742150;
        double r742152 = c;
        double r742153 = r742151 * r742152;
        double r742154 = r742148 - r742153;
        double r742155 = sqrt(r742154);
        double r742156 = r742147 + r742155;
        double r742157 = 2.0;
        double r742158 = r742157 * r742150;
        double r742159 = r742156 / r742158;
        return r742159;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r742160 = c;
        double r742161 = b;
        double r742162 = r742160 / r742161;
        double r742163 = -2.0;
        double r742164 = r742162 * r742163;
        double r742165 = 2.0;
        double r742166 = r742164 / r742165;
        return r742166;
}

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

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

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

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

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

Reproduce

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