Average Error: 0.3 → 0.3
Time: 13.3s
Precision: binary64
Cost: 38976
\[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
\[\frac{{\left({\ell}^{\left(\mathsf{expm1}\left(w \cdot 0.5\right) + 1\right)}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}} \]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
(FPCore (w l)
 :precision binary64
 (/ (pow (pow l (+ (expm1 (* w 0.5)) 1.0)) (sqrt (exp w))) (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, (expm1((w * 0.5)) + 1.0)), sqrt(exp(w))) / 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(Math.pow(l, (Math.expm1((w * 0.5)) + 1.0)), Math.sqrt(Math.exp(w))) / 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.expm1((w * 0.5)) + 1.0)), math.sqrt(math.exp(w))) / math.exp(w)
function code(w, l)
	return Float64(exp(Float64(-w)) * (l ^ exp(w)))
end
function code(w, l)
	return Float64(((l ^ Float64(expm1(Float64(w * 0.5)) + 1.0)) ^ sqrt(exp(w))) / 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[(N[(Exp[N[(w * 0.5), $MachinePrecision]] - 1), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Exp[w], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[Exp[w], $MachinePrecision]), $MachinePrecision]
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\frac{{\left({\ell}^{\left(\mathsf{expm1}\left(w \cdot 0.5\right) + 1\right)}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

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

    \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    Proof
    (/.f64 (pow.f64 l (exp.f64 w)) (exp.f64 w)): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (pow.f64 l (exp.f64 w)))) (exp.f64 w)): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 (exp.f64 w)) (pow.f64 l (exp.f64 w)))): 2 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= exp-neg_binary64 (exp.f64 (neg.f64 w))) (pow.f64 l (exp.f64 w))): 3 points increase in error, 5 points decrease in error
  3. Applied egg-rr1.3

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

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

    \[\leadsto \frac{{\left({\ell}^{\color{blue}{\left(\left(1 + \sqrt{e^{w}}\right) - 1\right)}}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}} \]
  6. Applied egg-rr0.3

    \[\leadsto \frac{{\left({\ell}^{\color{blue}{\left(\mathsf{expm1}\left(w \cdot 0.5\right) + 1\right)}}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}} \]
  7. Final simplification0.3

    \[\leadsto \frac{{\left({\ell}^{\left(\mathsf{expm1}\left(w \cdot 0.5\right) + 1\right)}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}} \]

Alternatives

Alternative 1
Error0.3
Cost38976
\[\frac{{\left(\ell \cdot {\ell}^{\left(\mathsf{expm1}\left(w \cdot 0.5\right)\right)}\right)}^{\left(\sqrt{e^{w}}\right)}}{e^{w}} \]
Alternative 2
Error0.3
Cost38848
\[\frac{{\left({\ell}^{\left(\sqrt{e^{w}}\right)}\right)}^{\left(e^{w \cdot 0.5}\right)}}{e^{w}} \]
Alternative 3
Error0.3
Cost19520
\[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
Alternative 4
Error0.3
Cost19456
\[\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}} \]
Alternative 5
Error0.9
Cost13184
\[{\ell}^{\left(e^{w}\right)} \cdot \left(1 - w\right) \]
Alternative 6
Error1.3
Cost12928
\[{\ell}^{\left(e^{w}\right)} \]
Alternative 7
Error1.7
Cost6592
\[\frac{\ell}{e^{w}} \]
Alternative 8
Error7.7
Cost320
\[\frac{\ell}{w + 1} \]
Alternative 9
Error13.7
Cost64
\[\ell \]

Error

Reproduce

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