exp-w (used to crash)

Percentage Accurate: 99.3% → 99.3%
Time: 14.8s
Alternatives: 13
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 13 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.3% 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.3% 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.8%

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

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

Alternative 2: 99.3% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
    5. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
    6. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
    7. exp-lowering-exp.f6499.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
  3. Simplified99.8%

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

Alternative 3: 97.5% accurate, 3.0× speedup?

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
    5. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
    6. exp-lowering-exp.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
    7. exp-lowering-exp.f6499.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
  3. Simplified99.8%

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

    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
  6. Step-by-step derivation
    1. Simplified98.9%

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

    Alternative 4: 94.6% accurate, 6.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\\ \mathbf{if}\;w \leq -1.02 \cdot 10^{+103}:\\ \;\;\;\;\ell \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{elif}\;w \leq 0.215:\\ \;\;\;\;\frac{\ell \cdot \left(1 - t\_0 \cdot t\_0\right)}{1 - t\_0}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
    (FPCore (w l)
     :precision binary64
     (let* ((t_0 (* w (+ -1.0 (* w (+ 0.5 (* w -0.16666666666666666)))))))
       (if (<= w -1.02e+103)
         (* l (* w (* -0.16666666666666666 (* w w))))
         (if (<= w 0.215) (/ (* l (- 1.0 (* t_0 t_0))) (- 1.0 t_0)) 0.0))))
    double code(double w, double l) {
    	double t_0 = w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))));
    	double tmp;
    	if (w <= -1.02e+103) {
    		tmp = l * (w * (-0.16666666666666666 * (w * w)));
    	} else if (w <= 0.215) {
    		tmp = (l * (1.0 - (t_0 * t_0))) / (1.0 - t_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) :: t_0
        real(8) :: tmp
        t_0 = w * ((-1.0d0) + (w * (0.5d0 + (w * (-0.16666666666666666d0)))))
        if (w <= (-1.02d+103)) then
            tmp = l * (w * ((-0.16666666666666666d0) * (w * w)))
        else if (w <= 0.215d0) then
            tmp = (l * (1.0d0 - (t_0 * t_0))) / (1.0d0 - t_0)
        else
            tmp = 0.0d0
        end if
        code = tmp
    end function
    
    public static double code(double w, double l) {
    	double t_0 = w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))));
    	double tmp;
    	if (w <= -1.02e+103) {
    		tmp = l * (w * (-0.16666666666666666 * (w * w)));
    	} else if (w <= 0.215) {
    		tmp = (l * (1.0 - (t_0 * t_0))) / (1.0 - t_0);
    	} else {
    		tmp = 0.0;
    	}
    	return tmp;
    }
    
    def code(w, l):
    	t_0 = w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))))
    	tmp = 0
    	if w <= -1.02e+103:
    		tmp = l * (w * (-0.16666666666666666 * (w * w)))
    	elif w <= 0.215:
    		tmp = (l * (1.0 - (t_0 * t_0))) / (1.0 - t_0)
    	else:
    		tmp = 0.0
    	return tmp
    
    function code(w, l)
    	t_0 = Float64(w * Float64(-1.0 + Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666)))))
    	tmp = 0.0
    	if (w <= -1.02e+103)
    		tmp = Float64(l * Float64(w * Float64(-0.16666666666666666 * Float64(w * w))));
    	elseif (w <= 0.215)
    		tmp = Float64(Float64(l * Float64(1.0 - Float64(t_0 * t_0))) / Float64(1.0 - t_0));
    	else
    		tmp = 0.0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(w, l)
    	t_0 = w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))));
    	tmp = 0.0;
    	if (w <= -1.02e+103)
    		tmp = l * (w * (-0.16666666666666666 * (w * w)));
    	elseif (w <= 0.215)
    		tmp = (l * (1.0 - (t_0 * t_0))) / (1.0 - t_0);
    	else
    		tmp = 0.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[w_, l_] := Block[{t$95$0 = N[(w * N[(-1.0 + N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -1.02e+103], N[(l * N[(w * N[(-0.16666666666666666 * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, 0.215], N[(N[(l * N[(1.0 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision], 0.0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\\
    \mathbf{if}\;w \leq -1.02 \cdot 10^{+103}:\\
    \;\;\;\;\ell \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(w \cdot w\right)\right)\right)\\
    
    \mathbf{elif}\;w \leq 0.215:\\
    \;\;\;\;\frac{\ell \cdot \left(1 - t\_0 \cdot t\_0\right)}{1 - t\_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if w < -1.01999999999999991e103

      1. Initial program 100.0%

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        3. sub-negN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        10. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
      5. Simplified100.0%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
      7. Step-by-step derivation
        1. Simplified100.0%

          \[\leadsto \left(1 + w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \color{blue}{\ell} \]
        2. Taylor expanded in w around inf

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

            \[\leadsto \mathsf{*.f64}\left(\left({w}^{3} \cdot \frac{-1}{6}\right), \ell\right) \]
          2. cube-multN/A

            \[\leadsto \mathsf{*.f64}\left(\left(\left(w \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{6}\right), \ell\right) \]
          3. unpow2N/A

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(\frac{-1}{6} \cdot \left(w \cdot w\right)\right)\right), \ell\right) \]
          10. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(\frac{-1}{6} \cdot {w}^{2}\right)\right), \ell\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \left({w}^{2}\right)\right)\right), \ell\right) \]
          12. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \left(w \cdot w\right)\right)\right), \ell\right) \]
          13. *-lowering-*.f64100.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(w, w\right)\right)\right), \ell\right) \]
        4. Simplified100.0%

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

        if -1.01999999999999991e103 < w < 0.214999999999999997

        1. Initial program 99.6%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        4. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          3. sub-negN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          5. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          8. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
          10. *-lowering-*.f6482.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
        5. Simplified82.7%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
        7. Step-by-step derivation
          1. Simplified84.1%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(w \cdot \left(-1 + w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right)\right) \cdot \left(w \cdot \left(-1 + w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right)\right)\right) \cdot \ell\right), \color{blue}{\left(1 - w \cdot \left(-1 + w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right)\right)}\right) \]
          3. Applied egg-rr92.5%

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

          if 0.214999999999999997 < w

          1. Initial program 100.0%

            \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
          2. Add Preprocessing
          3. Applied egg-rr100.0%

            \[\leadsto \color{blue}{0} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification95.1%

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

        Alternative 5: 93.5% accurate, 7.1× speedup?

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

          1. Initial program 100.0%

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
            5. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
            6. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
            7. exp-lowering-exp.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
          3. Simplified100.0%

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

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
          6. Step-by-step derivation
            1. Simplified100.0%

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(-1 \cdot \left(\left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell\right)\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
              5. distribute-rgt-outN/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\ell \cdot \left(-1 + \frac{1}{2}\right)\right)\right) \cdot w - \ell\right)\right)\right) \]
              6. metadata-evalN/A

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

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\frac{-1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\left(-1 \cdot \frac{-1}{2}\right) \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\frac{1}{2} \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
              10. --lowering--.f64N/A

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

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\left(\ell \cdot \frac{1}{2}\right) \cdot w\right), \ell\right)\right)\right) \]
              12. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\ell \cdot \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(w \cdot \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
              15. *-lowering-*.f6473.4%

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(w, \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
            4. Simplified73.4%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\left(\frac{-1}{w}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
              11. /-lowering-/.f64100.0%

                \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{/.f64}\left(-1, w\right), \frac{1}{2}\right)\right)\right)\right) \]
            7. Simplified100.0%

              \[\leadsto \ell + \color{blue}{\left(w \cdot w\right) \cdot \left(\ell \cdot \left(\frac{-1}{w} + 0.5\right)\right)} \]
            8. Taylor expanded in w around inf

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{2}, \left(w \cdot \color{blue}{w}\right)\right)\right) \]
              7. *-lowering-*.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \color{blue}{w}\right)\right)\right) \]
            10. Simplified100.0%

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

            if -2.00000000000000007e154 < w < 0.19

            1. Initial program 99.7%

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

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
            4. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              3. sub-negN/A

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              6. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              10. *-lowering-*.f6484.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
            5. Simplified84.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
            7. Step-by-step derivation
              1. Simplified85.3%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(-1 + w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right) \cdot w\right)\right), \ell\right) \]
                2. flip-+N/A

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(-1 \cdot -1 - \left(w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right) \cdot \left(w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right)\right) \cdot w\right), \left(-1 - w \cdot \left(\frac{1}{2} + w \cdot \frac{-1}{6}\right)\right)\right)\right), \ell\right) \]
              3. Applied egg-rr87.9%

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

              if 0.19 < w

              1. Initial program 100.0%

                \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
              2. Add Preprocessing
              3. Applied egg-rr100.0%

                \[\leadsto \color{blue}{0} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification91.4%

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

            Alternative 6: 91.3% accurate, 15.2× speedup?

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

              1. Initial program 99.7%

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

                \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              4. Step-by-step derivation
                1. +-lowering-+.f64N/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                3. sub-negN/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                6. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                9. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                10. *-lowering-*.f6486.6%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
              5. Simplified86.6%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
              7. Step-by-step derivation
                1. Simplified87.6%

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

                if 0.23000000000000001 < w

                1. Initial program 100.0%

                  \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                2. Add Preprocessing
                3. Applied egg-rr100.0%

                  \[\leadsto \color{blue}{0} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification89.6%

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

              Alternative 7: 91.3% accurate, 20.3× speedup?

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

                1. Initial program 99.9%

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

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                4. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  3. sub-negN/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  5. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  8. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                  10. *-lowering-*.f6464.1%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                5. Simplified64.1%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
                7. Step-by-step derivation
                  1. Simplified68.3%

                    \[\leadsto \left(1 + w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \color{blue}{\ell} \]
                  2. Taylor expanded in w around inf

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

                      \[\leadsto \mathsf{*.f64}\left(\left({w}^{3} \cdot \frac{-1}{6}\right), \ell\right) \]
                    2. cube-multN/A

                      \[\leadsto \mathsf{*.f64}\left(\left(\left(w \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{6}\right), \ell\right) \]
                    3. unpow2N/A

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(\frac{-1}{6} \cdot \left(w \cdot w\right)\right)\right), \ell\right) \]
                    10. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(\frac{-1}{6} \cdot {w}^{2}\right)\right), \ell\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \left({w}^{2}\right)\right)\right), \ell\right) \]
                    12. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \left(w \cdot w\right)\right)\right), \ell\right) \]
                    13. *-lowering-*.f6468.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(w, w\right)\right)\right), \ell\right) \]
                  4. Simplified68.3%

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

                  if -0.0560000000000000012 < w < 0.23000000000000001

                  1. Initial program 99.6%

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

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

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

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

                      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                    5. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                    6. exp-lowering-exp.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                    7. exp-lowering-exp.f6499.6%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                  3. Simplified99.6%

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

                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified98.6%

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

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

                        \[\leadsto \mathsf{/.f64}\left(\ell, \left(w + \color{blue}{1}\right)\right) \]
                      2. +-lowering-+.f6498.6%

                        \[\leadsto \mathsf{/.f64}\left(\ell, \mathsf{+.f64}\left(w, \color{blue}{1}\right)\right) \]
                    4. Simplified98.6%

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

                    if 0.23000000000000001 < w

                    1. Initial program 100.0%

                      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                    2. Add Preprocessing
                    3. Applied egg-rr100.0%

                      \[\leadsto \color{blue}{0} \]
                  7. Recombined 3 regimes into one program.
                  8. Final simplification89.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -0.056:\\ \;\;\;\;\ell \cdot \left(w \cdot \left(-0.16666666666666666 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{elif}\;w \leq 0.23:\\ \;\;\;\;\frac{\ell}{w + 1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 8: 89.6% accurate, 20.3× speedup?

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

                    1. Initial program 99.9%

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

                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + w \cdot \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)}, \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                    4. Step-by-step derivation
                      1. +-lowering-+.f64N/A

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) - 1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      3. sub-negN/A

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right) + -1\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      5. +-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \left(-1 + w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \left(w \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \left(\frac{1}{2} + \frac{-1}{6} \cdot w\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      8. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{6} \cdot w\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \left(w \cdot \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                      10. *-lowering-*.f6464.1%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right)\right) \]
                    5. Simplified64.1%

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \frac{-1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{\ell}\right) \]
                    7. Step-by-step derivation
                      1. Simplified68.3%

                        \[\leadsto \left(1 + w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right) \cdot \color{blue}{\ell} \]
                      2. Taylor expanded in w around inf

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{6} \cdot \left(\ell \cdot \left(w \cdot w\right)\right)\right), w\right) \]
                        11. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{6} \cdot \left(\ell \cdot {w}^{2}\right)\right), w\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \left(\ell \cdot {w}^{2}\right)\right), w\right) \]
                        13. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\ell, \left({w}^{2}\right)\right)\right), w\right) \]
                        14. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\ell, \left(w \cdot w\right)\right)\right), w\right) \]
                        15. *-lowering-*.f6463.4%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(w, w\right)\right)\right), w\right) \]
                      4. Simplified63.4%

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

                      if -0.0519999999999999976 < w < 0.209999999999999992

                      1. Initial program 99.6%

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                        5. pow-lowering-pow.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                        6. exp-lowering-exp.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                        7. exp-lowering-exp.f6499.6%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                      3. Simplified99.6%

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

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified98.6%

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

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

                            \[\leadsto \mathsf{/.f64}\left(\ell, \left(w + \color{blue}{1}\right)\right) \]
                          2. +-lowering-+.f6498.6%

                            \[\leadsto \mathsf{/.f64}\left(\ell, \mathsf{+.f64}\left(w, \color{blue}{1}\right)\right) \]
                        4. Simplified98.6%

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

                        if 0.209999999999999992 < w

                        1. Initial program 100.0%

                          \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                        2. Add Preprocessing
                        3. Applied egg-rr100.0%

                          \[\leadsto \color{blue}{0} \]
                      7. Recombined 3 regimes into one program.
                      8. Final simplification88.1%

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

                      Alternative 9: 88.0% accurate, 20.3× speedup?

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

                        1. Initial program 99.9%

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                          5. pow-lowering-pow.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                          6. exp-lowering-exp.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                          7. exp-lowering-exp.f6499.9%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                        3. Simplified99.9%

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

                          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified98.8%

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

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(-1 \cdot \left(\left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell\right)\right)\right) \]
                            4. associate-*r*N/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
                            5. distribute-rgt-outN/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\ell \cdot \left(-1 + \frac{1}{2}\right)\right)\right) \cdot w - \ell\right)\right)\right) \]
                            6. metadata-evalN/A

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

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\frac{-1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
                            8. associate-*r*N/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\left(-1 \cdot \frac{-1}{2}\right) \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
                            9. metadata-evalN/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\frac{1}{2} \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
                            10. --lowering--.f64N/A

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

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\left(\ell \cdot \frac{1}{2}\right) \cdot w\right), \ell\right)\right)\right) \]
                            12. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\ell \cdot \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
                            13. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
                            14. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(w \cdot \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
                            15. *-lowering-*.f6445.2%

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(w, \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
                          4. Simplified45.2%

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\left(\frac{-1}{w}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
                            11. /-lowering-/.f6457.2%

                              \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{/.f64}\left(-1, w\right), \frac{1}{2}\right)\right)\right)\right) \]
                          7. Simplified57.2%

                            \[\leadsto \ell + \color{blue}{\left(w \cdot w\right) \cdot \left(\ell \cdot \left(\frac{-1}{w} + 0.5\right)\right)} \]
                          8. Taylor expanded in w around inf

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{2}, \left(w \cdot \color{blue}{w}\right)\right)\right) \]
                            7. *-lowering-*.f6457.2%

                              \[\leadsto \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(w, \color{blue}{w}\right)\right)\right) \]
                          10. Simplified57.2%

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

                          if -0.068000000000000005 < w < 0.299999999999999989

                          1. Initial program 99.6%

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                            5. pow-lowering-pow.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                            6. exp-lowering-exp.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                            7. exp-lowering-exp.f6499.6%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                          3. Simplified99.6%

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

                            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                          6. Step-by-step derivation
                            1. Simplified98.6%

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

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

                                \[\leadsto \mathsf{/.f64}\left(\ell, \left(w + \color{blue}{1}\right)\right) \]
                              2. +-lowering-+.f6498.6%

                                \[\leadsto \mathsf{/.f64}\left(\ell, \mathsf{+.f64}\left(w, \color{blue}{1}\right)\right) \]
                            4. Simplified98.6%

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

                            if 0.299999999999999989 < w

                            1. Initial program 100.0%

                              \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                            2. Add Preprocessing
                            3. Applied egg-rr100.0%

                              \[\leadsto \color{blue}{0} \]
                          7. Recombined 3 regimes into one program.
                          8. Final simplification86.2%

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

                          Alternative 10: 77.8% accurate, 27.6× speedup?

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

                            1. Initial program 99.9%

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

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

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

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

                                \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                              5. pow-lowering-pow.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                              6. exp-lowering-exp.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                              7. exp-lowering-exp.f6499.9%

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                            3. Simplified99.9%

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

                              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                            6. Step-by-step derivation
                              1. Simplified98.8%

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

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

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

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

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(-1 \cdot \left(\left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right) \cdot w\right) - \ell\right)\right)\right) \]
                                4. associate-*r*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(-1 \cdot \ell + \frac{1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
                                5. distribute-rgt-outN/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\ell \cdot \left(-1 + \frac{1}{2}\right)\right)\right) \cdot w - \ell\right)\right)\right) \]
                                6. metadata-evalN/A

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

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(-1 \cdot \left(\frac{-1}{2} \cdot \ell\right)\right) \cdot w - \ell\right)\right)\right) \]
                                8. associate-*r*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\left(-1 \cdot \frac{-1}{2}\right) \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
                                9. metadata-evalN/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \left(\left(\frac{1}{2} \cdot \ell\right) \cdot w - \ell\right)\right)\right) \]
                                10. --lowering--.f64N/A

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

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\left(\ell \cdot \frac{1}{2}\right) \cdot w\right), \ell\right)\right)\right) \]
                                12. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\left(\ell \cdot \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
                                13. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{1}{2} \cdot w\right)\right), \ell\right)\right)\right) \]
                                14. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \left(w \cdot \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
                                15. *-lowering-*.f6445.2%

                                  \[\leadsto \mathsf{+.f64}\left(\ell, \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(w, \frac{1}{2}\right)\right), \ell\right)\right)\right) \]
                              4. Simplified45.2%

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

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

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

                                  \[\leadsto \ell - \color{blue}{\ell \cdot w} \]
                                3. --lowering--.f64N/A

                                  \[\leadsto \mathsf{\_.f64}\left(\ell, \color{blue}{\left(\ell \cdot w\right)}\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{\_.f64}\left(\ell, \left(w \cdot \color{blue}{\ell}\right)\right) \]
                                5. *-lowering-*.f6427.7%

                                  \[\leadsto \mathsf{\_.f64}\left(\ell, \mathsf{*.f64}\left(w, \color{blue}{\ell}\right)\right) \]
                              7. Simplified27.7%

                                \[\leadsto \color{blue}{\ell - w \cdot \ell} \]
                              8. Taylor expanded in w around inf

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

                                  \[\leadsto \mathsf{neg}\left(\ell \cdot w\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(w \cdot \ell\right) \]
                                3. distribute-rgt-neg-inN/A

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

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

                                  \[\leadsto \mathsf{*.f64}\left(w, \color{blue}{\left(-1 \cdot \ell\right)}\right) \]
                                6. mul-1-negN/A

                                  \[\leadsto \mathsf{*.f64}\left(w, \left(\mathsf{neg}\left(\ell\right)\right)\right) \]
                                7. neg-sub0N/A

                                  \[\leadsto \mathsf{*.f64}\left(w, \left(0 - \color{blue}{\ell}\right)\right) \]
                                8. --lowering--.f6427.7%

                                  \[\leadsto \mathsf{*.f64}\left(w, \mathsf{\_.f64}\left(0, \color{blue}{\ell}\right)\right) \]
                              10. Simplified27.7%

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

                              if -0.0122000000000000008 < w < 0.17999999999999999

                              1. Initial program 99.6%

                                \[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. Simplified98.6%

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

                                if 0.17999999999999999 < w

                                1. Initial program 100.0%

                                  \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                                2. Add Preprocessing
                                3. Applied egg-rr100.0%

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

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

                              Alternative 11: 77.8% accurate, 30.5× speedup?

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

                                1. Initial program 99.7%

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

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

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

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

                                    \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{\left(e^{w}\right)}\right), \color{blue}{\left(e^{w}\right)}\right) \]
                                  5. pow-lowering-pow.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \left(e^{w}\right)\right), \left(e^{\color{blue}{w}}\right)\right) \]
                                  6. exp-lowering-exp.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \left(e^{w}\right)\right) \]
                                  7. exp-lowering-exp.f6499.7%

                                    \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \mathsf{exp.f64}\left(w\right)\right), \mathsf{exp.f64}\left(w\right)\right) \]
                                3. Simplified99.7%

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

                                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\ell}, \mathsf{exp.f64}\left(w\right)\right) \]
                                6. Step-by-step derivation
                                  1. Simplified98.7%

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

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

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

                                      \[\leadsto \ell - \color{blue}{\ell \cdot w} \]
                                    3. --lowering--.f64N/A

                                      \[\leadsto \mathsf{\_.f64}\left(\ell, \color{blue}{\left(\ell \cdot w\right)}\right) \]
                                    4. *-lowering-*.f6473.0%

                                      \[\leadsto \mathsf{\_.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{w}\right)\right) \]
                                  4. Simplified73.0%

                                    \[\leadsto \color{blue}{\ell - \ell \cdot w} \]

                                  if 0.17999999999999999 < w

                                  1. Initial program 100.0%

                                    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                                  2. Add Preprocessing
                                  3. Applied egg-rr100.0%

                                    \[\leadsto \color{blue}{0} \]
                                7. Recombined 2 regimes into one program.
                                8. Final simplification77.2%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq 0.18:\\ \;\;\;\;\ell - w \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
                                9. Add Preprocessing

                                Alternative 12: 71.0% accurate, 50.7× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w \leq 0.235:\\ \;\;\;\;\ell\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
                                (FPCore (w l) :precision binary64 (if (<= w 0.235) l 0.0))
                                double code(double w, double l) {
                                	double tmp;
                                	if (w <= 0.235) {
                                		tmp = l;
                                	} 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.235d0) then
                                        tmp = l
                                    else
                                        tmp = 0.0d0
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double w, double l) {
                                	double tmp;
                                	if (w <= 0.235) {
                                		tmp = l;
                                	} else {
                                		tmp = 0.0;
                                	}
                                	return tmp;
                                }
                                
                                def code(w, l):
                                	tmp = 0
                                	if w <= 0.235:
                                		tmp = l
                                	else:
                                		tmp = 0.0
                                	return tmp
                                
                                function code(w, l)
                                	tmp = 0.0
                                	if (w <= 0.235)
                                		tmp = l;
                                	else
                                		tmp = 0.0;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(w, l)
                                	tmp = 0.0;
                                	if (w <= 0.235)
                                		tmp = l;
                                	else
                                		tmp = 0.0;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[w_, l_] := If[LessEqual[w, 0.235], l, 0.0]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;w \leq 0.235:\\
                                \;\;\;\;\ell\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;0\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if w < 0.23499999999999999

                                  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. Simplified64.4%

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

                                    if 0.23499999999999999 < w

                                    1. Initial program 100.0%

                                      \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                                    2. Add Preprocessing
                                    3. Applied egg-rr100.0%

                                      \[\leadsto \color{blue}{0} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Add Preprocessing

                                  Alternative 13: 16.2% accurate, 305.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.8%

                                    \[e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \]
                                  2. Add Preprocessing
                                  3. Applied egg-rr18.2%

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

                                  Reproduce

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