Average Error: 52.6 → 0.4
Time: 20.6s
Precision: 64
\[4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt a \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt b \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt c \lt 20282409603651670423947251286016\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{\frac{c \cdot \left(a \cdot 3\right) + \left(b \cdot b - b \cdot b\right)}{\left(-b\right) - \sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)}}}{a \cdot 3}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{\frac{c \cdot \left(a \cdot 3\right) + \left(b \cdot b - b \cdot b\right)}{\left(-b\right) - \sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)}}}{a \cdot 3}
double f(double a, double b, double c) {
        double r85383 = b;
        double r85384 = -r85383;
        double r85385 = r85383 * r85383;
        double r85386 = 3.0;
        double r85387 = a;
        double r85388 = r85386 * r85387;
        double r85389 = c;
        double r85390 = r85388 * r85389;
        double r85391 = r85385 - r85390;
        double r85392 = sqrt(r85391);
        double r85393 = r85384 + r85392;
        double r85394 = r85393 / r85388;
        return r85394;
}

double f(double a, double b, double c) {
        double r85395 = c;
        double r85396 = a;
        double r85397 = 3.0;
        double r85398 = r85396 * r85397;
        double r85399 = r85395 * r85398;
        double r85400 = b;
        double r85401 = r85400 * r85400;
        double r85402 = r85401 - r85401;
        double r85403 = r85399 + r85402;
        double r85404 = -r85400;
        double r85405 = r85395 * r85396;
        double r85406 = r85397 * r85405;
        double r85407 = r85401 - r85406;
        double r85408 = sqrt(r85407);
        double r85409 = r85404 - r85408;
        double r85410 = r85403 / r85409;
        double r85411 = r85410 / r85398;
        return r85411;
}

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

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

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019179 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))