Average Error: 52.5 → 6.3
Time: 32.6s
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(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{c}{b} \cdot \frac{-1}{2}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{c}{b} \cdot \frac{-1}{2}
double f(double a, double b, double c) {
        double r2791139 = b;
        double r2791140 = -r2791139;
        double r2791141 = r2791139 * r2791139;
        double r2791142 = 3.0;
        double r2791143 = a;
        double r2791144 = r2791142 * r2791143;
        double r2791145 = c;
        double r2791146 = r2791144 * r2791145;
        double r2791147 = r2791141 - r2791146;
        double r2791148 = sqrt(r2791147);
        double r2791149 = r2791140 + r2791148;
        double r2791150 = r2791149 / r2791144;
        return r2791150;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r2791151 = c;
        double r2791152 = b;
        double r2791153 = r2791151 / r2791152;
        double r2791154 = -0.5;
        double r2791155 = r2791153 * r2791154;
        return r2791155;
}

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

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

    \[\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}{\frac{-1}{2} \cdot \frac{c}{b}}\]
  4. Final simplification6.3

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

Reproduce

herbie shell --seed 2019152 
(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 a) c)))) (* 3 a)))