Average Error: 58.1 → 57.1
Time: 3.5s
Precision: 64
\[x = 77617 \land y = 33096\]
\[\left(\left(333.75 \cdot {y}^{6} + \left(x \cdot x\right) \cdot \left(\left(\left(\left(\left(\left(11 \cdot x\right) \cdot x\right) \cdot y\right) \cdot y - {y}^{6}\right) - 121 \cdot {y}^{4}\right) - 2\right)\right) + 5.5 \cdot {y}^{8}\right) + \frac{x}{2 \cdot y}\]
\[0.5 \cdot \frac{x}{y} - 2 \cdot {x}^{2}\]
\left(\left(333.75 \cdot {y}^{6} + \left(x \cdot x\right) \cdot \left(\left(\left(\left(\left(\left(11 \cdot x\right) \cdot x\right) \cdot y\right) \cdot y - {y}^{6}\right) - 121 \cdot {y}^{4}\right) - 2\right)\right) + 5.5 \cdot {y}^{8}\right) + \frac{x}{2 \cdot y}
0.5 \cdot \frac{x}{y} - 2 \cdot {x}^{2}
double f(double x, double y) {
        double r14897 = 333.75;
        double r14898 = y;
        double r14899 = 6.0;
        double r14900 = pow(r14898, r14899);
        double r14901 = r14897 * r14900;
        double r14902 = x;
        double r14903 = r14902 * r14902;
        double r14904 = 11.0;
        double r14905 = r14904 * r14902;
        double r14906 = r14905 * r14902;
        double r14907 = r14906 * r14898;
        double r14908 = r14907 * r14898;
        double r14909 = r14908 - r14900;
        double r14910 = 121.0;
        double r14911 = 4.0;
        double r14912 = pow(r14898, r14911);
        double r14913 = r14910 * r14912;
        double r14914 = r14909 - r14913;
        double r14915 = 2.0;
        double r14916 = r14914 - r14915;
        double r14917 = r14903 * r14916;
        double r14918 = r14901 + r14917;
        double r14919 = 5.5;
        double r14920 = 8.0;
        double r14921 = pow(r14898, r14920);
        double r14922 = r14919 * r14921;
        double r14923 = r14918 + r14922;
        double r14924 = r14915 * r14898;
        double r14925 = r14902 / r14924;
        double r14926 = r14923 + r14925;
        return r14926;
}

double f(double x, double y) {
        double r14927 = 0.5;
        double r14928 = x;
        double r14929 = y;
        double r14930 = r14928 / r14929;
        double r14931 = r14927 * r14930;
        double r14932 = 2.0;
        double r14933 = 2.0;
        double r14934 = pow(r14928, r14933);
        double r14935 = r14932 * r14934;
        double r14936 = r14931 - r14935;
        return r14936;
}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.1

    \[\left(\left(333.75 \cdot {y}^{6} + \left(x \cdot x\right) \cdot \left(\left(\left(\left(\left(\left(11 \cdot x\right) \cdot x\right) \cdot y\right) \cdot y - {y}^{6}\right) - 121 \cdot {y}^{4}\right) - 2\right)\right) + 5.5 \cdot {y}^{8}\right) + \frac{x}{2 \cdot y}\]
  2. Simplified58.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(\left(11 \cdot x\right) \cdot x\right) \cdot y\right) \cdot y - \left({y}^{6} + \mathsf{fma}\left({y}^{4}, 121, 2\right)\right)\right) \cdot x, 333.75 \cdot {y}^{6} + \mathsf{fma}\left({y}^{8}, 5.5, \frac{x}{2 \cdot y}\right)\right)}\]
  3. Taylor expanded around 0 57.1

    \[\leadsto \color{blue}{0.5 \cdot \frac{x}{y} - 2 \cdot {x}^{2}}\]
  4. Final simplification57.1

    \[\leadsto 0.5 \cdot \frac{x}{y} - 2 \cdot {x}^{2}\]

Reproduce

herbie shell --seed 2019354 +o rules:numerics
(FPCore (x y)
  :name "Rump's expression from Stadtherr's award speech"
  :precision binary64
  :pre (and (== x 77617) (== y 33096))
  (+ (+ (+ (* 333.75 (pow y 6)) (* (* x x) (- (- (- (* (* (* (* 11 x) x) y) y) (pow y 6)) (* 121 (pow y 4))) 2))) (* 5.5 (pow y 8))) (/ x (* 2 y))))