Average Error: 52.4 → 0.2
Time: 6.3s
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{\frac{a \cdot c}{1}}{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{\frac{a \cdot c}{1}}{a}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}
double f(double a, double b, double c) {
        double r110195 = b;
        double r110196 = -r110195;
        double r110197 = r110195 * r110195;
        double r110198 = 3.0;
        double r110199 = a;
        double r110200 = r110198 * r110199;
        double r110201 = c;
        double r110202 = r110200 * r110201;
        double r110203 = r110197 - r110202;
        double r110204 = sqrt(r110203);
        double r110205 = r110196 + r110204;
        double r110206 = r110205 / r110200;
        return r110206;
}

double f(double a, double b, double c) {
        double r110207 = a;
        double r110208 = c;
        double r110209 = r110207 * r110208;
        double r110210 = 1.0;
        double r110211 = r110209 / r110210;
        double r110212 = r110211 / r110207;
        double r110213 = b;
        double r110214 = -r110213;
        double r110215 = r110213 * r110213;
        double r110216 = 3.0;
        double r110217 = r110216 * r110207;
        double r110218 = r110217 * r110208;
        double r110219 = r110215 - r110218;
        double r110220 = sqrt(r110219);
        double r110221 = r110214 - r110220;
        double r110222 = r110212 / r110221;
        return r110222;
}

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

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

    \[\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}{\left({b}^{2} - {b}^{2}\right) + 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 associate-/r*0.5

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

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

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

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

    \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{3}}{\color{blue}{a \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}\]
  12. Using strategy rm
  13. Applied associate-/r*0.3

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

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

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

Reproduce

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