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 r84197 = b;
        double r84198 = -r84197;
        double r84199 = r84197 * r84197;
        double r84200 = 3.0;
        double r84201 = a;
        double r84202 = r84200 * r84201;
        double r84203 = c;
        double r84204 = r84202 * r84203;
        double r84205 = r84199 - r84204;
        double r84206 = sqrt(r84205);
        double r84207 = r84198 + r84206;
        double r84208 = r84207 / r84202;
        return r84208;
}

double f(double a, double b, double c) {
        double r84209 = a;
        double r84210 = c;
        double r84211 = r84209 * r84210;
        double r84212 = 1.0;
        double r84213 = r84211 / r84212;
        double r84214 = r84213 / r84209;
        double r84215 = b;
        double r84216 = -r84215;
        double r84217 = r84215 * r84215;
        double r84218 = 3.0;
        double r84219 = r84218 * r84209;
        double r84220 = r84219 * r84210;
        double r84221 = r84217 - r84220;
        double r84222 = sqrt(r84221);
        double r84223 = r84216 - r84222;
        double r84224 = r84214 / r84223;
        return r84224;
}

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