Average Error: 28.5 → 0.4
Time: 9.9s
Precision: 64
\[1.05367121277235087 \cdot 10^{-8} \lt a \lt 94906265.6242515594 \land 1.05367121277235087 \cdot 10^{-8} \lt b \lt 94906265.6242515594 \land 1.05367121277235087 \cdot 10^{-8} \lt c \lt 94906265.6242515594\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right)}{a}}{\left(-b\right) - \sqrt{\sqrt{{b}^{4} - \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(\left(4 \cdot a\right) \cdot c\right)} \cdot \frac{\sqrt{{b}^{4} - \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}}}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right)}{a}}{\left(-b\right) - \sqrt{\sqrt{{b}^{4} - \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(\left(4 \cdot a\right) \cdot c\right)} \cdot \frac{\sqrt{{b}^{4} - \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}}}
double f(double a, double b, double c) {
        double r34616 = b;
        double r34617 = -r34616;
        double r34618 = r34616 * r34616;
        double r34619 = 4.0;
        double r34620 = a;
        double r34621 = r34619 * r34620;
        double r34622 = c;
        double r34623 = r34621 * r34622;
        double r34624 = r34618 - r34623;
        double r34625 = sqrt(r34624);
        double r34626 = r34617 + r34625;
        double r34627 = 2.0;
        double r34628 = r34627 * r34620;
        double r34629 = r34626 / r34628;
        return r34629;
}

double f(double a, double b, double c) {
        double r34630 = 1.0;
        double r34631 = 2.0;
        double r34632 = r34630 / r34631;
        double r34633 = 4.0;
        double r34634 = a;
        double r34635 = c;
        double r34636 = r34634 * r34635;
        double r34637 = r34633 * r34636;
        double r34638 = r34637 / r34634;
        double r34639 = b;
        double r34640 = -r34639;
        double r34641 = 4.0;
        double r34642 = pow(r34639, r34641);
        double r34643 = r34633 * r34634;
        double r34644 = r34643 * r34635;
        double r34645 = r34644 * r34644;
        double r34646 = r34642 - r34645;
        double r34647 = sqrt(r34646);
        double r34648 = r34639 * r34639;
        double r34649 = r34648 + r34644;
        double r34650 = r34647 / r34649;
        double r34651 = r34647 * r34650;
        double r34652 = sqrt(r34651);
        double r34653 = r34640 - r34652;
        double r34654 = r34638 / r34653;
        double r34655 = r34632 * r34654;
        return r34655;
}

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

    \[\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.5

    \[\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}{b \cdot \left(b - b\right) + 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 *-un-lft-identity0.5

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

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

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

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

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

    \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\frac{4 \cdot \left(a \cdot c\right) - 0}{a}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\]
  12. Using strategy rm
  13. Applied flip--0.4

    \[\leadsto \frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right) - 0}{a}}{\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}}}}\]
  14. Simplified0.4

    \[\leadsto \frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right) - 0}{a}}{\left(-b\right) - \sqrt{\frac{\color{blue}{{b}^{4} - \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}}}\]
  15. Using strategy rm
  16. Applied *-un-lft-identity0.4

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

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

    \[\leadsto \frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right) - 0}{a}}{\left(-b\right) - \sqrt{\color{blue}{\frac{\sqrt{{b}^{4} - \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(\left(4 \cdot a\right) \cdot c\right)}}{1} \cdot \frac{\sqrt{{b}^{4} - \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}}}}\]
  19. Simplified0.4

    \[\leadsto \frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right) - 0}{a}}{\left(-b\right) - \sqrt{\color{blue}{\sqrt{{b}^{4} - \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(\left(4 \cdot a\right) \cdot c\right)}} \cdot \frac{\sqrt{{b}^{4} - \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}}}\]
  20. Final simplification0.4

    \[\leadsto \frac{1}{2} \cdot \frac{\frac{4 \cdot \left(a \cdot c\right)}{a}}{\left(-b\right) - \sqrt{\sqrt{{b}^{4} - \left(\left(4 \cdot a\right) \cdot c\right) \cdot \left(\left(4 \cdot a\right) \cdot c\right)} \cdot \frac{\sqrt{{b}^{4} - \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}}}\]

Reproduce

herbie shell --seed 2020047 
(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)))