exp-w (used to crash)

Percentage Accurate: 99.4% → 99.4%
Time: 23.3s
Alternatives: 14
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 14 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, 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 99.7%

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

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

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

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

      \[\leadsto \frac{\color{blue}{{\ell}^{\left(e^{w}\right)}}}{e^{-\left(-w\right)}} \]
    5. remove-double-neg99.7%

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

    \[\leadsto \color{blue}{\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 97.8% accurate, 2.9× speedup?

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

\\
\ell \cdot e^{-w}
\end{array}
Derivation
  1. Initial program 99.7%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt41.3%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
    3. sqr-neg85.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
    4. sqrt-unprod43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
    5. add-sqr-sqrt84.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
    6. add-sqr-sqrt84.7%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
    8. add-sqr-sqrt43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
    9. sqrt-unprod68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
    10. sqr-neg68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
    11. sqrt-unprod25.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
    12. add-sqr-sqrt52.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
    13. pow152.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
    14. exp-neg52.0%

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

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
    17. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
    18. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
    19. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
  4. Applied egg-rr98.4%

    \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
  5. Final simplification98.4%

    \[\leadsto \ell \cdot e^{-w} \]
  6. Add Preprocessing

Alternative 3: 97.8% accurate, 3.0× speedup?

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

\\
\frac{\ell}{e^{w}}
\end{array}
Derivation
  1. Initial program 99.7%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt41.3%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
    3. sqr-neg85.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
    4. sqrt-unprod43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
    5. add-sqr-sqrt84.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
    6. add-sqr-sqrt84.7%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
    8. add-sqr-sqrt43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
    9. sqrt-unprod68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
    10. sqr-neg68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
    11. sqrt-unprod25.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
    12. add-sqr-sqrt52.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
    13. pow152.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
    14. exp-neg52.0%

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

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
    17. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
    18. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
    19. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
  4. Applied egg-rr98.4%

    \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
  5. Taylor expanded in w around inf 98.4%

    \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
  6. Step-by-step derivation
    1. rem-exp-log94.0%

      \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
    2. prod-exp94.0%

      \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
    3. sub-neg94.0%

      \[\leadsto e^{\color{blue}{\log \ell - w}} \]
    4. div-exp94.0%

      \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
    5. rem-exp-log98.4%

      \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
  7. Simplified98.4%

    \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
  8. Add Preprocessing

Alternative 4: 89.5% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\\ t_1 := 0.5 + w \cdot -0.16666666666666666\\ \mathbf{if}\;w \leq -2.95 \cdot 10^{+54}:\\ \;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot t\_1 + -1\right)\right)\\ \mathbf{elif}\;w \leq -0.24:\\ \;\;\;\;\ell + w \cdot \left(\frac{\left(w \cdot \left(\ell \cdot t\_1\right)\right) \cdot t\_0}{t\_0} - \ell\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (let* ((t_0 (* w (* l (- (* w -0.16666666666666666) 0.5))))
        (t_1 (+ 0.5 (* w -0.16666666666666666))))
   (if (<= w -2.95e+54)
     (+ l (* l (* w (+ (* w t_1) -1.0))))
     (if (<= w -0.24)
       (+ l (* w (- (/ (* (* w (* l t_1)) t_0) t_0) l)))
       (/ l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))))))
double code(double w, double l) {
	double t_0 = w * (l * ((w * -0.16666666666666666) - 0.5));
	double t_1 = 0.5 + (w * -0.16666666666666666);
	double tmp;
	if (w <= -2.95e+54) {
		tmp = l + (l * (w * ((w * t_1) + -1.0)));
	} else if (w <= -0.24) {
		tmp = l + (w * ((((w * (l * t_1)) * t_0) / t_0) - l));
	} else {
		tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
	}
	return tmp;
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = w * (l * ((w * (-0.16666666666666666d0)) - 0.5d0))
    t_1 = 0.5d0 + (w * (-0.16666666666666666d0))
    if (w <= (-2.95d+54)) then
        tmp = l + (l * (w * ((w * t_1) + (-1.0d0))))
    else if (w <= (-0.24d0)) then
        tmp = l + (w * ((((w * (l * t_1)) * t_0) / t_0) - l))
    else
        tmp = l / (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))
    end if
    code = tmp
