Average Error: 44.1 → 11.8
Time: 35.8s
Precision: 64
\[1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt a \lt 9007199254740992 \land 1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt b \lt 9007199254740992 \land 1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt c \lt 9007199254740992\]
\[\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 r4737147 = b;
        double r4737148 = -r4737147;
        double r4737149 = r4737147 * r4737147;
        double r4737150 = 3.0;
        double r4737151 = a;
        double r4737152 = r4737150 * r4737151;
        double r4737153 = c;
        double r4737154 = r4737152 * r4737153;
        double r4737155 = r4737149 - r4737154;
        double r4737156 = sqrt(r4737155);
        double r4737157 = r4737148 + r4737156;
        double r4737158 = r4737157 / r4737152;
        return r4737158;
}

double f(double __attribute__((unused)) a, double b, double c) {
        double r4737159 = c;
        double r4737160 = b;
        double r4737161 = r4737159 / r4737160;
        double r4737162 = -0.5;
        double r4737163 = r4737161 * r4737162;
        return r4737163;
}

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 44.1

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

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

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

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

Reproduce

herbie shell --seed 2019169 
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))