Average Error: 43.9 → 0.2
Time: 20.3s
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{\frac{\left(3 \cdot a\right) \cdot c}{3 \cdot a}}{\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{\frac{\left(3 \cdot a\right) \cdot c}{3 \cdot a}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}
double f(double a, double b, double c) {
        double r79962 = b;
        double r79963 = -r79962;
        double r79964 = r79962 * r79962;
        double r79965 = 3.0;
        double r79966 = a;
        double r79967 = r79965 * r79966;
        double r79968 = c;
        double r79969 = r79967 * r79968;
        double r79970 = r79964 - r79969;
        double r79971 = sqrt(r79970);
        double r79972 = r79963 + r79971;
        double r79973 = r79972 / r79967;
        return r79973;
}

double f(double a, double b, double c) {
        double r79974 = 3.0;
        double r79975 = a;
        double r79976 = r79974 * r79975;
        double r79977 = c;
        double r79978 = r79976 * r79977;
        double r79979 = r79978 / r79976;
        double r79980 = b;
        double r79981 = -r79980;
        double r79982 = r79980 * r79980;
        double r79983 = r79982 - r79978;
        double r79984 = sqrt(r79983);
        double r79985 = r79981 - r79984;
        double r79986 = r79979 / r79985;
        return r79986;
}

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 43.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-+43.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.4

    \[\leadsto \frac{\frac{\color{blue}{0 + \left(3 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\]
  5. Using strategy rm
  6. Applied div-inv0.5

    \[\leadsto \color{blue}{\frac{0 + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}} \cdot \frac{1}{3 \cdot a}}\]
  7. Using strategy rm
  8. Applied pow10.5

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

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

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

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

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

Reproduce

herbie shell --seed 2019212 
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :precision binary64
  :pre (and (< 1.11022e-16 a 9.0072e15) (< 1.11022e-16 b 9.0072e15) (< 1.11022e-16 c 9.0072e15))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))