math.exp on complex, imaginary part

Percentage Accurate: 100.0% → 100.0%
Time: 13.2s
Alternatives: 18
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 18 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: 96.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\\ \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\left(\sin im \cdot \left(1 + t\_0 \cdot \left(t\_0 \cdot t\_0\right)\right)\right) \cdot \frac{1}{1 + t\_0 \cdot \left(t\_0 + -1\right)}\\ \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + t\_0\right)\\ \end{array} \end{array} \]
(FPCore (re im)
 :precision binary64
 (let* ((t_0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
   (if (<= re -0.36)
     (* (exp re) im)
     (if (<= re 5.8e-21)
       (*
        (* (sin im) (+ 1.0 (* t_0 (* t_0 t_0))))
        (/ 1.0 (+ 1.0 (* t_0 (+ t_0 -1.0)))))
       (if (<= re 1.02e+103)
         (* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
         (* (sin im) (+ 1.0 t_0)))))))
double code(double re, double im) {
	double t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))));
	double tmp;
	if (re <= -0.36) {
		tmp = exp(re) * im;
	} else if (re <= 5.8e-21) {
		tmp = (sin(im) * (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 / (1.0 + (t_0 * (t_0 + -1.0))));
	} else if (re <= 1.02e+103) {
		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
	} else {
		tmp = sin(im) * (1.0 + t_0);
	}
	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 = re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))
    if (re <= (-0.36d0)) then
        tmp = exp(re) * im
    else if (re <= 5.8d-21) then
        tmp = (sin(im) * (1.0d0 + (t_0 * (t_0 * t_0)))) * (1.0d0 / (1.0d0 + (t_0 * (t_0 + (-1.0d0)))))
    else if (re <= 1.02d+103) then
        tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
    else
        tmp = sin(im) * (1.0d0 + t_0)
    end if
    code = tmp
end function
public static double code(double re, double im) {
	double t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))));
	double tmp;
	if (re <= -0.36) {
		tmp = Math.exp(re) * im;
	} else if (re <= 5.8e-21) {
		tmp = (Math.sin(im) * (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 / (1.0 + (t_0 * (t_0 + -1.0))));
	} else if (re <= 1.02e+103) {
		tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
	} else {
		tmp = Math.sin(im) * (1.0 + t_0);
	}
	return tmp;
}
def code(re, im):
	t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))
	tmp = 0
	if re <= -0.36:
		tmp = math.exp(re) * im
	elif re <= 5.8e-21:
		tmp = (math.sin(im) * (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 / (1.0 + (t_0 * (t_0 + -1.0))))
	elif re <= 1.02e+103:
		tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))))
	else:
		tmp = math.sin(im) * (1.0 + t_0)
	return tmp
function code(re, im)
	t_0 = Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))
	tmp = 0.0
	if (re <= -0.36)
		tmp = Float64(exp(re) * im);
	elseif (re <= 5.8e-21)
		tmp = Float64(Float64(sin(im) * Float64(1.0 + Float64(t_0 * Float64(t_0 * t_0)))) * Float64(1.0 / Float64(1.0 + Float64(t_0 * Float64(t_0 + -1.0)))));
	elseif (re <= 1.02e+103)
		tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))));
	else
		tmp = Float64(sin(im) * Float64(1.0 + t_0));
	end
	return tmp
