Average Error: 62.0 → 0
Time: 7.0s
Precision: 64
\[x = 10864 \land y = 18817\]
\[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
\[\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)}\]
9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)
\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)}
double f(double x, double y) {
        double r53611 = 9.0;
        double r53612 = x;
        double r53613 = 4.0;
        double r53614 = pow(r53612, r53613);
        double r53615 = r53611 * r53614;
        double r53616 = y;
        double r53617 = r53616 * r53616;
        double r53618 = 2.0;
        double r53619 = r53617 - r53618;
        double r53620 = r53617 * r53619;
        double r53621 = r53615 - r53620;
        return r53621;
}

double f(double x, double y) {
        double r53622 = y;
        double r53623 = -r53622;
        double r53624 = 2.0;
        double r53625 = fma(r53623, r53622, r53624);
        double r53626 = r53625 * r53622;
        double r53627 = 9.0;
        double r53628 = x;
        double r53629 = 4.0;
        double r53630 = pow(r53628, r53629);
        double r53631 = r53627 * r53630;
        double r53632 = fma(r53626, r53622, r53631);
        double r53633 = sqrt(r53632);
        double r53634 = r53633 * r53633;
        return r53634;
}

Error

Derivation

  1. Initial program 62.0

    \[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt62.0

    \[\leadsto \color{blue}{\sqrt{9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)} \cdot \sqrt{9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)}}\]
  4. Simplified62.0

    \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)}} \cdot \sqrt{9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)}\]
  5. Simplified0

    \[\leadsto \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)} \cdot \color{blue}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)}}\]
  6. Final simplification0

    \[\leadsto \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-y, y, 2\right) \cdot y, y, 9 \cdot {x}^{4}\right)}\]

Reproduce

herbie shell --seed 2020042 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :precision binary64
  :pre (and (== x 10864) (== y 18817))
  (- (* 9 (pow x 4)) (* (* y y) (- (* y y) 2))))