Average Error: 53.0 → 5.9
Time: 54.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(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 r4262801 = b;
        double r4262802 = -r4262801;
        double r4262803 = r4262801 * r4262801;
        double r4262804 = 3.0;
        double r4262805 = a;
        double r4262806 = r4262804 * r4262805;
        double r4262807 = c;
        double r4262808 = r4262806 * r4262807;
        double r4262809 = r4262803 - r4262808;
        double r4262810 = sqrt(r4262809);
        double r4262811 = r4262802 + r4262810;
        double r4262812 = r4262811 / r4262806;
        return r4262812;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r4262813 = c;
        double r4262814 = b;
        double r4262815 = r4262813 / r4262814;
        double r4262816 = -0.5;
        double r4262817 = r4262815 * r4262816;
        return r4262817;
}

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 53.0

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

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

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

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

Reproduce

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