Average Error: 52.4 → 0.1
Time: 14.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(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{4 \cdot c}{\left(-\left(b + \left|\frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}}\right|\right)\right) \cdot 2}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{4 \cdot c}{\left(-\left(b + \left|\frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}}\right|\right)\right) \cdot 2}
double f(double a, double b, double c) {
        double r33231 = b;
        double r33232 = -r33231;
        double r33233 = r33231 * r33231;
        double r33234 = 4.0;
        double r33235 = a;
        double r33236 = r33234 * r33235;
        double r33237 = c;
        double r33238 = r33236 * r33237;
        double r33239 = r33233 - r33238;
        double r33240 = sqrt(r33239);
        double r33241 = r33232 + r33240;
        double r33242 = 2.0;
        double r33243 = r33242 * r33235;
        double r33244 = r33241 / r33243;
        return r33244;
}

double f(double a, double b, double c) {
        double r33245 = 4.0;
        double r33246 = c;
        double r33247 = r33245 * r33246;
        double r33248 = b;
        double r33249 = 4.0;
        double r33250 = pow(r33248, r33249);
        double r33251 = a;
        double r33252 = r33251 * r33246;
        double r33253 = r33245 * r33252;
        double r33254 = r33253 * r33253;
        double r33255 = r33250 - r33254;
        double r33256 = sqrt(r33255);
        double r33257 = r33248 * r33248;
        double r33258 = r33245 * r33251;
        double r33259 = r33258 * r33246;
        double r33260 = r33257 + r33259;
        double r33261 = sqrt(r33260);
        double r33262 = r33256 / r33261;
        double r33263 = fabs(r33262);
        double r33264 = r33248 + r33263;
        double r33265 = -r33264;
        double r33266 = 2.0;
        double r33267 = r33265 * r33266;
        double r33268 = r33247 / r33267;
        return r33268;
}

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(4 \cdot a\right) \cdot c}}{2 \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(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 flip--0.4

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

    \[\leadsto \frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\frac{\color{blue}{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{b \cdot b + \left(4 \cdot a\right) \cdot c}}}}{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{\frac{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}{\color{blue}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}}}}}}{2 \cdot a}\]
  10. Applied add-sqr-sqrt0.4

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

    \[\leadsto \frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{\color{blue}{\frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}} \cdot \frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}}}}}}{2 \cdot a}\]
  12. Using strategy rm
  13. Applied *-un-lft-identity0.4

    \[\leadsto \frac{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{\frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}} \cdot \frac{\sqrt{{b}^{4} - \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)}}{\sqrt{b \cdot b + \left(4 \cdot a\right) \cdot c}}}\right)}}}{2 \cdot a}\]
  14. Applied *-un-lft-identity0.4

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019308 
(FPCore (a b c)
  :name "Quadratic roots, wide range"
  :precision binary64
  :pre (and (< 4.93038e-32 a 2.02824e31) (< 4.93038e-32 b 2.02824e31) (< 4.93038e-32 c 2.02824e31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))