math.exp on complex, imaginary part

Percentage Accurate: 100.0% → 100.0%
Time: 21.5s
Alternatives: 26
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ e^{re} \cdot \sin im \end{array} \]
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
	return exp(re) * sin(im);
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
	return Math.exp(re) * Math.sin(im);
}
def code(re, im):
	return math.exp(re) * math.sin(im)
function code(re, im)
	return Float64(exp(re) * sin(im))
end
function tmp = code(re, im)
	tmp = exp(re) * sin(im);
end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{re} \cdot \sin im
\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 26 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: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ e^{re} \cdot \sin im \end{array} \]
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
	return exp(re) * sin(im);
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
	return Math.exp(re) * Math.sin(im);
}
def code(re, im):
	return math.exp(re) * math.sin(im)
function code(re, im)
	return Float64(exp(re) * sin(im))
end
function tmp = code(re, im)
	tmp = exp(re) * sin(im);
end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{re} \cdot \sin im
\end{array}

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ e^{re} \cdot \sin im \end{array} \]
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
	return exp(re) * sin(im);
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
	return Math.exp(re) * Math.sin(im);
}
def code(re, im):
	return math.exp(re) * math.sin(im)
function code(re, im)
	return Float64(exp(re) * sin(im))
end
function tmp = code(re, im)
	tmp = exp(re) * sin(im);
end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{re} \cdot \sin im
\end{array}
Derivation
  1. Initial program 100.0%

    \[e^{re} \cdot \sin im \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 91.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := \sin im \cdot \left(re + 1\right)\\ t_2 := e^{re} \cdot im\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;t\_0 \leq -0.02:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-55}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 50000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (re im)
 :precision binary64
 (let* ((t_0 (* (exp re) (sin im)))
        (t_1 (* (sin im) (+ re 1.0)))
        (t_2 (* (exp re) im)))
   (if (<= t_0 (- INFINITY))
     (*
      (* im (* re (* re re)))
      (fma (* im im) -0.027777777777777776 0.16666666666666666))
     (if (<= t_0 -0.02)
       t_1
       (if (<= t_0 1e-55) t_2 (if (<= t_0 50000.0) t_1 t_2))))))