end function
public static double code(double w, double l) {
	double t_0 = w * (l * ((w * -0.16666666666666666) - 0.5));
	double t_1 = 0.5 + (w * -0.16666666666666666);
	double tmp;
	if (w <= -2.95e+54) {
		tmp = l + (l * (w * ((w * t_1) + -1.0)));
	} else if (w <= -0.24) {
		tmp = l + (w * ((((w * (l * t_1)) * t_0) / t_0) - l));
	} else {
		tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
	}
	return tmp;
}
def code(w, l):
	t_0 = w * (l * ((w * -0.16666666666666666) - 0.5))
	t_1 = 0.5 + (w * -0.16666666666666666)
	tmp = 0
	if w <= -2.95e+54:
		tmp = l + (l * (w * ((w * t_1) + -1.0)))
	elif w <= -0.24:
		tmp = l + (w * ((((w * (l * t_1)) * t_0) / t_0) - l))
	else:
		tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))
	return tmp
function code(w, l)
	t_0 = Float64(w * Float64(l * Float64(Float64(w * -0.16666666666666666) - 0.5)))
	t_1 = Float64(0.5 + Float64(w * -0.16666666666666666))
	tmp = 0.0
	if (w <= -2.95e+54)
		tmp = Float64(l + Float64(l * Float64(w * Float64(Float64(w * t_1) + -1.0))));
	elseif (w <= -0.24)
		tmp = Float64(l + Float64(w * Float64(Float64(Float64(Float64(w * Float64(l * t_1)) * t_0) / t_0) - l)));
	else
		tmp = Float64(l / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666)))))));
	end
	return tmp
end
function tmp_2 = code(w, l)
	t_0 = w * (l * ((w * -0.16666666666666666) - 0.5));
	t_1 = 0.5 + (w * -0.16666666666666666);
	tmp = 0.0;
	if (w <= -2.95e+54)
		tmp = l + (l * (w * ((w * t_1) + -1.0)));
	elseif (w <= -0.24)
		tmp = l + (w * ((((w * (l * t_1)) * t_0) / t_0) - l));
	else
		tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
	end
	tmp_2 = tmp;
