Average Error: 52.4 → 6.3
Time: 17.6s
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(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{c}{b} \cdot -0.5\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{c}{b} \cdot -0.5
double f(double a, double b, double c) {
        double r3567373 = b;
        double r3567374 = -r3567373;
        double r3567375 = r3567373 * r3567373;
        double r3567376 = 3.0;
        double r3567377 = a;
        double r3567378 = r3567376 * r3567377;
        double r3567379 = c;
        double r3567380 = r3567378 * r3567379;
        double r3567381 = r3567375 - r3567380;
        double r3567382 = sqrt(r3567381);
        double r3567383 = r3567374 + r3567382;
        double r3567384 = r3567383 / r3567378;
        return r3567384;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r3567385 = c;
        double r3567386 = b;
        double r3567387 = r3567385 / r3567386;
        double r3567388 = -0.5;
        double r3567389 = r3567387 * r3567388;
        return r3567389;
}

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

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

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

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

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

Reproduce

herbie shell --seed 2019172 
(FPCore (a b c)
  :name "Cubic critical, 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) (* (* 3.0 a) c)))) (* 3.0 a)))