Average Error: 43.8 → 0.4
Time: 5.6s
Precision: 64
\[1.11022 \cdot 10^{-16} \lt a \lt 9.0072 \cdot 10^{15} \land 1.11022 \cdot 10^{-16} \lt b \lt 9.0072 \cdot 10^{15} \land 1.11022 \cdot 10^{-16} \lt c \lt 9.0072 \cdot 10^{15}\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{\frac{\left(3 \cdot a\right) \cdot \left(-\left(3 \cdot a\right) \cdot c\right)}{-\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{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{\frac{\left(3 \cdot a\right) \cdot \left(-\left(3 \cdot a\right) \cdot c\right)}{-\left(3 \cdot a\right) \cdot c}}
double f(double a, double b, double c) {
        double r155200 = b;
        double r155201 = -r155200;
        double r155202 = r155200 * r155200;
        double r155203 = 3.0;
        double r155204 = a;
        double r155205 = r155203 * r155204;
        double r155206 = c;
        double r155207 = r155205 * r155206;
        double r155208 = r155202 - r155207;
        double r155209 = sqrt(r155208);
        double r155210 = r155201 + r155209;
        double r155211 = r155210 / r155205;
        return r155211;
}

double f(double a, double b, double c) {
        double r155212 = b;
        double r155213 = 2.0;
        double r155214 = pow(r155212, r155213);
        double r155215 = r155214 - r155214;
        double r155216 = 3.0;
        double r155217 = a;
        double r155218 = r155216 * r155217;
        double r155219 = c;
        double r155220 = r155218 * r155219;
        double r155221 = r155215 + r155220;
        double r155222 = -r155212;
        double r155223 = r155212 * r155212;
        double r155224 = r155223 - r155220;
        double r155225 = sqrt(r155224);
        double r155226 = r155222 - r155225;
        double r155227 = r155221 / r155226;
        double r155228 = -r155220;
        double r155229 = r155218 * r155228;
        double r155230 = r155229 / r155228;
        double r155231 = r155227 / r155230;
        return r155231;
}

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

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

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

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

    \[\leadsto \frac{\frac{\left({b}^{2} - {b}^{2}\right) \cdot \left({b}^{2} - {b}^{2}\right) - \left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)}{\color{blue}{\left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(-\left(3 \cdot a\right) \cdot c\right)}}}{3 \cdot a}\]
  11. Using strategy rm
  12. Applied difference-of-squares0.5

    \[\leadsto \frac{\frac{\color{blue}{\left(\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c\right) \cdot \left(\left({b}^{2} - {b}^{2}\right) - \left(3 \cdot a\right) \cdot c\right)}}{\left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(-\left(3 \cdot a\right) \cdot c\right)}}{3 \cdot a}\]
  13. Applied times-frac0.4

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

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

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

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

Reproduce

herbie shell --seed 2020064 
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :precision binary64
  :pre (and (< 1.11022e-16 a 9.0072e+15) (< 1.11022e-16 b 9.0072e+15) (< 1.11022e-16 c 9.0072e+15))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))