| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 32384 |
\[\frac{{\ell}^{\left(e^{w}\right)}}{\log \left(1 + \mathsf{expm1}\left(e^{w}\right)\right)}
\]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
(FPCore (w l) :precision binary64 (let* ((t_0 (cbrt (exp w)))) (/ (pow l (exp w)) (* t_0 (pow 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 = cbrt(exp(w));
return pow(l, exp(w)) / (t_0 * pow(t_0, 2.0));
}
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.cbrt(Math.exp(w));
return Math.pow(l, Math.exp(w)) / (t_0 * Math.pow(t_0, 2.0));
}
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function code(w, l) t_0 = cbrt(exp(w)) return Float64((l ^ exp(w)) / Float64(t_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], 1/3], $MachinePrecision]}, N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[(t$95$0 * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\begin{array}{l}
t_0 := \sqrt[3]{e^{w}}\\
\frac{{\ell}^{\left(e^{w}\right)}}{t_0 \cdot {t_0}^{2}}
\end{array}
Results
Initial program 0.2
Simplified0.2
[Start]0.2 | \[ e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\] |
|---|---|
exp-neg [=>]0.2 | \[ \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)}
\] |
associate-*l/ [=>]0.2 | \[ \color{blue}{\frac{1 \cdot {\ell}^{\left(e^{w}\right)}}{e^{w}}}
\] |
*-lft-identity [=>]0.2 | \[ \frac{\color{blue}{{\ell}^{\left(e^{w}\right)}}}{e^{w}}
\] |
Applied egg-rr0.2
Simplified0.2
[Start]0.2 | \[ \frac{1}{{\left(\sqrt[3]{e^{w}}\right)}^{2}} \cdot \frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}}
\] |
|---|---|
associate-*l/ [=>]0.2 | \[ \color{blue}{\frac{1 \cdot \frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}
\] |
*-lft-identity [=>]0.2 | \[ \frac{\color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}}}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}
\] |
associate-/l/ [=>]0.2 | \[ \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2} \cdot \sqrt[3]{e^{w}}}}
\] |
Final simplification0.2
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 32384 |
| Alternative 2 | |
|---|---|
| Error | 0.2 |
| Cost | 19520 |
| Alternative 3 | |
|---|---|
| Error | 0.2 |
| Cost | 19456 |
| Alternative 4 | |
|---|---|
| Error | 0.7 |
| Cost | 13568 |
| Alternative 5 | |
|---|---|
| Error | 0.8 |
| Cost | 13184 |
| Alternative 6 | |
|---|---|
| Error | 1.0 |
| Cost | 6912 |
| Alternative 7 | |
|---|---|
| Error | 1.3 |
| Cost | 6656 |
| Alternative 8 | |
|---|---|
| Error | 1.6 |
| Cost | 6592 |
| Alternative 9 | |
|---|---|
| Error | 1.6 |
| Cost | 708 |
| Alternative 10 | |
|---|---|
| Error | 7.6 |
| Cost | 452 |
| Alternative 11 | |
|---|---|
| Error | 7.6 |
| Cost | 324 |
| Alternative 12 | |
|---|---|
| Error | 7.6 |
| Cost | 320 |
| Alternative 13 | |
|---|---|
| Error | 13.7 |
| Cost | 64 |
herbie shell --seed 2023054
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))