math.exp on complex, imaginary part

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 26 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 97.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\ t_1 := 1 + t\_0\\ t_2 := re \cdot t\_1\\ t_3 := -1 - t\_0\\ \mathbf{if}\;re \leq -0.105:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 4.4 \cdot 10^{+51}:\\ \;\;\;\;\sin im \cdot \frac{1 + t\_2 \cdot \left(\left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_1\right)\right)}{1 + t\_2 \cdot \left(t\_2 + -1\right)}\\ \mathbf{elif}\;re \leq 10^{+103}:\\ \;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_3\right)\right)}{1 + re \cdot t\_3}\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + t\_2\right)\\ \end{array} \end{array} \]
(FPCore (re im)
 :precision binary64
 (let* ((t_0 (* re (+ 0.5 (* re 0.16666666666666666))))
        (t_1 (+ 1.0 t_0))
        (t_2 (* re t_1))
        (t_3 (- -1.0 t_0)))
   (if (<= re -0.105)
     (* (exp re) im)
     (if (<= re 4.4e+51)
       (*
        (sin im)
        (/
         (+ 1.0 (* t_2 (* (* re re) (* t_1 t_1))))
         (+ 1.0 (* t_2 (+ t_2 -1.0)))))
       (if (<= re 1e+103)
         (/ (* (sin im) (+ 1.0 (* (* re re) (* t_1 t_3)))) (+ 1.0 (* re t_3)))
         (* (sin im) (+ 1.0 t_2)))))))
double code(double re, double im) {
	double t_0 = re * (0.5 + (re * 0.16666666666666666));
	double t_1 = 1.0 + t_0;
	double t_2 = re * t_1;
	double t_3 = -1.0 - t_0;
	double tmp;
	if (re <= -0.105) {
		tmp = exp(re) * im;
	} else if (re <= 4.4e+51) {
		tmp = sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))));
	} else if (re <= 1e+103) {
		tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3));
	} else {
		tmp = sin(im) * (1.0 + t_2);
	}
	return tmp;
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = re * (0.5d0 + (re * 0.16666666666666666d0))
    t_1 = 1.0d0 + t_0
    t_2 = re * t_1
    t_3 = (-1.0d0) - t_0
    if (re <= (-0.105d0)) then
        tmp = exp(re) * im
    else if (re <= 4.4d+51) then
        tmp = sin(im) * ((1.0d0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0d0 + (t_2 * (t_2 + (-1.0d0)))))
    else if (re <= 1d+103) then
        tmp = (sin(im) * (1.0d0 + ((re * re) * (t_1 * t_3)))) / (1.0d0 + (re * t_3))
    else
        tmp = sin(im) * (1.0d0 + t_2)
    end if
    code = tmp
end function
public static double code(double re, double im) {
	double t_0 = re * (0.5 + (re * 0.16666666666666666));
	double t_1 = 1.0 + t_0;
	double t_2 = re * t_1;
	double t_3 = -1.0 - t_0;
	double tmp;
	if (re <= -0.105) {
		tmp = Math.exp(re) * im;
	} else if (re <= 4.4e+51) {
		tmp = Math.sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))));
	} else if (re <= 1e+103) {
		tmp = (Math.sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3));
	} else {
		tmp = Math.sin(im) * (1.0 + t_2);
	}
	return tmp;
}
def code(re, im):
	t_0 = re * (0.5 + (re * 0.16666666666666666))
	t_1 = 1.0 + t_0
	t_2 = re * t_1
	t_3 = -1.0 - t_0
	tmp = 0
	if re <= -0.105:
		tmp = math.exp(re) * im
	elif re <= 4.4e+51:
		tmp = math.sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))))
	elif re <= 1e+103:
		tmp = (math.sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3))
	else:
		tmp = math.sin(im) * (1.0 + t_2)
	return tmp
function code(re, im)
	t_0 = Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))
	t_1 = Float64(1.0 + t_0)
	t_2 = Float64(re * t_1)
	t_3 = Float64(-1.0 - t_0)
	tmp = 0.0
	if (re <= -0.105)
		tmp = Float64(exp(re) * im);
	elseif (re <= 4.4e+51)
		tmp = Float64(sin(im) * Float64(Float64(1.0 + Float64(t_2 * Float64(Float64(re * re) * Float64(t_1 * t_1)))) / Float64(1.0 + Float64(t_2 * Float64(t_2 + -1.0)))));
	elseif (re <= 1e+103)
		tmp = Float64(Float64(sin(im) * Float64(1.0 + Float64(Float64(re * re) * Float64(t_1 * t_3)))) / Float64(1.0 + Float64(re * t_3)));
	else
		tmp = Float64(sin(im) * Float64(1.0 + t_2));
	end
	return tmp
end
function tmp_2 = code(re, im)
	t_0 = re * (0.5 + (re * 0.16666666666666666));
	t_1 = 1.0 + t_0;
	t_2 = re * t_1;
	t_3 = -1.0 - t_0;
	tmp = 0.0;
	if (re <= -0.105)
		tmp = exp(re) * im;
	elseif (re <= 4.4e+51)
		tmp = sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))));
	elseif (re <= 1e+103)
		tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3));
	else
		tmp = sin(im) * (1.0 + t_2);
	end
	tmp_2 = tmp;