double code(double re, double im) {
	double t_0 = exp(re) * sin(im);
	double t_1 = sin(im) * (re + 1.0);
	double t_2 = exp(re) * im;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (im * (re * (re * re))) * fma((im * im), -0.027777777777777776, 0.16666666666666666);
	} else if (t_0 <= -0.02) {
		tmp = t_1;
	} else if (t_0 <= 1e-55) {
		tmp = t_2;
	} else if (t_0 <= 50000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(re, im)
	t_0 = Float64(exp(re) * sin(im))
	t_1 = Float64(sin(im) * Float64(re + 1.0))
	t_2 = Float64(exp(re) * im)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(im * Float64(re * Float64(re * re))) * fma(Float64(im * im), -0.027777777777777776, 0.16666666666666666));
	elseif (t_0 <= -0.02)
		tmp = t_1;
	elseif (t_0 <= 1e-55)
		tmp = t_2;
	elseif (t_0 <= 50000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.02], t$95$1, If[LessEqual[t$95$0, 1e-55], t$95$2, If[LessEqual[t$95$0, 50000.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{re} \cdot \sin im\\
t_1 := \sin im \cdot \left(re + 1\right)\\
t_2 := e^{re} \cdot im\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\

\mathbf{elif}\;t\_0 \leq -0.02:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 10^{-55}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_0 \leq 50000:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -inf.0

    1. Initial program 100.0%

      \[e^{re} \cdot \sin im \]
    2. Add Preprocessing
    3. Taylor expanded in re around 0

      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
      7. accelerator-lowering-fma.f6478.1

        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
    5. Simplified78.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
    6. Taylor expanded in re around inf

      \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
      2. cube-multN/A

        \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot \left(re \cdot re\right)\right)}\right) \cdot \sin im \]
      3. unpow2N/A

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

        \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot {re}^{2}\right)}\right) \cdot \sin im \]
      5. unpow2N/A

        \[\leadsto \left(\frac{1}{6} \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
      6. *-lowering-*.f6478.1

        \[\leadsto \left(0.16666666666666666 \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
    8. Simplified78.1%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \cdot \sin im \]
    9. Taylor expanded in im around 0

      \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{36} \cdot \left({im}^{2} \cdot {re}^{3}\right) + \frac{1}{6} \cdot {re}^{3}\right)} \]
    10. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto im \cdot \left(\frac{-1}{36} \cdot \color{blue}{\left({re}^{3} \cdot {im}^{2}\right)}\right) + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      3. associate-*r*N/A

        \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right) \cdot im} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      5. associate-*r*N/A

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

        \[\leadsto \left(\frac{-1}{36} \cdot \color{blue}{\left({im}^{2} \cdot {re}^{3}\right)}\right) \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      7. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot {re}^{3}\right)} \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      8. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left({re}^{3} \cdot im\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \color{blue}{\left(im \cdot {re}^{3}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
      10. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(im \cdot \frac{1}{6}\right) \cdot {re}^{3}} \]
      11. *-commutativeN/A

        \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(\frac{1}{6} \cdot im\right)} \cdot {re}^{3} \]
      12. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
      13. distribute-rgt-outN/A

        \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
      14. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
    11. Simplified58.1%

      \[\leadsto \color{blue}{\left(\left(re \cdot \left(re \cdot re\right)\right) \cdot im\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)} \]

    if -inf.0 < (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004 or 9.99999999999999995e-56 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

    1. Initial program 99.9%

      \[e^{re} \cdot \sin im \]
    2. Add Preprocessing
    3. Taylor expanded in re around 0

      \[\leadsto \color{blue}{\left(1 + re\right)} \cdot \sin im \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
      2. +-lowering-+.f6497.2

        \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
    5. Simplified97.2%

      \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]

    if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 9.99999999999999995e-56 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

    1. Initial program 100.0%

      \[e^{re} \cdot \sin im \]
    2. Add Preprocessing
    3. Taylor expanded in im around 0

      \[\leadsto e^{re} \cdot \color{blue}{im} \]
    4. Step-by-step derivation
      1. Simplified93.3%

        \[\leadsto e^{re} \cdot \color{blue}{im} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 10^{-55}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 91.1% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := e^{re} \cdot im\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;t\_0 \leq -0.02:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;t\_0 \leq 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 50000:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (re im)
     :precision binary64
     (let* ((t_0 (* (exp re) (sin im))) (t_1 (* (exp re) im)))
       (if (<= t_0 (- INFINITY))
         (*
          (* im (* re (* re re)))
          (fma (* im im) -0.027777777777777776 0.16666666666666666))
         (if (<= t_0 -0.02)
           (sin im)
           (if (<= t_0 1e-55) t_1 (if (<= t_0 50000.0) (sin im) t_1))))))
    double code(double re, double im) {
    	double t_0 = exp(re) * sin(im);
    	double t_1 = exp(re) * im;
    	double tmp;
    	if (t_0 <= -((double) INFINITY)) {
    		tmp = (im * (re * (re * re))) * fma((im * im), -0.027777777777777776, 0.16666666666666666);
    	} else if (t_0 <= -0.02) {
    		tmp = sin(im);
    	} else if (t_0 <= 1e-55) {
    		tmp = t_1;
    	} else if (t_0 <= 50000.0) {
    		tmp = sin(im);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(re, im)
    	t_0 = Float64(exp(re) * sin(im))
    	t_1 = Float64(exp(re) * im)
    	tmp = 0.0
    	if (t_0 <= Float64(-Inf))
    		tmp = Float64(Float64(im * Float64(re * Float64(re * re))) * fma(Float64(im * im), -0.027777777777777776, 0.16666666666666666));
    	elseif (t_0 <= -0.02)
    		tmp = sin(im);
    	elseif (t_0 <= 1e-55)
    		tmp = t_1;
    	elseif (t_0 <= 50000.0)
    		tmp = sin(im);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.02], N[Sin[im], $MachinePrecision], If[LessEqual[t$95$0, 1e-55], t$95$1, If[LessEqual[t$95$0, 50000.0], N[Sin[im], $MachinePrecision], t$95$1]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := e^{re} \cdot \sin im\\
    t_1 := e^{re} \cdot im\\
    \mathbf{if}\;t\_0 \leq -\infty:\\
    \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\
    
    \mathbf{elif}\;t\_0 \leq -0.02:\\
    \;\;\;\;\sin im\\
    
    \mathbf{elif}\;t\_0 \leq 10^{-55}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_0 \leq 50000:\\
    \;\;\;\;\sin im\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -inf.0

      1. Initial program 100.0%

        \[e^{re} \cdot \sin im \]
      2. Add Preprocessing
      3. Taylor expanded in re around 0

        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
      4. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
        7. accelerator-lowering-fma.f6478.1

          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
      5. Simplified78.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
      6. Taylor expanded in re around inf

        \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
        2. cube-multN/A

          \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot \left(re \cdot re\right)\right)}\right) \cdot \sin im \]
        3. unpow2N/A

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

          \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot {re}^{2}\right)}\right) \cdot \sin im \]
        5. unpow2N/A

          \[\leadsto \left(\frac{1}{6} \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
        6. *-lowering-*.f6478.1

          \[\leadsto \left(0.16666666666666666 \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
      8. Simplified78.1%

        \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \cdot \sin im \]
      9. Taylor expanded in im around 0

        \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{36} \cdot \left({im}^{2} \cdot {re}^{3}\right) + \frac{1}{6} \cdot {re}^{3}\right)} \]
      10. Step-by-step derivation
        1. distribute-lft-inN/A

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

          \[\leadsto im \cdot \left(\frac{-1}{36} \cdot \color{blue}{\left({re}^{3} \cdot {im}^{2}\right)}\right) + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        3. associate-*r*N/A

          \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        4. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right) \cdot im} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        5. associate-*r*N/A

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

          \[\leadsto \left(\frac{-1}{36} \cdot \color{blue}{\left({im}^{2} \cdot {re}^{3}\right)}\right) \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        7. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot {re}^{3}\right)} \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        8. associate-*l*N/A

          \[\leadsto \color{blue}{\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left({re}^{3} \cdot im\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        9. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \color{blue}{\left(im \cdot {re}^{3}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
        10. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(im \cdot \frac{1}{6}\right) \cdot {re}^{3}} \]
        11. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(\frac{1}{6} \cdot im\right)} \cdot {re}^{3} \]
        12. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
        13. distribute-rgt-outN/A

          \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
        14. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
      11. Simplified58.1%

        \[\leadsto \color{blue}{\left(\left(re \cdot \left(re \cdot re\right)\right) \cdot im\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)} \]

      if -inf.0 < (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004 or 9.99999999999999995e-56 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

      1. Initial program 99.9%

        \[e^{re} \cdot \sin im \]
      2. Add Preprocessing
      3. Taylor expanded in re around 0

        \[\leadsto \color{blue}{\sin im} \]
      4. Step-by-step derivation
        1. sin-lowering-sin.f6496.0

          \[\leadsto \color{blue}{\sin im} \]
      5. Simplified96.0%

        \[\leadsto \color{blue}{\sin im} \]

      if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 9.99999999999999995e-56 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

      1. Initial program 100.0%

        \[e^{re} \cdot \sin im \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto e^{re} \cdot \color{blue}{im} \]
      4. Step-by-step derivation
        1. Simplified93.3%

          \[\leadsto e^{re} \cdot \color{blue}{im} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification89.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 10^{-55}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 83.7% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;t\_0 \leq -0.02:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;t\_0 \leq 10^{-55}:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\ \mathbf{elif}\;t\_0 \leq 50000:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\ \end{array} \end{array} \]
      (FPCore (re im)
       :precision binary64
       (let* ((t_0 (* (exp re) (sin im)))
              (t_1 (fma re (fma re 0.16666666666666666 0.5) 1.0)))
         (if (<= t_0 (- INFINITY))
           (*
            (* im (* re (* re re)))
            (fma (* im im) -0.027777777777777776 0.16666666666666666))
           (if (<= t_0 -0.02)
             (sin im)
             (if (<= t_0 1e-55)
               (/ -1.0 (/ (fma re t_1 -1.0) im))
               (if (<= t_0 50000.0)
                 (sin im)
                 (/
                  1.0
                  (/
                   (+ re -1.0)
                   (*
                    im
                    (fma
                     re
                     (* t_1 (fma (fma re 0.16666666666666666 0.5) (* re re) re))
                     -1.0))))))))))
      double code(double re, double im) {
      	double t_0 = exp(re) * sin(im);
      	double t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0);
      	double tmp;
      	if (t_0 <= -((double) INFINITY)) {
      		tmp = (im * (re * (re * re))) * fma((im * im), -0.027777777777777776, 0.16666666666666666);
      	} else if (t_0 <= -0.02) {
      		tmp = sin(im);
      	} else if (t_0 <= 1e-55) {
      		tmp = -1.0 / (fma(re, t_1, -1.0) / im);
      	} else if (t_0 <= 50000.0) {
      		tmp = sin(im);
      	} else {
      		tmp = 1.0 / ((re + -1.0) / (im * fma(re, (t_1 * fma(fma(re, 0.16666666666666666, 0.5), (re * re), re)), -1.0)));
      	}
      	return tmp;
      }
      
      function code(re, im)
      	t_0 = Float64(exp(re) * sin(im))
      	t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0)
      	tmp = 0.0
      	if (t_0 <= Float64(-Inf))
      		tmp = Float64(Float64(im * Float64(re * Float64(re * re))) * fma(Float64(im * im), -0.027777777777777776, 0.16666666666666666));
      	elseif (t_0 <= -0.02)
      		tmp = sin(im);
      	elseif (t_0 <= 1e-55)
      		tmp = Float64(-1.0 / Float64(fma(re, t_1, -1.0) / im));
      	elseif (t_0 <= 50000.0)
      		tmp = sin(im);
      	else
      		tmp = Float64(1.0 / Float64(Float64(re + -1.0) / Float64(im * fma(re, Float64(t_1 * fma(fma(re, 0.16666666666666666, 0.5), Float64(re * re), re)), -1.0))));
      	end
      	return tmp
      end
      
      code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.02], N[Sin[im], $MachinePrecision], If[LessEqual[t$95$0, 1e-55], N[(-1.0 / N[(N[(re * t$95$1 + -1.0), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 50000.0], N[Sin[im], $MachinePrecision], N[(1.0 / N[(N[(re + -1.0), $MachinePrecision] / N[(im * N[(re * N[(t$95$1 * N[(N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] * N[(re * re), $MachinePrecision] + re), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := e^{re} \cdot \sin im\\
      t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\
      \mathbf{if}\;t\_0 \leq -\infty:\\
      \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\
      
      \mathbf{elif}\;t\_0 \leq -0.02:\\
      \;\;\;\;\sin im\\
      
      \mathbf{elif}\;t\_0 \leq 10^{-55}:\\
      \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\
      
      \mathbf{elif}\;t\_0 \leq 50000:\\
      \;\;\;\;\sin im\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -inf.0

        1. Initial program 100.0%

          \[e^{re} \cdot \sin im \]
        2. Add Preprocessing
        3. Taylor expanded in re around 0

          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
          7. accelerator-lowering-fma.f6478.1

            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
        5. Simplified78.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
        6. Taylor expanded in re around inf

          \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot \sin im \]
          2. cube-multN/A

            \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot \left(re \cdot re\right)\right)}\right) \cdot \sin im \]
          3. unpow2N/A

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

            \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(re \cdot {re}^{2}\right)}\right) \cdot \sin im \]
          5. unpow2N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
          6. *-lowering-*.f6478.1

            \[\leadsto \left(0.16666666666666666 \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot \sin im \]
        8. Simplified78.1%

          \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \cdot \sin im \]
        9. Taylor expanded in im around 0

          \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{36} \cdot \left({im}^{2} \cdot {re}^{3}\right) + \frac{1}{6} \cdot {re}^{3}\right)} \]
        10. Step-by-step derivation
          1. distribute-lft-inN/A

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

            \[\leadsto im \cdot \left(\frac{-1}{36} \cdot \color{blue}{\left({re}^{3} \cdot {im}^{2}\right)}\right) + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          3. associate-*r*N/A

            \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {re}^{3}\right) \cdot {im}^{2}\right) \cdot im} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          5. associate-*r*N/A

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

            \[\leadsto \left(\frac{-1}{36} \cdot \color{blue}{\left({im}^{2} \cdot {re}^{3}\right)}\right) \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          7. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot {re}^{3}\right)} \cdot im + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          8. associate-*l*N/A

            \[\leadsto \color{blue}{\left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left({re}^{3} \cdot im\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          9. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \color{blue}{\left(im \cdot {re}^{3}\right)} + im \cdot \left(\frac{1}{6} \cdot {re}^{3}\right) \]
          10. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(im \cdot \frac{1}{6}\right) \cdot {re}^{3}} \]
          11. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\left(\frac{1}{6} \cdot im\right)} \cdot {re}^{3} \]
          12. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{36} \cdot {im}^{2}\right) \cdot \left(im \cdot {re}^{3}\right) + \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
          13. distribute-rgt-outN/A

            \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
          14. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\left(im \cdot {re}^{3}\right) \cdot \left(\frac{-1}{36} \cdot {im}^{2} + \frac{1}{6}\right)} \]
        11. Simplified58.1%

          \[\leadsto \color{blue}{\left(\left(re \cdot \left(re \cdot re\right)\right) \cdot im\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)} \]

        if -inf.0 < (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004 or 9.99999999999999995e-56 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

        1. Initial program 99.9%

          \[e^{re} \cdot \sin im \]
        2. Add Preprocessing
        3. Taylor expanded in re around 0

          \[\leadsto \color{blue}{\sin im} \]
        4. Step-by-step derivation
          1. sin-lowering-sin.f6496.0

            \[\leadsto \color{blue}{\sin im} \]
        5. Simplified96.0%

          \[\leadsto \color{blue}{\sin im} \]

        if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 9.99999999999999995e-56

        1. Initial program 100.0%

          \[e^{re} \cdot \sin im \]
        2. Add Preprocessing
        3. Taylor expanded in re around 0

          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
          7. accelerator-lowering-fma.f6448.7

            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
        5. Simplified48.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
        6. Taylor expanded in im around 0

          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
        7. Step-by-step derivation
          1. Simplified48.7%

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

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

              \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
            3. clear-numN/A

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

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

              \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
          3. Applied egg-rr48.0%

            \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
          4. Taylor expanded in re around 0

            \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{-1 \cdot im}}} \]
          5. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{\mathsf{neg}\left(im\right)}}} \]
            2. neg-lowering-neg.f6484.6

              \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]
          6. Simplified84.6%

            \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]

          if 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

          1. Initial program 100.0%

            \[e^{re} \cdot \sin im \]
          2. Add Preprocessing
          3. Taylor expanded in re around 0

            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
            7. accelerator-lowering-fma.f6465.6

              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
          5. Simplified65.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
          6. Taylor expanded in im around 0

            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
          7. Step-by-step derivation
            1. Simplified41.0%

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

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

                \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
              3. clear-numN/A

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

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

                \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
            3. Applied egg-rr12.6%

              \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
            4. Taylor expanded in re around 0

              \[\leadsto \frac{1}{\frac{\color{blue}{re - 1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), re \cdot re, re\right), -1\right) \cdot im}} \]
            5. Step-by-step derivation
              1. sub-negN/A

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

                \[\leadsto \frac{1}{\frac{re + \color{blue}{-1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), re \cdot re, re\right), -1\right) \cdot im}} \]
              3. +-lowering-+.f6448.8

                \[\leadsto \frac{1}{\frac{\color{blue}{re + -1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}} \]
            6. Simplified48.8%

              \[\leadsto \frac{1}{\frac{\color{blue}{re + -1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}} \]
          8. Recombined 4 regimes into one program.
          9. Final simplification81.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -\infty:\\ \;\;\;\;\left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right) \cdot \mathsf{fma}\left(im \cdot im, -0.027777777777777776, 0.16666666666666666\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 10^{-55}:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\ \end{array} \]
          10. Add Preprocessing

          Alternative 5: 92.5% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := e^{re} \cdot im\\ \mathbf{if}\;t\_0 \leq -0.02:\\ \;\;\;\;\frac{\sin im}{\frac{1}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (re im)
           :precision binary64
           (let* ((t_0 (* (exp re) (sin im))) (t_1 (* (exp re) im)))
             (if (<= t_0 -0.02)
               (/
                (sin im)
                (/ 1.0 (fma re (fma re (fma re 0.16666666666666666 0.5) 1.0) 1.0)))
               (if (<= t_0 2e-130)
                 t_1
                 (if (<= t_0 50000.0)
                   (*
                    (sin im)
                    (fma (fma re 0.16666666666666666 0.5) (* re re) (+ re 1.0)))
                   t_1)))))
          double code(double re, double im) {
          	double t_0 = exp(re) * sin(im);
          	double t_1 = exp(re) * im;
          	double tmp;
          	if (t_0 <= -0.02) {
          		tmp = sin(im) / (1.0 / fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0));
          	} else if (t_0 <= 2e-130) {
          		tmp = t_1;
          	} else if (t_0 <= 50000.0) {
          		tmp = sin(im) * fma(fma(re, 0.16666666666666666, 0.5), (re * re), (re + 1.0));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(re, im)
          	t_0 = Float64(exp(re) * sin(im))
          	t_1 = Float64(exp(re) * im)
          	tmp = 0.0
          	if (t_0 <= -0.02)
          		tmp = Float64(sin(im) / Float64(1.0 / fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0)));
          	elseif (t_0 <= 2e-130)
          		tmp = t_1;
          	elseif (t_0 <= 50000.0)
          		tmp = Float64(sin(im) * fma(fma(re, 0.16666666666666666, 0.5), Float64(re * re), Float64(re + 1.0)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(N[Sin[im], $MachinePrecision] / N[(1.0 / N[(re * N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-130], t$95$1, If[LessEqual[t$95$0, 50000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] * N[(re * re), $MachinePrecision] + N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := e^{re} \cdot \sin im\\
          t_1 := e^{re} \cdot im\\
          \mathbf{if}\;t\_0 \leq -0.02:\\
          \;\;\;\;\frac{\sin im}{\frac{1}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)}}\\
          
          \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_0 \leq 50000:\\
          \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

            1. Initial program 99.9%

              \[e^{re} \cdot \sin im \]
            2. Add Preprocessing
            3. Taylor expanded in re around 0

              \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
            5. Simplified86.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) + 1\right)} \]
              2. flip3-+N/A

                \[\leadsto \sin im \cdot \color{blue}{\frac{{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right)}^{3} + {1}^{3}}{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) + \left(1 \cdot 1 - \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot 1\right)}} \]
              3. clear-numN/A

                \[\leadsto \sin im \cdot \color{blue}{\frac{1}{\frac{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) + \left(1 \cdot 1 - \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot 1\right)}{{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right)}^{3} + {1}^{3}}}} \]
              4. un-div-invN/A

                \[\leadsto \color{blue}{\frac{\sin im}{\frac{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) + \left(1 \cdot 1 - \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot 1\right)}{{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right)}^{3} + {1}^{3}}}} \]
              5. /-lowering-/.f64N/A

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

                \[\leadsto \frac{\color{blue}{\sin im}}{\frac{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) + \left(1 \cdot 1 - \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot 1\right)}{{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right)}^{3} + {1}^{3}}} \]
            7. Applied egg-rr86.6%

              \[\leadsto \color{blue}{\frac{\sin im}{\frac{1}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)}}} \]

            if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 2.0000000000000002e-130 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

            1. Initial program 100.0%

              \[e^{re} \cdot \sin im \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto e^{re} \cdot \color{blue}{im} \]
            4. Step-by-step derivation
              1. Simplified93.1%

                \[\leadsto e^{re} \cdot \color{blue}{im} \]

              if 2.0000000000000002e-130 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

              1. Initial program 100.0%

                \[e^{re} \cdot \sin im \]
              2. Add Preprocessing
              3. Taylor expanded in re around 0

                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                7. accelerator-lowering-fma.f64100.0

                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
              5. Simplified100.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
              6. Step-by-step derivation
                1. distribute-rgt-inN/A

                  \[\leadsto \left(\color{blue}{\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + 1 \cdot re\right)} + 1\right) \cdot \sin im \]
                2. *-lft-identityN/A

                  \[\leadsto \left(\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + \color{blue}{re}\right) + 1\right) \cdot \sin im \]
                3. associate-+l+N/A

                  \[\leadsto \color{blue}{\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + \left(re + 1\right)\right)} \cdot \sin im \]
                4. *-commutativeN/A

                  \[\leadsto \left(\color{blue}{\left(\left(re \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot re\right)} \cdot re + \left(re + 1\right)\right) \cdot \sin im \]
                5. associate-*l*N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), \color{blue}{re \cdot re}, re + 1\right) \cdot \sin im \]
                9. +-lowering-+.f64100.0

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, \color{blue}{re + 1}\right) \cdot \sin im \]
              7. Applied egg-rr100.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)} \cdot \sin im \]
            5. Recombined 3 regimes into one program.
            6. Final simplification92.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\frac{\sin im}{\frac{1}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)}}\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 2 \cdot 10^{-130}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
            7. Add Preprocessing

            Alternative 6: 92.5% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := e^{re} \cdot im\\ \mathbf{if}\;t\_0 \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (re im)
             :precision binary64
             (let* ((t_0 (* (exp re) (sin im))) (t_1 (* (exp re) im)))
               (if (<= t_0 -0.02)
                 (* (sin im) (fma re (fma re (fma re 0.16666666666666666 0.5) 1.0) 1.0))
                 (if (<= t_0 2e-130)
                   t_1
                   (if (<= t_0 50000.0)
                     (*
                      (sin im)
                      (fma (fma re 0.16666666666666666 0.5) (* re re) (+ re 1.0)))
                     t_1)))))
            double code(double re, double im) {
            	double t_0 = exp(re) * sin(im);
            	double t_1 = exp(re) * im;
            	double tmp;
            	if (t_0 <= -0.02) {
            		tmp = sin(im) * fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0);
            	} else if (t_0 <= 2e-130) {
            		tmp = t_1;
            	} else if (t_0 <= 50000.0) {
            		tmp = sin(im) * fma(fma(re, 0.16666666666666666, 0.5), (re * re), (re + 1.0));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(re, im)
            	t_0 = Float64(exp(re) * sin(im))
            	t_1 = Float64(exp(re) * im)
            	tmp = 0.0
            	if (t_0 <= -0.02)
            		tmp = Float64(sin(im) * fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0));
            	elseif (t_0 <= 2e-130)
            		tmp = t_1;
            	elseif (t_0 <= 50000.0)
            		tmp = Float64(sin(im) * fma(fma(re, 0.16666666666666666, 0.5), Float64(re * re), Float64(re + 1.0)));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-130], t$95$1, If[LessEqual[t$95$0, 50000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] * N[(re * re), $MachinePrecision] + N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := e^{re} \cdot \sin im\\
            t_1 := e^{re} \cdot im\\
            \mathbf{if}\;t\_0 \leq -0.02:\\
            \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\
            
            \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_0 \leq 50000:\\
            \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

              1. Initial program 99.9%

                \[e^{re} \cdot \sin im \]
              2. Add Preprocessing
              3. Taylor expanded in re around 0

                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
              5. Simplified86.6%

                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]

              if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 2.0000000000000002e-130 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

              1. Initial program 100.0%

                \[e^{re} \cdot \sin im \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto e^{re} \cdot \color{blue}{im} \]
              4. Step-by-step derivation
                1. Simplified93.1%

                  \[\leadsto e^{re} \cdot \color{blue}{im} \]

                if 2.0000000000000002e-130 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

                1. Initial program 100.0%

                  \[e^{re} \cdot \sin im \]
                2. Add Preprocessing
                3. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                4. Step-by-step derivation
                  1. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                  7. accelerator-lowering-fma.f64100.0

                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                5. Simplified100.0%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                6. Step-by-step derivation
                  1. distribute-rgt-inN/A

                    \[\leadsto \left(\color{blue}{\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + 1 \cdot re\right)} + 1\right) \cdot \sin im \]
                  2. *-lft-identityN/A

                    \[\leadsto \left(\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + \color{blue}{re}\right) + 1\right) \cdot \sin im \]
                  3. associate-+l+N/A

                    \[\leadsto \color{blue}{\left(\left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) \cdot re + \left(re + 1\right)\right)} \cdot \sin im \]
                  4. *-commutativeN/A

                    \[\leadsto \left(\color{blue}{\left(\left(re \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot re\right)} \cdot re + \left(re + 1\right)\right) \cdot \sin im \]
                  5. associate-*l*N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), \color{blue}{re \cdot re}, re + 1\right) \cdot \sin im \]
                  9. +-lowering-+.f64100.0

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, \color{blue}{re + 1}\right) \cdot \sin im \]
                7. Applied egg-rr100.0%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)} \cdot \sin im \]
              5. Recombined 3 regimes into one program.
              6. Final simplification92.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 2 \cdot 10^{-130}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
              7. Add Preprocessing

              Alternative 7: 92.5% accurate, 0.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ t_1 := e^{re} \cdot \sin im\\ t_2 := e^{re} \cdot im\\ \mathbf{if}\;t\_1 \leq -0.02:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-130}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              (FPCore (re im)
               :precision binary64
               (let* ((t_0
                       (*
                        (sin im)
                        (fma re (fma re (fma re 0.16666666666666666 0.5) 1.0) 1.0)))
                      (t_1 (* (exp re) (sin im)))
                      (t_2 (* (exp re) im)))
                 (if (<= t_1 -0.02)
                   t_0
                   (if (<= t_1 2e-130) t_2 (if (<= t_1 50000.0) t_0 t_2)))))
              double code(double re, double im) {
              	double t_0 = sin(im) * fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0);
              	double t_1 = exp(re) * sin(im);
              	double t_2 = exp(re) * im;
              	double tmp;
              	if (t_1 <= -0.02) {
              		tmp = t_0;
              	} else if (t_1 <= 2e-130) {
              		tmp = t_2;
              	} else if (t_1 <= 50000.0) {
              		tmp = t_0;
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              function code(re, im)
              	t_0 = Float64(sin(im) * fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), 1.0))
              	t_1 = Float64(exp(re) * sin(im))
              	t_2 = Float64(exp(re) * im)
              	tmp = 0.0
              	if (t_1 <= -0.02)
              		tmp = t_0;
              	elseif (t_1 <= 2e-130)
              		tmp = t_2;
              	elseif (t_1 <= 50000.0)
              		tmp = t_0;
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              code[re_, im_] := Block[{t$95$0 = N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[t$95$1, -0.02], t$95$0, If[LessEqual[t$95$1, 2e-130], t$95$2, If[LessEqual[t$95$1, 50000.0], t$95$0, t$95$2]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\
              t_1 := e^{re} \cdot \sin im\\
              t_2 := e^{re} \cdot im\\
              \mathbf{if}\;t\_1 \leq -0.02:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-130}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 50000:\\
              \;\;\;\;t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004 or 2.0000000000000002e-130 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

                1. Initial program 99.9%

                  \[e^{re} \cdot \sin im \]
                2. Add Preprocessing
                3. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                4. Step-by-step derivation
                  1. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                  7. accelerator-lowering-fma.f6492.2

                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                5. Simplified92.2%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]

                if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 2.0000000000000002e-130 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

                1. Initial program 100.0%

                  \[e^{re} \cdot \sin im \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto e^{re} \cdot \color{blue}{im} \]
                4. Step-by-step derivation
                  1. Simplified93.1%

                    \[\leadsto e^{re} \cdot \color{blue}{im} \]
                5. Recombined 2 regimes into one program.
                6. Final simplification92.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 2 \cdot 10^{-130}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
                7. Add Preprocessing

                Alternative 8: 90.7% accurate, 0.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ t_1 := e^{re} \cdot \sin im\\ \mathbf{if}\;t\_1 \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-55}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re \cdot re, 0.5, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (re im)
                 :precision binary64
                 (let* ((t_0 (* (exp re) im)) (t_1 (* (exp re) (sin im))))
                   (if (<= t_1 -0.02)
                     (* (sin im) (fma re (fma re 0.5 1.0) 1.0))
                     (if (<= t_1 1e-55)
                       t_0
                       (if (<= t_1 50000.0)
                         (* (sin im) (fma (* re re) 0.5 (+ re 1.0)))
                         t_0)))))
                double code(double re, double im) {
                	double t_0 = exp(re) * im;
                	double t_1 = exp(re) * sin(im);
                	double tmp;
                	if (t_1 <= -0.02) {
                		tmp = sin(im) * fma(re, fma(re, 0.5, 1.0), 1.0);
                	} else if (t_1 <= 1e-55) {
                		tmp = t_0;
                	} else if (t_1 <= 50000.0) {
                		tmp = sin(im) * fma((re * re), 0.5, (re + 1.0));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                function code(re, im)
                	t_0 = Float64(exp(re) * im)
                	t_1 = Float64(exp(re) * sin(im))
                	tmp = 0.0
                	if (t_1 <= -0.02)
                		tmp = Float64(sin(im) * fma(re, fma(re, 0.5, 1.0), 1.0));
                	elseif (t_1 <= 1e-55)
                		tmp = t_0;
                	elseif (t_1 <= 50000.0)
                		tmp = Float64(sin(im) * fma(Float64(re * re), 0.5, Float64(re + 1.0)));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.02], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-55], t$95$0, If[LessEqual[t$95$1, 50000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(re * re), $MachinePrecision] * 0.5 + N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := e^{re} \cdot im\\
                t_1 := e^{re} \cdot \sin im\\
                \mathbf{if}\;t\_1 \leq -0.02:\\
                \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\
                
                \mathbf{elif}\;t\_1 \leq 10^{-55}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;t\_1 \leq 50000:\\
                \;\;\;\;\sin im \cdot \mathsf{fma}\left(re \cdot re, 0.5, re + 1\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

                  1. Initial program 99.9%

                    \[e^{re} \cdot \sin im \]
                  2. Add Preprocessing
                  3. Taylor expanded in re around 0

                    \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                  4. Step-by-step derivation
                    1. +-commutativeN/A

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

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

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

                      \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                    5. accelerator-lowering-fma.f6479.3

                      \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                  5. Simplified79.3%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]

                  if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 9.99999999999999995e-56 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

                  1. Initial program 100.0%

                    \[e^{re} \cdot \sin im \]
                  2. Add Preprocessing
                  3. Taylor expanded in im around 0

                    \[\leadsto e^{re} \cdot \color{blue}{im} \]
                  4. Step-by-step derivation
                    1. Simplified93.3%

                      \[\leadsto e^{re} \cdot \color{blue}{im} \]

                    if 9.99999999999999995e-56 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

                    1. Initial program 100.0%

                      \[e^{re} \cdot \sin im \]
                    2. Add Preprocessing
                    3. Taylor expanded in re around 0

                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                    4. Step-by-step derivation
                      1. +-commutativeN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                      5. accelerator-lowering-fma.f64100.0

                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                    5. Simplified100.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                    6. Step-by-step derivation
                      1. distribute-lft-inN/A

                        \[\leadsto \left(\color{blue}{\left(re \cdot \left(re \cdot \frac{1}{2}\right) + re \cdot 1\right)} + 1\right) \cdot \sin im \]
                      2. *-rgt-identityN/A

                        \[\leadsto \left(\left(re \cdot \left(re \cdot \frac{1}{2}\right) + \color{blue}{re}\right) + 1\right) \cdot \sin im \]
                      3. associate-+l+N/A

                        \[\leadsto \color{blue}{\left(re \cdot \left(re \cdot \frac{1}{2}\right) + \left(re + 1\right)\right)} \cdot \sin im \]
                      4. associate-*r*N/A

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{re \cdot re}, \frac{1}{2}, re + 1\right) \cdot \sin im \]
                      7. +-lowering-+.f64100.0

                        \[\leadsto \mathsf{fma}\left(re \cdot re, 0.5, \color{blue}{re + 1}\right) \cdot \sin im \]
                    7. Applied egg-rr100.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(re \cdot re, 0.5, re + 1\right)} \cdot \sin im \]
                  5. Recombined 3 regimes into one program.
                  6. Final simplification90.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 10^{-55}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re \cdot re, 0.5, re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 9: 90.7% accurate, 0.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ t_1 := e^{re} \cdot \sin im\\ t_2 := \sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\ \mathbf{if}\;t\_1 \leq -0.02:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-55}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (re im)
                   :precision binary64
                   (let* ((t_0 (* (exp re) im))
                          (t_1 (* (exp re) (sin im)))
                          (t_2 (* (sin im) (fma re (fma re 0.5 1.0) 1.0))))
                     (if (<= t_1 -0.02)
                       t_2
                       (if (<= t_1 1e-55) t_0 (if (<= t_1 50000.0) t_2 t_0)))))
                  double code(double re, double im) {
                  	double t_0 = exp(re) * im;
                  	double t_1 = exp(re) * sin(im);
                  	double t_2 = sin(im) * fma(re, fma(re, 0.5, 1.0), 1.0);
                  	double tmp;
                  	if (t_1 <= -0.02) {
                  		tmp = t_2;
                  	} else if (t_1 <= 1e-55) {
                  		tmp = t_0;
                  	} else if (t_1 <= 50000.0) {
                  		tmp = t_2;
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  function code(re, im)
                  	t_0 = Float64(exp(re) * im)
                  	t_1 = Float64(exp(re) * sin(im))
                  	t_2 = Float64(sin(im) * fma(re, fma(re, 0.5, 1.0), 1.0))
                  	tmp = 0.0
                  	if (t_1 <= -0.02)
                  		tmp = t_2;
                  	elseif (t_1 <= 1e-55)
                  		tmp = t_0;
                  	elseif (t_1 <= 50000.0)
                  		tmp = t_2;
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.02], t$95$2, If[LessEqual[t$95$1, 1e-55], t$95$0, If[LessEqual[t$95$1, 50000.0], t$95$2, t$95$0]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := e^{re} \cdot im\\
                  t_1 := e^{re} \cdot \sin im\\
                  t_2 := \sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\
                  \mathbf{if}\;t\_1 \leq -0.02:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{-55}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;t\_1 \leq 50000:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004 or 9.99999999999999995e-56 < (*.f64 (exp.f64 re) (sin.f64 im)) < 5e4

                    1. Initial program 99.9%

                      \[e^{re} \cdot \sin im \]
                    2. Add Preprocessing
                    3. Taylor expanded in re around 0

                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                    4. Step-by-step derivation
                      1. +-commutativeN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                      5. accelerator-lowering-fma.f6487.7

                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                    5. Simplified87.7%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]

                    if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 9.99999999999999995e-56 or 5e4 < (*.f64 (exp.f64 re) (sin.f64 im))

                    1. Initial program 100.0%

                      \[e^{re} \cdot \sin im \]
                    2. Add Preprocessing
                    3. Taylor expanded in im around 0

                      \[\leadsto e^{re} \cdot \color{blue}{im} \]
                    4. Step-by-step derivation
                      1. Simplified93.3%

                        \[\leadsto e^{re} \cdot \color{blue}{im} \]
                    5. Recombined 2 regimes into one program.
                    6. Final simplification90.7%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 10^{-55}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 50000:\\ \;\;\;\;\sin im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 10: 59.1% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\ \mathbf{if}\;t\_0 \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\ \end{array} \end{array} \]
                    (FPCore (re im)
                     :precision binary64
                     (let* ((t_0 (* (exp re) (sin im)))
                            (t_1 (fma re (fma re 0.16666666666666666 0.5) 1.0)))
                       (if (<= t_0 -0.02)
                         (* im (* re (* re (fma (* im im) -0.08333333333333333 0.5))))
                         (if (<= t_0 2e-130)
                           (/ -1.0 (/ (fma re t_1 -1.0) im))
                           (/
                            1.0
                            (/
                             (+ re -1.0)
                             (*
                              im
                              (fma
                               re
                               (* t_1 (fma (fma re 0.16666666666666666 0.5) (* re re) re))
                               -1.0))))))))
                    double code(double re, double im) {
                    	double t_0 = exp(re) * sin(im);
                    	double t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0);
                    	double tmp;
                    	if (t_0 <= -0.02) {
                    		tmp = im * (re * (re * fma((im * im), -0.08333333333333333, 0.5)));
                    	} else if (t_0 <= 2e-130) {
                    		tmp = -1.0 / (fma(re, t_1, -1.0) / im);
                    	} else {
                    		tmp = 1.0 / ((re + -1.0) / (im * fma(re, (t_1 * fma(fma(re, 0.16666666666666666, 0.5), (re * re), re)), -1.0)));
                    	}
                    	return tmp;
                    }
                    
                    function code(re, im)
                    	t_0 = Float64(exp(re) * sin(im))
                    	t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0)
                    	tmp = 0.0
                    	if (t_0 <= -0.02)
                    		tmp = Float64(im * Float64(re * Float64(re * fma(Float64(im * im), -0.08333333333333333, 0.5))));
                    	elseif (t_0 <= 2e-130)
                    		tmp = Float64(-1.0 / Float64(fma(re, t_1, -1.0) / im));
                    	else
                    		tmp = Float64(1.0 / Float64(Float64(re + -1.0) / Float64(im * fma(re, Float64(t_1 * fma(fma(re, 0.16666666666666666, 0.5), Float64(re * re), re)), -1.0))));
                    	end
                    	return tmp
                    end
                    
                    code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(im * N[(re * N[(re * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-130], N[(-1.0 / N[(N[(re * t$95$1 + -1.0), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re + -1.0), $MachinePrecision] / N[(im * N[(re * N[(t$95$1 * N[(N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] * N[(re * re), $MachinePrecision] + re), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := e^{re} \cdot \sin im\\
                    t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\
                    \mathbf{if}\;t\_0 \leq -0.02:\\
                    \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\
                    
                    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-130}:\\
                    \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

                      1. Initial program 99.9%

                        \[e^{re} \cdot \sin im \]
                      2. Add Preprocessing
                      3. Taylor expanded in re around 0

                        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

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

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

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

                          \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                        5. accelerator-lowering-fma.f6479.3

                          \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                      5. Simplified79.3%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                      6. Taylor expanded in im around 0

                        \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                      7. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                        2. +-commutativeN/A

                          \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                        3. associate-+r+N/A

                          \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                        4. associate-*r*N/A

                          \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                        5. distribute-rgt1-inN/A

                          \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                        6. +-commutativeN/A

                          \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                        7. *-lowering-*.f64N/A

                          \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                        8. +-commutativeN/A

                          \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                        9. *-commutativeN/A

                          \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                        10. unpow2N/A

                          \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                        11. associate-*l*N/A

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

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

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

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

                          \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                      8. Simplified25.0%

                        \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                      9. Taylor expanded in re around inf

                        \[\leadsto im \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({re}^{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                      10. Step-by-step derivation
                        1. associate-*r*N/A

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

                          \[\leadsto im \cdot \left(\color{blue}{\left({re}^{2} \cdot \frac{1}{2}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) \]
                        3. associate-*r*N/A

                          \[\leadsto im \cdot \color{blue}{\left({re}^{2} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                        4. unpow2N/A

                          \[\leadsto im \cdot \left(\color{blue}{\left(re \cdot re\right)} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                        5. associate-*l*N/A

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

                          \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(re \cdot \frac{1}{2}\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                        7. *-commutativeN/A

                          \[\leadsto im \cdot \left(re \cdot \left(\color{blue}{\left(\frac{1}{2} \cdot re\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                        8. associate-*r*N/A

                          \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                        10. associate-*r*N/A

                          \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                        11. *-commutativeN/A

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

                          \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                        13. *-lowering-*.f64N/A

                          \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                        14. distribute-rgt-inN/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(1 \cdot \frac{1}{2} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)}\right)\right) \]
                        15. metadata-evalN/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\frac{1}{2}} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
                        16. +-commutativeN/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2} + \frac{1}{2}\right)}\right)\right) \]
                        17. *-commutativeN/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\left({im}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{2} + \frac{1}{2}\right)\right)\right) \]
                        18. associate-*l*N/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{2}\right)} + \frac{1}{2}\right)\right)\right) \]
                        19. metadata-evalN/A

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left({im}^{2} \cdot \color{blue}{\frac{-1}{12}} + \frac{1}{2}\right)\right)\right) \]
                        20. metadata-evalN/A

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

                          \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\mathsf{fma}\left({im}^{2}, \frac{1}{2} \cdot \frac{-1}{6}, \frac{1}{2}\right)}\right)\right) \]
                      11. Simplified25.3%

                        \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)} \]

                      if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 2.0000000000000002e-130

                      1. Initial program 100.0%

                        \[e^{re} \cdot \sin im \]
                      2. Add Preprocessing
                      3. Taylor expanded in re around 0

                        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                        7. accelerator-lowering-fma.f6447.3

                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                      5. Simplified47.3%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                      6. Taylor expanded in im around 0

                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                      7. Step-by-step derivation
                        1. Simplified47.3%

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

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

                            \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
                          3. clear-numN/A

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

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

                            \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
                        3. Applied egg-rr46.6%

                          \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
                        4. Taylor expanded in re around 0

                          \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{-1 \cdot im}}} \]
                        5. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{\mathsf{neg}\left(im\right)}}} \]
                          2. neg-lowering-neg.f6484.2

                            \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]
                        6. Simplified84.2%

                          \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]

                        if 2.0000000000000002e-130 < (*.f64 (exp.f64 re) (sin.f64 im))

                        1. Initial program 100.0%

                          \[e^{re} \cdot \sin im \]
                        2. Add Preprocessing
                        3. Taylor expanded in re around 0

                          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                          7. accelerator-lowering-fma.f6488.5

                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                        5. Simplified88.5%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                        6. Taylor expanded in im around 0

                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                        7. Step-by-step derivation
                          1. Simplified24.0%

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

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

                              \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
                            3. clear-numN/A

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

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

                              \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
                          3. Applied egg-rr14.5%

                            \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
                          4. Taylor expanded in re around 0

                            \[\leadsto \frac{1}{\frac{\color{blue}{re - 1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), re \cdot re, re\right), -1\right) \cdot im}} \]
                          5. Step-by-step derivation
                            1. sub-negN/A

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

                              \[\leadsto \frac{1}{\frac{re + \color{blue}{-1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), re \cdot re, re\right), -1\right) \cdot im}} \]
                            3. +-lowering-+.f6426.5

                              \[\leadsto \frac{1}{\frac{\color{blue}{re + -1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}} \]
                          6. Simplified26.5%

                            \[\leadsto \frac{1}{\frac{\color{blue}{re + -1}}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}} \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification51.4%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 2 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re + -1}{im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right)}}\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 11: 58.5% accurate, 0.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ \mathbf{if}\;t\_0 \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;im \cdot \mathsf{fma}\left(\left(re \cdot re\right) \cdot \mathsf{fma}\left(re \cdot re, 0.027777777777777776, -0.25\right), \frac{1}{\mathsf{fma}\left(re, 0.16666666666666666, -0.5\right)}, re + 1\right)\\ \end{array} \end{array} \]
                        (FPCore (re im)
                         :precision binary64
                         (let* ((t_0 (* (exp re) (sin im))))
                           (if (<= t_0 -0.02)
                             (* im (* re (* re (fma (* im im) -0.08333333333333333 0.5))))
                             (if (<= t_0 0.0)
                               (/
                                -1.0
                                (/ (fma re (fma re (fma re 0.16666666666666666 0.5) 1.0) -1.0) im))
                               (*
                                im
                                (fma
                                 (* (* re re) (fma (* re re) 0.027777777777777776 -0.25))
                                 (/ 1.0 (fma re 0.16666666666666666 -0.5))
                                 (+ re 1.0)))))))
                        double code(double re, double im) {
                        	double t_0 = exp(re) * sin(im);
                        	double tmp;
                        	if (t_0 <= -0.02) {
                        		tmp = im * (re * (re * fma((im * im), -0.08333333333333333, 0.5)));
                        	} else if (t_0 <= 0.0) {
                        		tmp = -1.0 / (fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), -1.0) / im);
                        	} else {
                        		tmp = im * fma(((re * re) * fma((re * re), 0.027777777777777776, -0.25)), (1.0 / fma(re, 0.16666666666666666, -0.5)), (re + 1.0));
                        	}
                        	return tmp;
                        }
                        
                        function code(re, im)
                        	t_0 = Float64(exp(re) * sin(im))
                        	tmp = 0.0
                        	if (t_0 <= -0.02)
                        		tmp = Float64(im * Float64(re * Float64(re * fma(Float64(im * im), -0.08333333333333333, 0.5))));
                        	elseif (t_0 <= 0.0)
                        		tmp = Float64(-1.0 / Float64(fma(re, fma(re, fma(re, 0.16666666666666666, 0.5), 1.0), -1.0) / im));
                        	else
                        		tmp = Float64(im * fma(Float64(Float64(re * re) * fma(Float64(re * re), 0.027777777777777776, -0.25)), Float64(1.0 / fma(re, 0.16666666666666666, -0.5)), Float64(re + 1.0)));
                        	end
                        	return tmp
                        end
                        
                        code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(im * N[(re * N[(re * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(-1.0 / N[(N[(re * N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + -1.0), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(N[(re * re), $MachinePrecision] * N[(N[(re * re), $MachinePrecision] * 0.027777777777777776 + -0.25), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(re * 0.16666666666666666 + -0.5), $MachinePrecision]), $MachinePrecision] + N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := e^{re} \cdot \sin im\\
                        \mathbf{if}\;t\_0 \leq -0.02:\\
                        \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\
                        
                        \mathbf{elif}\;t\_0 \leq 0:\\
                        \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;im \cdot \mathsf{fma}\left(\left(re \cdot re\right) \cdot \mathsf{fma}\left(re \cdot re, 0.027777777777777776, -0.25\right), \frac{1}{\mathsf{fma}\left(re, 0.16666666666666666, -0.5\right)}, re + 1\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

                          1. Initial program 99.9%

                            \[e^{re} \cdot \sin im \]
                          2. Add Preprocessing
                          3. Taylor expanded in re around 0

                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                          4. Step-by-step derivation
                            1. +-commutativeN/A

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

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

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

                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                            5. accelerator-lowering-fma.f6479.3

                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                          5. Simplified79.3%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                          6. Taylor expanded in im around 0

                            \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                          7. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                            2. +-commutativeN/A

                              \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                            3. associate-+r+N/A

                              \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                            4. associate-*r*N/A

                              \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                            5. distribute-rgt1-inN/A

                              \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                            6. +-commutativeN/A

                              \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                            7. *-lowering-*.f64N/A

                              \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                            8. +-commutativeN/A

                              \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                            9. *-commutativeN/A

                              \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                            10. unpow2N/A

                              \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                            11. associate-*l*N/A

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

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

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

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

                              \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                          8. Simplified25.0%

                            \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                          9. Taylor expanded in re around inf

                            \[\leadsto im \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({re}^{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                          10. Step-by-step derivation
                            1. associate-*r*N/A

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

                              \[\leadsto im \cdot \left(\color{blue}{\left({re}^{2} \cdot \frac{1}{2}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) \]
                            3. associate-*r*N/A

                              \[\leadsto im \cdot \color{blue}{\left({re}^{2} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                            4. unpow2N/A

                              \[\leadsto im \cdot \left(\color{blue}{\left(re \cdot re\right)} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                            5. associate-*l*N/A

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

                              \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(re \cdot \frac{1}{2}\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                            7. *-commutativeN/A

                              \[\leadsto im \cdot \left(re \cdot \left(\color{blue}{\left(\frac{1}{2} \cdot re\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                            8. associate-*r*N/A

                              \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                            9. *-lowering-*.f64N/A

                              \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            10. associate-*r*N/A

                              \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                            11. *-commutativeN/A

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

                              \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                            13. *-lowering-*.f64N/A

                              \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                            14. distribute-rgt-inN/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(1 \cdot \frac{1}{2} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)}\right)\right) \]
                            15. metadata-evalN/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\frac{1}{2}} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
                            16. +-commutativeN/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2} + \frac{1}{2}\right)}\right)\right) \]
                            17. *-commutativeN/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\left({im}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{2} + \frac{1}{2}\right)\right)\right) \]
                            18. associate-*l*N/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{2}\right)} + \frac{1}{2}\right)\right)\right) \]
                            19. metadata-evalN/A

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left({im}^{2} \cdot \color{blue}{\frac{-1}{12}} + \frac{1}{2}\right)\right)\right) \]
                            20. metadata-evalN/A

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

                              \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\mathsf{fma}\left({im}^{2}, \frac{1}{2} \cdot \frac{-1}{6}, \frac{1}{2}\right)}\right)\right) \]
                          11. Simplified25.3%

                            \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)} \]

                          if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 0.0

                          1. Initial program 100.0%

                            \[e^{re} \cdot \sin im \]
                          2. Add Preprocessing
                          3. Taylor expanded in re around 0

                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                          4. Step-by-step derivation
                            1. +-commutativeN/A

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                            7. accelerator-lowering-fma.f6437.0

                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                          5. Simplified37.0%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                          6. Taylor expanded in im around 0

                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                          7. Step-by-step derivation
                            1. Simplified37.0%

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

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

                                \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
                              3. clear-numN/A

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

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

                                \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
                            3. Applied egg-rr36.2%

                              \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
                            4. Taylor expanded in re around 0

                              \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{-1 \cdot im}}} \]
                            5. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{\mathsf{neg}\left(im\right)}}} \]
                              2. neg-lowering-neg.f6482.9

                                \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]
                            6. Simplified82.9%

                              \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]

                            if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                            1. Initial program 100.0%

                              \[e^{re} \cdot \sin im \]
                            2. Add Preprocessing
                            3. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                            4. Step-by-step derivation
                              1. +-commutativeN/A

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                              7. accelerator-lowering-fma.f6489.8

                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                            5. Simplified89.8%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                            6. Taylor expanded in im around 0

                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                            7. Step-by-step derivation
                              1. Simplified38.8%

                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                              2. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto \left(\color{blue}{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) + re \cdot 1\right)} + 1\right) \cdot im \]
                                2. *-rgt-identityN/A

                                  \[\leadsto \left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) + \color{blue}{re}\right) + 1\right) \cdot im \]
                                3. associate-+r+N/A

                                  \[\leadsto \color{blue}{\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)\right) + \left(re + 1\right)\right)} \cdot im \]
                                4. associate-*r*N/A

                                  \[\leadsto \left(\color{blue}{\left(re \cdot re\right) \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right)} + \left(re + 1\right)\right) \cdot im \]
                                5. flip-+N/A

                                  \[\leadsto \left(\left(re \cdot re\right) \cdot \color{blue}{\frac{\left(re \cdot \frac{1}{6}\right) \cdot \left(re \cdot \frac{1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}}{re \cdot \frac{1}{6} - \frac{1}{2}}} + \left(re + 1\right)\right) \cdot im \]
                                6. associate-*r/N/A

                                  \[\leadsto \left(\color{blue}{\frac{\left(re \cdot re\right) \cdot \left(\left(re \cdot \frac{1}{6}\right) \cdot \left(re \cdot \frac{1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}\right)}{re \cdot \frac{1}{6} - \frac{1}{2}}} + \left(re + 1\right)\right) \cdot im \]
                                7. div-invN/A

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(re \cdot re\right) \cdot \left(\left(re \cdot \frac{1}{6}\right) \cdot \left(re \cdot \frac{1}{6}\right) - \frac{1}{2} \cdot \frac{1}{2}\right), \frac{1}{re \cdot \frac{1}{6} - \frac{1}{2}}, re + 1\right)} \cdot im \]
                              3. Applied egg-rr38.8%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(re \cdot re\right) \cdot \mathsf{fma}\left(re \cdot re, 0.027777777777777776, -0.25\right), \frac{1}{\mathsf{fma}\left(re, 0.16666666666666666, -0.5\right)}, re + 1\right)} \cdot im \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification51.0%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 0:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;im \cdot \mathsf{fma}\left(\left(re \cdot re\right) \cdot \mathsf{fma}\left(re \cdot re, 0.027777777777777776, -0.25\right), \frac{1}{\mathsf{fma}\left(re, 0.16666666666666666, -0.5\right)}, re + 1\right)\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 12: 58.1% accurate, 0.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\ \mathbf{if}\;t\_0 \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;im \cdot \mathsf{fma}\left(re, t\_1, 1\right)\\ \end{array} \end{array} \]
                            (FPCore (re im)
                             :precision binary64
                             (let* ((t_0 (* (exp re) (sin im)))
                                    (t_1 (fma re (fma re 0.16666666666666666 0.5) 1.0)))
                               (if (<= t_0 -0.02)
                                 (* im (* re (* re (fma (* im im) -0.08333333333333333 0.5))))
                                 (if (<= t_0 0.0)
                                   (/ -1.0 (/ (fma re t_1 -1.0) im))
                                   (* im (fma re t_1 1.0))))))
                            double code(double re, double im) {
                            	double t_0 = exp(re) * sin(im);
                            	double t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0);
                            	double tmp;
                            	if (t_0 <= -0.02) {
                            		tmp = im * (re * (re * fma((im * im), -0.08333333333333333, 0.5)));
                            	} else if (t_0 <= 0.0) {
                            		tmp = -1.0 / (fma(re, t_1, -1.0) / im);
                            	} else {
                            		tmp = im * fma(re, t_1, 1.0);
                            	}
                            	return tmp;
                            }
                            
                            function code(re, im)
                            	t_0 = Float64(exp(re) * sin(im))
                            	t_1 = fma(re, fma(re, 0.16666666666666666, 0.5), 1.0)
                            	tmp = 0.0
                            	if (t_0 <= -0.02)
                            		tmp = Float64(im * Float64(re * Float64(re * fma(Float64(im * im), -0.08333333333333333, 0.5))));
                            	elseif (t_0 <= 0.0)
                            		tmp = Float64(-1.0 / Float64(fma(re, t_1, -1.0) / im));
                            	else
                            		tmp = Float64(im * fma(re, t_1, 1.0));
                            	end
                            	return tmp
                            end
                            
                            code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(im * N[(re * N[(re * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(-1.0 / N[(N[(re * t$95$1 + -1.0), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := e^{re} \cdot \sin im\\
                            t_1 := \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right)\\
                            \mathbf{if}\;t\_0 \leq -0.02:\\
                            \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\
                            
                            \mathbf{elif}\;t\_0 \leq 0:\\
                            \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, t\_1, -1\right)}{im}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;im \cdot \mathsf{fma}\left(re, t\_1, 1\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if (*.f64 (exp.f64 re) (sin.f64 im)) < -0.0200000000000000004

                              1. Initial program 99.9%

                                \[e^{re} \cdot \sin im \]
                              2. Add Preprocessing
                              3. Taylor expanded in re around 0

                                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                              4. Step-by-step derivation
                                1. +-commutativeN/A

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

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

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

                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                5. accelerator-lowering-fma.f6479.3

                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                              5. Simplified79.3%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                              6. Taylor expanded in im around 0

                                \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                              7. Step-by-step derivation
                                1. *-lowering-*.f64N/A

                                  \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                2. +-commutativeN/A

                                  \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                3. associate-+r+N/A

                                  \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                4. associate-*r*N/A

                                  \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                5. distribute-rgt1-inN/A

                                  \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                6. +-commutativeN/A

                                  \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                8. +-commutativeN/A

                                  \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                9. *-commutativeN/A

                                  \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                10. unpow2N/A

                                  \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                11. associate-*l*N/A

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

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

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

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

                                  \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                              8. Simplified25.0%

                                \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                              9. Taylor expanded in re around inf

                                \[\leadsto im \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({re}^{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                              10. Step-by-step derivation
                                1. associate-*r*N/A

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

                                  \[\leadsto im \cdot \left(\color{blue}{\left({re}^{2} \cdot \frac{1}{2}\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) \]
                                3. associate-*r*N/A

                                  \[\leadsto im \cdot \color{blue}{\left({re}^{2} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)} \]
                                4. unpow2N/A

                                  \[\leadsto im \cdot \left(\color{blue}{\left(re \cdot re\right)} \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                                5. associate-*l*N/A

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

                                  \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(re \cdot \frac{1}{2}\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                                7. *-commutativeN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(\color{blue}{\left(\frac{1}{2} \cdot re\right)} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) \]
                                8. associate-*r*N/A

                                  \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                                9. *-lowering-*.f64N/A

                                  \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                10. associate-*r*N/A

                                  \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)}\right) \]
                                11. *-commutativeN/A

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

                                  \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                                13. *-lowering-*.f64N/A

                                  \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)}\right) \]
                                14. distribute-rgt-inN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(1 \cdot \frac{1}{2} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)}\right)\right) \]
                                15. metadata-evalN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\frac{1}{2}} + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
                                16. +-commutativeN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \frac{1}{2} + \frac{1}{2}\right)}\right)\right) \]
                                17. *-commutativeN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{\left({im}^{2} \cdot \frac{-1}{6}\right)} \cdot \frac{1}{2} + \frac{1}{2}\right)\right)\right) \]
                                18. associate-*l*N/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{6} \cdot \frac{1}{2}\right)} + \frac{1}{2}\right)\right)\right) \]
                                19. metadata-evalN/A

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \left({im}^{2} \cdot \color{blue}{\frac{-1}{12}} + \frac{1}{2}\right)\right)\right) \]
                                20. metadata-evalN/A

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

                                  \[\leadsto im \cdot \left(re \cdot \left(re \cdot \color{blue}{\mathsf{fma}\left({im}^{2}, \frac{1}{2} \cdot \frac{-1}{6}, \frac{1}{2}\right)}\right)\right) \]
                              11. Simplified25.3%

                                \[\leadsto im \cdot \color{blue}{\left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)} \]

                              if -0.0200000000000000004 < (*.f64 (exp.f64 re) (sin.f64 im)) < 0.0

                              1. Initial program 100.0%

                                \[e^{re} \cdot \sin im \]
                              2. Add Preprocessing
                              3. Taylor expanded in re around 0

                                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                              4. Step-by-step derivation
                                1. +-commutativeN/A

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                7. accelerator-lowering-fma.f6437.0

                                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                              5. Simplified37.0%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                              6. Taylor expanded in im around 0

                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                              7. Step-by-step derivation
                                1. Simplified37.0%

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

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

                                    \[\leadsto \color{blue}{\frac{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}} \]
                                  3. clear-numN/A

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\frac{re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right) - 1}{\left(\left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot \frac{1}{6} + \frac{1}{2}\right) + 1\right)\right) - 1 \cdot 1\right) \cdot im}}} \]
                                3. Applied egg-rr36.2%

                                  \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), re \cdot re, re\right), -1\right) \cdot im}}} \]
                                4. Taylor expanded in re around 0

                                  \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{-1 \cdot im}}} \]
                                5. Step-by-step derivation
                                  1. mul-1-negN/A

                                    \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), -1\right)}{\color{blue}{\mathsf{neg}\left(im\right)}}} \]
                                  2. neg-lowering-neg.f6482.9

                                    \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]
                                6. Simplified82.9%

                                  \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{\color{blue}{-im}}} \]

                                if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                1. Initial program 100.0%

                                  \[e^{re} \cdot \sin im \]
                                2. Add Preprocessing
                                3. Taylor expanded in re around 0

                                  \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                4. Step-by-step derivation
                                  1. +-commutativeN/A

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                  7. accelerator-lowering-fma.f6489.8

                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                5. Simplified89.8%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                6. Taylor expanded in im around 0

                                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                7. Step-by-step derivation
                                  1. Simplified38.8%

                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification51.0%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq -0.02:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \mathsf{fma}\left(im \cdot im, -0.08333333333333333, 0.5\right)\right)\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 0:\\ \;\;\;\;\frac{-1}{\frac{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), -1\right)}{im}}\\ \mathbf{else}:\\ \;\;\;\;im \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 13: 30.0% accurate, 0.5× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot \sin im\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right) \cdot \mathsf{fma}\left(re, im, im\right)\\ \mathbf{elif}\;t\_0 \leq 0.9:\\ \;\;\;\;\mathsf{fma}\left(re, \mathsf{fma}\left(im, re \cdot 0.5, im\right), im\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right) \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (re im)
                                 :precision binary64
                                 (let* ((t_0 (* (exp re) (sin im))))
                                   (if (<= t_0 0.0)
                                     (* (* im (* im -0.16666666666666666)) (fma re im im))
                                     (if (<= t_0 0.9)
                                       (fma re (fma im (* re 0.5) im) im)
                                       (* im (* (fma re 0.16666666666666666 0.5) (* re re)))))))
                                double code(double re, double im) {
                                	double t_0 = exp(re) * sin(im);
                                	double tmp;
                                	if (t_0 <= 0.0) {
                                		tmp = (im * (im * -0.16666666666666666)) * fma(re, im, im);
                                	} else if (t_0 <= 0.9) {
                                		tmp = fma(re, fma(im, (re * 0.5), im), im);
                                	} else {
                                		tmp = im * (fma(re, 0.16666666666666666, 0.5) * (re * re));
                                	}
                                	return tmp;
                                }
                                
                                function code(re, im)
                                	t_0 = Float64(exp(re) * sin(im))
                                	tmp = 0.0
                                	if (t_0 <= 0.0)
                                		tmp = Float64(Float64(im * Float64(im * -0.16666666666666666)) * fma(re, im, im));
                                	elseif (t_0 <= 0.9)
                                		tmp = fma(re, fma(im, Float64(re * 0.5), im), im);
                                	else
                                		tmp = Float64(im * Float64(fma(re, 0.16666666666666666, 0.5) * Float64(re * re)));
                                	end
                                	return tmp
                                end
                                
                                code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(re * im + im), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.9], N[(re * N[(im * N[(re * 0.5), $MachinePrecision] + im), $MachinePrecision] + im), $MachinePrecision], N[(im * N[(N[(re * 0.16666666666666666 + 0.5), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := e^{re} \cdot \sin im\\
                                \mathbf{if}\;t\_0 \leq 0:\\
                                \;\;\;\;\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right) \cdot \mathsf{fma}\left(re, im, im\right)\\
                                
                                \mathbf{elif}\;t\_0 \leq 0.9:\\
                                \;\;\;\;\mathsf{fma}\left(re, \mathsf{fma}\left(im, re \cdot 0.5, im\right), im\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;im \cdot \left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right) \cdot \left(re \cdot re\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if (*.f64 (exp.f64 re) (sin.f64 im)) < 0.0

                                  1. Initial program 100.0%

                                    \[e^{re} \cdot \sin im \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in re around 0

                                    \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                  4. Step-by-step derivation
                                    1. +-commutativeN/A

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

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

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

                                      \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                    5. accelerator-lowering-fma.f6455.2

                                      \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                  5. Simplified55.2%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                  6. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                  7. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                    2. +-commutativeN/A

                                      \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                    3. associate-+r+N/A

                                      \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                    4. associate-*r*N/A

                                      \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                    5. distribute-rgt1-inN/A

                                      \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                    6. +-commutativeN/A

                                      \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                    8. +-commutativeN/A

                                      \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                    9. *-commutativeN/A

                                      \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                    10. unpow2N/A

                                      \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                    11. associate-*l*N/A

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

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

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

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

                                      \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                  8. Simplified31.9%

                                    \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                  9. Taylor expanded in re around 0

                                    \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                  10. Step-by-step derivation
                                    1. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                    2. distribute-rgt-outN/A

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

                                      \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                    4. distribute-lft1-inN/A

                                      \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                    5. +-commutativeN/A

                                      \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                    6. *-lowering-*.f64N/A

                                      \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                    7. +-commutativeN/A

                                      \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                    9. unpow2N/A

                                      \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                    10. associate-*l*N/A

                                      \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                    11. *-commutativeN/A

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                    16. distribute-lft1-inN/A

                                      \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                    17. accelerator-lowering-fma.f6424.0

                                      \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                  11. Simplified24.0%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                  12. Taylor expanded in im around inf

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

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

                                      \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                    3. associate-*l*N/A

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

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

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

                                      \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                    7. *-lowering-*.f6411.9

                                      \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot -0.16666666666666666\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                  14. Simplified11.9%

                                    \[\leadsto \color{blue}{\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)} \cdot \mathsf{fma}\left(re, im, im\right) \]

                                  if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im)) < 0.900000000000000022

                                  1. Initial program 100.0%

                                    \[e^{re} \cdot \sin im \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in im around 0

                                    \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                  4. Step-by-step derivation
                                    1. Simplified46.5%

                                      \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                    2. Taylor expanded in re around 0

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(re, im \cdot \color{blue}{\left(\frac{1}{2} \cdot re\right)} + im, im\right) \]
                                      7. accelerator-lowering-fma.f64N/A

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

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(im, \color{blue}{re \cdot \frac{1}{2}}, im\right), im\right) \]
                                      9. *-lowering-*.f6444.2

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(im, \color{blue}{re \cdot 0.5}, im\right), im\right) \]
                                    4. Simplified44.2%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(im, re \cdot 0.5, im\right), im\right)} \]

                                    if 0.900000000000000022 < (*.f64 (exp.f64 re) (sin.f64 im))

                                    1. Initial program 100.0%

                                      \[e^{re} \cdot \sin im \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in re around 0

                                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                    4. Step-by-step derivation
                                      1. +-commutativeN/A

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                      7. accelerator-lowering-fma.f6476.1

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                    5. Simplified76.1%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                    6. Taylor expanded in im around 0

                                      \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                    7. Step-by-step derivation
                                      1. Simplified29.3%

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                      2. Taylor expanded in re around inf

                                        \[\leadsto \color{blue}{\left({re}^{3} \cdot \left(\frac{1}{6} + \frac{1}{2} \cdot \frac{1}{re}\right)\right)} \cdot im \]
                                      3. Step-by-step derivation
                                        1. unpow3N/A

                                          \[\leadsto \left(\color{blue}{\left(\left(re \cdot re\right) \cdot re\right)} \cdot \left(\frac{1}{6} + \frac{1}{2} \cdot \frac{1}{re}\right)\right) \cdot im \]
                                        2. unpow2N/A

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

                                          \[\leadsto \color{blue}{\left({re}^{2} \cdot \left(re \cdot \left(\frac{1}{6} + \frac{1}{2} \cdot \frac{1}{re}\right)\right)\right)} \cdot im \]
                                        4. +-commutativeN/A

                                          \[\leadsto \left({re}^{2} \cdot \left(re \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{1}{re} + \frac{1}{6}\right)}\right)\right) \cdot im \]
                                        5. distribute-rgt-inN/A

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

                                          \[\leadsto \left({re}^{2} \cdot \left(\color{blue}{\frac{1}{2} \cdot \left(\frac{1}{re} \cdot re\right)} + \frac{1}{6} \cdot re\right)\right) \cdot im \]
                                        7. lft-mult-inverseN/A

                                          \[\leadsto \left({re}^{2} \cdot \left(\frac{1}{2} \cdot \color{blue}{1} + \frac{1}{6} \cdot re\right)\right) \cdot im \]
                                        8. metadata-evalN/A

                                          \[\leadsto \left({re}^{2} \cdot \left(\color{blue}{\frac{1}{2}} + \frac{1}{6} \cdot re\right)\right) \cdot im \]
                                        9. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{2} + \frac{1}{6} \cdot re\right) \cdot {re}^{2}\right)} \cdot im \]
                                        10. *-lowering-*.f64N/A

                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{2} + \frac{1}{6} \cdot re\right) \cdot {re}^{2}\right)} \cdot im \]
                                        11. +-commutativeN/A

                                          \[\leadsto \left(\color{blue}{\left(\frac{1}{6} \cdot re + \frac{1}{2}\right)} \cdot {re}^{2}\right) \cdot im \]
                                        12. *-commutativeN/A

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

                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right)} \cdot {re}^{2}\right) \cdot im \]
                                        14. unpow2N/A

                                          \[\leadsto \left(\mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right) \cdot \color{blue}{\left(re \cdot re\right)}\right) \cdot im \]
                                        15. *-lowering-*.f6430.0

                                          \[\leadsto \left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right) \cdot \color{blue}{\left(re \cdot re\right)}\right) \cdot im \]
                                      4. Simplified30.0%

                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right) \cdot \left(re \cdot re\right)\right)} \cdot im \]
                                    8. Recombined 3 regimes into one program.
                                    9. Final simplification21.9%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq 0:\\ \;\;\;\;\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right) \cdot \mathsf{fma}\left(re, im, im\right)\\ \mathbf{elif}\;e^{re} \cdot \sin im \leq 0.9:\\ \;\;\;\;\mathsf{fma}\left(re, \mathsf{fma}\left(im, re \cdot 0.5, im\right), im\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right) \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 14: 31.6% accurate, 0.9× speedup?

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

                                      1. Initial program 100.0%

                                        \[e^{re} \cdot \sin im \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in re around 0

                                        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                      4. Step-by-step derivation
                                        1. +-commutativeN/A

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

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

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

                                          \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                        5. accelerator-lowering-fma.f6455.2

                                          \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                      5. Simplified55.2%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                      6. Taylor expanded in im around 0

                                        \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                      7. Step-by-step derivation
                                        1. *-lowering-*.f64N/A

                                          \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                        2. +-commutativeN/A

                                          \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                        3. associate-+r+N/A

                                          \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                        4. associate-*r*N/A

                                          \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                        5. distribute-rgt1-inN/A

                                          \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                        6. +-commutativeN/A

                                          \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                        7. *-lowering-*.f64N/A

                                          \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                        8. +-commutativeN/A

                                          \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                        9. *-commutativeN/A

                                          \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                        10. unpow2N/A

                                          \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                        11. associate-*l*N/A

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

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

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

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

                                          \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                      8. Simplified31.9%

                                        \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                      9. Taylor expanded in re around 0

                                        \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                      10. Step-by-step derivation
                                        1. associate-*r*N/A

                                          \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                        2. distribute-rgt-outN/A

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

                                          \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                        4. distribute-lft1-inN/A

                                          \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                        5. +-commutativeN/A

                                          \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                        6. *-lowering-*.f64N/A

                                          \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                        7. +-commutativeN/A

                                          \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                        8. *-commutativeN/A

                                          \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                        9. unpow2N/A

                                          \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                        10. associate-*l*N/A

                                          \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                        11. *-commutativeN/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                        16. distribute-lft1-inN/A

                                          \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                        17. accelerator-lowering-fma.f6424.0

                                          \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                      11. Simplified24.0%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                      12. Taylor expanded in im around -inf

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

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

                                          \[\leadsto \color{blue}{\left(-1 \cdot re - 1\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                        3. *-lowering-*.f64N/A

                                          \[\leadsto \color{blue}{\left(-1 \cdot re - 1\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                        4. sub-negN/A

                                          \[\leadsto \color{blue}{\left(-1 \cdot re + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        5. metadata-evalN/A

                                          \[\leadsto \left(-1 \cdot re + \color{blue}{-1}\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        6. +-commutativeN/A

                                          \[\leadsto \color{blue}{\left(-1 + -1 \cdot re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        7. mul-1-negN/A

                                          \[\leadsto \left(-1 + \color{blue}{\left(\mathsf{neg}\left(re\right)\right)}\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        8. unsub-negN/A

                                          \[\leadsto \color{blue}{\left(-1 - re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        9. --lowering--.f64N/A

                                          \[\leadsto \color{blue}{\left(-1 - re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                        10. *-lowering-*.f64N/A

                                          \[\leadsto \left(-1 - re\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                        11. cube-multN/A

                                          \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(im \cdot \left(im \cdot im\right)\right)}\right) \]
                                        12. unpow2N/A

                                          \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \left(im \cdot \color{blue}{{im}^{2}}\right)\right) \]
                                        13. *-lowering-*.f64N/A

                                          \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(im \cdot {im}^{2}\right)}\right) \]
                                        14. unpow2N/A

                                          \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \left(im \cdot \color{blue}{\left(im \cdot im\right)}\right)\right) \]
                                        15. *-lowering-*.f6415.4

                                          \[\leadsto \left(-1 - re\right) \cdot \left(0.16666666666666666 \cdot \left(im \cdot \color{blue}{\left(im \cdot im\right)}\right)\right) \]
                                      14. Simplified15.4%

                                        \[\leadsto \color{blue}{\left(-1 - re\right) \cdot \left(0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)} \]

                                      if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                      1. Initial program 100.0%

                                        \[e^{re} \cdot \sin im \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in re around 0

                                        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                      4. Step-by-step derivation
                                        1. +-commutativeN/A

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                        7. accelerator-lowering-fma.f6489.8

                                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                      5. Simplified89.8%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                      6. Taylor expanded in im around 0

                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                      7. Step-by-step derivation
                                        1. Simplified38.8%

                                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification24.1%

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

                                      Alternative 15: 31.4% accurate, 0.9× speedup?

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

                                        1. Initial program 100.0%

                                          \[e^{re} \cdot \sin im \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in re around 0

                                          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                        4. Step-by-step derivation
                                          1. +-commutativeN/A

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

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

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

                                            \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                          5. accelerator-lowering-fma.f6455.2

                                            \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                        5. Simplified55.2%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                        6. Taylor expanded in im around 0

                                          \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                        7. Step-by-step derivation
                                          1. *-lowering-*.f64N/A

                                            \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                          2. +-commutativeN/A

                                            \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                          3. associate-+r+N/A

                                            \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                          4. associate-*r*N/A

                                            \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                          5. distribute-rgt1-inN/A

                                            \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                          6. +-commutativeN/A

                                            \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                          7. *-lowering-*.f64N/A

                                            \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                          8. +-commutativeN/A

                                            \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                          9. *-commutativeN/A

                                            \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                          10. unpow2N/A

                                            \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                          11. associate-*l*N/A

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

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

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

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

                                            \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                        8. Simplified31.9%

                                          \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                        9. Taylor expanded in re around 0

                                          \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                        10. Step-by-step derivation
                                          1. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                          2. distribute-rgt-outN/A

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

                                            \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                          4. distribute-lft1-inN/A

                                            \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                          5. +-commutativeN/A

                                            \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                          6. *-lowering-*.f64N/A

                                            \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                          7. +-commutativeN/A

                                            \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                          8. *-commutativeN/A

                                            \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                          9. unpow2N/A

                                            \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                          10. associate-*l*N/A

                                            \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                          11. *-commutativeN/A

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                          16. distribute-lft1-inN/A

                                            \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                          17. accelerator-lowering-fma.f6424.0

                                            \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                        11. Simplified24.0%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                        12. Taylor expanded in im around -inf

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

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

                                            \[\leadsto \color{blue}{\left(-1 \cdot re - 1\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                          3. *-lowering-*.f64N/A

                                            \[\leadsto \color{blue}{\left(-1 \cdot re - 1\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                          4. sub-negN/A

                                            \[\leadsto \color{blue}{\left(-1 \cdot re + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          5. metadata-evalN/A

                                            \[\leadsto \left(-1 \cdot re + \color{blue}{-1}\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          6. +-commutativeN/A

                                            \[\leadsto \color{blue}{\left(-1 + -1 \cdot re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          7. mul-1-negN/A

                                            \[\leadsto \left(-1 + \color{blue}{\left(\mathsf{neg}\left(re\right)\right)}\right) \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          8. unsub-negN/A

                                            \[\leadsto \color{blue}{\left(-1 - re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          9. --lowering--.f64N/A

                                            \[\leadsto \color{blue}{\left(-1 - re\right)} \cdot \left(\frac{1}{6} \cdot {im}^{3}\right) \]
                                          10. *-lowering-*.f64N/A

                                            \[\leadsto \left(-1 - re\right) \cdot \color{blue}{\left(\frac{1}{6} \cdot {im}^{3}\right)} \]
                                          11. cube-multN/A

                                            \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(im \cdot \left(im \cdot im\right)\right)}\right) \]
                                          12. unpow2N/A

                                            \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \left(im \cdot \color{blue}{{im}^{2}}\right)\right) \]
                                          13. *-lowering-*.f64N/A

                                            \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \color{blue}{\left(im \cdot {im}^{2}\right)}\right) \]
                                          14. unpow2N/A

                                            \[\leadsto \left(-1 - re\right) \cdot \left(\frac{1}{6} \cdot \left(im \cdot \color{blue}{\left(im \cdot im\right)}\right)\right) \]
                                          15. *-lowering-*.f6415.4

                                            \[\leadsto \left(-1 - re\right) \cdot \left(0.16666666666666666 \cdot \left(im \cdot \color{blue}{\left(im \cdot im\right)}\right)\right) \]
                                        14. Simplified15.4%

                                          \[\leadsto \color{blue}{\left(-1 - re\right) \cdot \left(0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)} \]

                                        if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                        1. Initial program 100.0%

                                          \[e^{re} \cdot \sin im \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in re around 0

                                          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                        4. Step-by-step derivation
                                          1. +-commutativeN/A

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                          7. accelerator-lowering-fma.f6489.8

                                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                        5. Simplified89.8%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                        6. Taylor expanded in im around 0

                                          \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                        7. Step-by-step derivation
                                          1. Simplified38.8%

                                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                          2. Taylor expanded in re around inf

                                            \[\leadsto \mathsf{fma}\left(re, \color{blue}{\frac{1}{6} \cdot {re}^{2}}, 1\right) \cdot im \]
                                          3. Step-by-step derivation
                                            1. unpow2N/A

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(re, re \cdot \color{blue}{\left(re \cdot \frac{1}{6}\right)}, 1\right) \cdot im \]
                                            6. *-lowering-*.f6437.1

                                              \[\leadsto \mathsf{fma}\left(re, re \cdot \color{blue}{\left(re \cdot 0.16666666666666666\right)}, 1\right) \cdot im \]
                                          4. Simplified37.1%

                                            \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \left(re \cdot 0.16666666666666666\right)}, 1\right) \cdot im \]
                                        8. Recombined 2 regimes into one program.
                                        9. Final simplification23.5%

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

                                        Alternative 16: 29.8% accurate, 0.9× speedup?

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

                                          1. Initial program 100.0%

                                            \[e^{re} \cdot \sin im \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in re around 0

                                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                          4. Step-by-step derivation
                                            1. +-commutativeN/A

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

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

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

                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                            5. accelerator-lowering-fma.f6455.2

                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                          5. Simplified55.2%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                          6. Taylor expanded in im around 0

                                            \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                          7. Step-by-step derivation
                                            1. *-lowering-*.f64N/A

                                              \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                            2. +-commutativeN/A

                                              \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                            3. associate-+r+N/A

                                              \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                            4. associate-*r*N/A

                                              \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                            5. distribute-rgt1-inN/A

                                              \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                            6. +-commutativeN/A

                                              \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                            7. *-lowering-*.f64N/A

                                              \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                            8. +-commutativeN/A

                                              \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                            9. *-commutativeN/A

                                              \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                            10. unpow2N/A

                                              \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                            11. associate-*l*N/A

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

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

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

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

                                              \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                          8. Simplified31.9%

                                            \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                          9. Taylor expanded in re around 0

                                            \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                          10. Step-by-step derivation
                                            1. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                            2. distribute-rgt-outN/A

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

                                              \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                            4. distribute-lft1-inN/A

                                              \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                            5. +-commutativeN/A

                                              \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                            6. *-lowering-*.f64N/A

                                              \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                            7. +-commutativeN/A

                                              \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                            8. *-commutativeN/A

                                              \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                            9. unpow2N/A

                                              \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                            10. associate-*l*N/A

                                              \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                            11. *-commutativeN/A

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                            16. distribute-lft1-inN/A

                                              \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                            17. accelerator-lowering-fma.f6424.0

                                              \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                          11. Simplified24.0%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                          12. Taylor expanded in im around inf

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

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

                                              \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                            3. associate-*l*N/A

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

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

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

                                              \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                            7. *-lowering-*.f6411.9

                                              \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot -0.16666666666666666\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                          14. Simplified11.9%

                                            \[\leadsto \color{blue}{\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)} \cdot \mathsf{fma}\left(re, im, im\right) \]

                                          if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                          1. Initial program 100.0%

                                            \[e^{re} \cdot \sin im \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in re around 0

                                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                          4. Step-by-step derivation
                                            1. +-commutativeN/A

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                            7. accelerator-lowering-fma.f6489.8

                                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                          5. Simplified89.8%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                          6. Taylor expanded in im around 0

                                            \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                          7. Step-by-step derivation
                                            1. Simplified38.8%

                                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                            2. Taylor expanded in re around inf

                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{\frac{1}{6} \cdot {re}^{2}}, 1\right) \cdot im \]
                                            3. Step-by-step derivation
                                              1. unpow2N/A

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(re, re \cdot \color{blue}{\left(re \cdot \frac{1}{6}\right)}, 1\right) \cdot im \]
                                              6. *-lowering-*.f6437.1

                                                \[\leadsto \mathsf{fma}\left(re, re \cdot \color{blue}{\left(re \cdot 0.16666666666666666\right)}, 1\right) \cdot im \]
                                            4. Simplified37.1%

                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \left(re \cdot 0.16666666666666666\right)}, 1\right) \cdot im \]
                                          8. Recombined 2 regimes into one program.
                                          9. Final simplification21.2%

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

                                          Alternative 17: 28.8% accurate, 0.9× speedup?

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

                                            1. Initial program 100.0%

                                              \[e^{re} \cdot \sin im \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in re around 0

                                              \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                            4. Step-by-step derivation
                                              1. +-commutativeN/A

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

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

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

                                                \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                              5. accelerator-lowering-fma.f6455.2

                                                \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                            5. Simplified55.2%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                            6. Taylor expanded in im around 0

                                              \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                            7. Step-by-step derivation
                                              1. *-lowering-*.f64N/A

                                                \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                              2. +-commutativeN/A

                                                \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                              3. associate-+r+N/A

                                                \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                              4. associate-*r*N/A

                                                \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                              5. distribute-rgt1-inN/A

                                                \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                              6. +-commutativeN/A

                                                \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                              7. *-lowering-*.f64N/A

                                                \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                              8. +-commutativeN/A

                                                \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                              9. *-commutativeN/A

                                                \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                              10. unpow2N/A

                                                \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                              11. associate-*l*N/A

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

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

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

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

                                                \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                            8. Simplified31.9%

                                              \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                            9. Taylor expanded in re around 0

                                              \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                            10. Step-by-step derivation
                                              1. associate-*r*N/A

                                                \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                              2. distribute-rgt-outN/A

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

                                                \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                              4. distribute-lft1-inN/A

                                                \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                              5. +-commutativeN/A

                                                \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                              6. *-lowering-*.f64N/A

                                                \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                              7. +-commutativeN/A

                                                \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                              8. *-commutativeN/A

                                                \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                              9. unpow2N/A

                                                \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                              10. associate-*l*N/A

                                                \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                              11. *-commutativeN/A

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                              16. distribute-lft1-inN/A

                                                \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                              17. accelerator-lowering-fma.f6424.0

                                                \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                            11. Simplified24.0%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                            12. Taylor expanded in im around inf

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

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

                                                \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                              3. associate-*l*N/A

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

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

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

                                                \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                              7. *-lowering-*.f6411.9

                                                \[\leadsto \left(im \cdot \color{blue}{\left(im \cdot -0.16666666666666666\right)}\right) \cdot \mathsf{fma}\left(re, im, im\right) \]
                                            14. Simplified11.9%

                                              \[\leadsto \color{blue}{\left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)} \cdot \mathsf{fma}\left(re, im, im\right) \]

                                            if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                            1. Initial program 100.0%

                                              \[e^{re} \cdot \sin im \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in re around 0

                                              \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                            4. Step-by-step derivation
                                              1. +-commutativeN/A

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

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

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

                                                \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                              5. accelerator-lowering-fma.f6487.5

                                                \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                            5. Simplified87.5%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                            6. Taylor expanded in im around 0

                                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{2}, 1\right), 1\right) \cdot \color{blue}{im} \]
                                            7. Step-by-step derivation
                                              1. Simplified38.5%

                                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right) \cdot \color{blue}{im} \]
                                            8. Recombined 2 regimes into one program.
                                            9. Final simplification21.8%

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

                                            Alternative 18: 28.5% accurate, 0.9× speedup?

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

                                              1. Initial program 100.0%

                                                \[e^{re} \cdot \sin im \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in re around 0

                                                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                              4. Step-by-step derivation
                                                1. +-commutativeN/A

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                                5. accelerator-lowering-fma.f6455.2

                                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                              5. Simplified55.2%

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                              6. Taylor expanded in im around 0

                                                \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. *-lowering-*.f64N/A

                                                  \[\leadsto \color{blue}{im \cdot \left(1 + \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                                2. +-commutativeN/A

                                                  \[\leadsto im \cdot \left(1 + \color{blue}{\left(re \cdot \left(1 + \frac{1}{2} \cdot re\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)}\right) \]
                                                3. associate-+r+N/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)\right)} \]
                                                4. associate-*r*N/A

                                                  \[\leadsto im \cdot \left(\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right) + \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)}\right) \]
                                                5. distribute-rgt1-inN/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                                6. +-commutativeN/A

                                                  \[\leadsto im \cdot \left(\color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                                7. *-lowering-*.f64N/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right)} \]
                                                8. +-commutativeN/A

                                                  \[\leadsto im \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                                9. *-commutativeN/A

                                                  \[\leadsto im \cdot \left(\left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                                10. unpow2N/A

                                                  \[\leadsto im \cdot \left(\left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)\right) \]
                                                11. associate-*l*N/A

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

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

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

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

                                                  \[\leadsto im \cdot \left(\mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, 1 + \frac{1}{2} \cdot re, 1\right)}\right) \]
                                              8. Simplified31.9%

                                                \[\leadsto \color{blue}{im \cdot \left(\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)\right)} \]
                                              9. Taylor expanded in re around 0

                                                \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                              10. Step-by-step derivation
                                                1. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(im \cdot re\right) \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \]
                                                2. distribute-rgt-outN/A

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

                                                  \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{re \cdot im} + im\right) \]
                                                4. distribute-lft1-inN/A

                                                  \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\left(\left(re + 1\right) \cdot im\right)} \]
                                                5. +-commutativeN/A

                                                  \[\leadsto \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\color{blue}{\left(1 + re\right)} \cdot im\right) \]
                                                6. *-lowering-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot \left(\left(1 + re\right) \cdot im\right)} \]
                                                7. +-commutativeN/A

                                                  \[\leadsto \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                                8. *-commutativeN/A

                                                  \[\leadsto \left(\color{blue}{{im}^{2} \cdot \frac{-1}{6}} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                                9. unpow2N/A

                                                  \[\leadsto \left(\color{blue}{\left(im \cdot im\right)} \cdot \frac{-1}{6} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                                10. associate-*l*N/A

                                                  \[\leadsto \left(\color{blue}{im \cdot \left(im \cdot \frac{-1}{6}\right)} + 1\right) \cdot \left(\left(1 + re\right) \cdot im\right) \]
                                                11. *-commutativeN/A

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \left(\color{blue}{\left(re + 1\right)} \cdot im\right) \]
                                                16. distribute-lft1-inN/A

                                                  \[\leadsto \mathsf{fma}\left(im, im \cdot \frac{-1}{6}, 1\right) \cdot \color{blue}{\left(re \cdot im + im\right)} \]
                                                17. accelerator-lowering-fma.f6424.0

                                                  \[\leadsto \mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                              11. Simplified24.0%

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(im, im \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(re, im, im\right)} \]
                                              12. Taylor expanded in im around inf

                                                \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({im}^{3} \cdot \left(1 + re\right)\right)} \]
                                              13. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\left({im}^{3} \cdot \left(1 + re\right)\right) \cdot \frac{-1}{6}} \]
                                                2. associate-*r*N/A

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

                                                  \[\leadsto {im}^{3} \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left(1 + re\right)\right)} \]
                                                4. cube-multN/A

                                                  \[\leadsto \color{blue}{\left(im \cdot \left(im \cdot im\right)\right)} \cdot \left(\frac{-1}{6} \cdot \left(1 + re\right)\right) \]
                                                5. unpow2N/A

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

                                                  \[\leadsto \color{blue}{im \cdot \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot \left(1 + re\right)\right)\right)} \]
                                                7. *-commutativeN/A

                                                  \[\leadsto im \cdot \left({im}^{2} \cdot \color{blue}{\left(\left(1 + re\right) \cdot \frac{-1}{6}\right)}\right) \]
                                                8. associate-*l*N/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\left({im}^{2} \cdot \left(1 + re\right)\right) \cdot \frac{-1}{6}\right)} \]
                                                9. *-commutativeN/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re\right)\right)\right)} \]
                                                10. *-lowering-*.f64N/A

                                                  \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re\right)\right)\right)} \]
                                                11. *-lowering-*.f64N/A

                                                  \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left({im}^{2} \cdot \left(1 + re\right)\right)\right)} \]
                                                12. unpow2N/A

                                                  \[\leadsto im \cdot \left(\frac{-1}{6} \cdot \left(\color{blue}{\left(im \cdot im\right)} \cdot \left(1 + re\right)\right)\right) \]
                                                13. associate-*l*N/A

                                                  \[\leadsto im \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot \left(im \cdot \left(1 + re\right)\right)\right)}\right) \]
                                                14. distribute-lft-inN/A

                                                  \[\leadsto im \cdot \left(\frac{-1}{6} \cdot \left(im \cdot \color{blue}{\left(im \cdot 1 + im \cdot re\right)}\right)\right) \]
                                                15. *-rgt-identityN/A

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

                                                  \[\leadsto im \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot \left(im + im \cdot re\right)\right)}\right) \]
                                                17. +-commutativeN/A

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

                                                  \[\leadsto im \cdot \left(\frac{-1}{6} \cdot \left(im \cdot \left(\color{blue}{re \cdot im} + im\right)\right)\right) \]
                                                19. accelerator-lowering-fma.f6411.3

                                                  \[\leadsto im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot \color{blue}{\mathsf{fma}\left(re, im, im\right)}\right)\right) \]
                                              14. Simplified11.3%

                                                \[\leadsto \color{blue}{im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot \mathsf{fma}\left(re, im, im\right)\right)\right)} \]

                                              if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                              1. Initial program 100.0%

                                                \[e^{re} \cdot \sin im \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in re around 0

                                                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                              4. Step-by-step derivation
                                                1. +-commutativeN/A

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                                5. accelerator-lowering-fma.f6487.5

                                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                              5. Simplified87.5%

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                              6. Taylor expanded in im around 0

                                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{2}, 1\right), 1\right) \cdot \color{blue}{im} \]
                                              7. Step-by-step derivation
                                                1. Simplified38.5%

                                                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right) \cdot \color{blue}{im} \]
                                              8. Recombined 2 regimes into one program.
                                              9. Final simplification21.4%

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

                                              Alternative 19: 36.3% accurate, 0.9× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
                                              (FPCore (re im)
                                               :precision binary64
                                               (if (<= (* (exp re) (sin im)) 0.001)
                                                 (fma im (* (* im im) -0.16666666666666666) im)
                                                 (* im (* 0.16666666666666666 (* re (* re re))))))
                                              double code(double re, double im) {
                                              	double tmp;
                                              	if ((exp(re) * sin(im)) <= 0.001) {
                                              		tmp = fma(im, ((im * im) * -0.16666666666666666), im);
                                              	} else {
                                              		tmp = im * (0.16666666666666666 * (re * (re * re)));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(re, im)
                                              	tmp = 0.0
                                              	if (Float64(exp(re) * sin(im)) <= 0.001)
                                              		tmp = fma(im, Float64(Float64(im * im) * -0.16666666666666666), im);
                                              	else
                                              		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[re_, im_] := If[LessEqual[N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision], 0.001], N[(im * N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + im), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\
                                              \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (*.f64 (exp.f64 re) (sin.f64 im)) < 1e-3

                                                1. Initial program 100.0%

                                                  \[e^{re} \cdot \sin im \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in re around 0

                                                  \[\leadsto \color{blue}{\sin im} \]
                                                4. Step-by-step derivation
                                                  1. sin-lowering-sin.f6448.6

                                                    \[\leadsto \color{blue}{\sin im} \]
                                                5. Simplified48.6%

                                                  \[\leadsto \color{blue}{\sin im} \]
                                                6. Taylor expanded in im around 0

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

                                                    \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \]
                                                  2. distribute-lft-inN/A

                                                    \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{6} \cdot {im}^{2}\right) + im \cdot 1} \]
                                                  3. *-rgt-identityN/A

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(im, \frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                  7. *-lowering-*.f6433.0

                                                    \[\leadsto \mathsf{fma}\left(im, -0.16666666666666666 \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                8. Simplified33.0%

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(im, -0.16666666666666666 \cdot \left(im \cdot im\right), im\right)} \]

                                                if 1e-3 < (*.f64 (exp.f64 re) (sin.f64 im))

                                                1. Initial program 100.0%

                                                  \[e^{re} \cdot \sin im \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in re around 0

                                                  \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                                4. Step-by-step derivation
                                                  1. +-commutativeN/A

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                                  7. accelerator-lowering-fma.f6487.3

                                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                                5. Simplified87.3%

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                                6. Taylor expanded in im around 0

                                                  \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                7. Step-by-step derivation
                                                  1. Simplified16.8%

                                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                  2. Taylor expanded in re around inf

                                                    \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot im \]
                                                  3. Step-by-step derivation
                                                    1. *-lowering-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)} \cdot im \]
                                                    2. cube-multN/A

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

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

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

                                                      \[\leadsto \left(\frac{1}{6} \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot im \]
                                                    6. *-lowering-*.f6417.3

                                                      \[\leadsto \left(0.16666666666666666 \cdot \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \cdot im \]
                                                  4. Simplified17.3%

                                                    \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \cdot im \]
                                                8. Recombined 2 regimes into one program.
                                                9. Final simplification28.8%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 20: 36.3% accurate, 0.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
                                                (FPCore (re im)
                                                 :precision binary64
                                                 (if (<= (* (exp re) (sin im)) 0.001)
                                                   (fma im (* (* im im) -0.16666666666666666) im)
                                                   (* 0.16666666666666666 (* im (* re (* re re))))))
                                                double code(double re, double im) {
                                                	double tmp;
                                                	if ((exp(re) * sin(im)) <= 0.001) {
                                                		tmp = fma(im, ((im * im) * -0.16666666666666666), im);
                                                	} else {
                                                		tmp = 0.16666666666666666 * (im * (re * (re * re)));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(re, im)
                                                	tmp = 0.0
                                                	if (Float64(exp(re) * sin(im)) <= 0.001)
                                                		tmp = fma(im, Float64(Float64(im * im) * -0.16666666666666666), im);
                                                	else
                                                		tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re))));
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[re_, im_] := If[LessEqual[N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision], 0.001], N[(im * N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + im), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\
                                                \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if (*.f64 (exp.f64 re) (sin.f64 im)) < 1e-3

                                                  1. Initial program 100.0%

                                                    \[e^{re} \cdot \sin im \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in re around 0

                                                    \[\leadsto \color{blue}{\sin im} \]
                                                  4. Step-by-step derivation
                                                    1. sin-lowering-sin.f6448.6

                                                      \[\leadsto \color{blue}{\sin im} \]
                                                  5. Simplified48.6%

                                                    \[\leadsto \color{blue}{\sin im} \]
                                                  6. Taylor expanded in im around 0

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

                                                      \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \]
                                                    2. distribute-lft-inN/A

                                                      \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{6} \cdot {im}^{2}\right) + im \cdot 1} \]
                                                    3. *-rgt-identityN/A

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(im, \frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                    7. *-lowering-*.f6433.0

                                                      \[\leadsto \mathsf{fma}\left(im, -0.16666666666666666 \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                  8. Simplified33.0%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(im, -0.16666666666666666 \cdot \left(im \cdot im\right), im\right)} \]

                                                  if 1e-3 < (*.f64 (exp.f64 re) (sin.f64 im))

                                                  1. Initial program 100.0%

                                                    \[e^{re} \cdot \sin im \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in re around 0

                                                    \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                                  4. Step-by-step derivation
                                                    1. +-commutativeN/A

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                                    7. accelerator-lowering-fma.f6487.3

                                                      \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                                  5. Simplified87.3%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                                  6. Taylor expanded in im around 0

                                                    \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                  7. Step-by-step derivation
                                                    1. Simplified16.8%

                                                      \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                    2. Taylor expanded in re around inf

                                                      \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                                                    3. Step-by-step derivation
                                                      1. *-lowering-*.f64N/A

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

                                                        \[\leadsto \frac{1}{6} \cdot \color{blue}{\left({re}^{3} \cdot im\right)} \]
                                                      3. *-lowering-*.f64N/A

                                                        \[\leadsto \frac{1}{6} \cdot \color{blue}{\left({re}^{3} \cdot im\right)} \]
                                                      4. cube-multN/A

                                                        \[\leadsto \frac{1}{6} \cdot \left(\color{blue}{\left(re \cdot \left(re \cdot re\right)\right)} \cdot im\right) \]
                                                      5. unpow2N/A

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

                                                        \[\leadsto \frac{1}{6} \cdot \left(\color{blue}{\left(re \cdot {re}^{2}\right)} \cdot im\right) \]
                                                      7. unpow2N/A

                                                        \[\leadsto \frac{1}{6} \cdot \left(\left(re \cdot \color{blue}{\left(re \cdot re\right)}\right) \cdot im\right) \]
                                                      8. *-lowering-*.f6417.3

                                                        \[\leadsto 0.16666666666666666 \cdot \left(\left(re \cdot \color{blue}{\left(re \cdot re\right)}\right) \cdot im\right) \]
                                                    4. Simplified17.3%

                                                      \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(\left(re \cdot \left(re \cdot re\right)\right) \cdot im\right)} \]
                                                  8. Recombined 2 regimes into one program.
                                                  9. Final simplification28.8%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;e^{re} \cdot \sin im \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(im, \left(im \cdot im\right) \cdot -0.16666666666666666, im\right)\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \]
                                                  10. Add Preprocessing

                                                  Alternative 21: 35.2% accurate, 0.9× speedup?

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

                                                    1. Initial program 100.0%

                                                      \[e^{re} \cdot \sin im \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in re around 0

                                                      \[\leadsto \color{blue}{\sin im} \]
                                                    4. Step-by-step derivation
                                                      1. sin-lowering-sin.f6441.6

                                                        \[\leadsto \color{blue}{\sin im} \]
                                                    5. Simplified41.6%

                                                      \[\leadsto \color{blue}{\sin im} \]
                                                    6. Taylor expanded in im around 0

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

                                                        \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \]
                                                      2. distribute-lft-inN/A

                                                        \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{6} \cdot {im}^{2}\right) + im \cdot 1} \]
                                                      3. *-rgt-identityN/A

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(im, \frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                      7. *-lowering-*.f6423.4

                                                        \[\leadsto \mathsf{fma}\left(im, -0.16666666666666666 \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                    8. Simplified23.4%

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(im, -0.16666666666666666 \cdot \left(im \cdot im\right), im\right)} \]

                                                    if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                                    1. Initial program 100.0%

                                                      \[e^{re} \cdot \sin im \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in re around 0

                                                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                                    4. Step-by-step derivation
                                                      1. +-commutativeN/A

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                                      5. accelerator-lowering-fma.f6487.5

                                                        \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                                    5. Simplified87.5%

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                                    6. Taylor expanded in im around 0

                                                      \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{2}, 1\right), 1\right) \cdot \color{blue}{im} \]
                                                    7. Step-by-step derivation
                                                      1. Simplified38.5%

                                                        \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right) \cdot \color{blue}{im} \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Final simplification29.0%

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

                                                    Alternative 22: 31.5% accurate, 0.9× speedup?

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

                                                      1. Initial program 100.0%

                                                        \[e^{re} \cdot \sin im \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in re around 0

                                                        \[\leadsto \color{blue}{\sin im} \]
                                                      4. Step-by-step derivation
                                                        1. sin-lowering-sin.f6441.6

                                                          \[\leadsto \color{blue}{\sin im} \]
                                                      5. Simplified41.6%

                                                        \[\leadsto \color{blue}{\sin im} \]
                                                      6. Taylor expanded in im around 0

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

                                                          \[\leadsto im \cdot \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} + 1\right)} \]
                                                        2. distribute-lft-inN/A

                                                          \[\leadsto \color{blue}{im \cdot \left(\frac{-1}{6} \cdot {im}^{2}\right) + im \cdot 1} \]
                                                        3. *-rgt-identityN/A

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(im, \frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                        7. *-lowering-*.f6423.4

                                                          \[\leadsto \mathsf{fma}\left(im, -0.16666666666666666 \cdot \color{blue}{\left(im \cdot im\right)}, im\right) \]
                                                      8. Simplified23.4%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(im, -0.16666666666666666 \cdot \left(im \cdot im\right), im\right)} \]

                                                      if 0.0 < (*.f64 (exp.f64 re) (sin.f64 im))

                                                      1. Initial program 100.0%

                                                        \[e^{re} \cdot \sin im \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in im around 0

                                                        \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                      4. Step-by-step derivation
                                                        1. Simplified46.0%

                                                          \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                        2. Taylor expanded in re around 0

                                                          \[\leadsto \color{blue}{im + im \cdot re} \]
                                                        3. Step-by-step derivation
                                                          1. +-commutativeN/A

                                                            \[\leadsto \color{blue}{im \cdot re + im} \]
                                                          2. accelerator-lowering-fma.f6432.8

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(im, re, im\right)} \]
                                                        4. Simplified32.8%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(im, re, im\right)} \]
                                                      5. Recombined 2 regimes into one program.
                                                      6. Final simplification26.9%

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

                                                      Alternative 23: 95.8% accurate, 1.5× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.00076:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\ \end{array} \end{array} \]
                                                      (FPCore (re im)
                                                       :precision binary64
                                                       (let* ((t_0 (* (exp re) im)))
                                                         (if (<= re -0.00076)
                                                           t_0
                                                           (if (<= re 9.5e-6)
                                                             (* (sin im) (+ re 1.0))
                                                             (if (<= re 1.9e+154) t_0 (* (sin im) (* re (* re 0.5))))))))
                                                      double code(double re, double im) {
                                                      	double t_0 = exp(re) * im;
                                                      	double tmp;
                                                      	if (re <= -0.00076) {
                                                      		tmp = t_0;
                                                      	} else if (re <= 9.5e-6) {
                                                      		tmp = sin(im) * (re + 1.0);
                                                      	} else if (re <= 1.9e+154) {
                                                      		tmp = t_0;
                                                      	} else {
                                                      		tmp = sin(im) * (re * (re * 0.5));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      real(8) function code(re, im)
                                                          real(8), intent (in) :: re
                                                          real(8), intent (in) :: im
                                                          real(8) :: t_0
                                                          real(8) :: tmp
                                                          t_0 = exp(re) * im
                                                          if (re <= (-0.00076d0)) then
                                                              tmp = t_0
                                                          else if (re <= 9.5d-6) then
                                                              tmp = sin(im) * (re + 1.0d0)
                                                          else if (re <= 1.9d+154) then
                                                              tmp = t_0
                                                          else
                                                              tmp = sin(im) * (re * (re * 0.5d0))
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double re, double im) {
                                                      	double t_0 = Math.exp(re) * im;
                                                      	double tmp;
                                                      	if (re <= -0.00076) {
                                                      		tmp = t_0;
                                                      	} else if (re <= 9.5e-6) {
                                                      		tmp = Math.sin(im) * (re + 1.0);
                                                      	} else if (re <= 1.9e+154) {
                                                      		tmp = t_0;
                                                      	} else {
                                                      		tmp = Math.sin(im) * (re * (re * 0.5));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(re, im):
                                                      	t_0 = math.exp(re) * im
                                                      	tmp = 0
                                                      	if re <= -0.00076:
                                                      		tmp = t_0
                                                      	elif re <= 9.5e-6:
                                                      		tmp = math.sin(im) * (re + 1.0)
                                                      	elif re <= 1.9e+154:
                                                      		tmp = t_0
                                                      	else:
                                                      		tmp = math.sin(im) * (re * (re * 0.5))
                                                      	return tmp
                                                      
                                                      function code(re, im)
                                                      	t_0 = Float64(exp(re) * im)
                                                      	tmp = 0.0
                                                      	if (re <= -0.00076)
                                                      		tmp = t_0;
                                                      	elseif (re <= 9.5e-6)
                                                      		tmp = Float64(sin(im) * Float64(re + 1.0));
                                                      	elseif (re <= 1.9e+154)
                                                      		tmp = t_0;
                                                      	else
                                                      		tmp = Float64(sin(im) * Float64(re * Float64(re * 0.5)));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(re, im)
                                                      	t_0 = exp(re) * im;
                                                      	tmp = 0.0;
                                                      	if (re <= -0.00076)
                                                      		tmp = t_0;
                                                      	elseif (re <= 9.5e-6)
                                                      		tmp = sin(im) * (re + 1.0);
                                                      	elseif (re <= 1.9e+154)
                                                      		tmp = t_0;
                                                      	else
                                                      		tmp = sin(im) * (re * (re * 0.5));
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.00076], t$95$0, If[LessEqual[re, 9.5e-6], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.9e+154], t$95$0, N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := e^{re} \cdot im\\
                                                      \mathbf{if}\;re \leq -0.00076:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      \mathbf{elif}\;re \leq 9.5 \cdot 10^{-6}:\\
                                                      \;\;\;\;\sin im \cdot \left(re + 1\right)\\
                                                      
                                                      \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if re < -7.6000000000000004e-4 or 9.5000000000000005e-6 < re < 1.8999999999999999e154

                                                        1. Initial program 99.9%

                                                          \[e^{re} \cdot \sin im \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in im around 0

                                                          \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                        4. Step-by-step derivation
                                                          1. Simplified92.0%

                                                            \[\leadsto e^{re} \cdot \color{blue}{im} \]

                                                          if -7.6000000000000004e-4 < re < 9.5000000000000005e-6

                                                          1. Initial program 100.0%

                                                            \[e^{re} \cdot \sin im \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in re around 0

                                                            \[\leadsto \color{blue}{\left(1 + re\right)} \cdot \sin im \]
                                                          4. Step-by-step derivation
                                                            1. +-commutativeN/A

                                                              \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
                                                            2. +-lowering-+.f6499.7

                                                              \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
                                                          5. Simplified99.7%

                                                            \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]

                                                          if 1.8999999999999999e154 < re

                                                          1. Initial program 100.0%

                                                            \[e^{re} \cdot \sin im \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in re around 0

                                                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + \frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                                          4. Step-by-step derivation
                                                            1. +-commutativeN/A

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{2}} + 1, 1\right) \cdot \sin im \]
                                                            5. accelerator-lowering-fma.f64100.0

                                                              \[\leadsto \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.5, 1\right)}, 1\right) \cdot \sin im \]
                                                          5. Simplified100.0%

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.5, 1\right), 1\right)} \cdot \sin im \]
                                                          6. Taylor expanded in re around inf

                                                            \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot {re}^{2}\right)} \cdot \sin im \]
                                                          7. Step-by-step derivation
                                                            1. unpow2N/A

                                                              \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\left(re \cdot re\right)}\right) \cdot \sin im \]
                                                            2. associate-*r*N/A

                                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{2} \cdot re\right) \cdot re\right)} \cdot \sin im \]
                                                            3. *-commutativeN/A

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

                                                              \[\leadsto \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot re\right)\right)} \cdot \sin im \]
                                                            5. *-commutativeN/A

                                                              \[\leadsto \left(re \cdot \color{blue}{\left(re \cdot \frac{1}{2}\right)}\right) \cdot \sin im \]
                                                            6. *-lowering-*.f64100.0

                                                              \[\leadsto \left(re \cdot \color{blue}{\left(re \cdot 0.5\right)}\right) \cdot \sin im \]
                                                          8. Simplified100.0%

                                                            \[\leadsto \color{blue}{\left(re \cdot \left(re \cdot 0.5\right)\right)} \cdot \sin im \]
                                                        5. Recombined 3 regimes into one program.
                                                        6. Final simplification97.0%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.00076:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\ \end{array} \]
                                                        7. Add Preprocessing

                                                        Alternative 24: 29.3% accurate, 17.1× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 7.6 \cdot 10^{+46}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \end{array} \]
                                                        (FPCore (re im) :precision binary64 (if (<= im 7.6e+46) im (* re im)))
                                                        double code(double re, double im) {
                                                        	double tmp;
                                                        	if (im <= 7.6e+46) {
                                                        		tmp = im;
                                                        	} else {
                                                        		tmp = re * im;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        real(8) function code(re, im)
                                                            real(8), intent (in) :: re
                                                            real(8), intent (in) :: im
                                                            real(8) :: tmp
                                                            if (im <= 7.6d+46) then
                                                                tmp = im
                                                            else
                                                                tmp = re * im
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double re, double im) {
                                                        	double tmp;
                                                        	if (im <= 7.6e+46) {
                                                        		tmp = im;
                                                        	} else {
                                                        		tmp = re * im;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(re, im):
                                                        	tmp = 0
                                                        	if im <= 7.6e+46:
                                                        		tmp = im
                                                        	else:
                                                        		tmp = re * im
                                                        	return tmp
                                                        
                                                        function code(re, im)
                                                        	tmp = 0.0
                                                        	if (im <= 7.6e+46)
                                                        		tmp = im;
                                                        	else
                                                        		tmp = Float64(re * im);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(re, im)
                                                        	tmp = 0.0;
                                                        	if (im <= 7.6e+46)
                                                        		tmp = im;
                                                        	else
                                                        		tmp = re * im;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[re_, im_] := If[LessEqual[im, 7.6e+46], im, N[(re * im), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;im \leq 7.6 \cdot 10^{+46}:\\
                                                        \;\;\;\;im\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;re \cdot im\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if im < 7.5999999999999998e46

                                                          1. Initial program 100.0%

                                                            \[e^{re} \cdot \sin im \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in re around 0

                                                            \[\leadsto \color{blue}{\sin im} \]
                                                          4. Step-by-step derivation
                                                            1. sin-lowering-sin.f6451.0

                                                              \[\leadsto \color{blue}{\sin im} \]
                                                          5. Simplified51.0%

                                                            \[\leadsto \color{blue}{\sin im} \]
                                                          6. Taylor expanded in im around 0

                                                            \[\leadsto \color{blue}{im} \]
                                                          7. Step-by-step derivation
                                                            1. Simplified30.6%

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

                                                            if 7.5999999999999998e46 < im

                                                            1. Initial program 100.0%

                                                              \[e^{re} \cdot \sin im \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in re around 0

                                                              \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)} \cdot \sin im \]
                                                            4. Step-by-step derivation
                                                              1. +-commutativeN/A

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{re \cdot \frac{1}{6}} + \frac{1}{2}, 1\right), 1\right) \cdot \sin im \]
                                                              7. accelerator-lowering-fma.f6469.8

                                                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \color{blue}{\mathsf{fma}\left(re, 0.16666666666666666, 0.5\right)}, 1\right), 1\right) \cdot \sin im \]
                                                            5. Simplified69.8%

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right)} \cdot \sin im \]
                                                            6. Taylor expanded in im around 0

                                                              \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, \frac{1}{6}, \frac{1}{2}\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                            7. Step-by-step derivation
                                                              1. Simplified12.5%

                                                                \[\leadsto \mathsf{fma}\left(re, \mathsf{fma}\left(re, \mathsf{fma}\left(re, 0.16666666666666666, 0.5\right), 1\right), 1\right) \cdot \color{blue}{im} \]
                                                              2. Taylor expanded in re around 0

                                                                \[\leadsto \color{blue}{im + im \cdot re} \]
                                                              3. Step-by-step derivation
                                                                1. +-commutativeN/A

                                                                  \[\leadsto \color{blue}{im \cdot re + im} \]
                                                                2. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{re \cdot im} + im \]
                                                                3. accelerator-lowering-fma.f6410.9

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                                              4. Simplified10.9%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(re, im, im\right)} \]
                                                              5. Taylor expanded in re around inf

                                                                \[\leadsto \color{blue}{im \cdot re} \]
                                                              6. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{re \cdot im} \]
                                                                2. *-lowering-*.f6411.6

                                                                  \[\leadsto \color{blue}{re \cdot im} \]
                                                              7. Simplified11.6%

                                                                \[\leadsto \color{blue}{re \cdot im} \]
                                                            8. Recombined 2 regimes into one program.
                                                            9. Add Preprocessing

                                                            Alternative 25: 30.6% accurate, 29.4× speedup?

                                                            \[\begin{array}{l} \\ \mathsf{fma}\left(im, re, im\right) \end{array} \]
                                                            (FPCore (re im) :precision binary64 (fma im re im))
                                                            double code(double re, double im) {
                                                            	return fma(im, re, im);
                                                            }
                                                            
                                                            function code(re, im)
                                                            	return fma(im, re, im)
                                                            end
                                                            
                                                            code[re_, im_] := N[(im * re + im), $MachinePrecision]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \mathsf{fma}\left(im, re, im\right)
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Initial program 100.0%

                                                              \[e^{re} \cdot \sin im \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in im around 0

                                                              \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                            4. Step-by-step derivation
                                                              1. Simplified65.0%

                                                                \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                              2. Taylor expanded in re around 0

                                                                \[\leadsto \color{blue}{im + im \cdot re} \]
                                                              3. Step-by-step derivation
                                                                1. +-commutativeN/A

                                                                  \[\leadsto \color{blue}{im \cdot re + im} \]
                                                                2. accelerator-lowering-fma.f6428.2

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(im, re, im\right)} \]
                                                              4. Simplified28.2%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(im, re, im\right)} \]
                                                              5. Add Preprocessing

                                                              Alternative 26: 27.6% accurate, 206.0× speedup?

                                                              \[\begin{array}{l} \\ im \end{array} \]
                                                              (FPCore (re im) :precision binary64 im)
                                                              double code(double re, double im) {
                                                              	return im;
                                                              }
                                                              
                                                              real(8) function code(re, im)
                                                                  real(8), intent (in) :: re
                                                                  real(8), intent (in) :: im
                                                                  code = im
                                                              end function
                                                              
                                                              public static double code(double re, double im) {
                                                              	return im;
                                                              }
                                                              
                                                              def code(re, im):
                                                              	return im
                                                              
                                                              function code(re, im)
                                                              	return im
                                                              end
                                                              
                                                              function tmp = code(re, im)
                                                              	tmp = im;
                                                              end
                                                              
                                                              code[re_, im_] := im
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              im
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 100.0%

                                                                \[e^{re} \cdot \sin im \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in re around 0

                                                                \[\leadsto \color{blue}{\sin im} \]
                                                              4. Step-by-step derivation
                                                                1. sin-lowering-sin.f6452.5

                                                                  \[\leadsto \color{blue}{\sin im} \]
                                                              5. Simplified52.5%

                                                                \[\leadsto \color{blue}{\sin im} \]
                                                              6. Taylor expanded in im around 0

                                                                \[\leadsto \color{blue}{im} \]
                                                              7. Step-by-step derivation
                                                                1. Simplified24.3%

                                                                  \[\leadsto \color{blue}{im} \]
                                                                2. Add Preprocessing

                                                                Reproduce

                                                                ?
                                                                herbie shell --seed 2024204 
                                                                (FPCore (re im)
                                                                  :name "math.exp on complex, imaginary part"
                                                                  :precision binary64
                                                                  (* (exp re) (sin im)))