Average Error: 28.6 → 0.3
Time: 20.5s
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{c}{\left(-b\right) - \sqrt{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{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}
double f(double a, double b, double c) {
        double r100374 = b;
        double r100375 = -r100374;
        double r100376 = r100374 * r100374;
        double r100377 = 3.0;
        double r100378 = a;
        double r100379 = r100377 * r100378;
        double r100380 = c;
        double r100381 = r100379 * r100380;
        double r100382 = r100376 - r100381;
        double r100383 = sqrt(r100382);
        double r100384 = r100375 + r100383;
        double r100385 = r100384 / r100379;
        return r100385;
}

double f(double a, double b, double c) {
        double r100386 = c;
        double r100387 = b;
        double r100388 = -r100387;
        double r100389 = r100387 * r100387;
        double r100390 = 3.0;
        double r100391 = a;
        double r100392 = r100390 * r100391;
        double r100393 = r100392 * r100386;
        double r100394 = r100389 - r100393;
        double r100395 = sqrt(r100394);
        double r100396 = r100388 - r100395;
        double r100397 = r100386 / r100396;
        return r100397;
}

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

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

    \[\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 *-un-lft-identity0.5

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

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

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

    \[\leadsto \frac{\frac{1}{1}}{\frac{\color{blue}{\frac{3 \cdot a}{3 \cdot a}}}{\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}\]
  16. Using strategy rm
  17. Applied *-un-lft-identity0.4

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

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

    \[\leadsto \frac{\frac{1}{1}}{\frac{\frac{3 \cdot a}{3 \cdot a}}{\color{blue}{\frac{1}{1} \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}}\]
  20. Applied add-sqr-sqrt0.4

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

    \[\leadsto \frac{\frac{1}{1}}{\color{blue}{\frac{\sqrt{\frac{3 \cdot a}{3 \cdot a}}}{\frac{1}{1}} \cdot \frac{\sqrt{\frac{3 \cdot a}{3 \cdot a}}}{\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}}\]
  22. Applied add-cube-cbrt0.4

    \[\leadsto \frac{\frac{1}{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}}{\frac{\sqrt{\frac{3 \cdot a}{3 \cdot a}}}{\frac{1}{1}} \cdot \frac{\sqrt{\frac{3 \cdot a}{3 \cdot a}}}{\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}\]
  23. Applied add-cube-cbrt0.4

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

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

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

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

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

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

Reproduce

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