end
code[w_, l_] := Block[{t$95$0 = N[(w * N[(l * N[(N[(w * -0.16666666666666666), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -2.95e+54], N[(l + N[(l * N[(w * N[(N[(w * t$95$1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, -0.24], N[(l + N[(w * N[(N[(N[(N[(w * N[(l * t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\\
t_1 := 0.5 + w \cdot -0.16666666666666666\\
\mathbf{if}\;w \leq -2.95 \cdot 10^{+54}:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot t\_1 + -1\right)\right)\\

\mathbf{elif}\;w \leq -0.24:\\
\;\;\;\;\ell + w \cdot \left(\frac{\left(w \cdot \left(\ell \cdot t\_1\right)\right) \cdot t\_0}{t\_0} - \ell\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\


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

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg55.4%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg55.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 81.1%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right) + 0.5 \cdot \ell\right)\right)} \]
    6. Taylor expanded in l around 0 86.9%

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

    if -2.9499999999999999e54 < w < -0.23999999999999999

    1. Initial program 99.1%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg47.4%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg47.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt1.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow11.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg1.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up87.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval87.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval87.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval87.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr87.7%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 11.7%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right) + 0.5 \cdot \ell\right)\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-in11.7%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \color{blue}{\left(w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) + w \cdot \left(0.5 \cdot \ell\right)\right)}\right) \]
      2. flip-+15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \color{blue}{\frac{\left(w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right)\right) \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right)\right) - \left(w \cdot \left(0.5 \cdot \ell\right)\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}}\right) \]
      3. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \color{blue}{\left(\left(\ell \cdot w\right) \cdot -0.16666666666666666\right)}\right) \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right)\right) - \left(w \cdot \left(0.5 \cdot \ell\right)\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      4. associate-*l*15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \color{blue}{\left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)}\right) \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right)\right) - \left(w \cdot \left(0.5 \cdot \ell\right)\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      5. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \color{blue}{\left(\left(\ell \cdot w\right) \cdot -0.16666666666666666\right)}\right) - \left(w \cdot \left(0.5 \cdot \ell\right)\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      6. associate-*l*15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \color{blue}{\left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)}\right) - \left(w \cdot \left(0.5 \cdot \ell\right)\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      7. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \color{blue}{\left(\ell \cdot 0.5\right)}\right) \cdot \left(w \cdot \left(0.5 \cdot \ell\right)\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      8. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \color{blue}{\left(\ell \cdot 0.5\right)}\right)}{w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right)\right) - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      9. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \color{blue}{\left(\left(\ell \cdot w\right) \cdot -0.16666666666666666\right)} - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      10. associate-*l*15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \color{blue}{\left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)} - w \cdot \left(0.5 \cdot \ell\right)}\right) \]
      11. *-commutative15.9%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \color{blue}{\left(\ell \cdot 0.5\right)}}\right) \]
    7. Applied egg-rr15.9%

      \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \color{blue}{\frac{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right)\right) - \left(w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}}\right) \]
    8. Step-by-step derivation
      1. difference-of-squares42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\color{blue}{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) + w \cdot \left(\ell \cdot 0.5\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)\right)}}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      2. distribute-lft-out42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\color{blue}{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right) + \ell \cdot 0.5\right)\right)} \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      3. +-commutative42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \color{blue}{\left(\ell \cdot 0.5 + \ell \cdot \left(w \cdot -0.16666666666666666\right)\right)}\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      4. distribute-lft-in42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \color{blue}{\left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)}\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      5. distribute-lft-out--42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \color{blue}{\left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right) - \ell \cdot 0.5\right)\right)}}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      6. distribute-lft-out--42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \color{blue}{\left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)}\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right)\right) - w \cdot \left(\ell \cdot 0.5\right)}\right) \]
      7. distribute-lft-out--42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\right)}{\color{blue}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666\right) - \ell \cdot 0.5\right)}}\right) \]
      8. distribute-lft-out--42.5%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\right)}{w \cdot \color{blue}{\left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)}}\right) \]
    9. Simplified42.5%

      \[\leadsto \ell + w \cdot \left(-1 \cdot \ell + \color{blue}{\frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)}}\right) \]

    if -0.23999999999999999 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt60.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg99.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt98.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt98.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow175.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr98.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 98.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log92.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp92.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp92.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log98.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified98.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 95.4%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + 0.16666666666666666 \cdot w\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative95.4%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + \color{blue}{w \cdot 0.16666666666666666}\right)\right)} \]
    10. Simplified95.4%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2.95 \cdot 10^{+54}:\\ \;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\ \mathbf{elif}\;w \leq -0.24:\\ \;\;\;\;\ell + w \cdot \left(\frac{\left(w \cdot \left(\ell \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \left(w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)\right)}{w \cdot \left(\ell \cdot \left(w \cdot -0.16666666666666666 - 0.5\right)\right)} - \ell\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.9% accurate, 15.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq 2 \cdot 10^{-7}:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < 1.9999999999999999e-7

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt30.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg82.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod52.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt52.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod29.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt61.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow161.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg61.9%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr98.1%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 88.9%

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

    if 1.9999999999999999e-7 < w

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt100.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 100.0%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log100.0%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp100.0%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg100.0%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp100.0%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log100.0%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 85.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + 0.16666666666666666 \cdot w\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative85.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + \color{blue}{w \cdot 0.16666666666666666}\right)\right)} \]
    10. Simplified85.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.9% accurate, 15.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq 2 \cdot 10^{-7}:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < 1.9999999999999999e-7

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt30.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg82.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod52.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt52.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg81.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod29.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt61.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow161.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg61.9%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval98.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr98.1%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 87.1%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right) + 0.5 \cdot \ell\right)\right)} \]
    6. Taylor expanded in l around 0 88.9%

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

    if 1.9999999999999999e-7 < w

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt100.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 100.0%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log100.0%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp100.0%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg100.0%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp100.0%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log100.0%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 85.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + 0.16666666666666666 \cdot w\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative85.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + \color{blue}{w \cdot 0.16666666666666666}\right)\right)} \]
    10. Simplified85.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 87.8% accurate, 15.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq -12.2:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\

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


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

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 69.6%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(-0.16666666666666666 \cdot \left(\ell \cdot w\right) + 0.5 \cdot \ell\right)\right)} \]
    6. Taylor expanded in l around 0 74.4%

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

    if -12.199999999999999 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt59.4%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg98.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt97.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow174.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log91.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp91.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp91.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 93.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + 0.5 \cdot w\right)}} \]
    9. Step-by-step derivation
      1. *-commutative93.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + \color{blue}{w \cdot 0.5}\right)} \]
    10. Simplified93.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot 0.5\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -12.2:\\ \;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 84.5% accurate, 19.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq -1.4:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(-1 + w \cdot 0.5\right)\right)\\

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


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

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around 0 64.5%

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

    if -1.3999999999999999 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt59.4%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg98.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt97.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow174.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log91.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp91.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp91.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 93.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + 0.5 \cdot w\right)}} \]
    9. Step-by-step derivation
      1. *-commutative93.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + \color{blue}{w \cdot 0.5}\right)} \]
    10. Simplified93.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.4:\\ \;\;\;\;\ell \cdot \left(1 + w \cdot \left(-1 + w \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 81.5% accurate, 19.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq -7.3:\\
\;\;\;\;\ell - w \cdot \left(\ell + w \cdot \left(\ell \cdot -0.5\right)\right)\\

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


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

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt55.1%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg55.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow10.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg0.0%

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval100.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr100.0%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 100.0%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log100.0%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp100.0%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg100.0%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp100.0%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log100.0%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 56.1%

      \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \left(w \cdot \left(-1 \cdot \ell + 0.5 \cdot \ell\right)\right) - \ell\right)} \]
    9. Step-by-step derivation
      1. distribute-rgt-out56.1%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \left(w \cdot \color{blue}{\left(\ell \cdot \left(-1 + 0.5\right)\right)}\right) - \ell\right) \]
      2. metadata-eval56.1%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \left(w \cdot \left(\ell \cdot \color{blue}{-0.5}\right)\right) - \ell\right) \]
      3. metadata-eval56.1%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \left(w \cdot \left(\ell \cdot \color{blue}{\left(-0.5\right)}\right)\right) - \ell\right) \]
      4. distribute-rgt-neg-in56.1%

        \[\leadsto \ell + w \cdot \left(-1 \cdot \left(w \cdot \color{blue}{\left(-\ell \cdot 0.5\right)}\right) - \ell\right) \]
      5. associate-*r*56.1%

        \[\leadsto \ell + w \cdot \left(\color{blue}{\left(-1 \cdot w\right) \cdot \left(-\ell \cdot 0.5\right)} - \ell\right) \]
      6. neg-mul-156.1%

        \[\leadsto \ell + w \cdot \left(\color{blue}{\left(-w\right)} \cdot \left(-\ell \cdot 0.5\right) - \ell\right) \]
      7. distribute-rgt-neg-in56.1%

        \[\leadsto \ell + w \cdot \left(\left(-w\right) \cdot \color{blue}{\left(\ell \cdot \left(-0.5\right)\right)} - \ell\right) \]
      8. metadata-eval56.1%

        \[\leadsto \ell + w \cdot \left(\left(-w\right) \cdot \left(\ell \cdot \color{blue}{-0.5}\right) - \ell\right) \]
    10. Simplified56.1%

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

    if -7.29999999999999982 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt59.4%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg98.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt97.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt38.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow174.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow74.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log91.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp91.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp91.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 93.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + 0.5 \cdot w\right)}} \]
    9. Step-by-step derivation
      1. *-commutative93.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + \color{blue}{w \cdot 0.5}\right)} \]
    10. Simplified93.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + w \cdot 0.5\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -7.3:\\ \;\;\;\;\ell - w \cdot \left(\ell + w \cdot \left(\ell \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 74.2% accurate, 19.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.122:\\
\;\;\;\;\ell \cdot \left(-w\right)\\

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


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

    1. Initial program 99.8%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt53.9%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.2%

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

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.7%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.7%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log97.7%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp97.7%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg97.7%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp97.7%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.7%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 32.1%

      \[\leadsto \color{blue}{\ell + -1 \cdot \left(\ell \cdot w\right)} \]
    9. Step-by-step derivation
      1. *-rgt-identity32.1%

        \[\leadsto \color{blue}{\ell \cdot 1} + -1 \cdot \left(\ell \cdot w\right) \]
      2. neg-mul-132.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\left(-\ell \cdot w\right)} \]
      3. distribute-rgt-neg-in32.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\ell \cdot \left(-w\right)} \]
      4. distribute-lft-out32.1%

        \[\leadsto \color{blue}{\ell \cdot \left(1 + \left(-w\right)\right)} \]
      5. sub-neg32.1%

        \[\leadsto \ell \cdot \color{blue}{\left(1 - w\right)} \]
    10. Simplified32.1%

      \[\leadsto \color{blue}{\ell \cdot \left(1 - w\right)} \]
    11. Taylor expanded in w around inf 32.1%

      \[\leadsto \color{blue}{-1 \cdot \left(\ell \cdot w\right)} \]
    12. Step-by-step derivation
      1. associate-*r*32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot \ell\right) \cdot w} \]
      2. mul-1-neg32.1%

        \[\leadsto \color{blue}{\left(-\ell\right)} \cdot w \]
    13. Simplified32.1%

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

    if -0.122 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt60.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg99.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt98.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt98.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow175.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr98.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 98.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log92.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp92.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp92.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log98.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified98.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 94.5%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w \cdot \left(1 + 0.5 \cdot w\right)}} \]
    9. Step-by-step derivation
      1. *-commutative94.5%

        \[\leadsto \frac{\ell}{1 + w \cdot \left(1 + \color{blue}{w \cdot 0.5}\right)} \]
    10. Simplified94.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -0.122:\\ \;\;\;\;\ell \cdot \left(-w\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 70.5% accurate, 30.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.04:\\
\;\;\;\;\ell \cdot \left(-w\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{w + 1}\\


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

    1. Initial program 99.8%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt53.9%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.2%

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

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.7%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.7%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log97.7%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp97.7%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg97.7%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp97.7%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.7%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 32.1%

      \[\leadsto \color{blue}{\ell + -1 \cdot \left(\ell \cdot w\right)} \]
    9. Step-by-step derivation
      1. *-rgt-identity32.1%

        \[\leadsto \color{blue}{\ell \cdot 1} + -1 \cdot \left(\ell \cdot w\right) \]
      2. neg-mul-132.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\left(-\ell \cdot w\right)} \]
      3. distribute-rgt-neg-in32.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\ell \cdot \left(-w\right)} \]
      4. distribute-lft-out32.1%

        \[\leadsto \color{blue}{\ell \cdot \left(1 + \left(-w\right)\right)} \]
      5. sub-neg32.1%

        \[\leadsto \ell \cdot \color{blue}{\left(1 - w\right)} \]
    10. Simplified32.1%

      \[\leadsto \color{blue}{\ell \cdot \left(1 - w\right)} \]
    11. Taylor expanded in w around inf 32.1%

      \[\leadsto \color{blue}{-1 \cdot \left(\ell \cdot w\right)} \]
    12. Step-by-step derivation
      1. associate-*r*32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot \ell\right) \cdot w} \]
      2. mul-1-neg32.1%

        \[\leadsto \color{blue}{\left(-\ell\right)} \cdot w \]
    13. Simplified32.1%

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

    if -0.0400000000000000008 < w

    1. Initial program 99.6%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt60.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg99.1%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt98.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt98.7%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt39.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
      9. sqrt-unprod75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod36.4%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
      13. pow175.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
      14. exp-neg75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{\frac{1}{e^{w}}}}\right)} \]
      15. inv-pow75.5%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval98.8%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr98.8%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 98.8%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log92.4%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp92.4%

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

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp92.4%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log98.8%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified98.8%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 89.7%

      \[\leadsto \frac{\ell}{\color{blue}{1 + w}} \]
    9. Step-by-step derivation
      1. +-commutative89.7%

        \[\leadsto \frac{\ell}{\color{blue}{w + 1}} \]
    10. Simplified89.7%

      \[\leadsto \frac{\ell}{\color{blue}{w + 1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -0.04:\\ \;\;\;\;\ell \cdot \left(-w\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{w + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.9% accurate, 33.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -0.011:\\ \;\;\;\;\ell \cdot \left(-w\right)\\ \mathbf{else}:\\ \;\;\;\;\ell\\ \end{array} \end{array} \]
(FPCore (w l) :precision binary64 (if (<= w -0.011) (* l (- w)) l))
double code(double w, double l) {
	double tmp;
	if (w <= -0.011) {
		tmp = l * -w;
	} 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 <= (-0.011d0)) then
        tmp = l * -w
    else
        tmp = l
    end if
    code = tmp
end function
public static double code(double w, double l) {
	double tmp;
	if (w <= -0.011) {
		tmp = l * -w;
	} else {
		tmp = l;
	}
	return tmp;
}
def code(w, l):
	tmp = 0
	if w <= -0.011:
		tmp = l * -w
	else:
		tmp = l
	return tmp
function code(w, l)
	tmp = 0.0
	if (w <= -0.011)
		tmp = Float64(l * Float64(-w));
	else
		tmp = l;
	end
	return tmp
end
function tmp_2 = code(w, l)
	tmp = 0.0;
	if (w <= -0.011)
		tmp = l * -w;
	else
		tmp = l;
	end
	tmp_2 = tmp;
end
code[w_, l_] := If[LessEqual[w, -0.011], N[(l * (-w)), $MachinePrecision], l]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.011:\\
\;\;\;\;\ell \cdot \left(-w\right)\\

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


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

    1. Initial program 99.8%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
      3. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
      4. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
      5. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
      6. add-sqr-sqrt53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w}} \cdot \sqrt{e^{-w}}\right)}} \]
      7. sqrt-unprod53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
      8. add-sqr-sqrt53.9%

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
      10. sqr-neg53.9%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
      11. sqrt-unprod0.0%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
      12. add-sqr-sqrt0.2%

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

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

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

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{1} \cdot \color{blue}{{\left(e^{w}\right)}^{-1}}}\right)} \]
      16. pow-prod-up97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
      17. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
      18. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
      19. metadata-eval97.7%

        \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
    4. Applied egg-rr97.7%

      \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
    5. Taylor expanded in w around inf 97.7%

      \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
    6. Step-by-step derivation
      1. rem-exp-log97.7%

        \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
      2. prod-exp97.7%

        \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
      3. sub-neg97.7%

        \[\leadsto e^{\color{blue}{\log \ell - w}} \]
      4. div-exp97.7%

        \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
      5. rem-exp-log97.7%

        \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
    8. Taylor expanded in w around 0 32.1%

      \[\leadsto \color{blue}{\ell + -1 \cdot \left(\ell \cdot w\right)} \]
    9. Step-by-step derivation
      1. *-rgt-identity32.1%

        \[\leadsto \color{blue}{\ell \cdot 1} + -1 \cdot \left(\ell \cdot w\right) \]
      2. neg-mul-132.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\left(-\ell \cdot w\right)} \]
      3. distribute-rgt-neg-in32.1%

        \[\leadsto \ell \cdot 1 + \color{blue}{\ell \cdot \left(-w\right)} \]
      4. distribute-lft-out32.1%

        \[\leadsto \color{blue}{\ell \cdot \left(1 + \left(-w\right)\right)} \]
      5. sub-neg32.1%

        \[\leadsto \ell \cdot \color{blue}{\left(1 - w\right)} \]
    10. Simplified32.1%

      \[\leadsto \color{blue}{\ell \cdot \left(1 - w\right)} \]
    11. Taylor expanded in w around inf 32.1%

      \[\leadsto \color{blue}{-1 \cdot \left(\ell \cdot w\right)} \]
    12. Step-by-step derivation
      1. associate-*r*32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot \ell\right) \cdot w} \]
      2. mul-1-neg32.1%

        \[\leadsto \color{blue}{\left(-\ell\right)} \cdot w \]
    13. Simplified32.1%

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

    if -0.010999999999999999 < w

    1. Initial program 99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -0.011:\\ \;\;\;\;\ell \cdot \left(-w\right)\\ \mathbf{else}:\\ \;\;\;\;\ell\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 63.6% accurate, 61.0× speedup?

