Average Error: 28.9 → 0.5
Time: 6.8s
Precision: 64
\[1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt a \lt 94906265.62425155937671661376953125 \land 1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt b \lt 94906265.62425155937671661376953125 \land 1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt c \lt 94906265.62425155937671661376953125\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(\sqrt[3]{\left(3 \cdot a\right) \cdot c} \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}\right) \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(\sqrt[3]{\left(3 \cdot a\right) \cdot c} \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}\right) \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}
double f(double a, double b, double c) {
        double r130099 = b;
        double r130100 = -r130099;
        double r130101 = r130099 * r130099;
        double r130102 = 3.0;
        double r130103 = a;
        double r130104 = r130102 * r130103;
        double r130105 = c;
        double r130106 = r130104 * r130105;
        double r130107 = r130101 - r130106;
        double r130108 = sqrt(r130107);
        double r130109 = r130100 + r130108;
        double r130110 = r130109 / r130104;
        return r130110;
}

double f(double a, double b, double c) {
        double r130111 = b;
        double r130112 = 2.0;
        double r130113 = pow(r130111, r130112);
        double r130114 = r130113 - r130113;
        double r130115 = 3.0;
        double r130116 = a;
        double r130117 = r130115 * r130116;
        double r130118 = c;
        double r130119 = r130117 * r130118;
        double r130120 = r130114 + r130119;
        double r130121 = -r130111;
        double r130122 = r130111 * r130111;
        double r130123 = cbrt(r130119);
        double r130124 = r130123 * r130123;
        double r130125 = r130124 * r130123;
        double r130126 = r130122 - r130125;
        double r130127 = sqrt(r130126);
        double r130128 = r130121 - r130127;
        double r130129 = r130120 / r130128;
        double r130130 = r130129 / r130117;
        return r130130;
}

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 28.9

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Using strategy rm
  3. Applied flip-+28.9

    \[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}\]
  4. Simplified0.6

    \[\leadsto \frac{\frac{\color{blue}{\left({b}^{2} - {b}^{2}\right) + 3 \cdot \left(a \cdot c\right)}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\]
  5. Using strategy rm
  6. Applied associate-*r*0.4

    \[\leadsto \frac{\frac{\left({b}^{2} - {b}^{2}\right) + \color{blue}{\left(3 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\]
  7. Using strategy rm
  8. Applied add-cube-cbrt0.5

    \[\leadsto \frac{\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{\left(\sqrt[3]{\left(3 \cdot a\right) \cdot c} \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}\right) \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}}}}}{3 \cdot a}\]
  9. Final simplification0.5

    \[\leadsto \frac{\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(\sqrt[3]{\left(3 \cdot a\right) \cdot c} \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}\right) \cdot \sqrt[3]{\left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}\]

Reproduce

herbie shell --seed 2019353 
(FPCore (a b c)
  :name "Cubic critical, narrow range"
  :precision binary64
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))