?

Average Error: 0.4% → 0.4%
Time: 16.9s
Precision: binary64
Cost: 32256

?

\[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
\[\frac{{\ell}^{\left(e^{w}\right)}}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{w}\right)\right)} \]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
(FPCore (w l) :precision binary64 (/ (pow l (exp w)) (expm1 (log1p (exp w)))))
double code(double w, double l) {
	return exp(-w) * pow(l, exp(w));
}
double code(double w, double l) {
	return pow(l, exp(w)) / expm1(log1p(exp(w)));
}
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(l, Math.exp(w)) / Math.expm1(Math.log1p(Math.exp(w)));
}
def code(w, l):
	return math.exp(-w) * math.pow(l, math.exp(w))
def code(w, l):
	return math.pow(l, math.exp(w)) / math.expm1(math.log1p(math.exp(w)))
function code(w, l)
	return Float64(exp(Float64(-w)) * (l ^ exp(w)))
end
function code(w, l)
	return Float64((l ^ exp(w)) / expm1(log1p(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[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[(Exp[N[Log[1 + N[Exp[w], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\frac{{\ell}^{\left(e^{w}\right)}}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{w}\right)\right)}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.4

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Simplified0.4

    \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    Proof

    [Start]0.4

    \[ e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]

    exp-neg [=>]0.4

    \[ \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]

    associate-*l/ [=>]0.4

    \[ \color{blue}{\frac{1 \cdot {\ell}^{\left(e^{w}\right)}}{e^{w}}} \]

    *-lft-identity [=>]0.4

    \[ \frac{\color{blue}{{\ell}^{\left(e^{w}\right)}}}{e^{w}} \]
  3. Applied egg-rr0.41

    \[\leadsto \color{blue}{\frac{1}{{\left(\sqrt[3]{e^{w}}\right)}^{2}} \cdot \frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}}} \]
  4. Simplified0.41

    \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2} \cdot \sqrt[3]{e^{w}}}} \]
    Proof

    [Start]0.41

    \[ \frac{1}{{\left(\sqrt[3]{e^{w}}\right)}^{2}} \cdot \frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]

    associate-*l/ [=>]0.41

    \[ \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.41

    \[ \frac{\color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}}}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}} \]

    associate-/l/ [=>]0.41

    \[ \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2} \cdot \sqrt[3]{e^{w}}}} \]
  5. Applied egg-rr0.4

    \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{w}\right)\right)}} \]
  6. Final simplification0.4

    \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{w}\right)\right)} \]

Alternatives

Alternative 1
Error0.4%
Cost19456
\[\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}} \]
Alternative 2
Error1.4%
Cost13568
\[\frac{{\ell}^{\left(e^{w}\right)}}{1 - w \cdot w} \cdot \left(1 - w\right) \]
Alternative 3
Error1.4%
Cost13184
\[\frac{{\ell}^{\left(e^{w}\right)}}{w + 1} \]
Alternative 4
Error2.04%
Cost12928
\[{\ell}^{\left(e^{w}\right)} \]
Alternative 5
Error2.69%
Cost6660
\[\begin{array}{l} \mathbf{if}\;w \leq 480:\\ \;\;\;\;\ell\\ \mathbf{else}:\\ \;\;\;\;e^{-w}\\ \end{array} \]
Alternative 6
Error2.68%
Cost6592
\[\frac{\ell}{e^{w}} \]
Alternative 7
Error12.72%
Cost320
\[\frac{\ell}{w + 1} \]
Alternative 8
Error21.5%
Cost64
\[\ell \]

Error

Reproduce?

herbie shell --seed 2023103 
(FPCore (w l)
  :name "exp-w (used to crash)"
  :precision binary64
  (* (exp (- w)) (pow l (exp w))))