end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(re * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[re, -0.105], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 4.4e+51], N[(N[Sin[im], $MachinePrecision] * N[(N[(1.0 + N[(t$95$2 * N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$2 * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(re * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\
t_1 := 1 + t\_0\\
t_2 := re \cdot t\_1\\
t_3 := -1 - t\_0\\
\mathbf{if}\;re \leq -0.105:\\
\;\;\;\;e^{re} \cdot im\\

\mathbf{elif}\;re \leq 4.4 \cdot 10^{+51}:\\
\;\;\;\;\sin im \cdot \frac{1 + t\_2 \cdot \left(\left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_1\right)\right)}{1 + t\_2 \cdot \left(t\_2 + -1\right)}\\

\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_3\right)\right)}{1 + re \cdot t\_3}\\

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


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

    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.104999999999999996 < re < 4.39999999999999984e51

      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.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. Simplified92.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 \]
      6. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\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)}\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\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), \left(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), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
      7. Applied egg-rr96.8%

        \[\leadsto \color{blue}{\frac{1 + \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(\left(re \cdot re\right) \cdot \left(\left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)}{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)}} \cdot \sin im \]

      if 4.39999999999999984e51 < re < 1e103

      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-*.f646.7%

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

        \[\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. flip-+N/A

          \[\leadsto \frac{1 \cdot 1 - \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 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)} \cdot \sin \color{blue}{im} \]
        2. associate-*l/N/A

          \[\leadsto \frac{\left(1 \cdot 1 - \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)\right) \cdot \sin im}{\color{blue}{1 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \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)\right) \cdot \sin im\right), \color{blue}{\left(1 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)\right)}\right) \]
      7. Applied egg-rr100.0%

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

      if 1e103 < 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.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.105:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 4.4 \cdot 10^{+51}:\\ \;\;\;\;\sin im \cdot \frac{1 + \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(\left(re \cdot re\right) \cdot \left(\left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)}{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 10^{+103}:\\ \;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(\left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(-1 - re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)}{1 + re \cdot \left(-1 - re \cdot \left(0.5 + re \cdot 0.16666666666666666\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: 95.7% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\ t_1 := 1 + t\_0\\ t_2 := -1 - t\_0\\ \mathbf{if}\;re \leq -0.16:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 10^{+103}:\\ \;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_2\right)\right)}{1 + re \cdot t\_2}\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot t\_1\right)\\ \end{array} \end{array} \]
    (FPCore (re im)
     :precision binary64
     (let* ((t_0 (* re (+ 0.5 (* re 0.16666666666666666))))
            (t_1 (+ 1.0 t_0))
            (t_2 (- -1.0 t_0)))
       (if (<= re -0.16)
         (* (exp re) im)
         (if (<= re 1e+103)
           (/ (* (sin im) (+ 1.0 (* (* re re) (* t_1 t_2)))) (+ 1.0 (* re t_2)))
           (* (sin im) (+ 1.0 (* re t_1)))))))
    double code(double re, double im) {
    	double t_0 = re * (0.5 + (re * 0.16666666666666666));
    	double t_1 = 1.0 + t_0;
    	double t_2 = -1.0 - t_0;
    	double tmp;
    	if (re <= -0.16) {
    		tmp = exp(re) * im;
    	} else if (re <= 1e+103) {
    		tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2));
    	} else {
    		tmp = sin(im) * (1.0 + (re * t_1));
    	}
    	return tmp;
    }
    
    real(8) function code(re, im)
        real(8), intent (in) :: re
        real(8), intent (in) :: im
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_0 = re * (0.5d0 + (re * 0.16666666666666666d0))
        t_1 = 1.0d0 + t_0
        t_2 = (-1.0d0) - t_0
        if (re <= (-0.16d0)) then
            tmp = exp(re) * im
        else if (re <= 1d+103) then
            tmp = (sin(im) * (1.0d0 + ((re * re) * (t_1 * t_2)))) / (1.0d0 + (re * t_2))
        else
            tmp = sin(im) * (1.0d0 + (re * t_1))
        end if
        code = tmp
    end function
    
    public static double code(double re, double im) {
    	double t_0 = re * (0.5 + (re * 0.16666666666666666));
    	double t_1 = 1.0 + t_0;
    	double t_2 = -1.0 - t_0;
    	double tmp;
    	if (re <= -0.16) {
    		tmp = Math.exp(re) * im;
    	} else if (re <= 1e+103) {
    		tmp = (Math.sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2));
    	} else {
    		tmp = Math.sin(im) * (1.0 + (re * t_1));
    	}
    	return tmp;
    }
    
    def code(re, im):
    	t_0 = re * (0.5 + (re * 0.16666666666666666))
    	t_1 = 1.0 + t_0
    	t_2 = -1.0 - t_0
    	tmp = 0
    	if re <= -0.16:
    		tmp = math.exp(re) * im
    	elif re <= 1e+103:
    		tmp = (math.sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2))
    	else:
    		tmp = math.sin(im) * (1.0 + (re * t_1))
    	return tmp
    
    function code(re, im)
    	t_0 = Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))
    	t_1 = Float64(1.0 + t_0)
    	t_2 = Float64(-1.0 - t_0)
    	tmp = 0.0
    	if (re <= -0.16)
    		tmp = Float64(exp(re) * im);
    	elseif (re <= 1e+103)
    		tmp = Float64(Float64(sin(im) * Float64(1.0 + Float64(Float64(re * re) * Float64(t_1 * t_2)))) / Float64(1.0 + Float64(re * t_2)));
    	else
    		tmp = Float64(sin(im) * Float64(1.0 + Float64(re * t_1)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(re, im)
    	t_0 = re * (0.5 + (re * 0.16666666666666666));
    	t_1 = 1.0 + t_0;
    	t_2 = -1.0 - t_0;
    	tmp = 0.0;
    	if (re <= -0.16)
    		tmp = exp(re) * im;
    	elseif (re <= 1e+103)
    		tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2));
    	else
    		tmp = sin(im) * (1.0 + (re * t_1));
    	end
    	tmp_2 = tmp;
    end
    
    code[re_, im_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[re, -0.16], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(re * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\
    t_1 := 1 + t\_0\\
    t_2 := -1 - t\_0\\
    \mathbf{if}\;re \leq -0.16:\\
    \;\;\;\;e^{re} \cdot im\\
    
    \mathbf{elif}\;re \leq 10^{+103}:\\
    \;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_2\right)\right)}{1 + re \cdot t\_2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sin im \cdot \left(1 + re \cdot t\_1\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if re < -0.160000000000000003

      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.160000000000000003 < re < 1e103

        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-*.f6486.3%

            \[\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. Simplified86.3%

          \[\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. flip-+N/A

            \[\leadsto \frac{1 \cdot 1 - \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 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)} \cdot \sin \color{blue}{im} \]
          2. associate-*l/N/A

            \[\leadsto \frac{\left(1 \cdot 1 - \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)\right) \cdot \sin im}{\color{blue}{1 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)}} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \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)\right) \cdot \sin im\right), \color{blue}{\left(1 - re \cdot \left(1 + re \cdot \left(\frac{1}{2} + re \cdot \frac{1}{6}\right)\right)\right)}\right) \]
        7. Applied egg-rr93.2%

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

        if 1e103 < 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 3 regimes into one program.
      6. Final simplification96.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.16:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 10^{+103}:\\ \;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(\left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(-1 - re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)}{1 + re \cdot \left(-1 - re \cdot \left(0.5 + re \cdot 0.16666666666666666\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: 96.6% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ t_1 := 0.5 + re \cdot 0.16666666666666666\\ \mathbf{if}\;re \leq -0.39:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\sin im \cdot \left(\left(1 + re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{re \cdot re + \left(1 - re\right)} + t\_1 \cdot \left(re \cdot re\right)\right)\\ \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot t\_1\right)\right)\\ \end{array} \end{array} \]
      (FPCore (re im)
       :precision binary64
       (let* ((t_0 (* (exp re) im)) (t_1 (+ 0.5 (* re 0.16666666666666666))))
         (if (<= re -0.39)
           t_0
           (if (<= re 92000000000000.0)
             (*
              (sin im)
              (+
               (* (+ 1.0 (* re (* re re))) (/ 1.0 (+ (* re re) (- 1.0 re))))
               (* t_1 (* re re))))
             (if (<= re 5e+102)
               t_0
               (* (sin im) (+ 1.0 (* re (+ 1.0 (* re t_1))))))))))
      double code(double re, double im) {
      	double t_0 = exp(re) * im;
      	double t_1 = 0.5 + (re * 0.16666666666666666);
      	double tmp;
      	if (re <= -0.39) {
      		tmp = t_0;
      	} else if (re <= 92000000000000.0) {
      		tmp = sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)));
      	} else if (re <= 5e+102) {
      		tmp = t_0;
      	} else {
      		tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_1))));
      	}
      	return tmp;
      }
      
      real(8) function code(re, im)
          real(8), intent (in) :: re
          real(8), intent (in) :: im
          real(8) :: t_0
          real(8) :: t_1
          real(8) :: tmp
          t_0 = exp(re) * im
          t_1 = 0.5d0 + (re * 0.16666666666666666d0)
          if (re <= (-0.39d0)) then
              tmp = t_0
          else if (re <= 92000000000000.0d0) then
              tmp = sin(im) * (((1.0d0 + (re * (re * re))) * (1.0d0 / ((re * re) + (1.0d0 - re)))) + (t_1 * (re * re)))
          else if (re <= 5d+102) then
              tmp = t_0
          else
              tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * t_1))))
          end if
          code = tmp
      end function
      
      public static double code(double re, double im) {
      	double t_0 = Math.exp(re) * im;
      	double t_1 = 0.5 + (re * 0.16666666666666666);
      	double tmp;
      	if (re <= -0.39) {
      		tmp = t_0;
      	} else if (re <= 92000000000000.0) {
      		tmp = Math.sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)));
      	} else if (re <= 5e+102) {
      		tmp = t_0;
      	} else {
      		tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * t_1))));
      	}
      	return tmp;
      }
      
      def code(re, im):
      	t_0 = math.exp(re) * im
      	t_1 = 0.5 + (re * 0.16666666666666666)
      	tmp = 0
      	if re <= -0.39:
      		tmp = t_0
      	elif re <= 92000000000000.0:
      		tmp = math.sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)))
      	elif re <= 5e+102:
      		tmp = t_0
      	else:
      		tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * t_1))))
      	return tmp
      
      function code(re, im)
      	t_0 = Float64(exp(re) * im)
      	t_1 = Float64(0.5 + Float64(re * 0.16666666666666666))
      	tmp = 0.0
      	if (re <= -0.39)
      		tmp = t_0;
      	elseif (re <= 92000000000000.0)
      		tmp = Float64(sin(im) * Float64(Float64(Float64(1.0 + Float64(re * Float64(re * re))) * Float64(1.0 / Float64(Float64(re * re) + Float64(1.0 - re)))) + Float64(t_1 * Float64(re * re))));
      	elseif (re <= 5e+102)
      		tmp = t_0;
      	else
      		tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * t_1)))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(re, im)
      	t_0 = exp(re) * im;
      	t_1 = 0.5 + (re * 0.16666666666666666);
      	tmp = 0.0;
      	if (re <= -0.39)
      		tmp = t_0;
      	elseif (re <= 92000000000000.0)
      		tmp = sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)));
      	elseif (re <= 5e+102)
      		tmp = t_0;
      	else
      		tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_1))));
      	end
      	tmp_2 = tmp;
      end
      
      code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.39], t$95$0, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(N[(1.0 + N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(re * re), $MachinePrecision] + N[(1.0 - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5e+102], t$95$0, N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := e^{re} \cdot im\\
      t_1 := 0.5 + re \cdot 0.16666666666666666\\
      \mathbf{if}\;re \leq -0.39:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;re \leq 92000000000000:\\
      \;\;\;\;\sin im \cdot \left(\left(1 + re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{re \cdot re + \left(1 - re\right)} + t\_1 \cdot \left(re \cdot re\right)\right)\\
      
      \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot t\_1\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if re < -0.39000000000000001 or 9.2e13 < re < 5e102

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

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

          if -0.39000000000000001 < re < 9.2e13

          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-*.f6498.1%

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

            \[\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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right)\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{\_.f64}\left(1, re\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(re, re\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
          9. Applied egg-rr98.1%

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

          if 5e102 < 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-*.f6497.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{sin.f64}\left(im\right)\right) \]
          5. Simplified97.8%

            \[\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 3 regimes into one program.
        6. Final simplification97.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.39:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\sin im \cdot \left(\left(1 + re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{re \cdot re + \left(1 - re\right)} + \left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right)\right)\\ \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\ \;\;\;\;e^{re} \cdot im\\ \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 5: 96.6% accurate, 1.6× speedup?

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

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

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

            if -0.028500000000000001 < re < 9.2e13

            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-*.f6498.1%

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

              \[\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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 5e102 < 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-*.f6497.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{sin.f64}\left(im\right)\right) \]
            5. Simplified97.8%

              \[\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 3 regimes into one program.
          6. Final simplification97.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.0285:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\sin im \cdot \left(\left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right) + \left(re + 1\right)\right)\\ \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\ \;\;\;\;e^{re} \cdot im\\ \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 6: 96.6% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ t_1 := \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.049:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (re im)
           :precision binary64
           (let* ((t_0 (* (exp re) im))
                  (t_1
                   (*
                    (sin im)
                    (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
             (if (<= re -0.049)
               t_0
               (if (<= re 92000000000000.0) t_1 (if (<= re 5e+102) t_0 t_1)))))
          double code(double re, double im) {
          	double t_0 = exp(re) * im;
          	double t_1 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
          	double tmp;
          	if (re <= -0.049) {
          		tmp = t_0;
          	} else if (re <= 92000000000000.0) {
          		tmp = t_1;
          	} else if (re <= 5e+102) {
          		tmp = t_0;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          real(8) function code(re, im)
              real(8), intent (in) :: re
              real(8), intent (in) :: im
              real(8) :: t_0
              real(8) :: t_1
              real(8) :: tmp
              t_0 = exp(re) * im
              t_1 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
              if (re <= (-0.049d0)) then
                  tmp = t_0
              else if (re <= 92000000000000.0d0) then
                  tmp = t_1
              else if (re <= 5d+102) then
                  tmp = t_0
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double re, double im) {
          	double t_0 = Math.exp(re) * im;
          	double t_1 = Math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
          	double tmp;
          	if (re <= -0.049) {
          		tmp = t_0;
          	} else if (re <= 92000000000000.0) {
          		tmp = t_1;
          	} else if (re <= 5e+102) {
          		tmp = t_0;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(re, im):
          	t_0 = math.exp(re) * im
          	t_1 = math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
          	tmp = 0
          	if re <= -0.049:
          		tmp = t_0
          	elif re <= 92000000000000.0:
          		tmp = t_1
          	elif re <= 5e+102:
          		tmp = t_0
          	else:
          		tmp = t_1
          	return tmp
          
          function code(re, im)
          	t_0 = Float64(exp(re) * im)
          	t_1 = 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.049)
          		tmp = t_0;
          	elseif (re <= 92000000000000.0)
          		tmp = t_1;
          	elseif (re <= 5e+102)
          		tmp = t_0;
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(re, im)
          	t_0 = exp(re) * im;
          	t_1 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
          	tmp = 0.0;
          	if (re <= -0.049)
          		tmp = t_0;
          	elseif (re <= 92000000000000.0)
          		tmp = t_1;
          	elseif (re <= 5e+102)
          		tmp = t_0;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = 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.049], t$95$0, If[LessEqual[re, 92000000000000.0], t$95$1, If[LessEqual[re, 5e+102], t$95$0, t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := e^{re} \cdot im\\
          t_1 := \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.049:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;re \leq 92000000000000:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < -0.049000000000000002 or 9.2e13 < re < 5e102

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

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

              if -0.049000000000000002 < re < 9.2e13 or 5e102 < 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-*.f6498.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. Simplified98.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 2 regimes into one program.
            6. Final simplification97.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.049:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\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 5 \cdot 10^{+102}:\\ \;\;\;\;e^{re} \cdot im\\ \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 7: 95.6% accurate, 1.6× speedup?

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

              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. Simplified93.8%

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

                if -0.0140000000000000003 < re < 9.2e13

                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-*.f6497.8%

                    \[\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. Simplified97.8%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(im\right), \mathsf{/.f64}\left(1, \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \frac{1}{2}\right)\right)}\right)\right) \]
                7. Applied egg-rr97.8%

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

                if 1.8999999999999999e154 < re

                1. Initial program 100.0%

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

                  \[\leadsto \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-*.f64100.0%

                    \[\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. Simplified100.0%

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

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

              Alternative 8: 95.6% accurate, 1.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ t_1 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \mathbf{if}\;re \leq -0.036:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (re im)
               :precision binary64
               (let* ((t_0 (* (exp re) im))
                      (t_1 (* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
                 (if (<= re -0.036)
                   t_0
                   (if (<= re 92000000000000.0) t_1 (if (<= re 1.9e+154) t_0 t_1)))))
              double code(double re, double im) {
              	double t_0 = exp(re) * im;
              	double t_1 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
              	double tmp;
              	if (re <= -0.036) {
              		tmp = t_0;
              	} else if (re <= 92000000000000.0) {
              		tmp = t_1;
              	} else if (re <= 1.9e+154) {
              		tmp = t_0;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(re, im)
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im
                  real(8) :: t_0
                  real(8) :: t_1
                  real(8) :: tmp
                  t_0 = exp(re) * im
                  t_1 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
                  if (re <= (-0.036d0)) then
                      tmp = t_0
                  else if (re <= 92000000000000.0d0) then
                      tmp = t_1
                  else if (re <= 1.9d+154) then
                      tmp = t_0
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double re, double im) {
              	double t_0 = Math.exp(re) * im;
              	double t_1 = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
              	double tmp;
              	if (re <= -0.036) {
              		tmp = t_0;
              	} else if (re <= 92000000000000.0) {
              		tmp = t_1;
              	} else if (re <= 1.9e+154) {
              		tmp = t_0;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(re, im):
              	t_0 = math.exp(re) * im
              	t_1 = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))))
              	tmp = 0
              	if re <= -0.036:
              		tmp = t_0
              	elif re <= 92000000000000.0:
              		tmp = t_1
              	elif re <= 1.9e+154:
              		tmp = t_0
              	else:
              		tmp = t_1
              	return tmp
              
              function code(re, im)
              	t_0 = Float64(exp(re) * im)
              	t_1 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))))
              	tmp = 0.0
              	if (re <= -0.036)
              		tmp = t_0;
              	elseif (re <= 92000000000000.0)
              		tmp = t_1;
              	elseif (re <= 1.9e+154)
              		tmp = t_0;
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(re, im)
              	t_0 = exp(re) * im;
              	t_1 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
              	tmp = 0.0;
              	if (re <= -0.036)
              		tmp = t_0;
              	elseif (re <= 92000000000000.0)
              		tmp = t_1;
              	elseif (re <= 1.9e+154)
              		tmp = t_0;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = 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.036], t$95$0, If[LessEqual[re, 92000000000000.0], t$95$1, If[LessEqual[re, 1.9e+154], t$95$0, t$95$1]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := e^{re} \cdot im\\
              t_1 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
              \mathbf{if}\;re \leq -0.036:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;re \leq 92000000000000:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if re < -0.0359999999999999973 or 9.2e13 < re < 1.8999999999999999e154

                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. Simplified93.8%

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

                  if -0.0359999999999999973 < re < 9.2e13 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-*.f6498.2%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.036:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\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 im\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \end{array} \]
                7. Add Preprocessing

                Alternative 9: 92.5% accurate, 1.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.029:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\frac{\sin im}{\frac{1}{re + 1}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (re im)
                 :precision binary64
                 (let* ((t_0 (* (exp re) im)))
                   (if (<= re -0.029)
                     t_0
                     (if (<= re 92000000000000.0) (/ (sin im) (/ 1.0 (+ re 1.0))) t_0))))
                double code(double re, double im) {
                	double t_0 = exp(re) * im;
                	double tmp;
                	if (re <= -0.029) {
                		tmp = t_0;
                	} else if (re <= 92000000000000.0) {
                		tmp = sin(im) / (1.0 / (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.029d0)) then
                        tmp = t_0
                    else if (re <= 92000000000000.0d0) then
                        tmp = sin(im) / (1.0d0 / (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.029) {
                		tmp = t_0;
                	} else if (re <= 92000000000000.0) {
                		tmp = Math.sin(im) / (1.0 / (re + 1.0));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(re, im):
                	t_0 = math.exp(re) * im
                	tmp = 0
                	if re <= -0.029:
                		tmp = t_0
                	elif re <= 92000000000000.0:
                		tmp = math.sin(im) / (1.0 / (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.029)
                		tmp = t_0;
                	elseif (re <= 92000000000000.0)
                		tmp = Float64(sin(im) / Float64(1.0 / 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.029)
                		tmp = t_0;
                	elseif (re <= 92000000000000.0)
                		tmp = sin(im) / (1.0 / (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.029], t$95$0, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] / N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := e^{re} \cdot im\\
                \mathbf{if}\;re \leq -0.029:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;re \leq 92000000000000:\\
                \;\;\;\;\frac{\sin im}{\frac{1}{re + 1}}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if re < -0.0290000000000000015 or 9.2e13 < 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.2%

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

                    if -0.0290000000000000015 < re < 9.2e13

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

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

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

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

                        \[\leadsto \sin im \cdot \frac{re \cdot re - 1 \cdot 1}{\color{blue}{re - 1}} \]
                      3. clear-numN/A

                        \[\leadsto \sin im \cdot \frac{1}{\color{blue}{\frac{re - 1}{re \cdot re - 1 \cdot 1}}} \]
                      4. un-div-invN/A

                        \[\leadsto \frac{\sin im}{\color{blue}{\frac{re - 1}{re \cdot re - 1 \cdot 1}}} \]
                      5. /-lowering-/.f64N/A

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(im\right), \left(\frac{\color{blue}{re - 1}}{re \cdot re - 1 \cdot 1}\right)\right) \]
                      7. clear-numN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(im\right), \left(\frac{1}{\color{blue}{\frac{re \cdot re - 1 \cdot 1}{re - 1}}}\right)\right) \]
                      8. flip-+N/A

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

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(im\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(re, \color{blue}{1}\right)\right)\right) \]
                    7. Applied egg-rr97.6%

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

                  Alternative 10: 92.5% accurate, 1.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.066:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 92000000000000:\\ \;\;\;\;\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.066)
                       t_0
                       (if (<= re 92000000000000.0) (* (sin im) (+ re 1.0)) t_0))))
                  double code(double re, double im) {
                  	double t_0 = exp(re) * im;
                  	double tmp;
                  	if (re <= -0.066) {
                  		tmp = t_0;
                  	} else if (re <= 92000000000000.0) {
                  		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.066d0)) then
                          tmp = t_0
                      else if (re <= 92000000000000.0d0) 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.066) {
                  		tmp = t_0;
                  	} else if (re <= 92000000000000.0) {
                  		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.066:
                  		tmp = t_0
                  	elif re <= 92000000000000.0:
                  		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.066)
                  		tmp = t_0;
                  	elseif (re <= 92000000000000.0)
                  		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.066)
                  		tmp = t_0;
                  	elseif (re <= 92000000000000.0)
                  		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.066], t$95$0, If[LessEqual[re, 92000000000000.0], 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.066:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;re \leq 92000000000000:\\
                  \;\;\;\;\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.066000000000000003 or 9.2e13 < 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.2%

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

                      if -0.066000000000000003 < re < 9.2e13

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

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

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

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

                    Alternative 11: 92.8% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \cdot im\\ \mathbf{if}\;re \leq -0.013:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                    (FPCore (re im)
                     :precision binary64
                     (let* ((t_0 (* (exp re) im)))
                       (if (<= re -0.013) t_0 (if (<= re 5.8e-22) (sin im) t_0))))
                    double code(double re, double im) {
                    	double t_0 = exp(re) * im;
                    	double tmp;
                    	if (re <= -0.013) {
                    		tmp = t_0;
                    	} else if (re <= 5.8e-22) {
                    		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.013d0)) then
                            tmp = t_0
                        else if (re <= 5.8d-22) 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.013) {
                    		tmp = t_0;
                    	} else if (re <= 5.8e-22) {
                    		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.013:
                    		tmp = t_0
                    	elif re <= 5.8e-22:
                    		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.013)
                    		tmp = t_0;
                    	elseif (re <= 5.8e-22)
                    		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.013)
                    		tmp = t_0;
                    	elseif (re <= 5.8e-22)
                    		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.013], t$95$0, If[LessEqual[re, 5.8e-22], N[Sin[im], $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := e^{re} \cdot im\\
                    \mathbf{if}\;re \leq -0.013:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\
                    \;\;\;\;\sin im\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if re < -0.0129999999999999994 or 5.8000000000000003e-22 < 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. Simplified89.3%

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

                        if -0.0129999999999999994 < re < 5.8000000000000003e-22

                        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 12: 73.8% accurate, 1.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := re \cdot \left(re \cdot \left(re \cdot re\right)\right)\\ \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot t\_0}{t\_0 + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\ \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
                       (let* ((t_0 (* re (* re (* re re)))))
                         (if (<= re -17000000000000.0)
                           (* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
                           (if (<= re 5.8e-22)
                             (sin im)
                             (if (<= re 1.16e+77)
                               (/
                                (*
                                 (/ (+ -1.0 (* (* re re) t_0)) (+ t_0 (+ 1.0 (* re re))))
                                 (* im (+ 1.0 (* im (* im -0.16666666666666666)))))
                                (+ re -1.0))
                               (*
                                im
                                (+
                                 1.0
                                 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))))
                      double code(double re, double im) {
                      	double t_0 = re * (re * (re * re));
                      	double tmp;
                      	if (re <= -17000000000000.0) {
                      		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                      	} else if (re <= 5.8e-22) {
                      		tmp = sin(im);
                      	} else if (re <= 1.16e+77) {
                      		tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
                      	} 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) :: t_0
                          real(8) :: tmp
                          t_0 = re * (re * (re * re))
                          if (re <= (-17000000000000.0d0)) then
                              tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
                          else if (re <= 5.8d-22) then
                              tmp = sin(im)
                          else if (re <= 1.16d+77) then
                              tmp = ((((-1.0d0) + ((re * re) * t_0)) / (t_0 + (1.0d0 + (re * re)))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))) / (re + (-1.0d0))
                          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 t_0 = re * (re * (re * re));
                      	double tmp;
                      	if (re <= -17000000000000.0) {
                      		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                      	} else if (re <= 5.8e-22) {
                      		tmp = Math.sin(im);
                      	} else if (re <= 1.16e+77) {
                      		tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
                      	} else {
                      		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                      	}
                      	return tmp;
                      }
                      
                      def code(re, im):
                      	t_0 = re * (re * (re * re))
                      	tmp = 0
                      	if re <= -17000000000000.0:
                      		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))))
                      	elif re <= 5.8e-22:
                      		tmp = math.sin(im)
                      	elif re <= 1.16e+77:
                      		tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0)
                      	else:
                      		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
                      	return tmp
                      
                      function code(re, im)
                      	t_0 = Float64(re * Float64(re * Float64(re * re)))
                      	tmp = 0.0
                      	if (re <= -17000000000000.0)
                      		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im)))));
                      	elseif (re <= 5.8e-22)
                      		tmp = sin(im);
                      	elseif (re <= 1.16e+77)
                      		tmp = Float64(Float64(Float64(Float64(-1.0 + Float64(Float64(re * re) * t_0)) / Float64(t_0 + Float64(1.0 + Float64(re * re)))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))) / Float64(re + -1.0));
                      	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)
                      	t_0 = re * (re * (re * re));
                      	tmp = 0.0;
                      	if (re <= -17000000000000.0)
                      		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                      	elseif (re <= 5.8e-22)
                      		tmp = sin(im);
                      	elseif (re <= 1.16e+77)
                      		tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
                      	else
                      		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[re_, im_] := Block[{t$95$0 = N[(re * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5.8e-22], N[Sin[im], $MachinePrecision], If[LessEqual[re, 1.16e+77], N[(N[(N[(N[(-1.0 + N[(N[(re * re), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 + N[(1.0 + N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(re + -1.0), $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}
                      t_0 := re \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
                      \mathbf{if}\;re \leq -17000000000000:\\
                      \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
                      
                      \mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\
                      \;\;\;\;\sin im\\
                      
                      \mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\
                      \;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot t\_0}{t\_0 + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\
                      
                      \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 4 regimes
                      2. if re < -1.7e13

                        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-+.f642.7%

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

                          \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                        7. Step-by-step derivation
                          1. *-lowering-*.f64N/A

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                          15. *-lowering-*.f642.3%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                        8. Simplified2.3%

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          5. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          7. unpow2N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          8. *-lowering-*.f6439.2%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                        11. Simplified39.2%

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

                        if -1.7e13 < re < 5.8000000000000003e-22

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

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

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

                        if 5.8000000000000003e-22 < re < 1.1600000000000001e77

                        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.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \left(re - 1\right)\right) \]
                          17. sub-negN/A

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
                          19. metadata-eval43.1%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                        10. Applied egg-rr43.1%

                          \[\leadsto \color{blue}{\frac{\left(re \cdot re + -1\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}} \]
                        11. Step-by-step derivation
                          1. metadata-evalN/A

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

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{{\left(re \cdot re\right)}^{3} - {1}^{3}}{\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)}\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                          4. cube-multN/A

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

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{{\left(re \cdot re\right)}^{3} + -1}{\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)}\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                          10. metadata-evalN/A

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(re \cdot re\right)}^{3} + {-1}^{3}\right), \left(\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                        12. Applied egg-rr63.7%

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

                        if 1.1600000000000001e77 < 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.8%

                            \[\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)\right), im\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), im\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), im\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), im\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), im\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), im\right) \]
                            7. *-lowering-*.f6479.7%

                              \[\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), im\right) \]
                          4. Simplified79.7%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)}{re \cdot \left(re \cdot \left(re \cdot re\right)\right) + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\ \mathbf{else}:\\ \;\;\;\;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 13: 50.6% accurate, 4.0× speedup?

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

                          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-+.f642.7%

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

                            \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                          7. Step-by-step derivation
                            1. *-lowering-*.f64N/A

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                            15. *-lowering-*.f642.3%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                          8. Simplified2.3%

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            5. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            7. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            8. *-lowering-*.f6439.2%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                          11. Simplified39.2%

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

                          if -1.7e13 < re < 1.1600000000000001e77

                          1. Initial program 100.0%

                            \[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-*.f6451.0%

                              \[\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. Simplified51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \left(re - 1\right)\right) \]
                            17. sub-negN/A

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
                            19. metadata-eval44.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(re, re\right), -1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                          10. Applied egg-rr44.4%

                            \[\leadsto \color{blue}{\frac{\left(re \cdot re + -1\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}} \]
                          11. Step-by-step derivation
                            1. metadata-evalN/A

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

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{{\left(re \cdot re\right)}^{3} - {1}^{3}}{\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)}\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                            4. cube-multN/A

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{{\left(re \cdot re\right)}^{3} + -1}{\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)}\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                            10. metadata-evalN/A

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(re \cdot re\right)}^{3} + {-1}^{3}\right), \left(\left(re \cdot re\right) \cdot \left(re \cdot re\right) + \left(1 \cdot 1 + \left(re \cdot re\right) \cdot 1\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(re, -1\right)\right) \]
                          12. Applied egg-rr47.0%

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

                          if 1.1600000000000001e77 < 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.8%

                              \[\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)\right), im\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), im\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), im\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), im\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), im\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), im\right) \]
                              7. *-lowering-*.f6479.7%

                                \[\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), im\right) \]
                            4. Simplified79.7%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot \left(re \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)}{re \cdot \left(re \cdot \left(re \cdot re\right)\right) + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\ \mathbf{else}:\\ \;\;\;\;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 14: 50.1% accurate, 6.0× speedup?

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

                            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-+.f642.7%

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

                              \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                            7. Step-by-step derivation
                              1. *-lowering-*.f64N/A

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                              15. *-lowering-*.f642.3%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                            8. Simplified2.3%

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              7. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              8. *-lowering-*.f6437.0%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            11. Simplified37.0%

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

                            if -8500 < 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-*.f6488.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. Simplified88.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 \]
                            6. Step-by-step derivation
                              1. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(1, re\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(re, re\right)\right)\right), \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)\right) \]
                              3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 15: 49.6% accurate, 7.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 2.7 \cdot 10^{+82}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 -17000000000000.0)
                             (* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
                             (if (<= re 2.7e+82)
                               (*
                                (+ 1.0 (* re (+ 1.0 (* re 0.5))))
                                (* im (+ 1.0 (* (* im im) -0.16666666666666666))))
                               (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))
                          double code(double re, double im) {
                          	double tmp;
                          	if (re <= -17000000000000.0) {
                          		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                          	} else if (re <= 2.7e+82) {
                          		tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                          	} 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 <= (-17000000000000.0d0)) then
                                  tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
                              else if (re <= 2.7d+82) then
                                  tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((im * im) * (-0.16666666666666666d0))))
                              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 <= -17000000000000.0) {
                          		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                          	} else if (re <= 2.7e+82) {
                          		tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                          	} else {
                          		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                          	}
                          	return tmp;
                          }
                          
                          def code(re, im):
                          	tmp = 0
                          	if re <= -17000000000000.0:
                          		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))))
                          	elif re <= 2.7e+82:
                          		tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)))
                          	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 <= -17000000000000.0)
                          		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im)))));
                          	elseif (re <= 2.7e+82)
                          		tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666))));
                          	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 <= -17000000000000.0)
                          		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                          	elseif (re <= 2.7e+82)
                          		tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                          	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, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.7e+82], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $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 -17000000000000:\\
                          \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
                          
                          \mathbf{elif}\;re \leq 2.7 \cdot 10^{+82}:\\
                          \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 3 regimes
                          2. if re < -1.7e13

                            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-+.f642.7%

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

                              \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                            7. Step-by-step derivation
                              1. *-lowering-*.f64N/A

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                              15. *-lowering-*.f642.3%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                            8. Simplified2.3%

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              7. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              8. *-lowering-*.f6439.2%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                            11. Simplified39.2%

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

                            if -1.7e13 < re < 2.6999999999999999e82

                            1. Initial program 100.0%

                              \[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-*.f6451.0%

                                \[\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. Simplified51.0%

                              \[\leadsto \color{blue}{e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)} \]
                            6. 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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                            7. 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{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                              5. *-lowering-*.f6444.5%

                                \[\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                            8. Simplified44.5%

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

                            if 2.6999999999999999e82 < 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.8%

                                \[\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)\right), im\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), im\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), im\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), im\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), im\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), im\right) \]
                                7. *-lowering-*.f6479.7%

                                  \[\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), im\right) \]
                              4. Simplified79.7%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 2.7 \cdot 10^{+82}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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} \]
                            7. Add Preprocessing

                            Alternative 16: 49.4% accurate, 7.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\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 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\ \end{array} \end{array} \]
                            (FPCore (re im)
                             :precision binary64
                             (if (<= re -17000000000000.0)
                               (* (+ re 1.0) (* 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 <= -17000000000000.0) {
                            		tmp = (re + 1.0) * (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 <= (-17000000000000.0d0)) then
                                    tmp = (re + 1.0d0) * (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 <= -17000000000000.0) {
                            		tmp = (re + 1.0) * (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 <= -17000000000000.0:
                            		tmp = (re + 1.0) * (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 <= -17000000000000.0)
                            		tmp = Float64(Float64(re + 1.0) * 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(Float64(im * im) * -0.16666666666666666))));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(re, im)
                            	tmp = 0.0;
                            	if (re <= -17000000000000.0)
                            		tmp = (re + 1.0) * (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, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $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[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;re \leq -17000000000000:\\
                            \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\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 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if re < -1.7e13

                              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-+.f642.7%

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

                                \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                              7. Step-by-step derivation
                                1. *-lowering-*.f64N/A

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                                15. *-lowering-*.f642.3%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                              8. Simplified2.3%

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                5. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                7. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                8. *-lowering-*.f6439.2%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              11. Simplified39.2%

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

                              if -1.7e13 < re

                              1. Initial program 100.0%

                                \[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-*.f6455.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. Simplified55.9%

                                \[\leadsto \color{blue}{e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)} \]
                              6. 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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                              7. 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{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\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{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                                7. *-lowering-*.f6450.4%

                                  \[\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(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                              8. Simplified50.4%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\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 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 17: 49.4% accurate, 8.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.3 \cdot 10^{+77}:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 -17000000000000.0)
                               (* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
                               (if (<= re 1.3e+77)
                                 (* (+ re 1.0) (* im (+ 1.0 (* (* im im) -0.16666666666666666))))
                                 (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))
                            double code(double re, double im) {
                            	double tmp;
                            	if (re <= -17000000000000.0) {
                            		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                            	} else if (re <= 1.3e+77) {
                            		tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                            	} 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 <= (-17000000000000.0d0)) then
                                    tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
                                else if (re <= 1.3d+77) then
                                    tmp = (re + 1.0d0) * (im * (1.0d0 + ((im * im) * (-0.16666666666666666d0))))
                                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 <= -17000000000000.0) {
                            		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                            	} else if (re <= 1.3e+77) {
                            		tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                            	} else {
                            		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                            	}
                            	return tmp;
                            }
                            
                            def code(re, im):
                            	tmp = 0
                            	if re <= -17000000000000.0:
                            		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))))
                            	elif re <= 1.3e+77:
                            		tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)))
                            	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 <= -17000000000000.0)
                            		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im)))));
                            	elseif (re <= 1.3e+77)
                            		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666))));
                            	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 <= -17000000000000.0)
                            		tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
                            	elseif (re <= 1.3e+77)
                            		tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
                            	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, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.3e+77], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $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 -17000000000000:\\
                            \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
                            
                            \mathbf{elif}\;re \leq 1.3 \cdot 10^{+77}:\\
                            \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 3 regimes
                            2. if re < -1.7e13

                              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-+.f642.7%

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

                                \[\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}{\left(im \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{120} \cdot {im}^{2} - \frac{1}{6}\right)\right)\right)}\right) \]
                              7. Step-by-step derivation
                                1. *-lowering-*.f64N/A

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                3. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{1}{120}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                                15. *-lowering-*.f642.3%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \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)\right)\right) \]
                              8. Simplified2.3%

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                5. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                7. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                                8. *-lowering-*.f6439.2%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \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)\right) \]
                              11. Simplified39.2%

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

                              if -1.7e13 < re < 1.3000000000000001e77

                              1. Initial program 100.0%

                                \[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-*.f6451.0%

                                  \[\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. Simplified51.0%

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

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

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

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

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

                              if 1.3000000000000001e77 < 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.8%

                                  \[\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)\right), im\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), im\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), im\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), im\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), im\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), im\right) \]
                                  7. *-lowering-*.f6479.7%

                                    \[\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), im\right) \]
                                4. Simplified79.7%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.3 \cdot 10^{+77}:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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} \]
                              7. Add Preprocessing

                              Alternative 18: 47.8% accurate, 8.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\ \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+73}:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\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
                               (let* ((t_0 (* (* im im) -0.16666666666666666)))
                                 (if (<= re -17000000000000.0)
                                   (* (+ re 1.0) (* im t_0))
                                   (if (<= re 1.65e+73)
                                     (* (+ re 1.0) (* im (+ 1.0 t_0)))
                                     (*
                                      im
                                      (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))))
                              double code(double re, double im) {
                              	double t_0 = (im * im) * -0.16666666666666666;
                              	double tmp;
                              	if (re <= -17000000000000.0) {
                              		tmp = (re + 1.0) * (im * t_0);
                              	} else if (re <= 1.65e+73) {
                              		tmp = (re + 1.0) * (im * (1.0 + t_0));
                              	} 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) :: t_0
                                  real(8) :: tmp
                                  t_0 = (im * im) * (-0.16666666666666666d0)
                                  if (re <= (-17000000000000.0d0)) then
                                      tmp = (re + 1.0d0) * (im * t_0)
                                  else if (re <= 1.65d+73) then
                                      tmp = (re + 1.0d0) * (im * (1.0d0 + t_0))
                                  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 t_0 = (im * im) * -0.16666666666666666;
                              	double tmp;
                              	if (re <= -17000000000000.0) {
                              		tmp = (re + 1.0) * (im * t_0);
                              	} else if (re <= 1.65e+73) {
                              		tmp = (re + 1.0) * (im * (1.0 + t_0));
                              	} else {
                              		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                              	}
                              	return tmp;
                              }
                              
                              def code(re, im):
                              	t_0 = (im * im) * -0.16666666666666666
                              	tmp = 0
                              	if re <= -17000000000000.0:
                              		tmp = (re + 1.0) * (im * t_0)
                              	elif re <= 1.65e+73:
                              		tmp = (re + 1.0) * (im * (1.0 + t_0))
                              	else:
                              		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
                              	return tmp
                              
                              function code(re, im)
                              	t_0 = Float64(Float64(im * im) * -0.16666666666666666)
                              	tmp = 0.0
                              	if (re <= -17000000000000.0)
                              		tmp = Float64(Float64(re + 1.0) * Float64(im * t_0));
                              	elseif (re <= 1.65e+73)
                              		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + t_0)));
                              	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)
                              	t_0 = (im * im) * -0.16666666666666666;
                              	tmp = 0.0;
                              	if (re <= -17000000000000.0)
                              		tmp = (re + 1.0) * (im * t_0);
                              	elseif (re <= 1.65e+73)
                              		tmp = (re + 1.0) * (im * (1.0 + t_0));
                              	else
                              		tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.65e+73], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $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}
                              t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
                              \mathbf{if}\;re \leq -17000000000000:\\
                              \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
                              
                              \mathbf{elif}\;re \leq 1.65 \cdot 10^{+73}:\\
                              \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\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 3 regimes
                              2. if re < -1.7e13

                                1. Initial program 100.0%

                                  \[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-*.f6476.2%

                                    \[\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. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -1.7e13 < re < 1.65000000000000015e73

                                1. Initial program 100.0%

                                  \[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-*.f6451.0%

                                    \[\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. Simplified51.0%

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

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

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

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

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

                                if 1.65000000000000015e73 < 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.8%

                                    \[\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)\right), im\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), im\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), im\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), im\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), im\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), im\right) \]
                                    7. *-lowering-*.f6479.7%

                                      \[\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), im\right) \]
                                  4. Simplified79.7%

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+73}:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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} \]
                                7. Add Preprocessing

                                Alternative 19: 45.4% accurate, 8.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\ \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\ \mathbf{elif}\;re \leq 1.8 \cdot 10^{+76}:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\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
                                 (let* ((t_0 (* (* im im) -0.16666666666666666)))
                                   (if (<= re -17000000000000.0)
                                     (* (+ re 1.0) (* im t_0))
                                     (if (<= re 1.8e+76)
                                       (* (+ re 1.0) (* im (+ 1.0 t_0)))
                                       (* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))))
                                double code(double re, double im) {
                                	double t_0 = (im * im) * -0.16666666666666666;
                                	double tmp;
                                	if (re <= -17000000000000.0) {
                                		tmp = (re + 1.0) * (im * t_0);
                                	} else if (re <= 1.8e+76) {
                                		tmp = (re + 1.0) * (im * (1.0 + t_0));
                                	} 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) :: t_0
                                    real(8) :: tmp
                                    t_0 = (im * im) * (-0.16666666666666666d0)
                                    if (re <= (-17000000000000.0d0)) then
                                        tmp = (re + 1.0d0) * (im * t_0)
                                    else if (re <= 1.8d+76) then
                                        tmp = (re + 1.0d0) * (im * (1.0d0 + t_0))
                                    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 t_0 = (im * im) * -0.16666666666666666;
                                	double tmp;
                                	if (re <= -17000000000000.0) {
                                		tmp = (re + 1.0) * (im * t_0);
                                	} else if (re <= 1.8e+76) {
                                		tmp = (re + 1.0) * (im * (1.0 + t_0));
                                	} else {
                                		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                	}
                                	return tmp;
                                }
                                
                                def code(re, im):
                                	t_0 = (im * im) * -0.16666666666666666
                                	tmp = 0
                                	if re <= -17000000000000.0:
                                		tmp = (re + 1.0) * (im * t_0)
                                	elif re <= 1.8e+76:
                                		tmp = (re + 1.0) * (im * (1.0 + t_0))
                                	else:
                                		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))))
                                	return tmp
                                
                                function code(re, im)
                                	t_0 = Float64(Float64(im * im) * -0.16666666666666666)
                                	tmp = 0.0
                                	if (re <= -17000000000000.0)
                                		tmp = Float64(Float64(re + 1.0) * Float64(im * t_0));
                                	elseif (re <= 1.8e+76)
                                		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + t_0)));
                                	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)
                                	t_0 = (im * im) * -0.16666666666666666;
                                	tmp = 0.0;
                                	if (re <= -17000000000000.0)
                                		tmp = (re + 1.0) * (im * t_0);
                                	elseif (re <= 1.8e+76)
                                		tmp = (re + 1.0) * (im * (1.0 + t_0));
                                	else
                                		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.8e+76], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $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}
                                t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
                                \mathbf{if}\;re \leq -17000000000000:\\
                                \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
                                
                                \mathbf{elif}\;re \leq 1.8 \cdot 10^{+76}:\\
                                \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\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 3 regimes
                                2. if re < -1.7e13

                                  1. Initial program 100.0%

                                    \[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-*.f6476.2%

                                      \[\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. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -1.7e13 < re < 1.8000000000000001e76

                                  1. Initial program 100.0%

                                    \[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-*.f6451.0%

                                      \[\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. Simplified51.0%

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

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

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

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

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

                                  if 1.8000000000000001e76 < 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.8%

                                      \[\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-*.f6462.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. Simplified62.4%

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

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

                                  Alternative 20: 45.1% accurate, 9.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\ \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\ \mathbf{elif}\;re \leq 3.8 \cdot 10^{+77}:\\ \;\;\;\;im \cdot \left(1 + t\_0\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
                                   (let* ((t_0 (* (* im im) -0.16666666666666666)))
                                     (if (<= re -17000000000000.0)
                                       (* (+ re 1.0) (* im t_0))
                                       (if (<= re 3.8e+77)
                                         (* im (+ 1.0 t_0))
                                         (* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))))
                                  double code(double re, double im) {
                                  	double t_0 = (im * im) * -0.16666666666666666;
                                  	double tmp;
                                  	if (re <= -17000000000000.0) {
                                  		tmp = (re + 1.0) * (im * t_0);
                                  	} else if (re <= 3.8e+77) {
                                  		tmp = im * (1.0 + t_0);
                                  	} 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) :: t_0
                                      real(8) :: tmp
                                      t_0 = (im * im) * (-0.16666666666666666d0)
                                      if (re <= (-17000000000000.0d0)) then
                                          tmp = (re + 1.0d0) * (im * t_0)
                                      else if (re <= 3.8d+77) then
                                          tmp = im * (1.0d0 + t_0)
                                      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 t_0 = (im * im) * -0.16666666666666666;
                                  	double tmp;
                                  	if (re <= -17000000000000.0) {
                                  		tmp = (re + 1.0) * (im * t_0);
                                  	} else if (re <= 3.8e+77) {
                                  		tmp = im * (1.0 + t_0);
                                  	} else {
                                  		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(re, im):
                                  	t_0 = (im * im) * -0.16666666666666666
                                  	tmp = 0
                                  	if re <= -17000000000000.0:
                                  		tmp = (re + 1.0) * (im * t_0)
                                  	elif re <= 3.8e+77:
                                  		tmp = im * (1.0 + t_0)
                                  	else:
                                  		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))))
                                  	return tmp
                                  
                                  function code(re, im)
                                  	t_0 = Float64(Float64(im * im) * -0.16666666666666666)
                                  	tmp = 0.0
                                  	if (re <= -17000000000000.0)
                                  		tmp = Float64(Float64(re + 1.0) * Float64(im * t_0));
                                  	elseif (re <= 3.8e+77)
                                  		tmp = Float64(im * Float64(1.0 + t_0));
                                  	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)
                                  	t_0 = (im * im) * -0.16666666666666666;
                                  	tmp = 0.0;
                                  	if (re <= -17000000000000.0)
                                  		tmp = (re + 1.0) * (im * t_0);
                                  	elseif (re <= 3.8e+77)
                                  		tmp = im * (1.0 + t_0);
                                  	else
                                  		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 3.8e+77], N[(im * N[(1.0 + t$95$0), $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}
                                  t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
                                  \mathbf{if}\;re \leq -17000000000000:\\
                                  \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
                                  
                                  \mathbf{elif}\;re \leq 3.8 \cdot 10^{+77}:\\
                                  \;\;\;\;im \cdot \left(1 + t\_0\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 3 regimes
                                  2. if re < -1.7e13

                                    1. Initial program 100.0%

                                      \[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-*.f6476.2%

                                        \[\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. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -1.7e13 < re < 3.8000000000000001e77

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

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

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

                                      \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                    7. Step-by-step derivation
                                      1. *-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-*.f6444.0%

                                        \[\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) \]
                                    8. Simplified44.0%

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

                                    if 3.8000000000000001e77 < 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.8%

                                        \[\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-*.f6462.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. Simplified62.4%

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

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

                                    Alternative 21: 43.8% accurate, 9.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;re \leq 6 \cdot 10^{+77}:\\ \;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 -17000000000000.0)
                                       (* (* im im) (* im (+ -0.16666666666666666 (* re -0.16666666666666666))))
                                       (if (<= re 6e+77)
                                         (* im (+ 1.0 (* (* im im) -0.16666666666666666)))
                                         (* im (+ 1.0 (* re (+ 1.0 (* re 0.5))))))))
                                    double code(double re, double im) {
                                    	double tmp;
                                    	if (re <= -17000000000000.0) {
                                    		tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
                                    	} else if (re <= 6e+77) {
                                    		tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
                                    	} 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 <= (-17000000000000.0d0)) then
                                            tmp = (im * im) * (im * ((-0.16666666666666666d0) + (re * (-0.16666666666666666d0))))
                                        else if (re <= 6d+77) then
                                            tmp = im * (1.0d0 + ((im * im) * (-0.16666666666666666d0)))
                                        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 <= -17000000000000.0) {
                                    		tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
                                    	} else if (re <= 6e+77) {
                                    		tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
                                    	} else {
                                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(re, im):
                                    	tmp = 0
                                    	if re <= -17000000000000.0:
                                    		tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)))
                                    	elif re <= 6e+77:
                                    		tmp = im * (1.0 + ((im * im) * -0.16666666666666666))
                                    	else:
                                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))))
                                    	return tmp
                                    
                                    function code(re, im)
                                    	tmp = 0.0
                                    	if (re <= -17000000000000.0)
                                    		tmp = Float64(Float64(im * im) * Float64(im * Float64(-0.16666666666666666 + Float64(re * -0.16666666666666666))));
                                    	elseif (re <= 6e+77)
                                    		tmp = Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666)));
                                    	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 <= -17000000000000.0)
                                    		tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
                                    	elseif (re <= 6e+77)
                                    		tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
                                    	else
                                    		tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[re_, im_] := If[LessEqual[re, -17000000000000.0], N[(N[(im * im), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 6e+77], N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $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 -17000000000000:\\
                                    \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\\
                                    
                                    \mathbf{elif}\;re \leq 6 \cdot 10^{+77}:\\
                                    \;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\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 3 regimes
                                    2. if re < -1.7e13

                                      1. Initial program 100.0%

                                        \[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-*.f6476.2%

                                          \[\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. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(1 + re\right)\right)}\right)\right) \]
                                        11. distribute-rgt-inN/A

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

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

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

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

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

                                      if -1.7e13 < re < 5.9999999999999996e77

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

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

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

                                        \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                      7. Step-by-step derivation
                                        1. *-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-*.f6444.0%

                                          \[\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) \]
                                      8. Simplified44.0%

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

                                      if 5.9999999999999996e77 < 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.8%

                                          \[\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-*.f6462.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. Simplified62.4%

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

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

                                      Alternative 22: 36.9% accurate, 10.7× speedup?

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

                                        1. Initial program 100.0%

                                          \[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-*.f6476.2%

                                            \[\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. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(1 + re\right)\right)}\right)\right) \]
                                          11. distribute-rgt-inN/A

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

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

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

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

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

                                        if -1.7e13 < re < 3.2000000000000001e190

                                        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.f6475.7%

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

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

                                          \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                        7. Step-by-step derivation
                                          1. *-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.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) \]
                                        8. Simplified40.7%

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

                                        if 3.2000000000000001e190 < 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. Simplified87.5%

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{re} \cdot im \]
                                          7. Recombined 3 regimes into one program.
                                          8. Final simplification35.8%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -17000000000000:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\\ \mathbf{elif}\;re \leq 3.2 \cdot 10^{+190}:\\ \;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \]
                                          9. Add Preprocessing

                                          Alternative 23: 30.8% accurate, 14.5× speedup?

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

                                            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.2%

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

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

                                              \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                            7. Step-by-step derivation
                                              1. *-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-*.f6430.6%

                                                \[\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) \]
                                            8. Simplified30.6%

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

                                            if 1.29999999999999991e189 < 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. Simplified87.5%

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

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

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

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

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

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

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

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

                                              Alternative 24: 28.2% accurate, 25.3× speedup?

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

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

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

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

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

                                                    if 4.79999999999999962e28 < im

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

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

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

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

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

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

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

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

                                                      Alternative 25: 29.8% 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 im around 0

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\left(re + 1\right)} \cdot im \]
                                                        5. Final simplification27.6%

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

                                                        Alternative 26: 26.6% 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 im around 0

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

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

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

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

                                                            Reproduce

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