exp-w (used to crash)

Percentage Accurate: 99.5% → 99.5%
Time: 22.3s
Alternatives: 12
Speedup: 1.0×

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 12 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.5% 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.5% accurate, 1.0× speedup?

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

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

    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
  2. Add Preprocessing
  3. Final simplification99.7%

    \[\leadsto e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \]
  4. Add Preprocessing

Alternative 2: 88.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;0\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(w \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (w l)
 :precision binary64
 (let* ((t_0 (* (exp (- 0.0 w)) (pow l (exp w)))))
   (if (<= t_0 0.0)
     0.0
     (if (<= t_0 INFINITY)
       (* l (fma w (fma w 0.5 -1.0) 1.0))
       (* l (* w (* w (* w -0.16666666666666666))))))))
double code(double w, double l) {
	double t_0 = exp((0.0 - w)) * pow(l, exp(w));
	double tmp;
	if (t_0 <= 0.0) {
		tmp = 0.0;
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = l * fma(w, fma(w, 0.5, -1.0), 1.0);
	} else {
		tmp = l * (w * (w * (w * -0.16666666666666666)));
	}
	return tmp;
}
function code(w, l)
	t_0 = Float64(exp(Float64(0.0 - w)) * (l ^ exp(w)))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = 0.0;
	elseif (t_0 <= Inf)
		tmp = Float64(l * fma(w, fma(w, 0.5, -1.0), 1.0));
	else
		tmp = Float64(l * Float64(w * Float64(w * Float64(w * -0.16666666666666666))));
	end
	return tmp
