| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 38912 |
\[e^{-w} \cdot {\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{\left(e^{w \cdot 0.5}\right)}
\]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
(FPCore (w l) :precision binary64 (let* ((t_0 (pow (exp w) 0.25))) (* (exp (- w)) (pow (pow (pow l (sqrt (exp w))) t_0) (* 2.0 (/ t_0 2.0))))))
double code(double w, double l) {
return exp(-w) * pow(l, exp(w));
}
double code(double w, double l) {
double t_0 = pow(exp(w), 0.25);
return exp(-w) * pow(pow(pow(l, sqrt(exp(w))), t_0), (2.0 * (t_0 / 2.0)));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp(-w) * (l ** exp(w))
end function
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: t_0
t_0 = exp(w) ** 0.25d0
code = exp(-w) * (((l ** sqrt(exp(w))) ** t_0) ** (2.0d0 * (t_0 / 2.0d0)))
end function
public static double code(double w, double l) {
return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
public static double code(double w, double l) {
double t_0 = Math.pow(Math.exp(w), 0.25);
return Math.exp(-w) * Math.pow(Math.pow(Math.pow(l, Math.sqrt(Math.exp(w))), t_0), (2.0 * (t_0 / 2.0)));
}
def code(w, l): return math.exp(-w) * math.pow(l, math.exp(w))
def code(w, l): t_0 = math.pow(math.exp(w), 0.25) return math.exp(-w) * math.pow(math.pow(math.pow(l, math.sqrt(math.exp(w))), t_0), (2.0 * (t_0 / 2.0)))
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function code(w, l) t_0 = exp(w) ^ 0.25 return Float64(exp(Float64(-w)) * (((l ^ sqrt(exp(w))) ^ t_0) ^ Float64(2.0 * Float64(t_0 / 2.0)))) end
function tmp = code(w, l) tmp = exp(-w) * (l ^ exp(w)); end
function tmp = code(w, l) t_0 = exp(w) ^ 0.25; tmp = exp(-w) * (((l ^ sqrt(exp(w))) ^ t_0) ^ (2.0 * (t_0 / 2.0))); end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[w_, l_] := Block[{t$95$0 = N[Power[N[Exp[w], $MachinePrecision], 0.25], $MachinePrecision]}, N[(N[Exp[(-w)], $MachinePrecision] * N[Power[N[Power[N[Power[l, N[Sqrt[N[Exp[w], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], t$95$0], $MachinePrecision], N[(2.0 * N[(t$95$0 / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\begin{array}{l}
t_0 := {\left(e^{w}\right)}^{0.25}\\
e^{-w} \cdot {\left({\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{t_0}\right)}^{\left(2 \cdot \frac{t_0}{2}\right)}
\end{array}
Results
Initial program 0.3
Taylor expanded in l around 0 4.6
Applied egg-rr0.3
Applied egg-rr0.3
Applied egg-rr0.7
Simplified0.3
[Start]0.7 | \[ e^{-w} \cdot \left({\left({\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{\left({\left(e^{w}\right)}^{0.25}\right)}\right)}^{\left(\frac{{\left(e^{w}\right)}^{0.25}}{2}\right)} \cdot {\left({\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{\left({\left(e^{w}\right)}^{0.25}\right)}\right)}^{\left(\frac{{\left(e^{w}\right)}^{0.25}}{2}\right)}\right)
\] |
|---|---|
pow-sqr [=>]0.3 | \[ e^{-w} \cdot \color{blue}{{\left({\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{\left({\left(e^{w}\right)}^{0.25}\right)}\right)}^{\left(2 \cdot \frac{{\left(e^{w}\right)}^{0.25}}{2}\right)}}
\] |
Final simplification0.3
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 38912 |
| Alternative 2 | |
|---|---|
| Error | 0.3 |
| Cost | 32640 |
| Alternative 3 | |
|---|---|
| Error | 0.3 |
| Cost | 19456 |
| Alternative 4 | |
|---|---|
| Error | 1.2 |
| Cost | 13376 |
| Alternative 5 | |
|---|---|
| Error | 1.7 |
| Cost | 6784 |
| Alternative 6 | |
|---|---|
| Error | 1.7 |
| Cost | 6660 |
| Alternative 7 | |
|---|---|
| Error | 1.7 |
| Cost | 6592 |
| Alternative 8 | |
|---|---|
| Error | 8.2 |
| Cost | 1348 |
| Alternative 9 | |
|---|---|
| Error | 8.2 |
| Cost | 708 |
| Alternative 10 | |
|---|---|
| Error | 13.6 |
| Cost | 64 |
herbie shell --seed 2023045
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))