| Alternative 1 | |
|---|---|
| Accuracy | 100.0% |
| Cost | 13120 |
\[{e}^{\left(x \cdot \left(y \cdot y\right)\right)}
\]
(FPCore (x y) :precision binary64 (exp (* (* x y) y)))
(FPCore (x y) :precision binary64 (pow (exp 0.5) (* (+ y y) (* y x))))
double code(double x, double y) {
return exp(((x * y) * y));
}
double code(double x, double y) {
return pow(exp(0.5), ((y + y) * (y * x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp(((x * y) * y))
end function
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp(0.5d0) ** ((y + y) * (y * x))
end function
public static double code(double x, double y) {
return Math.exp(((x * y) * y));
}
public static double code(double x, double y) {
return Math.pow(Math.exp(0.5), ((y + y) * (y * x)));
}
def code(x, y): return math.exp(((x * y) * y))
def code(x, y): return math.pow(math.exp(0.5), ((y + y) * (y * x)))
function code(x, y) return exp(Float64(Float64(x * y) * y)) end
function code(x, y) return exp(0.5) ^ Float64(Float64(y + y) * Float64(y * x)) end
function tmp = code(x, y) tmp = exp(((x * y) * y)); end
function tmp = code(x, y) tmp = exp(0.5) ^ ((y + y) * (y * x)); end
code[x_, y_] := N[Exp[N[(N[(x * y), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]
code[x_, y_] := N[Power[N[Exp[0.5], $MachinePrecision], N[(N[(y + y), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
e^{\left(x \cdot y\right) \cdot y}
{\left(e^{0.5}\right)}^{\left(\left(y + y\right) \cdot \left(y \cdot x\right)\right)}
Results
Initial program 100.0%
Applied egg-rr100.0%
[Start]100.0 | \[ e^{\left(x \cdot y\right) \cdot y}
\] |
|---|---|
*-un-lft-identity [=>]100.0 | \[ e^{\color{blue}{1 \cdot \left(\left(x \cdot y\right) \cdot y\right)}}
\] |
exp-prod [=>]100.0 | \[ \color{blue}{{\left(e^{1}\right)}^{\left(\left(x \cdot y\right) \cdot y\right)}}
\] |
associate-*l* [=>]100.0 | \[ {\left(e^{1}\right)}^{\color{blue}{\left(x \cdot \left(y \cdot y\right)\right)}}
\] |
Applied egg-rr100.0%
[Start]100.0 | \[ {\left(e^{1}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
|---|---|
add-sqr-sqrt [=>]100.0 | \[ {\color{blue}{\left(\sqrt{e^{1}} \cdot \sqrt{e^{1}}\right)}}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
unpow-prod-down [=>]100.0 | \[ \color{blue}{{\left(\sqrt{e^{1}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}}
\] |
exp-1-e [=>]100.0 | \[ {\left(\sqrt{\color{blue}{e}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
associate-*r* [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\color{blue}{\left(\left(x \cdot y\right) \cdot y\right)}} \cdot {\left(\sqrt{e^{1}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
*-commutative [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\color{blue}{\left(y \cdot \left(x \cdot y\right)\right)}} \cdot {\left(\sqrt{e^{1}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
exp-1-e [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right)\right)} \cdot {\left(\sqrt{\color{blue}{e}}\right)}^{\left(x \cdot \left(y \cdot y\right)\right)}
\] |
associate-*r* [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\color{blue}{\left(\left(x \cdot y\right) \cdot y\right)}}
\] |
*-commutative [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\color{blue}{\left(y \cdot \left(x \cdot y\right)\right)}}
\] |
Applied egg-rr100.0%
[Start]100.0 | \[ {\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right)\right)}
\] |
|---|---|
pow-prod-up [=>]100.0 | \[ \color{blue}{{\left(\sqrt{e}\right)}^{\left(y \cdot \left(x \cdot y\right) + y \cdot \left(x \cdot y\right)\right)}}
\] |
distribute-rgt-out [=>]100.0 | \[ {\left(\sqrt{e}\right)}^{\color{blue}{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}}
\] |
add-exp-log [=>]100.0 | \[ {\color{blue}{\left(e^{\log \left(\sqrt{e}\right)}\right)}}^{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}
\] |
pow1/2 [=>]100.0 | \[ {\left(e^{\log \color{blue}{\left({e}^{0.5}\right)}}\right)}^{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}
\] |
log-pow [=>]100.0 | \[ {\left(e^{\color{blue}{0.5 \cdot \log e}}\right)}^{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}
\] |
log-E [=>]100.0 | \[ {\left(e^{0.5 \cdot \color{blue}{1}}\right)}^{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}
\] |
metadata-eval [=>]100.0 | \[ {\left(e^{\color{blue}{0.5}}\right)}^{\left(\left(x \cdot y\right) \cdot \left(y + y\right)\right)}
\] |
*-commutative [=>]100.0 | \[ {\left(e^{0.5}\right)}^{\left(\color{blue}{\left(y \cdot x\right)} \cdot \left(y + y\right)\right)}
\] |
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 100.0% |
| Cost | 13120 |
| Alternative 2 | |
|---|---|
| Accuracy | 100.0% |
| Cost | 6720 |
| Alternative 3 | |
|---|---|
| Accuracy | 66.9% |
| Cost | 64 |
herbie shell --seed 2023151
(FPCore (x y)
:name "Data.Random.Distribution.Normal:normalF from random-fu-0.2.6.2"
:precision binary64
(exp (* (* x y) y)))