end
code[w_, l_] := Block[{t$95$0 = N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], 0.0, If[LessEqual[t$95$0, Infinity], N[(l * N[(w * N[(w * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(l * N[(w * N[(w * N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;0\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 0.0

    1. Initial program 100.0%

      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. exp-negN/A

        \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
      2. sqr-powN/A

        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
      3. pow-prod-upN/A

        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
      4. flip-+N/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
      5. +-inversesN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      6. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      7. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      8. mul0-lftN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      9. *-commutativeN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      10. *-commutativeN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      11. mul0-lftN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      12. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
      13. +-inversesN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
      14. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
      15. flip--N/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
      16. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
      17. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
      18. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
      19. div-invN/A

        \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
      20. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
      21. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
      22. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
      23. metadata-evalN/A

        \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{0} \]

    if 0.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < +inf.0

    1. Initial program 99.7%

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

      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
    4. Step-by-step derivation
      1. Simplified97.9%

        \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
      2. Taylor expanded in w around 0

        \[\leadsto \color{blue}{\left(1 + w \cdot \left(\frac{1}{2} \cdot w - 1\right)\right)} \cdot \ell \]
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(w \cdot \left(\frac{1}{2} \cdot w - 1\right) + 1\right)} \cdot \ell \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(w, \frac{1}{2} \cdot w - 1, 1\right)} \cdot \ell \]
        3. sub-negN/A

          \[\leadsto \mathsf{fma}\left(w, \color{blue}{\frac{1}{2} \cdot w + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \cdot \ell \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \cdot \ell \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(w, w \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \cdot \ell \]
        6. accelerator-lowering-fma.f6486.7

          \[\leadsto \mathsf{fma}\left(w, \color{blue}{\mathsf{fma}\left(w, 0.5, -1\right)}, 1\right) \cdot \ell \]
      4. Simplified86.7%

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

      if +inf.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w)))

      1. Initial program 99.7%

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

        \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
      4. Step-by-step derivation
        1. Simplified98.2%

          \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
        2. Taylor expanded in w around 0

          \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right)} \]
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right) + \ell} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(w, -1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right), \ell\right)} \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + -1 \cdot \ell}, \ell\right) \]
          4. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(w, w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + \color{blue}{\left(\mathsf{neg}\left(\ell\right)\right)}, \ell\right) \]
          5. unsub-negN/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
          7. distribute-rgt-inN/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\left(\frac{-1}{6} \cdot \left(\ell \cdot w\right)\right) \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right)} - \ell, \ell\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\left(\ell \cdot w\right) \cdot \frac{-1}{6}\right)} \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
          9. associate-*l*N/A

            \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right)} + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
          10. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\frac{1}{2} \cdot \left(\ell \cdot w\right)}\right) - \ell, \ell\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\left(\ell \cdot w\right) \cdot \frac{1}{2}}\right) - \ell, \ell\right) \]
          12. distribute-lft-outN/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
          13. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right)} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - \ell, \ell\right) \]
          16. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
          17. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \left(\color{blue}{w \cdot \frac{-1}{6}} + \frac{1}{2}\right) - \ell, \ell\right) \]
          18. accelerator-lowering-fma.f6476.3

            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\mathsf{fma}\left(w, -0.16666666666666666, 0.5\right)} - \ell, \ell\right) \]
        4. Simplified76.3%

          \[\leadsto \color{blue}{\mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right) - \ell, \ell\right)} \]
        5. Taylor expanded in w around inf

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left(\ell \cdot {w}^{3}\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot \ell\right) \cdot {w}^{3}} \]
          2. *-commutativeN/A

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

            \[\leadsto \color{blue}{\ell \cdot \left(\frac{-1}{6} \cdot {w}^{3}\right)} \]
          4. metadata-evalN/A

            \[\leadsto \ell \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{6}\right)\right)} \cdot {w}^{3}\right) \]
          5. distribute-lft-neg-inN/A

            \[\leadsto \ell \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{6} \cdot {w}^{3}\right)\right)} \]
          6. *-commutativeN/A

            \[\leadsto \ell \cdot \left(\mathsf{neg}\left(\color{blue}{{w}^{3} \cdot \frac{1}{6}}\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\ell \cdot \left(\mathsf{neg}\left({w}^{3} \cdot \frac{1}{6}\right)\right)} \]
          8. distribute-rgt-neg-inN/A

            \[\leadsto \ell \cdot \color{blue}{\left({w}^{3} \cdot \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)} \]
          9. cube-multN/A

            \[\leadsto \ell \cdot \left(\color{blue}{\left(w \cdot \left(w \cdot w\right)\right)} \cdot \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right) \]
          10. unpow2N/A

            \[\leadsto \ell \cdot \left(\left(w \cdot \color{blue}{{w}^{2}}\right) \cdot \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \ell \cdot \left(\left(w \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-1}{6}}\right) \]
          12. associate-*l*N/A

            \[\leadsto \ell \cdot \color{blue}{\left(w \cdot \left({w}^{2} \cdot \frac{-1}{6}\right)\right)} \]
          13. unpow2N/A

            \[\leadsto \ell \cdot \left(w \cdot \left(\color{blue}{\left(w \cdot w\right)} \cdot \frac{-1}{6}\right)\right) \]
          14. associate-*r*N/A

            \[\leadsto \ell \cdot \left(w \cdot \color{blue}{\left(w \cdot \left(w \cdot \frac{-1}{6}\right)\right)}\right) \]
          15. *-commutativeN/A

            \[\leadsto \ell \cdot \left(w \cdot \left(w \cdot \color{blue}{\left(\frac{-1}{6} \cdot w\right)}\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \ell \cdot \color{blue}{\left(w \cdot \left(w \cdot \left(\frac{-1}{6} \cdot w\right)\right)\right)} \]
          17. *-lowering-*.f64N/A

            \[\leadsto \ell \cdot \left(w \cdot \color{blue}{\left(w \cdot \left(\frac{-1}{6} \cdot w\right)\right)}\right) \]
          18. *-commutativeN/A

            \[\leadsto \ell \cdot \left(w \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{-1}{6}\right)}\right)\right) \]
          19. *-lowering-*.f6423.3

            \[\leadsto \ell \cdot \left(w \cdot \left(w \cdot \color{blue}{\left(w \cdot -0.16666666666666666\right)}\right)\right) \]
        7. Simplified23.3%

          \[\leadsto \color{blue}{\ell \cdot \left(w \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right)\right)} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification88.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{elif}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq \infty:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(w \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 91.4% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \end{array} \end{array} \]
      (FPCore (w l)
       :precision binary64
       (if (<= (* (exp (- 0.0 w)) (pow l (exp w))) 0.0)
         0.0
         (* l (fma w (fma w (fma w -0.16666666666666666 0.5) -1.0) 1.0))))
      double code(double w, double l) {
      	double tmp;
      	if ((exp((0.0 - w)) * pow(l, exp(w))) <= 0.0) {
      		tmp = 0.0;
      	} else {
      		tmp = l * fma(w, fma(w, fma(w, -0.16666666666666666, 0.5), -1.0), 1.0);
      	}
      	return tmp;
      }
      
      function code(w, l)
      	tmp = 0.0
      	if (Float64(exp(Float64(0.0 - w)) * (l ^ exp(w))) <= 0.0)
      		tmp = 0.0;
      	else
      		tmp = Float64(l * fma(w, fma(w, fma(w, -0.16666666666666666, 0.5), -1.0), 1.0));
      	end
      	return tmp
      end
      
      code[w_, l_] := If[LessEqual[N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], 0.0, N[(l * N[(w * N[(w * N[(w * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\
      \;\;\;\;0\\
      
      \mathbf{else}:\\
      \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 0.0

        1. Initial program 100.0%

          \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. exp-negN/A

            \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
          2. sqr-powN/A

            \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
          3. pow-prod-upN/A

            \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
          4. flip-+N/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
          5. +-inversesN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          7. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          8. mul0-lftN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          9. *-commutativeN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          10. *-commutativeN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          11. mul0-lftN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          12. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
          13. +-inversesN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
          14. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
          15. flip--N/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
          16. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
          18. associate-/r/N/A

            \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
          19. div-invN/A

            \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
          20. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
          21. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
          22. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
          23. metadata-evalN/A

            \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
        4. Applied egg-rr100.0%

          \[\leadsto \color{blue}{0} \]

        if 0.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w)))

        1. Initial program 99.7%

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

          \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
        4. Step-by-step derivation
          1. Simplified97.9%

            \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
          2. Taylor expanded in w around 0

            \[\leadsto \color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)} \cdot \ell \]
          3. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\left(w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right) + 1\right)} \cdot \ell \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(w, w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1, 1\right)} \cdot \ell \]
            3. sub-negN/A

              \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \cdot \ell \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(w, w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + \color{blue}{-1}, 1\right) \cdot \ell \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(w, \color{blue}{\mathsf{fma}\left(w, \frac{1}{2} + \frac{-1}{6} \cdot w, -1\right)}, 1\right) \cdot \ell \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(w, \mathsf{fma}\left(w, \color{blue}{\frac{-1}{6} \cdot w + \frac{1}{2}}, -1\right), 1\right) \cdot \ell \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(w, \mathsf{fma}\left(w, \color{blue}{w \cdot \frac{-1}{6}} + \frac{1}{2}, -1\right), 1\right) \cdot \ell \]
            8. accelerator-lowering-fma.f6489.3

              \[\leadsto \mathsf{fma}\left(w, \mathsf{fma}\left(w, \color{blue}{\mathsf{fma}\left(w, -0.16666666666666666, 0.5\right)}, -1\right), 1\right) \cdot \ell \]
          4. Simplified89.3%

            \[\leadsto \color{blue}{\mathsf{fma}\left(w, \mathsf{fma}\left(w, \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right), -1\right), 1\right)} \cdot \ell \]
        5. Recombined 2 regimes into one program.
        6. Final simplification90.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 4: 89.7% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(w, \ell \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right), \ell\right)\\ \end{array} \end{array} \]
        (FPCore (w l)
         :precision binary64
         (if (<= (* (exp (- 0.0 w)) (pow l (exp w))) 0.0)
           0.0
           (fma w (* l (* w (* w -0.16666666666666666))) l)))
        double code(double w, double l) {
        	double tmp;
        	if ((exp((0.0 - w)) * pow(l, exp(w))) <= 0.0) {
        		tmp = 0.0;
        	} else {
        		tmp = fma(w, (l * (w * (w * -0.16666666666666666))), l);
        	}
        	return tmp;
        }
        
        function code(w, l)
        	tmp = 0.0
        	if (Float64(exp(Float64(0.0 - w)) * (l ^ exp(w))) <= 0.0)
        		tmp = 0.0;
        	else
        		tmp = fma(w, Float64(l * Float64(w * Float64(w * -0.16666666666666666))), l);
        	end
        	return tmp
        end
        
        code[w_, l_] := If[LessEqual[N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], 0.0, N[(w * N[(l * N[(w * N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + l), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\
        \;\;\;\;0\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(w, \ell \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right), \ell\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 0.0

          1. Initial program 100.0%

            \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. exp-negN/A

              \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
            2. sqr-powN/A

              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
            3. pow-prod-upN/A

              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
            4. flip-+N/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
            5. +-inversesN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            6. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            7. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            8. mul0-lftN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            9. *-commutativeN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            10. *-commutativeN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            11. mul0-lftN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            12. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
            13. +-inversesN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
            14. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
            15. flip--N/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
            16. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
            17. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
            18. associate-/r/N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
            19. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
            20. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
            21. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
            22. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
            23. metadata-evalN/A

              \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
          4. Applied egg-rr100.0%

            \[\leadsto \color{blue}{0} \]

          if 0.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w)))

          1. Initial program 99.7%

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

            \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
          4. Step-by-step derivation
            1. Simplified97.9%

              \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
            2. Taylor expanded in w around 0

              \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right)} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right) + \ell} \]
              2. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(w, -1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right), \ell\right)} \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + -1 \cdot \ell}, \ell\right) \]
              4. mul-1-negN/A

                \[\leadsto \mathsf{fma}\left(w, w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + \color{blue}{\left(\mathsf{neg}\left(\ell\right)\right)}, \ell\right) \]
              5. unsub-negN/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
              6. --lowering--.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\left(\frac{-1}{6} \cdot \left(\ell \cdot w\right)\right) \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right)} - \ell, \ell\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\left(\ell \cdot w\right) \cdot \frac{-1}{6}\right)} \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
              9. associate-*l*N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right)} + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
              10. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\frac{1}{2} \cdot \left(\ell \cdot w\right)}\right) - \ell, \ell\right) \]
              11. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\left(\ell \cdot w\right) \cdot \frac{1}{2}}\right) - \ell, \ell\right) \]
              12. distribute-lft-outN/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
              13. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right)} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - \ell, \ell\right) \]
              16. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
              17. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \left(\color{blue}{w \cdot \frac{-1}{6}} + \frac{1}{2}\right) - \ell, \ell\right) \]
              18. accelerator-lowering-fma.f6487.6

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\mathsf{fma}\left(w, -0.16666666666666666, 0.5\right)} - \ell, \ell\right) \]
            4. Simplified87.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right) - \ell, \ell\right)} \]
            5. Step-by-step derivation
              1. flip-+N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}}{w \cdot \frac{-1}{6} - \frac{1}{2}}} - \ell, \ell\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}}{w \cdot \frac{-1}{6} - \frac{1}{2}}} - \ell, \ell\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\color{blue}{\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{2}\right)\right)}}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              4. swap-sqrN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\color{blue}{\left(w \cdot w\right) \cdot \left(\frac{-1}{6} \cdot \frac{-1}{6}\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{2}\right)\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              5. accelerator-lowering-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\color{blue}{\mathsf{fma}\left(w \cdot w, \frac{-1}{6} \cdot \frac{-1}{6}, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{2}\right)\right)}}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(\color{blue}{w \cdot w}, \frac{-1}{6} \cdot \frac{-1}{6}, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{2}\right)\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, \color{blue}{\frac{1}{36}}, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{2}\right)\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              8. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, \frac{1}{36}, \mathsf{neg}\left(\color{blue}{\frac{1}{4}}\right)\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, \frac{1}{36}, \color{blue}{\frac{-1}{4}}\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \ell, \ell\right) \]
              10. sub-negN/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, \frac{1}{36}, \frac{-1}{4}\right)}{\color{blue}{w \cdot \frac{-1}{6} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} - \ell, \ell\right) \]
              11. accelerator-lowering-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, \frac{1}{36}, \frac{-1}{4}\right)}{\color{blue}{\mathsf{fma}\left(w, \frac{-1}{6}, \mathsf{neg}\left(\frac{1}{2}\right)\right)}} - \ell, \ell\right) \]
              12. metadata-eval88.1

                \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\mathsf{fma}\left(w \cdot w, 0.027777777777777776, -0.25\right)}{\mathsf{fma}\left(w, -0.16666666666666666, \color{blue}{-0.5}\right)} - \ell, \ell\right) \]
            6. Applied egg-rr88.1%

              \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\mathsf{fma}\left(w \cdot w, 0.027777777777777776, -0.25\right)}{\mathsf{fma}\left(w, -0.16666666666666666, -0.5\right)}} - \ell, \ell\right) \]
            7. Taylor expanded in w around inf

              \[\leadsto \mathsf{fma}\left(w, \color{blue}{\frac{-1}{6} \cdot \left(\ell \cdot {w}^{2}\right)}, \ell\right) \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot {w}^{2}\right) \cdot \frac{-1}{6}}, \ell\right) \]
              2. associate-*l*N/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\ell \cdot \left({w}^{2} \cdot \frac{-1}{6}\right)}, \ell\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \left(\color{blue}{\left(w \cdot w\right)} \cdot \frac{-1}{6}\right), \ell\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \color{blue}{\left(w \cdot \left(w \cdot \frac{-1}{6}\right)\right)}, \ell\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \left(w \cdot \color{blue}{\left(\frac{-1}{6} \cdot w\right)}\right), \ell\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \color{blue}{\ell \cdot \left(w \cdot \left(\frac{-1}{6} \cdot w\right)\right)}, \ell\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \color{blue}{\left(w \cdot \left(\frac{-1}{6} \cdot w\right)\right)}, \ell\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{-1}{6}\right)}\right), \ell\right) \]
              9. *-lowering-*.f6488.1

                \[\leadsto \mathsf{fma}\left(w, \ell \cdot \left(w \cdot \color{blue}{\left(w \cdot -0.16666666666666666\right)}\right), \ell\right) \]
            9. Simplified88.1%

              \[\leadsto \mathsf{fma}\left(w, \color{blue}{\ell \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right)}, \ell\right) \]
          5. Recombined 2 regimes into one program.
          6. Final simplification89.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(w, \ell \cdot \left(w \cdot \left(w \cdot -0.16666666666666666\right)\right), \ell\right)\\ \end{array} \]
          7. Add Preprocessing

          Alternative 5: 88.4% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\ \end{array} \end{array} \]
          (FPCore (w l)
           :precision binary64
           (if (<= (* (exp (- 0.0 w)) (pow l (exp w))) 0.0)
             0.0
             (* l (fma w (fma w 0.5 -1.0) 1.0))))
          double code(double w, double l) {
          	double tmp;
          	if ((exp((0.0 - w)) * pow(l, exp(w))) <= 0.0) {
          		tmp = 0.0;
          	} else {
          		tmp = l * fma(w, fma(w, 0.5, -1.0), 1.0);
          	}
          	return tmp;
          }
          
          function code(w, l)
          	tmp = 0.0
          	if (Float64(exp(Float64(0.0 - w)) * (l ^ exp(w))) <= 0.0)
          		tmp = 0.0;
          	else
          		tmp = Float64(l * fma(w, fma(w, 0.5, -1.0), 1.0));
          	end
          	return tmp
          end
          
          code[w_, l_] := If[LessEqual[N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], 0.0, N[(l * N[(w * N[(w * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\
          \;\;\;\;0\\
          
          \mathbf{else}:\\
          \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 0.0

            1. Initial program 100.0%

              \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. exp-negN/A

                \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
              2. sqr-powN/A

                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
              3. pow-prod-upN/A

                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
              4. flip-+N/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
              5. +-inversesN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              6. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              7. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              8. mul0-lftN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              9. *-commutativeN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              10. *-commutativeN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              11. mul0-lftN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              12. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
              13. +-inversesN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
              14. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
              15. flip--N/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
              16. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
              17. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
              18. associate-/r/N/A

                \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
              19. div-invN/A

                \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
              20. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
              21. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
              22. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
              23. metadata-evalN/A

                \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
            4. Applied egg-rr100.0%

              \[\leadsto \color{blue}{0} \]

            if 0.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w)))

            1. Initial program 99.7%

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

              \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
            4. Step-by-step derivation
              1. Simplified97.9%

                \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
              2. Taylor expanded in w around 0

                \[\leadsto \color{blue}{\left(1 + w \cdot \left(\frac{1}{2} \cdot w - 1\right)\right)} \cdot \ell \]
              3. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(w \cdot \left(\frac{1}{2} \cdot w - 1\right) + 1\right)} \cdot \ell \]
                2. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(w, \frac{1}{2} \cdot w - 1, 1\right)} \cdot \ell \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(w, \color{blue}{\frac{1}{2} \cdot w + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \cdot \ell \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \cdot \ell \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(w, w \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \cdot \ell \]
                6. accelerator-lowering-fma.f6486.7

                  \[\leadsto \mathsf{fma}\left(w, \color{blue}{\mathsf{fma}\left(w, 0.5, -1\right)}, 1\right) \cdot \ell \]
              4. Simplified86.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)} \cdot \ell \]
            5. Recombined 2 regimes into one program.
            6. Final simplification88.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \mathsf{fma}\left(w, \mathsf{fma}\left(w, 0.5, -1\right), 1\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 6: 71.4% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\ell\\ \end{array} \end{array} \]
            (FPCore (w l)
             :precision binary64
             (if (<= (* (exp (- 0.0 w)) (pow l (exp w))) 0.0) 0.0 l))
            double code(double w, double l) {
            	double tmp;
            	if ((exp((0.0 - w)) * pow(l, exp(w))) <= 0.0) {
            		tmp = 0.0;
            	} 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 ((exp((0.0d0 - w)) * (l ** exp(w))) <= 0.0d0) then
                    tmp = 0.0d0
                else
                    tmp = l
                end if
                code = tmp
            end function
            
            public static double code(double w, double l) {
            	double tmp;
            	if ((Math.exp((0.0 - w)) * Math.pow(l, Math.exp(w))) <= 0.0) {
            		tmp = 0.0;
            	} else {
            		tmp = l;
            	}
            	return tmp;
            }
            
            def code(w, l):
            	tmp = 0
            	if (math.exp((0.0 - w)) * math.pow(l, math.exp(w))) <= 0.0:
            		tmp = 0.0
            	else:
            		tmp = l
            	return tmp
            
            function code(w, l)
            	tmp = 0.0
            	if (Float64(exp(Float64(0.0 - w)) * (l ^ exp(w))) <= 0.0)
            		tmp = 0.0;
            	else
            		tmp = l;
            	end
            	return tmp
            end
            
            function tmp_2 = code(w, l)
            	tmp = 0.0;
            	if ((exp((0.0 - w)) * (l ^ exp(w))) <= 0.0)
            		tmp = 0.0;
            	else
            		tmp = l;
            	end
            	tmp_2 = tmp;
            end
            
            code[w_, l_] := If[LessEqual[N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0], 0.0, l]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)} \leq 0:\\
            \;\;\;\;0\\
            
            \mathbf{else}:\\
            \;\;\;\;\ell\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 0.0

              1. Initial program 100.0%

                \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. exp-negN/A

                  \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
                2. sqr-powN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                3. pow-prod-upN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                4. flip-+N/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                5. +-inversesN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                6. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                7. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                8. mul0-lftN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                9. *-commutativeN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                10. *-commutativeN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                11. mul0-lftN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                12. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                13. +-inversesN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                14. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                15. flip--N/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                16. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
                17. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
                18. associate-/r/N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
                19. div-invN/A

                  \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
                20. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
                21. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
                22. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
                23. metadata-evalN/A

                  \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
              4. Applied egg-rr100.0%

                \[\leadsto \color{blue}{0} \]

              if 0.0 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w)))

              1. Initial program 99.7%

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

                \[\leadsto \color{blue}{\ell} \]
              4. Step-by-step derivation
                1. Simplified66.7%

                  \[\leadsto \color{blue}{\ell} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification71.1%

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

              Alternative 7: 97.8% accurate, 2.8× 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. Taylor expanded in w around 0

                \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
              4. Step-by-step derivation
                1. Simplified98.2%

                  \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
                2. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\ell \cdot e^{\mathsf{neg}\left(w\right)}} \]
                  2. exp-negN/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{1}{e^{w}}} \]
                  3. un-div-invN/A

                    \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\ell}{e^{w}}} \]
                  5. exp-lowering-exp.f6498.2

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

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

                Alternative 8: 98.1% accurate, 2.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq -0.7:\\ \;\;\;\;e^{0 - w}\\ \mathbf{elif}\;w \leq 0.21:\\ \;\;\;\;\frac{\ell \cdot \left(1 - w \cdot w\right)}{w + 1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
                (FPCore (w l)
                 :precision binary64
                 (if (<= w -0.7)
                   (exp (- 0.0 w))
                   (if (<= w 0.21) (/ (* l (- 1.0 (* w w))) (+ w 1.0)) 0.0)))
                double code(double w, double l) {
                	double tmp;
                	if (w <= -0.7) {
                		tmp = exp((0.0 - w));
                	} else if (w <= 0.21) {
                		tmp = (l * (1.0 - (w * w))) / (w + 1.0);
                	} else {
                		tmp = 0.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.7d0)) then
                        tmp = exp((0.0d0 - w))
                    else if (w <= 0.21d0) then
                        tmp = (l * (1.0d0 - (w * w))) / (w + 1.0d0)
                    else
                        tmp = 0.0d0
                    end if
                    code = tmp
                end function
                
                public static double code(double w, double l) {
                	double tmp;
                	if (w <= -0.7) {
                		tmp = Math.exp((0.0 - w));
                	} else if (w <= 0.21) {
                		tmp = (l * (1.0 - (w * w))) / (w + 1.0);
                	} else {
                		tmp = 0.0;
                	}
                	return tmp;
                }
                
                def code(w, l):
                	tmp = 0
                	if w <= -0.7:
                		tmp = math.exp((0.0 - w))
                	elif w <= 0.21:
                		tmp = (l * (1.0 - (w * w))) / (w + 1.0)
                	else:
                		tmp = 0.0
                	return tmp
                
                function code(w, l)
                	tmp = 0.0
                	if (w <= -0.7)
                		tmp = exp(Float64(0.0 - w));
                	elseif (w <= 0.21)
                		tmp = Float64(Float64(l * Float64(1.0 - Float64(w * w))) / Float64(w + 1.0));
                	else
                		tmp = 0.0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(w, l)
                	tmp = 0.0;
                	if (w <= -0.7)
                		tmp = exp((0.0 - w));
                	elseif (w <= 0.21)
                		tmp = (l * (1.0 - (w * w))) / (w + 1.0);
                	else
                		tmp = 0.0;
                	end
                	tmp_2 = tmp;
                end
                
                code[w_, l_] := If[LessEqual[w, -0.7], N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision], If[LessEqual[w, 0.21], N[(N[(l * N[(1.0 - N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(w + 1.0), $MachinePrecision]), $MachinePrecision], 0.0]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;w \leq -0.7:\\
                \;\;\;\;e^{0 - w}\\
                
                \mathbf{elif}\;w \leq 0.21:\\
                \;\;\;\;\frac{\ell \cdot \left(1 - w \cdot w\right)}{w + 1}\\
                
                \mathbf{else}:\\
                \;\;\;\;0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if w < -0.69999999999999996

                  1. Initial program 100.0%

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

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                    2. pow-prod-upN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                    3. flip-+N/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                    4. +-inversesN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                    5. metadata-evalN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                    6. metadata-evalN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                    7. metadata-evalN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                    8. +-inversesN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                    9. metadata-evalN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                    10. flip--N/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                    11. metadata-evalN/A

                      \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot {\ell}^{\color{blue}{0}} \]
                    12. metadata-eval98.8

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

                    \[\leadsto e^{-w} \cdot \color{blue}{1} \]

                  if -0.69999999999999996 < w < 0.209999999999999992

                  1. Initial program 99.6%

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

                    \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
                  4. Step-by-step derivation
                    1. Simplified97.5%

                      \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
                    2. Taylor expanded in w around 0

                      \[\leadsto \color{blue}{\left(1 + -1 \cdot w\right)} \cdot \ell \]
                    3. Step-by-step derivation
                      1. neg-mul-1N/A

                        \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(w\right)\right)}\right) \cdot \ell \]
                      2. unsub-negN/A

                        \[\leadsto \color{blue}{\left(1 - w\right)} \cdot \ell \]
                      3. --lowering--.f6497.5

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

                      \[\leadsto \color{blue}{\left(1 - w\right)} \cdot \ell \]
                    5. Step-by-step derivation
                      1. flip--N/A

                        \[\leadsto \color{blue}{\frac{1 \cdot 1 - w \cdot w}{1 + w}} \cdot \ell \]
                      2. associate-*l/N/A

                        \[\leadsto \color{blue}{\frac{\left(1 \cdot 1 - w \cdot w\right) \cdot \ell}{1 + w}} \]
                      3. /-lowering-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\left(1 \cdot 1 - w \cdot w\right) \cdot \ell}{1 + w}} \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \frac{\color{blue}{\left(1 \cdot 1 - w \cdot w\right) \cdot \ell}}{1 + w} \]
                      5. metadata-evalN/A

                        \[\leadsto \frac{\left(\color{blue}{1} - w \cdot w\right) \cdot \ell}{1 + w} \]
                      6. --lowering--.f64N/A

                        \[\leadsto \frac{\color{blue}{\left(1 - w \cdot w\right)} \cdot \ell}{1 + w} \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \frac{\left(1 - \color{blue}{w \cdot w}\right) \cdot \ell}{1 + w} \]
                      8. +-commutativeN/A

                        \[\leadsto \frac{\left(1 - w \cdot w\right) \cdot \ell}{\color{blue}{w + 1}} \]
                      9. +-lowering-+.f6497.5

                        \[\leadsto \frac{\left(1 - w \cdot w\right) \cdot \ell}{\color{blue}{w + 1}} \]
                    6. Applied egg-rr97.5%

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

                    if 0.209999999999999992 < w

                    1. Initial program 100.0%

                      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. exp-negN/A

                        \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
                      2. sqr-powN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                      3. pow-prod-upN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                      4. flip-+N/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                      5. +-inversesN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      6. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      7. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      8. mul0-lftN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      9. *-commutativeN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      10. *-commutativeN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      11. mul0-lftN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      12. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                      13. +-inversesN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                      14. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                      15. flip--N/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                      16. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
                      17. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
                      18. associate-/r/N/A

                        \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
                      19. div-invN/A

                        \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
                      20. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
                      21. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
                      22. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
                      23. metadata-evalN/A

                        \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
                    4. Applied egg-rr100.0%

                      \[\leadsto \color{blue}{0} \]
                  5. Recombined 3 regimes into one program.
                  6. Final simplification98.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -0.7:\\ \;\;\;\;e^{0 - w}\\ \mathbf{elif}\;w \leq 0.21:\\ \;\;\;\;\frac{\ell \cdot \left(1 - w \cdot w\right)}{w + 1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 9: 97.8% accurate, 2.8× speedup?

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

                    \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
                  4. Step-by-step derivation
                    1. Simplified98.2%

                      \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
                    2. Final simplification98.2%

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

                    Alternative 10: 92.9% accurate, 4.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq 0.22:\\ \;\;\;\;\mathsf{fma}\left(w, \left(w \cdot \ell\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot 0.027777777777777776\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) - \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot 0.25}{0.25} - \ell, \ell\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
                    (FPCore (w l)
                     :precision binary64
                     (if (<= w 0.22)
                       (fma
                        w
                        (-
                         (*
                          (* w l)
                          (/
                           (-
                            (* (* (* w w) 0.027777777777777776) (fma w -0.16666666666666666 -0.5))
                            (* (fma w -0.16666666666666666 -0.5) 0.25))
                           0.25))
                         l)
                        l)
                       0.0))
                    double code(double w, double l) {
                    	double tmp;
                    	if (w <= 0.22) {
                    		tmp = fma(w, (((w * l) * (((((w * w) * 0.027777777777777776) * fma(w, -0.16666666666666666, -0.5)) - (fma(w, -0.16666666666666666, -0.5) * 0.25)) / 0.25)) - l), l);
                    	} else {
                    		tmp = 0.0;
                    	}
                    	return tmp;
                    }
                    
                    function code(w, l)
                    	tmp = 0.0
                    	if (w <= 0.22)
                    		tmp = fma(w, Float64(Float64(Float64(w * l) * Float64(Float64(Float64(Float64(Float64(w * w) * 0.027777777777777776) * fma(w, -0.16666666666666666, -0.5)) - Float64(fma(w, -0.16666666666666666, -0.5) * 0.25)) / 0.25)) - l), l);
                    	else
                    		tmp = 0.0;
                    	end
                    	return tmp
                    end
                    
                    code[w_, l_] := If[LessEqual[w, 0.22], N[(w * N[(N[(N[(w * l), $MachinePrecision] * N[(N[(N[(N[(N[(w * w), $MachinePrecision] * 0.027777777777777776), $MachinePrecision] * N[(w * -0.16666666666666666 + -0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(w * -0.16666666666666666 + -0.5), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision] / 0.25), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision] + l), $MachinePrecision], 0.0]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;w \leq 0.22:\\
                    \;\;\;\;\mathsf{fma}\left(w, \left(w \cdot \ell\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot 0.027777777777777776\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) - \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot 0.25}{0.25} - \ell, \ell\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if w < 0.220000000000000001

                      1. Initial program 99.7%

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

                        \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
                      4. Step-by-step derivation
                        1. Simplified97.9%

                          \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
                        2. Taylor expanded in w around 0

                          \[\leadsto \color{blue}{\ell + w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right)} \]
                        3. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{w \cdot \left(-1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right)\right) + \ell} \]
                          2. accelerator-lowering-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(w, -1 \cdot \ell + w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right), \ell\right)} \]
                          3. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + -1 \cdot \ell}, \ell\right) \]
                          4. mul-1-negN/A

                            \[\leadsto \mathsf{fma}\left(w, w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) + \color{blue}{\left(\mathsf{neg}\left(\ell\right)\right)}, \ell\right) \]
                          5. unsub-negN/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
                          6. --lowering--.f64N/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{w \cdot \left(\frac{-1}{6} \cdot \left(\ell \cdot w\right) + \frac{1}{2} \cdot \ell\right) - \ell}, \ell\right) \]
                          7. distribute-rgt-inN/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\left(\frac{-1}{6} \cdot \left(\ell \cdot w\right)\right) \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right)} - \ell, \ell\right) \]
                          8. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\left(\ell \cdot w\right) \cdot \frac{-1}{6}\right)} \cdot w + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
                          9. associate-*l*N/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right)} + \left(\frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell, \ell\right) \]
                          10. associate-*r*N/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\frac{1}{2} \cdot \left(\ell \cdot w\right)}\right) - \ell, \ell\right) \]
                          11. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w\right) + \color{blue}{\left(\ell \cdot w\right) \cdot \frac{1}{2}}\right) - \ell, \ell\right) \]
                          12. distribute-lft-outN/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
                          13. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
                          14. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right) \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)} - \ell, \ell\right) \]
                          15. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(w, \color{blue}{\left(\ell \cdot w\right)} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - \ell, \ell\right) \]
                          16. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{-1}{6} \cdot w + \frac{1}{2}\right)} - \ell, \ell\right) \]
                          17. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \left(\color{blue}{w \cdot \frac{-1}{6}} + \frac{1}{2}\right) - \ell, \ell\right) \]
                          18. accelerator-lowering-fma.f6487.6

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\mathsf{fma}\left(w, -0.16666666666666666, 0.5\right)} - \ell, \ell\right) \]
                        4. Simplified87.6%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, 0.5\right) - \ell, \ell\right)} \]
                        5. Step-by-step derivation
                          1. flip-+N/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}}{w \cdot \frac{-1}{6} - \frac{1}{2}}} - \ell, \ell\right) \]
                          2. div-subN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\left(\frac{\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right)}{w \cdot \frac{-1}{6} - \frac{1}{2}} - \frac{\frac{1}{2} \cdot \frac{1}{2}}{w \cdot \frac{-1}{6} - \frac{1}{2}}\right)} - \ell, \ell\right) \]
                          3. frac-subN/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right)\right) \cdot \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) - \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) \cdot \left(\frac{1}{2} \cdot \frac{1}{2}\right)}{\left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) \cdot \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right)}} - \ell, \ell\right) \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(\left(w \cdot \frac{-1}{6}\right) \cdot \left(w \cdot \frac{-1}{6}\right)\right) \cdot \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) - \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) \cdot \left(\frac{1}{2} \cdot \frac{1}{2}\right)}{\left(w \cdot \frac{-1}{6} - \frac{1}{2}\right) \cdot \left(w \cdot \frac{-1}{6} - \frac{1}{2}\right)}} - \ell, \ell\right) \]
                        6. Applied egg-rr74.0%

                          \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \color{blue}{\frac{\left(\left(w \cdot w\right) \cdot 0.027777777777777776\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) - \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot 0.25}{\mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right)}} - \ell, \ell\right) \]
                        7. Taylor expanded in w around 0

                          \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot \frac{1}{36}\right) \cdot \mathsf{fma}\left(w, \frac{-1}{6}, \frac{-1}{2}\right) - \mathsf{fma}\left(w, \frac{-1}{6}, \frac{-1}{2}\right) \cdot \frac{1}{4}}{\color{blue}{\frac{1}{4}}} - \ell, \ell\right) \]
                        8. Step-by-step derivation
                          1. Simplified91.0%

                            \[\leadsto \mathsf{fma}\left(w, \left(\ell \cdot w\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot 0.027777777777777776\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) - \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot 0.25}{\color{blue}{0.25}} - \ell, \ell\right) \]

                          if 0.220000000000000001 < w

                          1. Initial program 100.0%

                            \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. exp-negN/A

                              \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
                            2. sqr-powN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                            3. pow-prod-upN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                            4. flip-+N/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                            5. +-inversesN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            6. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            7. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            8. mul0-lftN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            9. *-commutativeN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            10. *-commutativeN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            11. mul0-lftN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            12. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            13. +-inversesN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                            14. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                            15. flip--N/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                            16. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
                            17. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
                            18. associate-/r/N/A

                              \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
                            19. div-invN/A

                              \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
                            20. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
                            21. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
                            22. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
                            23. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
                          4. Applied egg-rr100.0%

                            \[\leadsto \color{blue}{0} \]
                        9. Recombined 2 regimes into one program.
                        10. Final simplification92.2%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq 0.22:\\ \;\;\;\;\mathsf{fma}\left(w, \left(w \cdot \ell\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot 0.027777777777777776\right) \cdot \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) - \mathsf{fma}\left(w, -0.16666666666666666, -0.5\right) \cdot 0.25}{0.25} - \ell, \ell\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
                        11. Add Preprocessing

                        Alternative 11: 77.9% accurate, 20.6× speedup?

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

                          1. Initial program 99.7%

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

                            \[\leadsto e^{\mathsf{neg}\left(w\right)} \cdot \color{blue}{\ell} \]
                          4. Step-by-step derivation
                            1. Simplified97.9%

                              \[\leadsto e^{-w} \cdot \color{blue}{\ell} \]
                            2. Taylor expanded in w around 0

                              \[\leadsto \color{blue}{\left(1 + -1 \cdot w\right)} \cdot \ell \]
                            3. Step-by-step derivation
                              1. neg-mul-1N/A

                                \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(w\right)\right)}\right) \cdot \ell \]
                              2. unsub-negN/A

                                \[\leadsto \color{blue}{\left(1 - w\right)} \cdot \ell \]
                              3. --lowering--.f6475.2

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

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

                            if 0.170000000000000012 < w

                            1. Initial program 100.0%

                              \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. exp-negN/A

                                \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
                              2. sqr-powN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                              3. pow-prod-upN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                              4. flip-+N/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                              5. +-inversesN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              6. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              7. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              8. mul0-lftN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              9. *-commutativeN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              10. *-commutativeN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              11. mul0-lftN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              12. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                              13. +-inversesN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                              14. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                              15. flip--N/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                              16. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
                              17. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
                              18. associate-/r/N/A

                                \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
                              19. div-invN/A

                                \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
                              20. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
                              21. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
                              22. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
                              23. metadata-evalN/A

                                \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
                            4. Applied egg-rr100.0%

                              \[\leadsto \color{blue}{0} \]
                          5. Recombined 2 regimes into one program.
                          6. Final simplification78.5%

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

                          Alternative 12: 16.0% accurate, 309.0× speedup?

                          \[\begin{array}{l} \\ 0 \end{array} \]
                          (FPCore (w l) :precision binary64 0.0)
                          double code(double w, double l) {
                          	return 0.0;
                          }
                          
                          real(8) function code(w, l)
                              real(8), intent (in) :: w
                              real(8), intent (in) :: l
                              code = 0.0d0
                          end function
                          
                          public static double code(double w, double l) {
                          	return 0.0;
                          }
                          
                          def code(w, l):
                          	return 0.0
                          
                          function code(w, l)
                          	return 0.0
                          end
                          
                          function tmp = code(w, l)
                          	tmp = 0.0;
                          end
                          
                          code[w_, l_] := 0.0
                          
                          \begin{array}{l}
                          
                          \\
                          0
                          \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. exp-negN/A

                              \[\leadsto \color{blue}{\frac{1}{e^{w}}} \cdot {\ell}^{\left(e^{w}\right)} \]
                            2. sqr-powN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{\left({\ell}^{\left(\frac{e^{w}}{2}\right)} \cdot {\ell}^{\left(\frac{e^{w}}{2}\right)}\right)} \]
                            3. pow-prod-upN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{{\ell}^{\left(\frac{e^{w}}{2} + \frac{e^{w}}{2}\right)}} \]
                            4. flip-+N/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(\frac{\frac{e^{w}}{2} \cdot \frac{e^{w}}{2} - \frac{e^{w}}{2} \cdot \frac{e^{w}}{2}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)}} \]
                            5. +-inversesN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            6. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 - 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            7. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{\color{blue}{0 \cdot 0} - 0}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            8. mul0-lftN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            9. *-commutativeN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{w \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            10. *-commutativeN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot w}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            11. mul0-lftN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            12. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - \color{blue}{0 \cdot 0}}{\frac{e^{w}}{2} - \frac{e^{w}}{2}}\right)} \]
                            13. +-inversesN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0}}\right)} \]
                            14. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\left(\frac{0 \cdot 0 - 0 \cdot 0}{\color{blue}{0 + 0}}\right)} \]
                            15. flip--N/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{\left(0 - 0\right)}} \]
                            16. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot {\ell}^{\color{blue}{0}} \]
                            17. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w}} \cdot \color{blue}{1} \]
                            18. associate-/r/N/A

                              \[\leadsto \color{blue}{\frac{1}{\frac{e^{w}}{1}}} \]
                            19. div-invN/A

                              \[\leadsto \frac{1}{\color{blue}{e^{w} \cdot \frac{1}{1}}} \]
                            20. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{1}} \]
                            21. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{2}\right)}} \]
                            22. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{2}\right)} \]
                            23. metadata-evalN/A

                              \[\leadsto \frac{1}{e^{w} \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{2}}\right)} \]
                          4. Applied egg-rr16.0%

                            \[\leadsto \color{blue}{0} \]
                          5. Add Preprocessing

                          Reproduce

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