Average Error: 52.7 → 0.1
Time: 19.1s
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{1 \cdot c}{\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{1 \cdot c}{\left(-b\right) - \sqrt{{b}^{2} - 3 \cdot \left(a \cdot c\right)}}
double f(double a, double b, double c) {
        double r74395 = b;
        double r74396 = -r74395;
        double r74397 = r74395 * r74395;
        double r74398 = 3.0;
        double r74399 = a;
        double r74400 = r74398 * r74399;
        double r74401 = c;
        double r74402 = r74400 * r74401;
        double r74403 = r74397 - r74402;
        double r74404 = sqrt(r74403);
        double r74405 = r74396 + r74404;
        double r74406 = r74405 / r74400;
        return r74406;
}

double f(double a, double b, double c) {
        double r74407 = 1.0;
        double r74408 = c;
        double r74409 = r74407 * r74408;
        double r74410 = b;
        double r74411 = -r74410;
        double r74412 = 2.0;
        double r74413 = pow(r74410, r74412);
        double r74414 = 3.0;
        double r74415 = a;
        double r74416 = r74415 * r74408;
        double r74417 = r74414 * r74416;
        double r74418 = r74413 - r74417;
        double r74419 = sqrt(r74418);
        double r74420 = r74411 - r74419;
        double r74421 = r74409 / r74420;
        return r74421;
}

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{\frac{3 \cdot a}{\left(3 \cdot a\right) \cdot c}}}{\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. Taylor expanded around 0 0.1

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

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

Reproduce

herbie shell --seed 2019325 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (< 4.93038e-32 a 2.02824e+31) (< 4.93038e-32 b 2.02824e+31) (< 4.93038e-32 c 2.02824e+31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))