Average Error: 0.0 → 0.1
Time: 4.7s
Precision: binary64
Cost: 26176
\[x \cdot e^{y \cdot y} \]
\[\begin{array}{l} t_0 := \sqrt{e^{y \cdot y}}\\ t_0 \cdot \left(x \cdot t_0\right) \end{array} \]
(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (sqrt (exp (* y y))))) (* t_0 (* x t_0))))
double code(double x, double y) {
	return x * exp((y * y));
}
double code(double x, double y) {
	double t_0 = sqrt(exp((y * y)));
	return t_0 * (x * t_0);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x * exp((y * y))
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    t_0 = sqrt(exp((y * y)))
    code = t_0 * (x * t_0)
end function
public static double code(double x, double y) {
	return x * Math.exp((y * y));
}
public static double code(double x, double y) {
	double t_0 = Math.sqrt(Math.exp((y * y)));
	return t_0 * (x * t_0);
}
def code(x, y):
	return x * math.exp((y * y))
def code(x, y):
	t_0 = math.sqrt(math.exp((y * y)))
	return t_0 * (x * t_0)
function code(x, y)
	return Float64(x * exp(Float64(y * y)))
end
function code(x, y)
	t_0 = sqrt(exp(Float64(y * y)))
	return Float64(t_0 * Float64(x * t_0))
end
function tmp = code(x, y)
	tmp = x * exp((y * y));
end
function tmp = code(x, y)
	t_0 = sqrt(exp((y * y)));
	tmp = t_0 * (x * t_0);
end
code[x_, y_] := N[(x * N[Exp[N[(y * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[Exp[N[(y * y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(t$95$0 * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]]
x \cdot e^{y \cdot y}
\begin{array}{l}
t_0 := \sqrt{e^{y \cdot y}}\\
t_0 \cdot \left(x \cdot t_0\right)
\end{array}

Error

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. Applied egg-rr1.4

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

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

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

Alternatives

Alternative 1
Error0.0
Cost6720
\[x \cdot e^{y \cdot y} \]
Alternative 2
Error0.4
Cost1216
\[0.5 \cdot \left(x \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) + \left(x + y \cdot \left(x \cdot y\right)\right) \]
Alternative 3
Error0.4
Cost1216
\[x + \left(x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot 0.5\right) + x \cdot \left(y \cdot y\right)\right) \]
Alternative 4
Error0.5
Cost448
\[x + x \cdot \left(y \cdot y\right) \]
Alternative 5
Error0.9
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022354 
(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))))