Average Error: 0.2 → 0.1
Time: 27.2s
Precision: 64
\[\left(\left(333.75 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(\left(\left(\left(11 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right) - \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) - 121 \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right) - 2\right)\right) + 5.5 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right)\right) + \frac{a}{2 \cdot b}\]
\[\left(a \cdot \left(\left(b \cdot b\right) \cdot \left(\sqrt{11 \cdot \left(a \cdot a\right)} \cdot \sqrt{11 \cdot \left(a \cdot a\right)} - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + \left(5.5 \cdot b\right) \cdot b\right) + \frac{a}{2 \cdot b}\right)\]
\left(\left(333.75 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(\left(\left(\left(11 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right) - \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) - 121 \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right) - 2\right)\right) + 5.5 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right)\right) + \frac{a}{2 \cdot b}
\left(a \cdot \left(\left(b \cdot b\right) \cdot \left(\sqrt{11 \cdot \left(a \cdot a\right)} \cdot \sqrt{11 \cdot \left(a \cdot a\right)} - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + \left(5.5 \cdot b\right) \cdot b\right) + \frac{a}{2 \cdot b}\right)
double f(double a, double b) {
        double r18945 = 333.75;
        double r18946 = b;
        double r18947 = r18946 * r18946;
        double r18948 = r18947 * r18947;
        double r18949 = r18948 * r18947;
        double r18950 = r18945 * r18949;
        double r18951 = a;
        double r18952 = r18951 * r18951;
        double r18953 = 11.0;
        double r18954 = r18953 * r18952;
        double r18955 = r18954 * r18947;
        double r18956 = r18955 - r18949;
        double r18957 = 121.0;
        double r18958 = r18957 * r18948;
        double r18959 = r18956 - r18958;
        double r18960 = 2.0;
        double r18961 = r18959 - r18960;
        double r18962 = r18952 * r18961;
        double r18963 = r18950 + r18962;
        double r18964 = 5.5;
        double r18965 = r18948 * r18948;
        double r18966 = r18964 * r18965;
        double r18967 = r18963 + r18966;
        double r18968 = r18960 * r18946;
        double r18969 = r18951 / r18968;
        double r18970 = r18967 + r18969;
        return r18970;
}

double f(double a, double b) {
        double r18971 = a;
        double r18972 = b;
        double r18973 = r18972 * r18972;
        double r18974 = 11.0;
        double r18975 = r18971 * r18971;
        double r18976 = r18974 * r18975;
        double r18977 = sqrt(r18976);
        double r18978 = r18977 * r18977;
        double r18979 = 121.0;
        double r18980 = r18973 + r18979;
        double r18981 = r18973 * r18980;
        double r18982 = r18978 - r18981;
        double r18983 = r18973 * r18982;
        double r18984 = 2.0;
        double r18985 = r18983 - r18984;
        double r18986 = r18971 * r18985;
        double r18987 = r18986 * r18971;
        double r18988 = 6.0;
        double r18989 = pow(r18972, r18988);
        double r18990 = 333.75;
        double r18991 = 5.5;
        double r18992 = r18991 * r18972;
        double r18993 = r18992 * r18972;
        double r18994 = r18990 + r18993;
        double r18995 = r18989 * r18994;
        double r18996 = r18984 * r18972;
        double r18997 = r18971 / r18996;
        double r18998 = r18995 + r18997;
        double r18999 = r18987 + r18998;
        return r18999;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(\left(333.75 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) + \left(a \cdot a\right) \cdot \left(\left(\left(\left(11 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right) - \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot b\right)\right) - 121 \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right) - 2\right)\right) + 5.5 \cdot \left(\left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \left(b \cdot b\right)\right)\right)\right) + \frac{a}{2 \cdot b}\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\left(a \cdot \left(\left(b \cdot b\right) \cdot \left(11 \cdot \left(a \cdot a\right) - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + 5.5 \cdot \left(b \cdot b\right)\right) + \frac{a}{2 \cdot b}\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.1

    \[\leadsto \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(11 \cdot \left(a \cdot a\right) - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + \color{blue}{\left(5.5 \cdot b\right) \cdot b}\right) + \frac{a}{2 \cdot b}\right)\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt0.1

    \[\leadsto \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(\color{blue}{\sqrt{11 \cdot \left(a \cdot a\right)} \cdot \sqrt{11 \cdot \left(a \cdot a\right)}} - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + \left(5.5 \cdot b\right) \cdot b\right) + \frac{a}{2 \cdot b}\right)\]
  7. Final simplification0.1

    \[\leadsto \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(\sqrt{11 \cdot \left(a \cdot a\right)} \cdot \sqrt{11 \cdot \left(a \cdot a\right)} - \left(b \cdot b\right) \cdot \left(b \cdot b + 121\right)\right) - 2\right)\right) \cdot a + \left({b}^{6} \cdot \left(333.75 + \left(5.5 \cdot b\right) \cdot b\right) + \frac{a}{2 \cdot b}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (a b)
  :name "Rump's example, from C program"
  :precision binary64
  (+ (+ (+ (* 333.75 (* (* (* b b) (* b b)) (* b b))) (* (* a a) (- (- (- (* (* 11 (* a a)) (* b b)) (* (* (* b b) (* b b)) (* b b))) (* 121 (* (* b b) (* b b)))) 2))) (* 5.5 (* (* (* b b) (* b b)) (* (* b b) (* b b))))) (/ a (* 2 b))))