Average Error: 52.8 → 0.2
Time: 29.6s
Precision: 64
\[4.93038 \cdot 10^{-32} \lt a \lt 2.02824 \cdot 10^{31} \land 4.93038 \cdot 10^{-32} \lt b \lt 2.02824 \cdot 10^{31} \land 4.93038 \cdot 10^{-32} \lt c \lt 2.02824 \cdot 10^{31}\]
\[\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}^{2} - 3 \cdot \left(a \cdot c\right)}}\]
\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}^{2} - 3 \cdot \left(a \cdot c\right)}}
double f(double a, double b, double c) {
        double r68406 = b;
        double r68407 = -r68406;
        double r68408 = r68406 * r68406;
        double r68409 = 3.0;
        double r68410 = a;
        double r68411 = r68409 * r68410;
        double r68412 = c;
        double r68413 = r68411 * r68412;
        double r68414 = r68408 - r68413;
        double r68415 = sqrt(r68414);
        double r68416 = r68407 + r68415;
        double r68417 = r68416 / r68411;
        return r68417;
}

double f(double a, double b, double c) {
        double r68418 = 3.0;
        double r68419 = a;
        double r68420 = r68418 * r68419;
        double r68421 = c;
        double r68422 = r68420 * r68421;
        double r68423 = r68422 / r68420;
        double r68424 = b;
        double r68425 = -r68424;
        double r68426 = 2.0;
        double r68427 = pow(r68424, r68426);
        double r68428 = r68419 * r68421;
        double r68429 = r68418 * r68428;
        double r68430 = r68427 - r68429;
        double r68431 = sqrt(r68430);
        double r68432 = r68425 - r68431;
        double r68433 = r68423 / r68432;
        return r68433;
}

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

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

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

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

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\color{blue}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{{b}^{2} - 3 \cdot \left(a \cdot c\right)}\right)}}\]
  10. Using strategy rm
  11. Applied associate-/r*0.2

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

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

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

Reproduce

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