\[\begin{array}{l} \\ \ell \cdot \left(1 - w\right) \end{array} \]
(FPCore (w l) :precision binary64 (* l (- 1.0 w)))
double code(double w, double l) {
	return l * (1.0 - w);
}
real(8) function code(w, l)
    real(8), intent (in) :: w
    real(8), intent (in) :: l
    code = l * (1.0d0 - w)
end function
public static double code(double w, double l) {
	return l * (1.0 - w);
}
def code(w, l):
	return l * (1.0 - w)
function code(w, l)
	return Float64(l * Float64(1.0 - w))
end
function tmp = code(w, l)
	tmp = l * (1.0 - w);
end
code[w_, l_] := N[(l * N[(1.0 - w), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\ell \cdot \left(1 - w\right)
\end{array}
Derivation
  1. Initial program 99.7%

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt41.3%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{w \cdot w}}}\right)} \]
    3. sqr-neg85.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\sqrt{\color{blue}{\left(-w\right) \cdot \left(-w\right)}}}\right)} \]
    4. sqrt-unprod43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}}\right)} \]
    5. add-sqr-sqrt84.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(e^{\color{blue}{-w}}\right)} \]
    6. add-sqr-sqrt84.7%

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

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{\left(\sqrt{e^{-w} \cdot e^{-w}}\right)}} \]
    8. add-sqr-sqrt43.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{-w} \cdot \sqrt{-w}}} \cdot e^{-w}}\right)} \]
    9. sqrt-unprod68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{\left(-w\right) \cdot \left(-w\right)}}} \cdot e^{-w}}\right)} \]
    10. sqr-neg68.7%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\sqrt{\color{blue}{w \cdot w}}} \cdot e^{-w}}\right)} \]
    11. sqrt-unprod25.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{\sqrt{w} \cdot \sqrt{w}}} \cdot e^{-w}}\right)} \]
    12. add-sqr-sqrt52.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{e^{\color{blue}{w}} \cdot e^{-w}}\right)} \]
    13. pow152.0%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{1}} \cdot e^{-w}}\right)} \]
    14. exp-neg52.0%

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

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

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{{\left(e^{w}\right)}^{\left(1 + -1\right)}}}\right)} \]
    17. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{{\left(e^{w}\right)}^{\color{blue}{0}}}\right)} \]
    18. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\left(\sqrt{\color{blue}{1}}\right)} \]
    19. metadata-eval98.4%

      \[\leadsto e^{-w} \cdot {\ell}^{\color{blue}{1}} \]
  4. Applied egg-rr98.4%

    \[\leadsto e^{-w} \cdot \color{blue}{\left(\ell \cdot 1\right)} \]
  5. Taylor expanded in w around inf 98.4%

    \[\leadsto \color{blue}{\ell \cdot e^{-w}} \]
  6. Step-by-step derivation
    1. rem-exp-log94.0%

      \[\leadsto \color{blue}{e^{\log \ell}} \cdot e^{-w} \]
    2. prod-exp94.0%

      \[\leadsto \color{blue}{e^{\log \ell + \left(-w\right)}} \]
    3. sub-neg94.0%

      \[\leadsto e^{\color{blue}{\log \ell - w}} \]
    4. div-exp94.0%

      \[\leadsto \color{blue}{\frac{e^{\log \ell}}{e^{w}}} \]
    5. rem-exp-log98.4%

      \[\leadsto \frac{\color{blue}{\ell}}{e^{w}} \]
  7. Simplified98.4%

    \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
  8. Taylor expanded in w around 0 62.5%

    \[\leadsto \color{blue}{\ell + -1 \cdot \left(\ell \cdot w\right)} \]
  9. Step-by-step derivation
    1. *-rgt-identity62.5%

      \[\leadsto \color{blue}{\ell \cdot 1} + -1 \cdot \left(\ell \cdot w\right) \]
    2. neg-mul-162.5%

      \[\leadsto \ell \cdot 1 + \color{blue}{\left(-\ell \cdot w\right)} \]
    3. distribute-rgt-neg-in62.5%

      \[\leadsto \ell \cdot 1 + \color{blue}{\ell \cdot \left(-w\right)} \]
    4. distribute-lft-out62.5%

      \[\leadsto \color{blue}{\ell \cdot \left(1 + \left(-w\right)\right)} \]
    5. sub-neg62.5%

      \[\leadsto \ell \cdot \color{blue}{\left(1 - w\right)} \]
  10. Simplified62.5%

    \[\leadsto \color{blue}{\ell \cdot \left(1 - w\right)} \]
  11. Add Preprocessing

Alternative 14: 57.5% 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 99.7%

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

    \[\leadsto \color{blue}{\ell} \]
  4. Add Preprocessing

Reproduce

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