Average Error: 0.0 → 0.0
Time: 4.5s
Precision: binary64
Cost: 38848
\[x \cdot e^{y \cdot y} \]
\[\begin{array}{l} t_0 := {\left(\sqrt{e^{y}}\right)}^{y}\\ x \cdot \left(t_0 \cdot t_0\right) \end{array} \]
(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (pow (sqrt (exp y)) y))) (* x (* t_0 t_0))))
double code(double x, double y) {
	return x * exp((y * y));
}
double code(double x, double y) {
	double t_0 = pow(sqrt(exp(y)), y);
	return x * (t_0 * 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 = x * (t_0 * 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.pow(Math.sqrt(Math.exp(y)), y);
	return x * (t_0 * t_0);
}
def code(x, y):
	return x * math.exp((y * y))
def code(x, y):
	t_0 = math.pow(math.sqrt(math.exp(y)), y)
	return x * (t_0 * t_0)
function code(x, y)
	return Float64(x * exp(Float64(y * y)))
end
function code(x, y)
	t_0 = sqrt(exp(y)) ^ y
	return Float64(x * Float64(t_0 * 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 = x * (t_0 * t_0);
end
code[x_, y_] := N[(x * N[Exp[N[(y * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[Power[N[Sqrt[N[Exp[y], $MachinePrecision]], $MachinePrecision], y], $MachinePrecision]}, N[(x * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]
x \cdot e^{y \cdot y}
\begin{array}{l}
t_0 := {\left(\sqrt{e^{y}}\right)}^{y}\\
x \cdot \left(t_0 \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.0
\[x \cdot {\left(e^{y}\right)}^{y} \]

Derivation

  1. Initial program 0.0

    \[x \cdot e^{y \cdot y} \]
  2. Simplified0.0

    \[\leadsto \color{blue}{x \cdot {\left(e^{y}\right)}^{y}} \]
    Proof
    (*.f64 x (pow.f64 (exp.f64 y) y)): 0 points increase in error, 0 points decrease in error
    (*.f64 x (Rewrite<= exp-prod_binary64 (exp.f64 (*.f64 y y)))): 1 points increase in error, 0 points decrease in error
  3. Applied egg-rr0.0

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

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

Alternatives

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

Error

Reproduce

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