Average Error: 52.3 → 6.4
Time: 16.2s
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 r735989 = b;
        double r735990 = -r735989;
        double r735991 = r735989 * r735989;
        double r735992 = 4.0;
        double r735993 = a;
        double r735994 = r735992 * r735993;
        double r735995 = c;
        double r735996 = r735994 * r735995;
        double r735997 = r735991 - r735996;
        double r735998 = sqrt(r735997);
        double r735999 = r735990 + r735998;
        double r736000 = 2.0;
        double r736001 = r736000 * r735993;
        double r736002 = r735999 / r736001;
        return r736002;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r736003 = c;
        double r736004 = b;
        double r736005 = r736003 / r736004;
        double r736006 = -2.0;
        double r736007 = r736005 * r736006;
        double r736008 = 2.0;
        double r736009 = r736007 / r736008;
        return r736009;
}

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

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

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

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

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

Reproduce

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