Average Error: 44.1 → 0.2
Time: 17.9s
Precision: 64
\[1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt a \lt 9007199254740992 \land 1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt b \lt 9007199254740992 \land 1.1102230246251565404236316680908203125 \cdot 10^{-16} \lt c \lt 9007199254740992\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{2 \cdot c}{\left(-b\right) - \sqrt{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{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}
double f(double a, double b, double c) {
        double r41341 = b;
        double r41342 = -r41341;
        double r41343 = r41341 * r41341;
        double r41344 = 4.0;
        double r41345 = a;
        double r41346 = r41344 * r41345;
        double r41347 = c;
        double r41348 = r41346 * r41347;
        double r41349 = r41343 - r41348;
        double r41350 = sqrt(r41349);
        double r41351 = r41342 + r41350;
        double r41352 = 2.0;
        double r41353 = r41352 * r41345;
        double r41354 = r41351 / r41353;
        return r41354;
}

double f(double a, double b, double c) {
        double r41355 = 2.0;
        double r41356 = c;
        double r41357 = r41355 * r41356;
        double r41358 = b;
        double r41359 = -r41358;
        double r41360 = r41358 * r41358;
        double r41361 = 4.0;
        double r41362 = a;
        double r41363 = r41361 * r41362;
        double r41364 = r41363 * r41356;
        double r41365 = r41360 - r41364;
        double r41366 = sqrt(r41365);
        double r41367 = r41359 - r41366;
        double r41368 = r41357 / r41367;
        return r41368;
}

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 44.1

    \[\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-+44.1

    \[\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 + \left(4 \cdot a\right) \cdot c}}{\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.4

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

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(0 + \left(4 \cdot a\right) \cdot c\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.4

    \[\leadsto \frac{\color{blue}{\frac{1}{1} \cdot \frac{0 + \left(4 \cdot a\right) \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}{2 \cdot a}\]
  9. Applied associate-/l*0.5

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

    \[\leadsto \frac{\frac{1}{1}}{\color{blue}{\frac{2 \cdot a}{\frac{\left(a \cdot c\right) \cdot 4}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}}\]
  11. Using strategy rm
  12. Applied associate-/r/0.5

    \[\leadsto \frac{\frac{1}{1}}{\color{blue}{\frac{2 \cdot a}{\left(a \cdot c\right) \cdot 4} \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}\]
  13. Applied associate-/r*0.4

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

    \[\leadsto \frac{\color{blue}{\frac{1}{\frac{2 \cdot a}{\left(a \cdot c\right) \cdot 4}}}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\]
  15. Taylor expanded around 0 0.2

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

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

Reproduce

herbie shell --seed 2019208 
(FPCore (a b c)
  :name "Quadratic roots, medium range"
  :precision binary64
  :pre (and (< 1.11022e-16 a 9.0072e15) (< 1.11022e-16 b 9.0072e15) (< 1.11022e-16 c 9.0072e15))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))