end
function tmp_2 = code(re, im)
	t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))));
	tmp = 0.0;
	if (re <= -0.36)
		tmp = exp(re) * im;
	elseif (re <= 5.8e-21)
		tmp = (sin(im) * (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 / (1.0 + (t_0 * (t_0 + -1.0))));
	elseif (re <= 1.02e+103)
		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
	else
		tmp = sin(im) * (1.0 + t_0);
	end
	tmp_2 = tmp;
end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.36], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 5.8e-21], N[(N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + N[(t$95$0 * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.02e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;re \leq -0.36:\\
\;\;\;\;e^{re} \cdot im\\

\mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\
\;\;\;\;\left(\sin im \cdot \left(1 + t\_0 \cdot \left(t\_0 \cdot t\_0\right)\right)\right) \cdot \frac{1}{1 + t\_0 \cdot \left(t\_0 + -1\right)}\\

\mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + t\_0\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if re < -0.35999999999999999

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
    4. Step-by-step derivation
      1. Simplified100.0%

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

      if -0.35999999999999999 < re < 5.8e-21

      1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
        7. *-lowering-*.f6499.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
      5. Simplified99.5%

        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)} \cdot \sin im \]
      6. Step-by-step derivation
        1. flip3-+N/A

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

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

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

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

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

      if 5.8e-21 < re < 1.01999999999999991e103

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f6488.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right) \]
      5. Simplified88.8%

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

      if 1.01999999999999991e103 < re

      1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
        7. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
      5. Simplified100.0%

        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)} \cdot \sin im \]
    5. Recombined 4 regimes into one program.
    6. Final simplification98.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\left(\sin im \cdot \left(1 + \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(\left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)\right)\right) \cdot \frac{1}{1 + \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) + -1\right)}\\ \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 96.8% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (re im)
     :precision binary64
     (let* ((t_0
             (*
              (sin im)
              (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
       (if (<= re -0.36)
         (* (exp re) im)
         (if (<= re 5.8e-21)
           t_0
           (if (<= re 1.02e+103)
             (* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
             t_0)))))
    double code(double re, double im) {
    	double t_0 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
    	double tmp;
    	if (re <= -0.36) {
    		tmp = exp(re) * im;
    	} else if (re <= 5.8e-21) {
    		tmp = t_0;
    	} else if (re <= 1.02e+103) {
    		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
    	} else {
    		tmp = t_0;
    	}
    	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 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
        if (re <= (-0.36d0)) then
            tmp = exp(re) * im
        else if (re <= 5.8d-21) then
            tmp = t_0
        else if (re <= 1.02d+103) then
            tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double re, double im) {
    	double t_0 = Math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
    	double tmp;
    	if (re <= -0.36) {
    		tmp = Math.exp(re) * im;
    	} else if (re <= 5.8e-21) {
    		tmp = t_0;
    	} else if (re <= 1.02e+103) {
    		tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(re, im):
    	t_0 = math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
    	tmp = 0
    	if re <= -0.36:
    		tmp = math.exp(re) * im
    	elif re <= 5.8e-21:
    		tmp = t_0
    	elif re <= 1.02e+103:
    		tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(re, im)
    	t_0 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))))
    	tmp = 0.0
    	if (re <= -0.36)
    		tmp = Float64(exp(re) * im);
    	elseif (re <= 5.8e-21)
    		tmp = t_0;
    	elseif (re <= 1.02e+103)
    		tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(re, im)
    	t_0 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
    	tmp = 0.0;
    	if (re <= -0.36)
    		tmp = exp(re) * im;
    	elseif (re <= 5.8e-21)
    		tmp = t_0;
    	elseif (re <= 1.02e+103)
    		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[re_, im_] := Block[{t$95$0 = N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.36], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 5.8e-21], t$95$0, If[LessEqual[re, 1.02e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
    \mathbf{if}\;re \leq -0.36:\\
    \;\;\;\;e^{re} \cdot im\\
    
    \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\
    \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if re < -0.35999999999999999

      1. Initial program 100.0%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
      4. Step-by-step derivation
        1. Simplified100.0%

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

        if -0.35999999999999999 < re < 5.8e-21 or 1.01999999999999991e103 < re

        1. Initial program 100.0%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
          7. *-lowering-*.f6499.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
        5. Simplified99.6%

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

        if 5.8e-21 < re < 1.01999999999999991e103

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right)\right) \]
          12. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
          13. *-lowering-*.f6488.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right) \]
        5. Simplified88.8%

          \[\leadsto \color{blue}{e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification98.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 95.8% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (re im)
       :precision binary64
       (let* ((t_0 (* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
         (if (<= re -0.36)
           (* (exp re) im)
           (if (<= re 5.8e-21)
             t_0
             (if (<= re 1.9e+154)
               (* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
               t_0)))))
      double code(double re, double im) {
      	double t_0 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
      	double tmp;
      	if (re <= -0.36) {
      		tmp = exp(re) * im;
      	} else if (re <= 5.8e-21) {
      		tmp = t_0;
      	} else if (re <= 1.9e+154) {
      		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
      	} else {
      		tmp = t_0;
      	}
      	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 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
          if (re <= (-0.36d0)) then
              tmp = exp(re) * im
          else if (re <= 5.8d-21) then
              tmp = t_0
          else if (re <= 1.9d+154) then
              tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double re, double im) {
      	double t_0 = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
      	double tmp;
      	if (re <= -0.36) {
      		tmp = Math.exp(re) * im;
      	} else if (re <= 5.8e-21) {
      		tmp = t_0;
      	} else if (re <= 1.9e+154) {
      		tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(re, im):
      	t_0 = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))))
      	tmp = 0
      	if re <= -0.36:
      		tmp = math.exp(re) * im
      	elif re <= 5.8e-21:
      		tmp = t_0
      	elif re <= 1.9e+154:
      		tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))))
      	else:
      		tmp = t_0
      	return tmp
      
      function code(re, im)
      	t_0 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))))
      	tmp = 0.0
      	if (re <= -0.36)
      		tmp = Float64(exp(re) * im);
      	elseif (re <= 5.8e-21)
      		tmp = t_0;
      	elseif (re <= 1.9e+154)
      		tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(re, im)
      	t_0 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
      	tmp = 0.0;
      	if (re <= -0.36)
      		tmp = exp(re) * im;
      	elseif (re <= 5.8e-21)
      		tmp = t_0;
      	elseif (re <= 1.9e+154)
      		tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[re_, im_] := Block[{t$95$0 = N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.36], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 5.8e-21], t$95$0, If[LessEqual[re, 1.9e+154], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
      \mathbf{if}\;re \leq -0.36:\\
      \;\;\;\;e^{re} \cdot im\\
      
      \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
      \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if re < -0.35999999999999999

        1. Initial program 100.0%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
        4. Step-by-step derivation
          1. Simplified100.0%

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

          if -0.35999999999999999 < re < 5.8e-21 or 1.8999999999999999e154 < re

          1. Initial program 100.0%

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
            5. *-lowering-*.f6499.6%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
          5. Simplified99.6%

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

          if 5.8e-21 < re < 1.8999999999999999e154

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right)\right) \]
            12. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
            13. *-lowering-*.f6479.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right) \]
          5. Simplified79.9%

            \[\leadsto \color{blue}{e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification97.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 5: 92.1% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 9 \cdot 10^{+27}:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (re im)
         :precision binary64
         (let* ((t_0 (* (exp re) im)))
           (if (<= re -0.36) t_0 (if (<= re 9e+27) (* (sin im) (+ re 1.0)) t_0))))
        double code(double re, double im) {
        	double t_0 = exp(re) * im;
        	double tmp;
        	if (re <= -0.36) {
        		tmp = t_0;
        	} else if (re <= 9e+27) {
        		tmp = sin(im) * (re + 1.0);
        	} else {
        		tmp = t_0;
        	}
        	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.36d0)) then
                tmp = t_0
            else if (re <= 9d+27) then
                tmp = sin(im) * (re + 1.0d0)
            else
                tmp = t_0
            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.36) {
        		tmp = t_0;
        	} else if (re <= 9e+27) {
        		tmp = Math.sin(im) * (re + 1.0);
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(re, im):
        	t_0 = math.exp(re) * im
        	tmp = 0
        	if re <= -0.36:
        		tmp = t_0
        	elif re <= 9e+27:
        		tmp = math.sin(im) * (re + 1.0)
        	else:
        		tmp = t_0
        	return tmp
        
        function code(re, im)
        	t_0 = Float64(exp(re) * im)
        	tmp = 0.0
        	if (re <= -0.36)
        		tmp = t_0;
        	elseif (re <= 9e+27)
        		tmp = Float64(sin(im) * Float64(re + 1.0));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(re, im)
        	t_0 = exp(re) * im;
        	tmp = 0.0;
        	if (re <= -0.36)
        		tmp = t_0;
        	elseif (re <= 9e+27)
        		tmp = sin(im) * (re + 1.0);
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.36], t$95$0, If[LessEqual[re, 9e+27], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := e^{re} \cdot im\\
        \mathbf{if}\;re \leq -0.36:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;re \leq 9 \cdot 10^{+27}:\\
        \;\;\;\;\sin im \cdot \left(re + 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if re < -0.35999999999999999 or 8.9999999999999998e27 < re

          1. Initial program 100.0%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
          4. Step-by-step derivation
            1. Simplified91.0%

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

            if -0.35999999999999999 < re < 8.9999999999999998e27

            1. Initial program 100.0%

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

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

                \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
              2. +-lowering-+.f6497.5%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
            5. Simplified97.5%

              \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
          5. Recombined 2 regimes into one program.
          6. Final simplification94.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 9 \cdot 10^{+27}:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
          7. Add Preprocessing

          Alternative 6: 92.6% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.36:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (re im)
           :precision binary64
           (let* ((t_0 (* (exp re) im)))
             (if (<= re -0.36) t_0 (if (<= re 5.8e-21) (sin im) t_0))))
          double code(double re, double im) {
          	double t_0 = exp(re) * im;
          	double tmp;
          	if (re <= -0.36) {
          		tmp = t_0;
          	} else if (re <= 5.8e-21) {
          		tmp = sin(im);
          	} else {
          		tmp = t_0;
          	}
          	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.36d0)) then
                  tmp = t_0
              else if (re <= 5.8d-21) then
                  tmp = sin(im)
              else
                  tmp = t_0
              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.36) {
          		tmp = t_0;
          	} else if (re <= 5.8e-21) {
          		tmp = Math.sin(im);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(re, im):
          	t_0 = math.exp(re) * im
          	tmp = 0
          	if re <= -0.36:
          		tmp = t_0
          	elif re <= 5.8e-21:
          		tmp = math.sin(im)
          	else:
          		tmp = t_0
          	return tmp
          
          function code(re, im)
          	t_0 = Float64(exp(re) * im)
          	tmp = 0.0
          	if (re <= -0.36)
          		tmp = t_0;
          	elseif (re <= 5.8e-21)
          		tmp = sin(im);
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(re, im)
          	t_0 = exp(re) * im;
          	tmp = 0.0;
          	if (re <= -0.36)
          		tmp = t_0;
          	elseif (re <= 5.8e-21)
          		tmp = sin(im);
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.36], t$95$0, If[LessEqual[re, 5.8e-21], N[Sin[im], $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := e^{re} \cdot im\\
          \mathbf{if}\;re \leq -0.36:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\
          \;\;\;\;\sin im\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < -0.35999999999999999 or 5.8e-21 < re

            1. Initial program 100.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
            4. Step-by-step derivation
              1. Simplified88.8%

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

              if -0.35999999999999999 < re < 5.8e-21

              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.f6499.1%

                  \[\leadsto \mathsf{sin.f64}\left(im\right) \]
              5. Simplified99.1%

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

            Alternative 7: 73.7% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 \cdot \left(re \cdot re\right)\\ \mathbf{if}\;re \leq -70:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.5 \cdot 10^{+139}:\\ \;\;\;\;im \cdot \left(1 + \frac{re \cdot re - t\_0 \cdot t\_0}{re - t\_0}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
            (FPCore (re im)
             :precision binary64
             (let* ((t_0 (* 0.5 (* re re))))
               (if (<= re -70.0)
                 (* im (* 0.008333333333333333 (* (* im im) (* im im))))
                 (if (<= re 5.8e-21)
                   (sin im)
                   (if (<= re 1.5e+139)
                     (* im (+ 1.0 (/ (- (* re re) (* t_0 t_0)) (- re t_0))))
                     (*
                      (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))
                      (* im (+ 1.0 (* im (* im -0.16666666666666666))))))))))
            double code(double re, double im) {
            	double t_0 = 0.5 * (re * re);
            	double tmp;
            	if (re <= -70.0) {
            		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
            	} else if (re <= 5.8e-21) {
            		tmp = sin(im);
            	} else if (re <= 1.5e+139) {
            		tmp = im * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
            	} else {
            		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
            	}
            	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 = 0.5d0 * (re * re)
                if (re <= (-70.0d0)) then
                    tmp = im * (0.008333333333333333d0 * ((im * im) * (im * im)))
                else if (re <= 5.8d-21) then
                    tmp = sin(im)
                else if (re <= 1.5d+139) then
                    tmp = im * (1.0d0 + (((re * re) - (t_0 * t_0)) / (re - t_0)))
                else
                    tmp = (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0)))))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
                end if
                code = tmp
            end function
            
            public static double code(double re, double im) {
            	double t_0 = 0.5 * (re * re);
            	double tmp;
            	if (re <= -70.0) {
            		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
            	} else if (re <= 5.8e-21) {
            		tmp = Math.sin(im);
            	} else if (re <= 1.5e+139) {
            		tmp = im * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
            	} else {
            		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
            	}
            	return tmp;
            }
            
            def code(re, im):
            	t_0 = 0.5 * (re * re)
            	tmp = 0
            	if re <= -70.0:
            		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)))
            	elif re <= 5.8e-21:
            		tmp = math.sin(im)
            	elif re <= 1.5e+139:
            		tmp = im * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)))
            	else:
            		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))))
            	return tmp
            
            function code(re, im)
            	t_0 = Float64(0.5 * Float64(re * re))
            	tmp = 0.0
            	if (re <= -70.0)
            		tmp = Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))));
            	elseif (re <= 5.8e-21)
            		tmp = sin(im);
            	elseif (re <= 1.5e+139)
            		tmp = Float64(im * Float64(1.0 + Float64(Float64(Float64(re * re) - Float64(t_0 * t_0)) / Float64(re - t_0))));
            	else
            		tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(re, im)
            	t_0 = 0.5 * (re * re);
            	tmp = 0.0;
            	if (re <= -70.0)
            		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
            	elseif (re <= 5.8e-21)
            		tmp = sin(im);
            	elseif (re <= 1.5e+139)
            		tmp = im * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
            	else
            		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
            	end
            	tmp_2 = tmp;
            end
            
            code[re_, im_] := Block[{t$95$0 = N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -70.0], N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5.8e-21], N[Sin[im], $MachinePrecision], If[LessEqual[re, 1.5e+139], N[(im * N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := 0.5 \cdot \left(re \cdot re\right)\\
            \mathbf{if}\;re \leq -70:\\
            \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\
            
            \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\
            \;\;\;\;\sin im\\
            
            \mathbf{elif}\;re \leq 1.5 \cdot 10^{+139}:\\
            \;\;\;\;im \cdot \left(1 + \frac{re \cdot re - t\_0 \cdot t\_0}{re - t\_0}\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if re < -70

              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.f644.6%

                  \[\leadsto \mathsf{sin.f64}\left(im\right) \]
              5. Simplified4.6%

                \[\leadsto \color{blue}{\sin im} \]
              6. Taylor expanded in im around 0

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                6. sub-negN/A

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

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                8. +-commutativeN/A

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                14. *-lowering-*.f644.0%

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
              8. Simplified4.0%

                \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
              9. Taylor expanded in im around inf

                \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
              10. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                2. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                3. pow-sqrN/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                8. *-lowering-*.f6445.4%

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
              11. Simplified45.4%

                \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

              if -70 < re < 5.8e-21

              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.f6499.1%

                  \[\leadsto \mathsf{sin.f64}\left(im\right) \]
              5. Simplified99.1%

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

              if 5.8e-21 < re < 1.5e139

              1. Initial program 99.9%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
              4. Step-by-step derivation
                1. Simplified80.7%

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                  5. *-lowering-*.f6425.4%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                4. Simplified25.4%

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)}{re - re \cdot \left(re \cdot \frac{1}{2}\right)}\right)\right), im\right) \]
                  4. *-rgt-identityN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)}{re \cdot 1 - re \cdot \left(re \cdot \frac{1}{2}\right)}\right)\right), im\right) \]
                  5. fmm-defN/A

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)\right), \left(\mathsf{fma}\left(re, 1, \mathsf{neg}\left(\left(re \cdot \frac{1}{2}\right) \cdot re\right)\right)\right)\right)\right), im\right) \]
                6. Applied egg-rr62.1%

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

                if 1.5e139 < re

                1. Initial program 100.0%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                  7. *-lowering-*.f64100.0%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                5. Simplified100.0%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right)\right)\right)\right) \]
                  7. *-lowering-*.f6478.8%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right) \]
                8. Simplified78.8%

                  \[\leadsto \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \color{blue}{\left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)} \]
              5. Recombined 4 regimes into one program.
              6. Final simplification80.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -70:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-21}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.5 \cdot 10^{+139}:\\ \;\;\;\;im \cdot \left(1 + \frac{re \cdot re - \left(0.5 \cdot \left(re \cdot re\right)\right) \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)}{re - 0.5 \cdot \left(re \cdot re\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \]
              7. Add Preprocessing

              Alternative 8: 51.5% accurate, 5.5× speedup?

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

                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.f644.6%

                    \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                5. Simplified4.6%

                  \[\leadsto \color{blue}{\sin im} \]
                6. Taylor expanded in im around 0

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                  6. sub-negN/A

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

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                  8. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                  14. *-lowering-*.f644.0%

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                8. Simplified4.0%

                  \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                9. Taylor expanded in im around inf

                  \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
                10. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                  2. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                  3. pow-sqrN/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                  8. *-lowering-*.f6445.4%

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                11. Simplified45.4%

                  \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

                if -31.5 < re < 2.0000000000000001e138

                1. Initial program 100.0%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                4. Step-by-step derivation
                  1. Simplified57.6%

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                    5. *-lowering-*.f6448.9%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                  4. Simplified48.9%

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)}{re - re \cdot \left(re \cdot \frac{1}{2}\right)}\right)\right), im\right) \]
                    4. *-rgt-identityN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)}{re \cdot 1 - re \cdot \left(re \cdot \frac{1}{2}\right)}\right)\right), im\right) \]
                    5. fmm-defN/A

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot re - \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right) \cdot \left(re \cdot \left(re \cdot \frac{1}{2}\right)\right)\right), \left(\mathsf{fma}\left(re, 1, \mathsf{neg}\left(\left(re \cdot \frac{1}{2}\right) \cdot re\right)\right)\right)\right)\right), im\right) \]
                  6. Applied egg-rr54.6%

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

                  if 2.0000000000000001e138 < re

                  1. Initial program 100.0%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    7. *-lowering-*.f64100.0%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                  5. Simplified100.0%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right)\right)\right)\right) \]
                    7. *-lowering-*.f6478.8%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right) \]
                  8. Simplified78.8%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -31.5:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 2 \cdot 10^{+138}:\\ \;\;\;\;im \cdot \left(1 + \frac{re \cdot re - \left(0.5 \cdot \left(re \cdot re\right)\right) \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)}{re - 0.5 \cdot \left(re \cdot re\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \]
                7. Add Preprocessing

                Alternative 9: 50.9% accurate, 7.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -0.35:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
                (FPCore (re im)
                 :precision binary64
                 (if (<= re -0.35)
                   (* im (* 0.008333333333333333 (* (* im im) (* im im))))
                   (*
                    (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))
                    (* im (+ 1.0 (* im (* im -0.16666666666666666)))))))
                double code(double re, double im) {
                	double tmp;
                	if (re <= -0.35) {
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	} else {
                		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
                	}
                	return tmp;
                }
                
                real(8) function code(re, im)
                    real(8), intent (in) :: re
                    real(8), intent (in) :: im
                    real(8) :: tmp
                    if (re <= (-0.35d0)) then
                        tmp = im * (0.008333333333333333d0 * ((im * im) * (im * im)))
                    else
                        tmp = (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0)))))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
                    end if
                    code = tmp
                end function
                
                public static double code(double re, double im) {
                	double tmp;
                	if (re <= -0.35) {
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	} else {
                		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
                	}
                	return tmp;
                }
                
                def code(re, im):
                	tmp = 0
                	if re <= -0.35:
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)))
                	else:
                		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))))
                	return tmp
                
                function code(re, im)
                	tmp = 0.0
                	if (re <= -0.35)
                		tmp = Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))));
                	else
                		tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))));
                	end
                	return tmp
                end
                
                function tmp_2 = code(re, im)
                	tmp = 0.0;
                	if (re <= -0.35)
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	else
                		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
                	end
                	tmp_2 = tmp;
                end
                
                code[re_, im_] := If[LessEqual[re, -0.35], N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;re \leq -0.35:\\
                \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if re < -0.34999999999999998

                  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.f644.9%

                      \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                  5. Simplified4.9%

                    \[\leadsto \color{blue}{\sin im} \]
                  6. Taylor expanded in im around 0

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                    6. sub-negN/A

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                    8. +-commutativeN/A

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                    14. *-lowering-*.f644.2%

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                  8. Simplified4.2%

                    \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                  9. Taylor expanded in im around inf

                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                    2. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                    3. pow-sqrN/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                    8. *-lowering-*.f6444.8%

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                  11. Simplified44.8%

                    \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

                  if -0.34999999999999998 < re

                  1. Initial program 100.0%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    7. *-lowering-*.f6492.2%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                  5. Simplified92.2%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right)\right)\right)\right) \]
                    7. *-lowering-*.f6456.2%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right) \]
                  8. Simplified56.2%

                    \[\leadsto \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \color{blue}{\left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 10: 51.0% accurate, 10.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -10.2:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
                (FPCore (re im)
                 :precision binary64
                 (if (<= re -10.2)
                   (* im (* 0.008333333333333333 (* (* im im) (* im im))))
                   (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
                double code(double re, double im) {
                	double tmp;
                	if (re <= -10.2) {
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	} else {
                		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                	}
                	return tmp;
                }
                
                real(8) function code(re, im)
                    real(8), intent (in) :: re
                    real(8), intent (in) :: im
                    real(8) :: tmp
                    if (re <= (-10.2d0)) then
                        tmp = im * (0.008333333333333333d0 * ((im * im) * (im * im)))
                    else
                        tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
                    end if
                    code = tmp
                end function
                
                public static double code(double re, double im) {
                	double tmp;
                	if (re <= -10.2) {
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	} else {
                		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                	}
                	return tmp;
                }
                
                def code(re, im):
                	tmp = 0
                	if re <= -10.2:
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)))
                	else:
                		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
                	return tmp
                
                function code(re, im)
                	tmp = 0.0
                	if (re <= -10.2)
                		tmp = Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))));
                	else
                		tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))));
                	end
                	return tmp
                end
                
                function tmp_2 = code(re, im)
                	tmp = 0.0;
                	if (re <= -10.2)
                		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                	else
                		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                	end
                	tmp_2 = tmp;
                end
                
                code[re_, im_] := If[LessEqual[re, -10.2], N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;re \leq -10.2:\\
                \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if re < -10.199999999999999

                  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.f644.6%

                      \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                  5. Simplified4.6%

                    \[\leadsto \color{blue}{\sin im} \]
                  6. Taylor expanded in im around 0

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                    6. sub-negN/A

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                    8. +-commutativeN/A

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                    14. *-lowering-*.f644.0%

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                  8. Simplified4.0%

                    \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                  9. Taylor expanded in im around inf

                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                    2. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                    3. pow-sqrN/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                    8. *-lowering-*.f6445.4%

                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                  11. Simplified45.4%

                    \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

                  if -10.199999999999999 < re

                  1. Initial program 100.0%

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    7. *-lowering-*.f6492.0%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                  5. Simplified92.0%

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -10.2:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 11: 48.2% accurate, 10.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -0.35:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 4.5 \cdot 10^{+30}:\\ \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (re im)
                   :precision binary64
                   (if (<= re -0.35)
                     (* im (* 0.008333333333333333 (* (* im im) (* im im))))
                     (if (<= re 4.5e+30)
                       (* im (+ 1.0 (* -0.16666666666666666 (* im im))))
                       (* im (* 0.5 (* re re))))))
                  double code(double re, double im) {
                  	double tmp;
                  	if (re <= -0.35) {
                  		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                  	} else if (re <= 4.5e+30) {
                  		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                  	} else {
                  		tmp = im * (0.5 * (re * re));
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(re, im)
                      real(8), intent (in) :: re
                      real(8), intent (in) :: im
                      real(8) :: tmp
                      if (re <= (-0.35d0)) then
                          tmp = im * (0.008333333333333333d0 * ((im * im) * (im * im)))
                      else if (re <= 4.5d+30) then
                          tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
                      else
                          tmp = im * (0.5d0 * (re * re))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double re, double im) {
                  	double tmp;
                  	if (re <= -0.35) {
                  		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                  	} else if (re <= 4.5e+30) {
                  		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                  	} else {
                  		tmp = im * (0.5 * (re * re));
                  	}
                  	return tmp;
                  }
                  
                  def code(re, im):
                  	tmp = 0
                  	if re <= -0.35:
                  		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)))
                  	elif re <= 4.5e+30:
                  		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)))
                  	else:
                  		tmp = im * (0.5 * (re * re))
                  	return tmp
                  
                  function code(re, im)
                  	tmp = 0.0
                  	if (re <= -0.35)
                  		tmp = Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))));
                  	elseif (re <= 4.5e+30)
                  		tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))));
                  	else
                  		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(re, im)
                  	tmp = 0.0;
                  	if (re <= -0.35)
                  		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                  	elseif (re <= 4.5e+30)
                  		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                  	else
                  		tmp = im * (0.5 * (re * re));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[re_, im_] := If[LessEqual[re, -0.35], N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 4.5e+30], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;re \leq -0.35:\\
                  \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\
                  
                  \mathbf{elif}\;re \leq 4.5 \cdot 10^{+30}:\\
                  \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if re < -0.34999999999999998

                    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.f644.9%

                        \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                    5. Simplified4.9%

                      \[\leadsto \color{blue}{\sin im} \]
                    6. Taylor expanded in im around 0

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                      6. sub-negN/A

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                      8. +-commutativeN/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                      14. *-lowering-*.f644.2%

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                    8. Simplified4.2%

                      \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                    9. Taylor expanded in im around inf

                      \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
                    10. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                      2. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                      3. pow-sqrN/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                      8. *-lowering-*.f6444.8%

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                    11. Simplified44.8%

                      \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

                    if -0.34999999999999998 < re < 4.49999999999999995e30

                    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.f6497.5%

                        \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                    5. Simplified97.5%

                      \[\leadsto \color{blue}{\sin im} \]
                    6. Taylor expanded in im around 0

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                      6. sub-negN/A

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                      8. +-commutativeN/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                      14. *-lowering-*.f6452.8%

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                    8. Simplified52.8%

                      \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                    9. Taylor expanded in im around 0

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                      5. *-lowering-*.f6454.7%

                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                    11. Simplified54.7%

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

                    if 4.49999999999999995e30 < re

                    1. Initial program 100.0%

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                    4. Step-by-step derivation
                      1. Simplified81.5%

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                        5. *-lowering-*.f6453.1%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                      4. Simplified53.1%

                        \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)} \cdot im \]
                      5. Taylor expanded in re around inf

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({re}^{2}\right)\right), im\right) \]
                        2. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(re \cdot re\right)\right), im\right) \]
                        3. *-lowering-*.f6453.1%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, re\right)\right), im\right) \]
                      7. Simplified53.1%

                        \[\leadsto \color{blue}{\left(0.5 \cdot \left(re \cdot re\right)\right)} \cdot im \]
                    5. Recombined 3 regimes into one program.
                    6. Final simplification52.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.35:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 4.5 \cdot 10^{+30}:\\ \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 12: 48.4% accurate, 12.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -33:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \end{array} \end{array} \]
                    (FPCore (re im)
                     :precision binary64
                     (if (<= re -33.0)
                       (* im (* 0.008333333333333333 (* (* im im) (* im im))))
                       (* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
                    double code(double re, double im) {
                    	double tmp;
                    	if (re <= -33.0) {
                    		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                    	} else {
                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(re, im)
                        real(8), intent (in) :: re
                        real(8), intent (in) :: im
                        real(8) :: tmp
                        if (re <= (-33.0d0)) then
                            tmp = im * (0.008333333333333333d0 * ((im * im) * (im * im)))
                        else
                            tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double re, double im) {
                    	double tmp;
                    	if (re <= -33.0) {
                    		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                    	} else {
                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                    	}
                    	return tmp;
                    }
                    
                    def code(re, im):
                    	tmp = 0
                    	if re <= -33.0:
                    		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)))
                    	else:
                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))))
                    	return tmp
                    
                    function code(re, im)
                    	tmp = 0.0
                    	if (re <= -33.0)
                    		tmp = Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))));
                    	else
                    		tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(re, im)
                    	tmp = 0.0;
                    	if (re <= -33.0)
                    		tmp = im * (0.008333333333333333 * ((im * im) * (im * im)));
                    	else
                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[re_, im_] := If[LessEqual[re, -33.0], N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;re \leq -33:\\
                    \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if re < -33

                      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.f644.6%

                          \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                      5. Simplified4.6%

                        \[\leadsto \color{blue}{\sin im} \]
                      6. Taylor expanded in im around 0

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                        6. sub-negN/A

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

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                        8. +-commutativeN/A

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                        14. *-lowering-*.f644.0%

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                      8. Simplified4.0%

                        \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                      9. Taylor expanded in im around inf

                        \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{120} \cdot {im}^{4}\right)}\right) \]
                      10. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \color{blue}{\left({im}^{4}\right)}\right)\right) \]
                        2. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \left({im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                        3. pow-sqrN/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                        8. *-lowering-*.f6445.4%

                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                      11. Simplified45.4%

                        \[\leadsto im \cdot \color{blue}{\left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)} \]

                      if -33 < re

                      1. Initial program 100.0%

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                      4. Step-by-step derivation
                        1. Simplified60.6%

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                          5. *-lowering-*.f6452.9%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                        4. Simplified52.9%

                          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)} \cdot im \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification51.2%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -33:\\ \;\;\;\;im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 13: 38.5% accurate, 14.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 5.2 \cdot 10^{+29}:\\ \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                      (FPCore (re im)
                       :precision binary64
                       (if (<= re 5.2e+29)
                         (* im (+ 1.0 (* -0.16666666666666666 (* im im))))
                         (* im (* 0.5 (* re re)))))
                      double code(double re, double im) {
                      	double tmp;
                      	if (re <= 5.2e+29) {
                      		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                      	} else {
                      		tmp = im * (0.5 * (re * re));
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(re, im)
                          real(8), intent (in) :: re
                          real(8), intent (in) :: im
                          real(8) :: tmp
                          if (re <= 5.2d+29) then
                              tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
                          else
                              tmp = im * (0.5d0 * (re * re))
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double re, double im) {
                      	double tmp;
                      	if (re <= 5.2e+29) {
                      		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                      	} else {
                      		tmp = im * (0.5 * (re * re));
                      	}
                      	return tmp;
                      }
                      
                      def code(re, im):
                      	tmp = 0
                      	if re <= 5.2e+29:
                      		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)))
                      	else:
                      		tmp = im * (0.5 * (re * re))
                      	return tmp
                      
                      function code(re, im)
                      	tmp = 0.0
                      	if (re <= 5.2e+29)
                      		tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))));
                      	else
                      		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(re, im)
                      	tmp = 0.0;
                      	if (re <= 5.2e+29)
                      		tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
                      	else
                      		tmp = im * (0.5 * (re * re));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[re_, im_] := If[LessEqual[re, 5.2e+29], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;re \leq 5.2 \cdot 10^{+29}:\\
                      \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if re < 5.2e29

                        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.f6470.9%

                            \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                        5. Simplified70.9%

                          \[\leadsto \color{blue}{\sin im} \]
                        6. Taylor expanded in im around 0

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{120} \cdot {im}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                          6. sub-negN/A

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

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{120} \cdot {im}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                          8. +-commutativeN/A

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right) \]
                          14. *-lowering-*.f6438.8%

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right)\right) \]
                        8. Simplified38.8%

                          \[\leadsto \color{blue}{im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)} \]
                        9. Taylor expanded in im around 0

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                          5. *-lowering-*.f6440.2%

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                        11. Simplified40.2%

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

                        if 5.2e29 < re

                        1. Initial program 100.0%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                        4. Step-by-step derivation
                          1. Simplified81.5%

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                            5. *-lowering-*.f6453.1%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                          4. Simplified53.1%

                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)} \cdot im \]
                          5. Taylor expanded in re around inf

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({re}^{2}\right)\right), im\right) \]
                            2. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(re \cdot re\right)\right), im\right) \]
                            3. *-lowering-*.f6453.1%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, re\right)\right), im\right) \]
                          7. Simplified53.1%

                            \[\leadsto \color{blue}{\left(0.5 \cdot \left(re \cdot re\right)\right)} \cdot im \]
                        5. Recombined 2 regimes into one program.
                        6. Final simplification42.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 5.2 \cdot 10^{+29}:\\ \;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 14: 38.4% accurate, 16.9× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 9 \cdot 10^{+27}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                        (FPCore (re im)
                         :precision binary64
                         (if (<= re 9e+27) im (* im (* 0.5 (* re re)))))
                        double code(double re, double im) {
                        	double tmp;
                        	if (re <= 9e+27) {
                        		tmp = im;
                        	} else {
                        		tmp = im * (0.5 * (re * re));
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(re, im)
                            real(8), intent (in) :: re
                            real(8), intent (in) :: im
                            real(8) :: tmp
                            if (re <= 9d+27) then
                                tmp = im
                            else
                                tmp = im * (0.5d0 * (re * re))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double re, double im) {
                        	double tmp;
                        	if (re <= 9e+27) {
                        		tmp = im;
                        	} else {
                        		tmp = im * (0.5 * (re * re));
                        	}
                        	return tmp;
                        }
                        
                        def code(re, im):
                        	tmp = 0
                        	if re <= 9e+27:
                        		tmp = im
                        	else:
                        		tmp = im * (0.5 * (re * re))
                        	return tmp
                        
                        function code(re, im)
                        	tmp = 0.0
                        	if (re <= 9e+27)
                        		tmp = im;
                        	else
                        		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(re, im)
                        	tmp = 0.0;
                        	if (re <= 9e+27)
                        		tmp = im;
                        	else
                        		tmp = im * (0.5 * (re * re));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[re_, im_] := If[LessEqual[re, 9e+27], im, N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;re \leq 9 \cdot 10^{+27}:\\
                        \;\;\;\;im\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if re < 8.9999999999999998e27

                          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.f6470.9%

                              \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                          5. Simplified70.9%

                            \[\leadsto \color{blue}{\sin im} \]
                          6. Taylor expanded in im around 0

                            \[\leadsto \color{blue}{im} \]
                          7. Step-by-step derivation
                            1. Simplified39.0%

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

                            if 8.9999999999999998e27 < re

                            1. Initial program 100.0%

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                            4. Step-by-step derivation
                              1. Simplified81.5%

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(re \cdot \frac{1}{2}\right)\right)\right)\right), im\right) \]
                                5. *-lowering-*.f6453.1%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)\right), im\right) \]
                              4. Simplified53.1%

                                \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)} \cdot im \]
                              5. Taylor expanded in re around inf

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({re}^{2}\right)\right), im\right) \]
                                2. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(re \cdot re\right)\right), im\right) \]
                                3. *-lowering-*.f6453.1%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, re\right)\right), im\right) \]
                              7. Simplified53.1%

                                \[\leadsto \color{blue}{\left(0.5 \cdot \left(re \cdot re\right)\right)} \cdot im \]
                            5. Recombined 2 regimes into one program.
                            6. Final simplification42.0%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 9 \cdot 10^{+27}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 15: 29.5% accurate, 25.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 6.8 \cdot 10^{+40}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \end{array} \]
                            (FPCore (re im) :precision binary64 (if (<= im 6.8e+40) im (* re im)))
                            double code(double re, double im) {
                            	double tmp;
                            	if (im <= 6.8e+40) {
                            		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 <= 6.8d+40) 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 <= 6.8e+40) {
                            		tmp = im;
                            	} else {
                            		tmp = re * im;
                            	}
                            	return tmp;
                            }
                            
                            def code(re, im):
                            	tmp = 0
                            	if im <= 6.8e+40:
                            		tmp = im
                            	else:
                            		tmp = re * im
                            	return tmp
                            
                            function code(re, im)
                            	tmp = 0.0
                            	if (im <= 6.8e+40)
                            		tmp = im;
                            	else
                            		tmp = Float64(re * im);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(re, im)
                            	tmp = 0.0;
                            	if (im <= 6.8e+40)
                            		tmp = im;
                            	else
                            		tmp = re * im;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[re_, im_] := If[LessEqual[im, 6.8e+40], im, N[(re * im), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;im \leq 6.8 \cdot 10^{+40}:\\
                            \;\;\;\;im\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;re \cdot im\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if im < 6.79999999999999977e40

                              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.f6455.9%

                                  \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                              5. Simplified55.9%

                                \[\leadsto \color{blue}{\sin im} \]
                              6. Taylor expanded in im around 0

                                \[\leadsto \color{blue}{im} \]
                              7. Step-by-step derivation
                                1. Simplified38.3%

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

                                if 6.79999999999999977e40 < im

                                1. Initial program 100.0%

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                  2. +-lowering-+.f6459.6%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                5. Simplified59.6%

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \color{blue}{im}\right) \]
                                7. Step-by-step derivation
                                  1. Simplified10.2%

                                    \[\leadsto \left(re + 1\right) \cdot \color{blue}{im} \]
                                  2. Taylor expanded in re around inf

                                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, im\right) \]
                                  3. Step-by-step derivation
                                    1. Simplified11.3%

                                      \[\leadsto \color{blue}{re} \cdot im \]
                                  4. Recombined 2 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 16: 31.0% accurate, 40.6× speedup?

                                  \[\begin{array}{l} \\ im + re \cdot im \end{array} \]
                                  (FPCore (re im) :precision binary64 (+ im (* re im)))
                                  double code(double re, double im) {
                                  	return im + (re * im);
                                  }
                                  
                                  real(8) function code(re, im)
                                      real(8), intent (in) :: re
                                      real(8), intent (in) :: im
                                      code = im + (re * im)
                                  end function
                                  
                                  public static double code(double re, double im) {
                                  	return im + (re * im);
                                  }
                                  
                                  def code(re, im):
                                  	return im + (re * im)
                                  
                                  function code(re, im)
                                  	return Float64(im + Float64(re * im))
                                  end
                                  
                                  function tmp = code(re, im)
                                  	tmp = im + (re * im);
                                  end
                                  
                                  code[re_, im_] := N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  im + re \cdot 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 \mathsf{*.f64}\left(\color{blue}{\left(1 + re\right)}, \mathsf{sin.f64}\left(im\right)\right) \]
                                  4. Step-by-step derivation
                                    1. +-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                    2. +-lowering-+.f6456.8%

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                  5. Simplified56.8%

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

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \color{blue}{im}\right) \]
                                  7. Step-by-step derivation
                                    1. Simplified33.9%

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

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

                                        \[\leadsto re \cdot im + \color{blue}{1 \cdot im} \]
                                      3. *-lft-identityN/A

                                        \[\leadsto re \cdot im + im \]
                                      4. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(\left(re \cdot im\right), \color{blue}{im}\right) \]
                                      5. *-lowering-*.f6433.9%

                                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(re, im\right), im\right) \]
                                    3. Applied egg-rr33.9%

                                      \[\leadsto \color{blue}{re \cdot im + im} \]
                                    4. Final simplification33.9%

                                      \[\leadsto im + re \cdot im \]
                                    5. Add Preprocessing

                                    Alternative 17: 31.0% accurate, 40.6× speedup?

                                    \[\begin{array}{l} \\ im \cdot \left(re + 1\right) \end{array} \]
                                    (FPCore (re im) :precision binary64 (* im (+ re 1.0)))
                                    double code(double re, double im) {
                                    	return im * (re + 1.0);
                                    }
                                    
                                    real(8) function code(re, im)
                                        real(8), intent (in) :: re
                                        real(8), intent (in) :: im
                                        code = im * (re + 1.0d0)
                                    end function
                                    
                                    public static double code(double re, double im) {
                                    	return im * (re + 1.0);
                                    }
                                    
                                    def code(re, im):
                                    	return im * (re + 1.0)
                                    
                                    function code(re, im)
                                    	return Float64(im * Float64(re + 1.0))
                                    end
                                    
                                    function tmp = code(re, im)
                                    	tmp = im * (re + 1.0);
                                    end
                                    
                                    code[re_, im_] := N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    im \cdot \left(re + 1\right)
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 100.0%

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

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

                                        \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                      2. +-lowering-+.f6456.8%

                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                    5. Simplified56.8%

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

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \color{blue}{im}\right) \]
                                    7. Step-by-step derivation
                                      1. Simplified33.9%

                                        \[\leadsto \left(re + 1\right) \cdot \color{blue}{im} \]
                                      2. Final simplification33.9%

                                        \[\leadsto im \cdot \left(re + 1\right) \]
                                      3. Add Preprocessing

                                      Alternative 18: 27.7% accurate, 203.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.f6456.5%

                                          \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                                      5. Simplified56.5%

                                        \[\leadsto \color{blue}{\sin im} \]
                                      6. Taylor expanded in im around 0

                                        \[\leadsto \color{blue}{im} \]
                                      7. Step-by-step derivation
                                        1. Simplified31.3%

                                          \[\leadsto \color{blue}{im} \]
                                        2. Add Preprocessing

                                        Reproduce

                                        ?
                                        herbie shell --seed 2024160 
                                        (FPCore (re im)
                                          :name "math.exp on complex, imaginary part"
                                          :precision binary64
                                          (* (exp re) (sin im)))