exp-w (used to crash)

Percentage Accurate: 99.4% → 99.4%
Time: 18.5s
Alternatives: 11
Speedup: N/A×

Specification

?
\[\begin{array}{l} \\ e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \end{array} \]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
double code(double w, double l) {
	return exp(-w) * pow(l, 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
public static double code(double w, double l) {
	return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
def code(w, l):
	return math.exp(-w) * math.pow(l, math.exp(w))
function code(w, l)
	return Float64(exp(Float64(-w)) * (l ^ exp(w)))
end
function tmp = code(w, l)
	tmp = exp(-w) * (l ^ exp(w));
end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \end{array} \]
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
double code(double w, double l) {
	return exp(-w) * pow(l, 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
public static double code(double w, double l) {
	return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
def code(w, l):
	return math.exp(-w) * math.pow(l, math.exp(w))
function code(w, l)
	return Float64(exp(Float64(-w)) * (l ^ exp(w)))
end
function tmp = code(w, l)
	tmp = exp(-w) * (l ^ exp(w));
end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}

Alternative 1: 99.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{e^{w}}\\ \frac{\frac{{\ell}^{\left(e^{w}\right)}}{{t_0}^{2}}}{t_0} \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (let* ((t_0 (cbrt (exp w)))) (/ (/ (pow l (exp w)) (pow t_0 2.0)) t_0)))
double code(double w, double l) {
	double t_0 = cbrt(exp(w));
	return (pow(l, exp(w)) / pow(t_0, 2.0)) / t_0;
}
public static double code(double w, double l) {
	double t_0 = Math.cbrt(Math.exp(w));
	return (Math.pow(l, Math.exp(w)) / Math.pow(t_0, 2.0)) / t_0;
}
function code(w, l)
	t_0 = cbrt(exp(w))
	return Float64(Float64((l ^ exp(w)) / (t_0 ^ 2.0)) / t_0)
end
code[w_, l_] := Block[{t$95$0 = N[Power[N[Exp[w], $MachinePrecision], 1/3], $MachinePrecision]}, N[(N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{e^{w}}\\
\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{t_0}^{2}}}{t_0}
\end{array}
\end{array}
Derivation
  1. Initial program 98.9%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Step-by-step derivation
    1. *-commutative98.9%

      \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
    2. exp-neg98.9%

      \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
    3. div-inv98.9%

      \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    4. add-cube-cbrt98.9%

      \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
    5. associate-/r*98.9%

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
    6. pow298.9%

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

    \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
  4. Final simplification98.9%

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

Alternative 2: 99.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{{\ell}^{\left(e^{w}\right)} \cdot \sqrt[3]{e^{\left(-w\right) - w}}}{\sqrt[3]{e^{w}}} \end{array} \]
(FPCore (w l)
 :precision binary64
 (/ (* (pow l (exp w)) (cbrt (exp (- (- w) w)))) (cbrt (exp w))))
double code(double w, double l) {
	return (pow(l, exp(w)) * cbrt(exp((-w - w)))) / cbrt(exp(w));
}
public static double code(double w, double l) {
	return (Math.pow(l, Math.exp(w)) * Math.cbrt(Math.exp((-w - w)))) / Math.cbrt(Math.exp(w));
}
function code(w, l)
	return Float64(Float64((l ^ exp(w)) * cbrt(exp(Float64(Float64(-w) - w)))) / cbrt(exp(w)))
end
code[w_, l_] := N[(N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[N[((-w) - w), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Exp[w], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{{\ell}^{\left(e^{w}\right)} \cdot \sqrt[3]{e^{\left(-w\right) - w}}}{\sqrt[3]{e^{w}}}
\end{array}
Derivation
  1. Initial program 98.9%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Step-by-step derivation
    1. *-commutative98.9%

      \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
    2. exp-neg98.9%

      \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
    3. div-inv98.9%

      \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    4. add-cube-cbrt98.9%

      \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
    5. associate-/r*98.9%

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
    6. pow298.9%

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

    \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
  4. Taylor expanded in l around 0 98.9%

    \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(e^{w}\right)}^{2}}\right)}^{0.3333333333333333} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
  5. Step-by-step derivation
    1. unpow1/398.9%

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{\left(e^{w}\right)}^{2}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    2. unpow298.9%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w} \cdot e^{w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    3. prod-exp98.9%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w + w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    4. rec-exp98.9%

      \[\leadsto \frac{\sqrt[3]{\color{blue}{e^{-\left(w + w\right)}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
  6. Simplified98.9%

    \[\leadsto \frac{\color{blue}{\sqrt[3]{e^{-\left(w + w\right)}} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
  7. Final simplification98.9%

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

Alternative 3: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{{\ell}^{\left(e^{w}\right)}}{e^{w}} \end{array} \]
(FPCore (w l) :precision binary64 (/ (pow l (exp w)) (exp w)))
double code(double w, double l) {
	return pow(l, exp(w)) / exp(w);
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    code = (l ** exp(w)) / exp(w)
end function
public static double code(double w, double l) {
	return Math.pow(l, Math.exp(w)) / Math.exp(w);
}
def code(w, l):
	return math.pow(l, math.exp(w)) / math.exp(w)
function code(w, l)
	return Float64((l ^ exp(w)) / exp(w))
end
function tmp = code(w, l)
	tmp = (l ^ exp(w)) / exp(w);
end
code[w_, l_] := N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[Exp[w], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}
\end{array}
Derivation
  1. Initial program 98.9%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Step-by-step derivation
    1. exp-neg98.9%

      \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. associate-*l/98.9%

      \[\leadsto \color{blue}{\frac{1 \cdot {\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    3. *-lft-identity98.9%

      \[\leadsto \frac{\color{blue}{{\ell}^{\left(e^{w}\right)}}}{e^{w}} \]
  3. Simplified98.9%

    \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
  4. Final simplification98.9%

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

Alternative 4: 90.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -6.5 \cdot 10^{+88}:\\ \;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\ \mathbf{elif}\;w \leq -1200000 \lor \neg \left(w \leq 0.07\right):\\ \;\;\;\;\log \left(e^{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(1 + w \cdot \left(\log \ell + -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (<= w -6.5e+88)
   (+
    l
    (fma 0.05555555555555555 (* l (* w w)) (* l (* w -0.3333333333333333))))
   (if (or (<= w -1200000.0) (not (<= w 0.07)))
     (log (exp l))
     (* l (+ 1.0 (* w (+ (log l) -1.0)))))))
double code(double w, double l) {
	double tmp;
	if (w <= -6.5e+88) {
		tmp = l + fma(0.05555555555555555, (l * (w * w)), (l * (w * -0.3333333333333333)));
	} else if ((w <= -1200000.0) || !(w <= 0.07)) {
		tmp = log(exp(l));
	} else {
		tmp = l * (1.0 + (w * (log(l) + -1.0)));
	}
	return tmp;
}
function code(w, l)
	tmp = 0.0
	if (w <= -6.5e+88)
		tmp = Float64(l + fma(0.05555555555555555, Float64(l * Float64(w * w)), Float64(l * Float64(w * -0.3333333333333333))));
	elseif ((w <= -1200000.0) || !(w <= 0.07))
		tmp = log(exp(l));
	else
		tmp = Float64(l * Float64(1.0 + Float64(w * Float64(log(l) + -1.0))));
	end
	return tmp
end
code[w_, l_] := If[LessEqual[w, -6.5e+88], N[(l + N[(0.05555555555555555 * N[(l * N[(w * w), $MachinePrecision]), $MachinePrecision] + N[(l * N[(w * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[w, -1200000.0], N[Not[LessEqual[w, 0.07]], $MachinePrecision]], N[Log[N[Exp[l], $MachinePrecision]], $MachinePrecision], N[(l * N[(1.0 + N[(w * N[(N[Log[l], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq -6.5 \cdot 10^{+88}:\\
\;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\

\mathbf{elif}\;w \leq -1200000 \lor \neg \left(w \leq 0.07\right):\\
\;\;\;\;\log \left(e^{\ell}\right)\\

\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(\log \ell + -1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -6.5000000000000002e88

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg100.0%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv100.0%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt100.0%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow2100.0%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 100.0%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 62.1%

      \[\leadsto \color{blue}{\ell + \left(-0.3333333333333333 \cdot \left(\ell \cdot w\right) + 0.05555555555555555 \cdot \left(\ell \cdot {w}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative62.1%

        \[\leadsto \ell + \color{blue}{\left(0.05555555555555555 \cdot \left(\ell \cdot {w}^{2}\right) + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right)} \]
      2. fma-def62.1%

        \[\leadsto \ell + \color{blue}{\mathsf{fma}\left(0.05555555555555555, \ell \cdot {w}^{2}, -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right)} \]
      3. unpow262.1%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \color{blue}{\left(w \cdot w\right)}, -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right) \]
      4. *-commutative62.1%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \color{blue}{\left(\ell \cdot w\right) \cdot -0.3333333333333333}\right) \]
      5. associate-*l*62.1%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \color{blue}{\ell \cdot \left(w \cdot -0.3333333333333333\right)}\right) \]
    7. Simplified62.1%

      \[\leadsto \color{blue}{\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)} \]

    if -6.5000000000000002e88 < w < -1.2e6 or 0.070000000000000007 < w

    1. Initial program 96.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative96.6%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg96.6%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv96.6%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt96.6%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*96.6%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow296.6%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in l around 0 96.6%

      \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(e^{w}\right)}^{2}}\right)}^{0.3333333333333333} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    5. Step-by-step derivation
      1. unpow1/396.6%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{\left(e^{w}\right)}^{2}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      2. unpow296.6%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w} \cdot e^{w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      3. prod-exp96.6%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w + w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      4. rec-exp96.6%

        \[\leadsto \frac{\sqrt[3]{\color{blue}{e^{-\left(w + w\right)}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    6. Simplified96.6%

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

      \[\leadsto \color{blue}{\left(\ell \cdot \ell\right) \cdot \frac{1}{\ell}} \]
    8. Step-by-step derivation
      1. pow229.5%

        \[\leadsto \color{blue}{{\ell}^{2}} \cdot \frac{1}{\ell} \]
      2. inv-pow29.5%

        \[\leadsto {\ell}^{2} \cdot \color{blue}{{\ell}^{-1}} \]
      3. pow-prod-up4.1%

        \[\leadsto \color{blue}{{\ell}^{\left(2 + -1\right)}} \]
      4. metadata-eval4.1%

        \[\leadsto {\ell}^{\color{blue}{1}} \]
      5. pow14.1%

        \[\leadsto \color{blue}{\ell} \]
      6. add-log-exp70.1%

        \[\leadsto \color{blue}{\log \left(e^{\ell}\right)} \]
    9. Applied egg-rr70.1%

      \[\leadsto \color{blue}{\log \left(e^{\ell}\right)} \]

    if -1.2e6 < w < 0.070000000000000007

    1. Initial program 99.4%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Taylor expanded in w around 0 98.4%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + \ell \cdot \log \ell\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg98.4%

        \[\leadsto \ell + w \cdot \left(\color{blue}{\left(-\ell\right)} + \ell \cdot \log \ell\right) \]
      2. +-commutative98.4%

        \[\leadsto \ell + w \cdot \color{blue}{\left(\ell \cdot \log \ell + \left(-\ell\right)\right)} \]
      3. sub-neg98.4%

        \[\leadsto \ell + w \cdot \color{blue}{\left(\ell \cdot \log \ell - \ell\right)} \]
    4. Simplified98.4%

      \[\leadsto \color{blue}{\ell + w \cdot \left(\ell \cdot \log \ell - \ell\right)} \]
    5. Taylor expanded in l around 0 98.4%

      \[\leadsto \color{blue}{\ell \cdot \left(1 + w \cdot \left(\log \ell - 1\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -6.5 \cdot 10^{+88}:\\ \;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\ \mathbf{elif}\;w \leq -1200000 \lor \neg \left(w \leq 0.07\right):\\ \;\;\;\;\log \left(e^{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(1 + w \cdot \left(\log \ell + -1\right)\right)\\ \end{array} \]

Alternative 5: 97.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \frac{\ell}{\sqrt[3]{e^{w}}} \end{array} \]
(FPCore (w l) :precision binary64 (/ l (cbrt (exp w))))
double code(double w, double l) {
	return l / cbrt(exp(w));
}
public static double code(double w, double l) {
	return l / Math.cbrt(Math.exp(w));
}
function code(w, l)
	return Float64(l / cbrt(exp(w)))
end
code[w_, l_] := N[(l / N[Power[N[Exp[w], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\ell}{\sqrt[3]{e^{w}}}
\end{array}
Derivation
  1. Initial program 98.9%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Step-by-step derivation
    1. *-commutative98.9%

      \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
    2. exp-neg98.9%

      \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
    3. div-inv98.9%

      \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
    4. add-cube-cbrt98.9%

      \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
    5. associate-/r*98.9%

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
    6. pow298.9%

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

    \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
  4. Taylor expanded in w around 0 97.9%

    \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
  5. Final simplification97.9%

    \[\leadsto \frac{\ell}{\sqrt[3]{e^{w}}} \]

Alternative 6: 75.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -1.3 \cdot 10^{+117}:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \mathbf{elif}\;w \leq -520:\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (<= w -1.3e+117)
   (+ l (* -0.3333333333333333 (* l w)))
   (if (<= w -520.0)
     (/ (* l l) l)
     (/
      l
      (+ 1.0 (fma 0.05555555555555555 (* w w) (* w 0.3333333333333333)))))))
double code(double w, double l) {
	double tmp;
	if (w <= -1.3e+117) {
		tmp = l + (-0.3333333333333333 * (l * w));
	} else if (w <= -520.0) {
		tmp = (l * l) / l;
	} else {
		tmp = l / (1.0 + fma(0.05555555555555555, (w * w), (w * 0.3333333333333333)));
	}
	return tmp;
}
function code(w, l)
	tmp = 0.0
	if (w <= -1.3e+117)
		tmp = Float64(l + Float64(-0.3333333333333333 * Float64(l * w)));
	elseif (w <= -520.0)
		tmp = Float64(Float64(l * l) / l);
	else
		tmp = Float64(l / Float64(1.0 + fma(0.05555555555555555, Float64(w * w), Float64(w * 0.3333333333333333))));
	end
	return tmp
end
code[w_, l_] := If[LessEqual[w, -1.3e+117], N[(l + N[(-0.3333333333333333 * N[(l * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, -520.0], N[(N[(l * l), $MachinePrecision] / l), $MachinePrecision], N[(l / N[(1.0 + N[(0.05555555555555555 * N[(w * w), $MachinePrecision] + N[(w * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq -1.3 \cdot 10^{+117}:\\
\;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\

\mathbf{elif}\;w \leq -520:\\
\;\;\;\;\frac{\ell \cdot \ell}{\ell}\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -1.3e117

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg100.0%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv100.0%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt100.0%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow2100.0%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 100.0%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 38.9%

      \[\leadsto \color{blue}{\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)} \]

    if -1.3e117 < w < -520

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg100.0%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv100.0%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt100.0%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow2100.0%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in l around 0 100.0%

      \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(e^{w}\right)}^{2}}\right)}^{0.3333333333333333} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    5. Step-by-step derivation
      1. unpow1/3100.0%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{\left(e^{w}\right)}^{2}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      2. unpow2100.0%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w} \cdot e^{w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      3. prod-exp100.0%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w + w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      4. rec-exp100.0%

        \[\leadsto \frac{\sqrt[3]{\color{blue}{e^{-\left(w + w\right)}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    6. Simplified100.0%

      \[\leadsto \frac{\color{blue}{\sqrt[3]{e^{-\left(w + w\right)}} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    7. Applied egg-rr18.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \ell\right) \cdot \frac{1}{\ell}} \]
    8. Step-by-step derivation
      1. un-div-inv18.7%

        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]
    9. Applied egg-rr18.7%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]

    if -520 < w

    1. Initial program 98.4%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative98.4%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg98.4%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv98.4%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt98.4%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*98.4%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow298.4%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 97.0%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 90.2%

      \[\leadsto \frac{\ell}{\color{blue}{1 + \left(0.05555555555555555 \cdot {w}^{2} + 0.3333333333333333 \cdot w\right)}} \]
    6. Step-by-step derivation
      1. fma-def90.2%

        \[\leadsto \frac{\ell}{1 + \color{blue}{\mathsf{fma}\left(0.05555555555555555, {w}^{2}, 0.3333333333333333 \cdot w\right)}} \]
      2. unpow290.2%

        \[\leadsto \frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, \color{blue}{w \cdot w}, 0.3333333333333333 \cdot w\right)} \]
      3. *-commutative90.2%

        \[\leadsto \frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, \color{blue}{w \cdot 0.3333333333333333}\right)} \]
    7. Simplified90.2%

      \[\leadsto \frac{\ell}{\color{blue}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.3 \cdot 10^{+117}:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \mathbf{elif}\;w \leq -520:\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\ \end{array} \]

Alternative 7: 83.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq 470000000:\\ \;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (<= w 470000000.0)
   (+
    l
    (fma 0.05555555555555555 (* l (* w w)) (* l (* w -0.3333333333333333))))
   (/ l (+ 1.0 (fma 0.05555555555555555 (* w w) (* w 0.3333333333333333))))))
double code(double w, double l) {
	double tmp;
	if (w <= 470000000.0) {
		tmp = l + fma(0.05555555555555555, (l * (w * w)), (l * (w * -0.3333333333333333)));
	} else {
		tmp = l / (1.0 + fma(0.05555555555555555, (w * w), (w * 0.3333333333333333)));
	}
	return tmp;
}
function code(w, l)
	tmp = 0.0
	if (w <= 470000000.0)
		tmp = Float64(l + fma(0.05555555555555555, Float64(l * Float64(w * w)), Float64(l * Float64(w * -0.3333333333333333))));
	else
		tmp = Float64(l / Float64(1.0 + fma(0.05555555555555555, Float64(w * w), Float64(w * 0.3333333333333333))));
	end
	return tmp
end
code[w_, l_] := If[LessEqual[w, 470000000.0], N[(l + N[(0.05555555555555555 * N[(l * N[(w * w), $MachinePrecision]), $MachinePrecision] + N[(l * N[(w * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[(1.0 + N[(0.05555555555555555 * N[(w * w), $MachinePrecision] + N[(w * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq 470000000:\\
\;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < 4.7e8

    1. Initial program 98.7%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative98.7%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg98.7%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv98.7%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt98.7%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*98.7%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow298.7%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 97.6%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 78.7%

      \[\leadsto \color{blue}{\ell + \left(-0.3333333333333333 \cdot \left(\ell \cdot w\right) + 0.05555555555555555 \cdot \left(\ell \cdot {w}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative78.7%

        \[\leadsto \ell + \color{blue}{\left(0.05555555555555555 \cdot \left(\ell \cdot {w}^{2}\right) + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right)} \]
      2. fma-def78.7%

        \[\leadsto \ell + \color{blue}{\mathsf{fma}\left(0.05555555555555555, \ell \cdot {w}^{2}, -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right)} \]
      3. unpow278.7%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \color{blue}{\left(w \cdot w\right)}, -0.3333333333333333 \cdot \left(\ell \cdot w\right)\right) \]
      4. *-commutative78.7%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \color{blue}{\left(\ell \cdot w\right) \cdot -0.3333333333333333}\right) \]
      5. associate-*l*78.7%

        \[\leadsto \ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \color{blue}{\ell \cdot \left(w \cdot -0.3333333333333333\right)}\right) \]
    7. Simplified78.7%

      \[\leadsto \color{blue}{\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)} \]

    if 4.7e8 < w

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg100.0%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv100.0%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt100.0%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow2100.0%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 100.0%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 62.9%

      \[\leadsto \frac{\ell}{\color{blue}{1 + \left(0.05555555555555555 \cdot {w}^{2} + 0.3333333333333333 \cdot w\right)}} \]
    6. Step-by-step derivation
      1. fma-def62.9%

        \[\leadsto \frac{\ell}{1 + \color{blue}{\mathsf{fma}\left(0.05555555555555555, {w}^{2}, 0.3333333333333333 \cdot w\right)}} \]
      2. unpow262.9%

        \[\leadsto \frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, \color{blue}{w \cdot w}, 0.3333333333333333 \cdot w\right)} \]
      3. *-commutative62.9%

        \[\leadsto \frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, \color{blue}{w \cdot 0.3333333333333333}\right)} \]
    7. Simplified62.9%

      \[\leadsto \frac{\ell}{\color{blue}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq 470000000:\\ \;\;\;\;\ell + \mathsf{fma}\left(0.05555555555555555, \ell \cdot \left(w \cdot w\right), \ell \cdot \left(w \cdot -0.3333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + \mathsf{fma}\left(0.05555555555555555, w \cdot w, w \cdot 0.3333333333333333\right)}\\ \end{array} \]

Alternative 8: 71.7% accurate, 23.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -2.1 \cdot 10^{+119} \lor \neg \left(w \leq -3300000000\right) \land w \leq 0.051:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (or (<= w -2.1e+119) (and (not (<= w -3300000000.0)) (<= w 0.051)))
   (+ l (* -0.3333333333333333 (* l w)))
   (/ (* l l) l)))
double code(double w, double l) {
	double tmp;
	if ((w <= -2.1e+119) || (!(w <= -3300000000.0) && (w <= 0.051))) {
		tmp = l + (-0.3333333333333333 * (l * w));
	} else {
		tmp = (l * l) / l;
	}
	return tmp;
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((w <= (-2.1d+119)) .or. (.not. (w <= (-3300000000.0d0))) .and. (w <= 0.051d0)) then
        tmp = l + ((-0.3333333333333333d0) * (l * w))
    else
        tmp = (l * l) / l
    end if
    code = tmp
end function
public static double code(double w, double l) {
	double tmp;
	if ((w <= -2.1e+119) || (!(w <= -3300000000.0) && (w <= 0.051))) {
		tmp = l + (-0.3333333333333333 * (l * w));
	} else {
		tmp = (l * l) / l;
	}
	return tmp;
}
def code(w, l):
	tmp = 0
	if (w <= -2.1e+119) or (not (w <= -3300000000.0) and (w <= 0.051)):
		tmp = l + (-0.3333333333333333 * (l * w))
	else:
		tmp = (l * l) / l
	return tmp
function code(w, l)
	tmp = 0.0
	if ((w <= -2.1e+119) || (!(w <= -3300000000.0) && (w <= 0.051)))
		tmp = Float64(l + Float64(-0.3333333333333333 * Float64(l * w)));
	else
		tmp = Float64(Float64(l * l) / l);
	end
	return tmp
end
function tmp_2 = code(w, l)
	tmp = 0.0;
	if ((w <= -2.1e+119) || (~((w <= -3300000000.0)) && (w <= 0.051)))
		tmp = l + (-0.3333333333333333 * (l * w));
	else
		tmp = (l * l) / l;
	end
	tmp_2 = tmp;
end
code[w_, l_] := If[Or[LessEqual[w, -2.1e+119], And[N[Not[LessEqual[w, -3300000000.0]], $MachinePrecision], LessEqual[w, 0.051]]], N[(l + N[(-0.3333333333333333 * N[(l * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / l), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq -2.1 \cdot 10^{+119} \lor \neg \left(w \leq -3300000000\right) \land w \leq 0.051:\\
\;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \ell}{\ell}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < -2.09999999999999983e119 or -3.3e9 < w < 0.0509999999999999967

    1. Initial program 99.5%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg99.5%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv99.5%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt99.5%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*99.5%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow299.5%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 98.1%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 85.4%

      \[\leadsto \color{blue}{\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)} \]

    if -2.09999999999999983e119 < w < -3.3e9 or 0.0509999999999999967 < w

    1. Initial program 97.4%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative97.4%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg97.4%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv97.4%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt97.4%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*97.4%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow297.4%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in l around 0 97.4%

      \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(e^{w}\right)}^{2}}\right)}^{0.3333333333333333} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    5. Step-by-step derivation
      1. unpow1/397.4%

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

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w} \cdot e^{w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      3. prod-exp97.4%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w + w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      4. rec-exp97.4%

        \[\leadsto \frac{\sqrt[3]{\color{blue}{e^{-\left(w + w\right)}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    6. Simplified97.4%

      \[\leadsto \frac{\color{blue}{\sqrt[3]{e^{-\left(w + w\right)}} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    7. Applied egg-rr27.3%

      \[\leadsto \color{blue}{\left(\ell \cdot \ell\right) \cdot \frac{1}{\ell}} \]
    8. Step-by-step derivation
      1. un-div-inv27.3%

        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]
    9. Applied egg-rr27.3%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2.1 \cdot 10^{+119} \lor \neg \left(w \leq -3300000000\right) \land w \leq 0.051:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \end{array} \]

Alternative 9: 69.9% accurate, 33.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -1200000 \lor \neg \left(w \leq 0.036\right):\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\ell\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (or (<= w -1200000.0) (not (<= w 0.036))) (/ (* l l) l) l))
double code(double w, double l) {
	double tmp;
	if ((w <= -1200000.0) || !(w <= 0.036)) {
		tmp = (l * l) / l;
	} else {
		tmp = l;
	}
	return tmp;
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((w <= (-1200000.0d0)) .or. (.not. (w <= 0.036d0))) then
        tmp = (l * l) / l
    else
        tmp = l
    end if
    code = tmp
end function
public static double code(double w, double l) {
	double tmp;
	if ((w <= -1200000.0) || !(w <= 0.036)) {
		tmp = (l * l) / l;
	} else {
		tmp = l;
	}
	return tmp;
}
def code(w, l):
	tmp = 0
	if (w <= -1200000.0) or not (w <= 0.036):
		tmp = (l * l) / l
	else:
		tmp = l
	return tmp
function code(w, l)
	tmp = 0.0
	if ((w <= -1200000.0) || !(w <= 0.036))
		tmp = Float64(Float64(l * l) / l);
	else
		tmp = l;
	end
	return tmp
end
function tmp_2 = code(w, l)
	tmp = 0.0;
	if ((w <= -1200000.0) || ~((w <= 0.036)))
		tmp = (l * l) / l;
	else
		tmp = l;
	end
	tmp_2 = tmp;
end
code[w_, l_] := If[Or[LessEqual[w, -1200000.0], N[Not[LessEqual[w, 0.036]], $MachinePrecision]], N[(N[(l * l), $MachinePrecision] / l), $MachinePrecision], l]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq -1200000 \lor \neg \left(w \leq 0.036\right):\\
\;\;\;\;\frac{\ell \cdot \ell}{\ell}\\

\mathbf{else}:\\
\;\;\;\;\ell\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < -1.2e6 or 0.0359999999999999973 < w

    1. Initial program 98.2%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative98.2%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg98.2%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv98.2%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt98.2%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*98.2%

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

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in l around 0 98.2%

      \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{\left(e^{w}\right)}^{2}}\right)}^{0.3333333333333333} \cdot {\ell}^{\left(e^{w}\right)}}}{\sqrt[3]{e^{w}}} \]
    5. Step-by-step derivation
      1. unpow1/398.2%

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

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w} \cdot e^{w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      3. prod-exp98.2%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{\color{blue}{e^{w + w}}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
      4. rec-exp98.2%

        \[\leadsto \frac{\sqrt[3]{\color{blue}{e^{-\left(w + w\right)}}} \cdot {\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}}} \]
    6. Simplified98.2%

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

      \[\leadsto \color{blue}{\left(\ell \cdot \ell\right) \cdot \frac{1}{\ell}} \]
    8. Step-by-step derivation
      1. un-div-inv25.4%

        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]
    9. Applied egg-rr25.4%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\ell}} \]

    if -1.2e6 < w < 0.0359999999999999973

    1. Initial program 99.4%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Taylor expanded in w around 0 97.0%

      \[\leadsto \color{blue}{\ell} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1200000 \lor \neg \left(w \leq 0.036\right):\\ \;\;\;\;\frac{\ell \cdot \ell}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\ell\\ \end{array} \]

Alternative 10: 69.9% accurate, 33.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 0.00066:\\ \;\;\;\;\frac{\ell}{1 + w \cdot 0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (if (<= l 0.00066)
   (/ l (+ 1.0 (* w 0.3333333333333333)))
   (+ l (* -0.3333333333333333 (* l w)))))
double code(double w, double l) {
	double tmp;
	if (l <= 0.00066) {
		tmp = l / (1.0 + (w * 0.3333333333333333));
	} else {
		tmp = l + (-0.3333333333333333 * (l * w));
	}
	return tmp;
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    real(8) :: tmp
    if (l <= 0.00066d0) then
        tmp = l / (1.0d0 + (w * 0.3333333333333333d0))
    else
        tmp = l + ((-0.3333333333333333d0) * (l * w))
    end if
    code = tmp
end function
public static double code(double w, double l) {
	double tmp;
	if (l <= 0.00066) {
		tmp = l / (1.0 + (w * 0.3333333333333333));
	} else {
		tmp = l + (-0.3333333333333333 * (l * w));
	}
	return tmp;
}
def code(w, l):
	tmp = 0
	if l <= 0.00066:
		tmp = l / (1.0 + (w * 0.3333333333333333))
	else:
		tmp = l + (-0.3333333333333333 * (l * w))
	return tmp
function code(w, l)
	tmp = 0.0
	if (l <= 0.00066)
		tmp = Float64(l / Float64(1.0 + Float64(w * 0.3333333333333333)));
	else
		tmp = Float64(l + Float64(-0.3333333333333333 * Float64(l * w)));
	end
	return tmp
end
function tmp_2 = code(w, l)
	tmp = 0.0;
	if (l <= 0.00066)
		tmp = l / (1.0 + (w * 0.3333333333333333));
	else
		tmp = l + (-0.3333333333333333 * (l * w));
	end
	tmp_2 = tmp;
end
code[w_, l_] := If[LessEqual[l, 0.00066], N[(l / N[(1.0 + N[(w * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l + N[(-0.3333333333333333 * N[(l * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 0.00066:\\
\;\;\;\;\frac{\ell}{1 + w \cdot 0.3333333333333333}\\

\mathbf{else}:\\
\;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.6e-4

    1. Initial program 99.7%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg99.7%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv99.7%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt99.7%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow299.7%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 98.9%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 56.2%

      \[\leadsto \frac{\ell}{\color{blue}{1 + 0.3333333333333333 \cdot w}} \]
    6. Step-by-step derivation
      1. *-commutative56.2%

        \[\leadsto \frac{\ell}{1 + \color{blue}{w \cdot 0.3333333333333333}} \]
    7. Simplified56.2%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot 0.3333333333333333}} \]

    if 6.6e-4 < l

    1. Initial program 97.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Step-by-step derivation
      1. *-commutative97.6%

        \[\leadsto \color{blue}{{\ell}^{\left(e^{w}\right)} \cdot e^{-w}} \]
      2. exp-neg97.6%

        \[\leadsto {\ell}^{\left(e^{w}\right)} \cdot \color{blue}{\frac{1}{e^{w}}} \]
      3. div-inv97.6%

        \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
      4. add-cube-cbrt97.6%

        \[\leadsto \frac{{\ell}^{\left(e^{w}\right)}}{\color{blue}{\left(\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}\right) \cdot \sqrt[3]{e^{w}}}} \]
      5. associate-/r*97.6%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{\sqrt[3]{e^{w}} \cdot \sqrt[3]{e^{w}}}}{\sqrt[3]{e^{w}}}} \]
      6. pow297.6%

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

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{\left(e^{w}\right)}}{{\left(\sqrt[3]{e^{w}}\right)}^{2}}}{\sqrt[3]{e^{w}}}} \]
    4. Taylor expanded in w around 0 96.5%

      \[\leadsto \frac{\color{blue}{\ell}}{\sqrt[3]{e^{w}}} \]
    5. Taylor expanded in w around 0 82.9%

      \[\leadsto \color{blue}{\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 0.00066:\\ \;\;\;\;\frac{\ell}{1 + w \cdot 0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\ell + -0.3333333333333333 \cdot \left(\ell \cdot w\right)\\ \end{array} \]

Alternative 11: 57.0% accurate, 305.0× speedup?

\[\begin{array}{l} \\ \ell \end{array} \]
(FPCore (w l) :precision binary64 l)
double code(double w, double l) {
	return l;
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    code = l
end function
public static double code(double w, double l) {
	return l;
}
def code(w, l):
	return l
function code(w, l)
	return l
end
function tmp = code(w, l)
	tmp = l;
end
code[w_, l_] := l
\begin{array}{l}

\\
\ell
\end{array}
Derivation
  1. Initial program 98.9%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Taylor expanded in w around 0 56.2%

    \[\leadsto \color{blue}{\ell} \]
  3. Final simplification56.2%

    \[\leadsto \ell \]

Reproduce

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