Average Error: 44.1 → 0.2
Time: 17.5s
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(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}}
double f(double a, double b, double c) {
        double r95218 = b;
        double r95219 = -r95218;
        double r95220 = r95218 * r95218;
        double r95221 = 3.0;
        double r95222 = a;
        double r95223 = r95221 * r95222;
        double r95224 = c;
        double r95225 = r95223 * r95224;
        double r95226 = r95220 - r95225;
        double r95227 = sqrt(r95226);
        double r95228 = r95219 + r95227;
        double r95229 = r95228 / r95223;
        return r95229;
}

double f(double a, double b, double c) {
        double r95230 = c;
        double r95231 = b;
        double r95232 = -r95231;
        double r95233 = r95231 * r95231;
        double r95234 = 3.0;
        double r95235 = r95234 * r95230;
        double r95236 = a;
        double r95237 = r95235 * r95236;
        double r95238 = r95233 - r95237;
        double r95239 = sqrt(r95238);
        double r95240 = r95232 - r95239;
        double r95241 = r95230 / r95240;
        return r95241;
}

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{3} \cdot \color{blue}{\frac{\frac{3 \cdot \left(a \cdot c\right)}{a}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}}}\]
  12. Using strategy rm
  13. Applied *-un-lft-identity0.6

    \[\leadsto \frac{1}{3} \cdot \frac{\frac{3 \cdot \left(a \cdot c\right)}{a}}{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}\right)}}\]
  14. Applied div-inv0.6

    \[\leadsto \frac{1}{3} \cdot \frac{\color{blue}{\left(3 \cdot \left(a \cdot c\right)\right) \cdot \frac{1}{a}}}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}\right)}\]
  15. Applied times-frac0.6

    \[\leadsto \frac{1}{3} \cdot \color{blue}{\left(\frac{3 \cdot \left(a \cdot c\right)}{1} \cdot \frac{\frac{1}{a}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}}\right)}\]
  16. Applied associate-*r*0.6

    \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \frac{3 \cdot \left(a \cdot c\right)}{1}\right) \cdot \frac{\frac{1}{a}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot c\right) \cdot a}}}\]
  17. Simplified0.5

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

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

Reproduce

herbie shell --seed 2019291 
(FPCore (a b c)
  :name "Cubic critical, 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) (* (* 3 a) c)))) (* 3 a)))