Average Error: 52.3 → 6.4
Time: 16.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(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 r3462996 = b;
        double r3462997 = -r3462996;
        double r3462998 = r3462996 * r3462996;
        double r3462999 = 3.0;
        double r3463000 = a;
        double r3463001 = r3462999 * r3463000;
        double r3463002 = c;
        double r3463003 = r3463001 * r3463002;
        double r3463004 = r3462998 - r3463003;
        double r3463005 = sqrt(r3463004);
        double r3463006 = r3462997 + r3463005;
        double r3463007 = r3463006 / r3463001;
        return r3463007;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r3463008 = c;
        double r3463009 = b;
        double r3463010 = r3463008 / r3463009;
        double r3463011 = -0.5;
        double r3463012 = r3463010 * r3463011;
        return r3463012;
}

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(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Simplified52.3

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

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

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

Reproduce

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