Average Error: 52.9 → 5.9
Time: 16.3s
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 r698340 = b;
        double r698341 = -r698340;
        double r698342 = r698340 * r698340;
        double r698343 = 4.0;
        double r698344 = a;
        double r698345 = r698343 * r698344;
        double r698346 = c;
        double r698347 = r698345 * r698346;
        double r698348 = r698342 - r698347;
        double r698349 = sqrt(r698348);
        double r698350 = r698341 + r698349;
        double r698351 = 2.0;
        double r698352 = r698351 * r698344;
        double r698353 = r698350 / r698352;
        return r698353;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r698354 = c;
        double r698355 = b;
        double r698356 = r698354 / r698355;
        double r698357 = -2.0;
        double r698358 = r698356 * r698357;
        double r698359 = 2.0;
        double r698360 = r698358 / r698359;
        return r698360;
}

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 a) c)))) (* 2 a)))