Average Error: 28.7 → 0.5
Time: 16.2s
Precision: 64
\[1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt a \lt 94906265.62425155937671661376953125 \land 1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt b \lt 94906265.62425155937671661376953125 \land 1.053671212772350866701172186984739043147 \cdot 10^{-8} \lt c \lt 94906265.62425155937671661376953125\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\frac{\left(4 \cdot c\right) \cdot a}{\left(-b\right) - \sqrt{\frac{\sqrt{{b}^{6}} + \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}} \cdot \frac{\sqrt{{b}^{6}} - \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}}}}}{2 \cdot a}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{\frac{\left(4 \cdot c\right) \cdot a}{\left(-b\right) - \sqrt{\frac{\sqrt{{b}^{6}} + \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}} \cdot \frac{\sqrt{{b}^{6}} - \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}}}}}{2 \cdot a}
double f(double a, double b, double c) {
        double r48420 = b;
        double r48421 = -r48420;
        double r48422 = r48420 * r48420;
        double r48423 = 4.0;
        double r48424 = a;
        double r48425 = r48423 * r48424;
        double r48426 = c;
        double r48427 = r48425 * r48426;
        double r48428 = r48422 - r48427;
        double r48429 = sqrt(r48428);
        double r48430 = r48421 + r48429;
        double r48431 = 2.0;
        double r48432 = r48431 * r48424;
        double r48433 = r48430 / r48432;
        return r48433;
}

double f(double a, double b, double c) {
        double r48434 = 4.0;
        double r48435 = c;
        double r48436 = r48434 * r48435;
        double r48437 = a;
        double r48438 = r48436 * r48437;
        double r48439 = b;
        double r48440 = -r48439;
        double r48441 = 6.0;
        double r48442 = pow(r48439, r48441);
        double r48443 = sqrt(r48442);
        double r48444 = r48434 * r48437;
        double r48445 = r48444 * r48435;
        double r48446 = 3.0;
        double r48447 = pow(r48445, r48446);
        double r48448 = sqrt(r48447);
        double r48449 = r48443 + r48448;
        double r48450 = 4.0;
        double r48451 = pow(r48439, r48450);
        double r48452 = r48439 * r48439;
        double r48453 = r48452 + r48445;
        double r48454 = r48445 * r48453;
        double r48455 = r48451 + r48454;
        double r48456 = sqrt(r48455);
        double r48457 = r48449 / r48456;
        double r48458 = r48443 - r48448;
        double r48459 = r48458 / r48456;
        double r48460 = r48457 * r48459;
        double r48461 = sqrt(r48460);
        double r48462 = r48440 - r48461;
        double r48463 = r48438 / r48462;
        double r48464 = 2.0;
        double r48465 = r48464 * r48437;
        double r48466 = r48463 / r48465;
        return r48466;
}

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 28.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-+28.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.5

    \[\leadsto \frac{\frac{\color{blue}{0 + a \cdot \left(4 \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 flip3--0.5

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

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

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

    \[\leadsto \frac{\frac{0 + a \cdot \left(4 \cdot c\right)}{\left(-b\right) - \sqrt{\frac{{b}^{6} - {\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}{\color{blue}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)} \cdot \sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}}}}}}{2 \cdot a}\]
  11. Applied add-sqr-sqrt0.5

    \[\leadsto \frac{\frac{0 + a \cdot \left(4 \cdot c\right)}{\left(-b\right) - \sqrt{\frac{{b}^{6} - \color{blue}{\sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}} \cdot \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)} \cdot \sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}}}}}{2 \cdot a}\]
  12. Applied add-sqr-sqrt0.5

    \[\leadsto \frac{\frac{0 + a \cdot \left(4 \cdot c\right)}{\left(-b\right) - \sqrt{\frac{\color{blue}{\sqrt{{b}^{6}} \cdot \sqrt{{b}^{6}}} - \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}} \cdot \sqrt{{\left(\left(4 \cdot a\right) \cdot c\right)}^{3}}}{\sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)} \cdot \sqrt{{b}^{4} + \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(b \cdot b + \left(4 \cdot a\right) \cdot c\right)}}}}}{2 \cdot a}\]
  13. Applied difference-of-squares0.5

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

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

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

Reproduce

herbie shell --seed 2019347 
(FPCore (a b c)
  :name "Quadratic roots, narrow range"
  :precision binary64
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))