Average Error: 52.7 → 0.4
Time: 7.7s
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(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\sqrt[3]{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\frac{3}{2}} \cdot {\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\frac{3}{2}}}}}}{2 \cdot a}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\sqrt[3]{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\frac{3}{2}} \cdot {\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\frac{3}{2}}}}}}{2 \cdot a}
double f(double a, double b, double c) {
        double r31161 = b;
        double r31162 = -r31161;
        double r31163 = r31161 * r31161;
        double r31164 = 4.0;
        double r31165 = a;
        double r31166 = r31164 * r31165;
        double r31167 = c;
        double r31168 = r31166 * r31167;
        double r31169 = r31163 - r31168;
        double r31170 = sqrt(r31169);
        double r31171 = r31162 + r31170;
        double r31172 = 2.0;
        double r31173 = r31172 * r31165;
        double r31174 = r31171 / r31173;
        return r31174;
}

double f(double a, double b, double c) {
        double r31175 = 0.0;
        double r31176 = 4.0;
        double r31177 = a;
        double r31178 = c;
        double r31179 = r31177 * r31178;
        double r31180 = r31176 * r31179;
        double r31181 = r31175 + r31180;
        double r31182 = b;
        double r31183 = -r31182;
        double r31184 = r31182 * r31182;
        double r31185 = r31176 * r31177;
        double r31186 = r31185 * r31178;
        double r31187 = r31184 - r31186;
        double r31188 = 1.5;
        double r31189 = pow(r31187, r31188);
        double r31190 = r31189 * r31189;
        double r31191 = cbrt(r31190);
        double r31192 = sqrt(r31191);
        double r31193 = r31183 - r31192;
        double r31194 = r31181 / r31193;
        double r31195 = 2.0;
        double r31196 = r31195 * r31177;
        double r31197 = r31194 / r31196;
        return r31197;
}

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(4 \cdot a\right) \cdot c}}{2 \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(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}{2 \cdot a}\]
  4. Simplified0.4

    \[\leadsto \frac{\frac{\color{blue}{0 + 4 \cdot \left(a \cdot c\right)}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\]
  5. Using strategy rm
  6. Applied add-cbrt-cube0.4

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

    \[\leadsto \frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\sqrt[3]{\color{blue}{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{3}}}}}}{2 \cdot a}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt0.4

    \[\leadsto \frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\sqrt[3]{{\color{blue}{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}^{3}}}}}{2 \cdot a}\]
  10. Applied unpow-prod-down0.4

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

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

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

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

Reproduce

herbie shell --seed 2020034 
(FPCore (a b c)
  :name "Quadratic roots, 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) (* (* 4 a) c)))) (* 2 a)))