Average Error: 0.0 → 0.1
Time: 2.1s
Precision: 64
\[x \cdot e^{y \cdot y}\]
\[\left(x \cdot {\left(e^{y}\right)}^{\left(\frac{y}{2}\right)}\right) \cdot \sqrt{e^{y \cdot y}}\]
x \cdot e^{y \cdot y}
\left(x \cdot {\left(e^{y}\right)}^{\left(\frac{y}{2}\right)}\right) \cdot \sqrt{e^{y \cdot y}}
double f(double x, double y) {
        double r886555 = x;
        double r886556 = y;
        double r886557 = r886556 * r886556;
        double r886558 = exp(r886557);
        double r886559 = r886555 * r886558;
        return r886559;
}

double f(double x, double y) {
        double r886560 = x;
        double r886561 = y;
        double r886562 = exp(r886561);
        double r886563 = 2.0;
        double r886564 = r886561 / r886563;
        double r886565 = pow(r886562, r886564);
        double r886566 = r886560 * r886565;
        double r886567 = r886561 * r886561;
        double r886568 = exp(r886567);
        double r886569 = sqrt(r886568);
        double r886570 = r886566 * r886569;
        return r886570;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.1
\[x \cdot {\left(e^{y}\right)}^{y}\]

Derivation

  1. Initial program 0.0

    \[x \cdot e^{y \cdot y}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.1

    \[\leadsto x \cdot \color{blue}{\left(\sqrt{e^{y \cdot y}} \cdot \sqrt{e^{y \cdot y}}\right)}\]
  4. Applied associate-*r*0.1

    \[\leadsto \color{blue}{\left(x \cdot \sqrt{e^{y \cdot y}}\right) \cdot \sqrt{e^{y \cdot y}}}\]
  5. Using strategy rm
  6. Applied add-log-exp0.1

    \[\leadsto \left(x \cdot \sqrt{e^{\color{blue}{\log \left(e^{y}\right)} \cdot y}}\right) \cdot \sqrt{e^{y \cdot y}}\]
  7. Applied exp-to-pow0.1

    \[\leadsto \left(x \cdot \sqrt{\color{blue}{{\left(e^{y}\right)}^{y}}}\right) \cdot \sqrt{e^{y \cdot y}}\]
  8. Applied sqrt-pow10.1

    \[\leadsto \left(x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\frac{y}{2}\right)}}\right) \cdot \sqrt{e^{y \cdot y}}\]
  9. Final simplification0.1

    \[\leadsto \left(x \cdot {\left(e^{y}\right)}^{\left(\frac{y}{2}\right)}\right) \cdot \sqrt{e^{y \cdot y}}\]

Reproduce

herbie shell --seed 2020024 +o rules:numerics
(FPCore (x y)
  :name "Data.Number.Erf:$dmerfcx from erf-2.0.0.0"
  :precision binary64

  :herbie-target
  (* x (pow (exp y) y))

  (* x (exp (* y y))))