Average Error: 28.8 → 0.3
Time: 15.4s
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{3 \cdot a}{3 \cdot a} \cdot c}{\left(-b\right) - \sqrt{\frac{{b}^{4} - \left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)}{b \cdot b + \left(3 \cdot a\right) \cdot c}}}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{\frac{3 \cdot a}{3 \cdot a} \cdot c}{\left(-b\right) - \sqrt{\frac{{b}^{4} - \left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)}{b \cdot b + \left(3 \cdot a\right) \cdot c}}}
double f(double a, double b, double c) {
        double r54712 = b;
        double r54713 = -r54712;
        double r54714 = r54712 * r54712;
        double r54715 = 3.0;
        double r54716 = a;
        double r54717 = r54715 * r54716;
        double r54718 = c;
        double r54719 = r54717 * r54718;
        double r54720 = r54714 - r54719;
        double r54721 = sqrt(r54720);
        double r54722 = r54713 + r54721;
        double r54723 = r54722 / r54717;
        return r54723;
}

double f(double a, double b, double c) {
        double r54724 = 3.0;
        double r54725 = a;
        double r54726 = r54724 * r54725;
        double r54727 = r54726 / r54726;
        double r54728 = c;
        double r54729 = r54727 * r54728;
        double r54730 = b;
        double r54731 = -r54730;
        double r54732 = 4.0;
        double r54733 = pow(r54730, r54732);
        double r54734 = r54726 * r54728;
        double r54735 = r54734 * r54734;
        double r54736 = r54733 - r54735;
        double r54737 = r54730 * r54730;
        double r54738 = r54737 + r54734;
        double r54739 = r54736 / r54738;
        double r54740 = sqrt(r54739);
        double r54741 = r54731 - r54740;
        double r54742 = r54729 / r54741;
        return r54742;
}

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

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

    \[\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}{0 + 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 *-un-lft-identity0.6

    \[\leadsto \frac{\frac{0 + 3 \cdot \left(a \cdot c\right)}{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}}{3 \cdot a}\]
  7. Applied *-un-lft-identity0.6

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(0 + 3 \cdot \left(a \cdot c\right)\right)}}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a}\]
  8. Applied times-frac0.6

    \[\leadsto \frac{\color{blue}{\frac{1}{1} \cdot \frac{0 + 3 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}\]
  9. Applied associate-/l*0.6

    \[\leadsto \color{blue}{\frac{\frac{1}{1}}{\frac{3 \cdot a}{\frac{0 + 3 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}}\]
  10. Simplified0.5

    \[\leadsto \frac{\frac{1}{1}}{\color{blue}{\frac{3 \cdot a}{\frac{\left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}}\]
  11. Using strategy rm
  12. Applied associate-/r/0.5

    \[\leadsto \frac{\frac{1}{1}}{\color{blue}{\frac{3 \cdot a}{\left(3 \cdot a\right) \cdot c} \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}\]
  13. Applied associate-/r*0.5

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

    \[\leadsto \frac{\color{blue}{\frac{3 \cdot a}{3 \cdot a} \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}\]
  15. Using strategy rm
  16. Applied flip--0.3

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

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

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

Reproduce

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