| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 19456 |
\[\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}
\]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
(FPCore (w l) :precision binary64 (/ (pow (pow l (exp (* 2.0 (* w 0.3333333333333333)))) (exp (* w 0.3333333333333333))) (exp w)))
double code(double w, double l) {
return exp(-w) * pow(l, exp(w));
}
double code(double w, double l) {
return pow(pow(l, exp((2.0 * (w * 0.3333333333333333)))), exp((w * 0.3333333333333333))) / exp(w);
}
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
code = ((l ** exp((2.0d0 * (w * 0.3333333333333333d0)))) ** exp((w * 0.3333333333333333d0))) / exp(w)
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) {
return Math.pow(Math.pow(l, Math.exp((2.0 * (w * 0.3333333333333333)))), Math.exp((w * 0.3333333333333333))) / Math.exp(w);
}
def code(w, l): return math.exp(-w) * math.pow(l, math.exp(w))
def code(w, l): return math.pow(math.pow(l, math.exp((2.0 * (w * 0.3333333333333333)))), math.exp((w * 0.3333333333333333))) / math.exp(w)
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function code(w, l) return Float64(((l ^ exp(Float64(2.0 * Float64(w * 0.3333333333333333)))) ^ exp(Float64(w * 0.3333333333333333))) / exp(w)) end
function tmp = code(w, l) tmp = exp(-w) * (l ^ exp(w)); end
function tmp = code(w, l) tmp = ((l ^ exp((2.0 * (w * 0.3333333333333333)))) ^ exp((w * 0.3333333333333333))) / exp(w); end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[w_, l_] := N[(N[Power[N[Power[l, N[Exp[N[(2.0 * N[(w * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Exp[N[(w * 0.3333333333333333), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[Exp[w], $MachinePrecision]), $MachinePrecision]
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\frac{{\left({\ell}^{\left(e^{2 \cdot \left(w \cdot 0.3333333333333333\right)}\right)}\right)}^{\left(e^{w \cdot 0.3333333333333333}\right)}}{e^{w}}
Results
Initial program 0.3
Simplified0.3
Taylor expanded in l around 0 4.6
Applied egg-rr0.4
Applied egg-rr0.3
Applied egg-rr0.3
Final simplification0.3
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 19456 |
| Alternative 2 | |
|---|---|
| Error | 0.9 |
| Cost | 13248 |
| Alternative 3 | |
|---|---|
| Error | 0.9 |
| Cost | 13184 |
| Alternative 4 | |
|---|---|
| Error | 1.7 |
| Cost | 6592 |
| Alternative 5 | |
|---|---|
| Error | 60.8 |
| Cost | 64 |
| Alternative 6 | |
|---|---|
| Error | 13.6 |
| Cost | 64 |

herbie shell --seed 2022295
(FPCore (w l)
:name "exp-w crasher"
:precision binary64
(* (exp (- w)) (pow l (exp w))))