Average Error: 0.0 → 0.0
Time: 4.1s
Precision: 64
\[x \cdot e^{y \cdot y}\]
\[x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{y \cdot y}\right)\right)\]
x \cdot e^{y \cdot y}
x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{y \cdot y}\right)\right)
double f(double x, double y) {
        double r845200 = x;
        double r845201 = y;
        double r845202 = r845201 * r845201;
        double r845203 = exp(r845202);
        double r845204 = r845200 * r845203;
        return r845204;
}

double f(double x, double y) {
        double r845205 = x;
        double r845206 = y;
        double r845207 = r845206 * r845206;
        double r845208 = exp(r845207);
        double r845209 = log1p(r845208);
        double r845210 = expm1(r845209);
        double r845211 = r845205 * r845210;
        return r845211;
}

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.0
\[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 expm1-log1p-u0.0

    \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{y \cdot y}\right)\right)}\]
  4. Final simplification0.0

    \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{y \cdot y}\right)\right)\]

Reproduce

herbie shell --seed 2020083 +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))))