math.exp on complex, imaginary part

Percentage Accurate: 99.9% → 99.9%
Time: 12.8s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.9% 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: 99.9% 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: 92.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{re} \leq 0.99999995:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;e^{re} \leq 1:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\right)\\ \end{array} \end{array} \]
(FPCore (re im)
 :precision binary64
 (if (<= (exp re) 0.99999995)
   (* (exp re) im)
   (if (<= (exp re) 1.0)
     (* (sin im) (+ re 1.0))
     (* (exp re) (* im (+ (* -0.16666666666666666 (* im im)) 1.0))))))
double code(double re, double im) {
	double tmp;
	if (exp(re) <= 0.99999995) {
		tmp = exp(re) * im;
	} else if (exp(re) <= 1.0) {
		tmp = sin(im) * (re + 1.0);
	} else {
		tmp = exp(re) * (im * ((-0.16666666666666666 * (im * im)) + 1.0));
	}
	return tmp;
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    real(8) :: tmp
    if (exp(re) <= 0.99999995d0) then
        tmp = exp(re) * im
    else if (exp(re) <= 1.0d0) then
        tmp = sin(im) * (re + 1.0d0)
    else
        tmp = exp(re) * (im * (((-0.16666666666666666d0) * (im * im)) + 1.0d0))
    end if
    code = tmp
end function
public static double code(double re, double im) {
	double tmp;
	if (Math.exp(re) <= 0.99999995) {
		tmp = Math.exp(re) * im;
	} else if (Math.exp(re) <= 1.0) {
		tmp = Math.sin(im) * (re + 1.0);
	} else {
		tmp = Math.exp(re) * (im * ((-0.16666666666666666 * (im * im)) + 1.0));
	}
	return tmp;
}
def code(re, im):
	tmp = 0
	if math.exp(re) <= 0.99999995:
		tmp = math.exp(re) * im
	elif math.exp(re) <= 1.0:
		tmp = math.sin(im) * (re + 1.0)
	else:
		tmp = math.exp(re) * (im * ((-0.16666666666666666 * (im * im)) + 1.0))
	return tmp
function code(re, im)
	tmp = 0.0
	if (exp(re) <= 0.99999995)
		tmp = Float64(exp(re) * im);
	elseif (exp(re) <= 1.0)
		tmp = Float64(sin(im) * Float64(re + 1.0));
	else
		tmp = Float64(exp(re) * Float64(im * Float64(Float64(-0.16666666666666666 * Float64(im * im)) + 1.0)));
	end
	return tmp
end
function tmp_2 = code(re, im)
	tmp = 0.0;
	if (exp(re) <= 0.99999995)
		tmp = exp(re) * im;
	elseif (exp(re) <= 1.0)
		tmp = sin(im) * (re + 1.0);
	else
		tmp = exp(re) * (im * ((-0.16666666666666666 * (im * im)) + 1.0));
	end
	tmp_2 = tmp;
end
code[re_, im_] := If[LessEqual[N[Exp[re], $MachinePrecision], 0.99999995], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[N[Exp[re], $MachinePrecision], 1.0], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.99999995:\\
\;\;\;\;e^{re} \cdot im\\

\mathbf{elif}\;e^{re} \leq 1:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\

\mathbf{else}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (exp.f64 re) < 0.999999949999999971

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

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

      if 0.999999949999999971 < (exp.f64 re) < 1

      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-+.f64100.0%

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

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

      if 1 < (exp.f64 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-*.f6481.8%

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

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

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

    Alternative 3: 91.4% accurate, 1.7× speedup?

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

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

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

        if -8.49999999999999935e-8 < re < 1.19999999999999996e-20

        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-+.f64100.0%

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

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

        if 4.5e89 < 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-*.f6477.1%

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

          \[\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. *-lowering-*.f6477.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(\frac{1}{6}, 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) \]
        8. Simplified77.1%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -8.5 \cdot 10^{-8}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 1.2 \cdot 10^{-20}:\\ \;\;\;\;\sin im \cdot \left(re + 1\right)\\ \mathbf{elif}\;re \leq 4.5 \cdot 10^{+89}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) + 1\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 91.3% accurate, 1.7× speedup?

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

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

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

          if -1.79999999999999991e-8 < re < 1.19999999999999996e-20

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

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

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

          if 8.39999999999999945e89 < 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-*.f6477.1%

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

            \[\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. *-lowering-*.f6477.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(\frac{1}{6}, 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) \]
          8. Simplified77.1%

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

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

        Alternative 5: 77.6% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.5 + re \cdot 0.16666666666666666\\ t_1 := re \cdot t\_0\\ t_2 := im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\\ \mathbf{if}\;re \leq -8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{im \cdot im}{im + re \cdot \left(im \cdot \left(-1 - re \cdot 0.5\right)\right)}\\ \mathbf{elif}\;re \leq 1.2 \cdot 10^{-20}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 8.4 \cdot 10^{+89}:\\ \;\;\;\;t\_2 \cdot \left(\frac{re \cdot \left(1 - re \cdot \left(t\_0 \cdot t\_1\right)\right)}{1 - t\_1} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(re \cdot \left(t\_1 + 1\right) + 1\right)\\ \end{array} \end{array} \]
        (FPCore (re im)
         :precision binary64
         (let* ((t_0 (+ 0.5 (* re 0.16666666666666666)))
                (t_1 (* re t_0))
                (t_2 (* im (+ (* -0.16666666666666666 (* im im)) 1.0))))
           (if (<= re -8.5e-8)
             (/ (* im im) (+ im (* re (* im (- -1.0 (* re 0.5))))))
             (if (<= re 1.2e-20)
               (sin im)
               (if (<= re 8.4e+89)
                 (* t_2 (+ (/ (* re (- 1.0 (* re (* t_0 t_1)))) (- 1.0 t_1)) 1.0))
                 (* t_2 (+ (* re (+ t_1 1.0)) 1.0)))))))
        double code(double re, double im) {
        	double t_0 = 0.5 + (re * 0.16666666666666666);
        	double t_1 = re * t_0;
        	double t_2 = im * ((-0.16666666666666666 * (im * im)) + 1.0);
        	double tmp;
        	if (re <= -8.5e-8) {
        		tmp = (im * im) / (im + (re * (im * (-1.0 - (re * 0.5)))));
        	} else if (re <= 1.2e-20) {
        		tmp = sin(im);
        	} else if (re <= 8.4e+89) {
        		tmp = t_2 * (((re * (1.0 - (re * (t_0 * t_1)))) / (1.0 - t_1)) + 1.0);
        	} else {
        		tmp = t_2 * ((re * (t_1 + 1.0)) + 1.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) :: t_2
            real(8) :: tmp
            t_0 = 0.5d0 + (re * 0.16666666666666666d0)
            t_1 = re * t_0
            t_2 = im * (((-0.16666666666666666d0) * (im * im)) + 1.0d0)
            if (re <= (-8.5d-8)) then
                tmp = (im * im) / (im + (re * (im * ((-1.0d0) - (re * 0.5d0)))))
            else if (re <= 1.2d-20) then
                tmp = sin(im)
            else if (re <= 8.4d+89) then
                tmp = t_2 * (((re * (1.0d0 - (re * (t_0 * t_1)))) / (1.0d0 - t_1)) + 1.0d0)
            else
                tmp = t_2 * ((re * (t_1 + 1.0d0)) + 1.0d0)
            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 = re * t_0;
        	double t_2 = im * ((-0.16666666666666666 * (im * im)) + 1.0);
        	double tmp;
        	if (re <= -8.5e-8) {
        		tmp = (im * im) / (im + (re * (im * (-1.0 - (re * 0.5)))));
        	} else if (re <= 1.2e-20) {
        		tmp = Math.sin(im);
        	} else if (re <= 8.4e+89) {
        		tmp = t_2 * (((re * (1.0 - (re * (t_0 * t_1)))) / (1.0 - t_1)) + 1.0);
        	} else {
        		tmp = t_2 * ((re * (t_1 + 1.0)) + 1.0);
        	}
        	return tmp;
        }
        
        def code(re, im):
        	t_0 = 0.5 + (re * 0.16666666666666666)
        	t_1 = re * t_0
        	t_2 = im * ((-0.16666666666666666 * (im * im)) + 1.0)
        	tmp = 0
        	if re <= -8.5e-8:
        		tmp = (im * im) / (im + (re * (im * (-1.0 - (re * 0.5)))))
        	elif re <= 1.2e-20:
        		tmp = math.sin(im)
        	elif re <= 8.4e+89:
        		tmp = t_2 * (((re * (1.0 - (re * (t_0 * t_1)))) / (1.0 - t_1)) + 1.0)
        	else:
        		tmp = t_2 * ((re * (t_1 + 1.0)) + 1.0)
        	return tmp
        
        function code(re, im)
        	t_0 = Float64(0.5 + Float64(re * 0.16666666666666666))
        	t_1 = Float64(re * t_0)
        	t_2 = Float64(im * Float64(Float64(-0.16666666666666666 * Float64(im * im)) + 1.0))
        	tmp = 0.0
        	if (re <= -8.5e-8)
        		tmp = Float64(Float64(im * im) / Float64(im + Float64(re * Float64(im * Float64(-1.0 - Float64(re * 0.5))))));
        	elseif (re <= 1.2e-20)
        		tmp = sin(im);
        	elseif (re <= 8.4e+89)
        		tmp = Float64(t_2 * Float64(Float64(Float64(re * Float64(1.0 - Float64(re * Float64(t_0 * t_1)))) / Float64(1.0 - t_1)) + 1.0));
        	else
        		tmp = Float64(t_2 * Float64(Float64(re * Float64(t_1 + 1.0)) + 1.0));
        	end
        	return tmp
        end
        
        function tmp_2 = code(re, im)
        	t_0 = 0.5 + (re * 0.16666666666666666);
        	t_1 = re * t_0;
        	t_2 = im * ((-0.16666666666666666 * (im * im)) + 1.0);
        	tmp = 0.0;
        	if (re <= -8.5e-8)
        		tmp = (im * im) / (im + (re * (im * (-1.0 - (re * 0.5)))));
        	elseif (re <= 1.2e-20)
        		tmp = sin(im);
        	elseif (re <= 8.4e+89)
        		tmp = t_2 * (((re * (1.0 - (re * (t_0 * t_1)))) / (1.0 - t_1)) + 1.0);
        	else
        		tmp = t_2 * ((re * (t_1 + 1.0)) + 1.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[(re * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(im * N[(N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -8.5e-8], N[(N[(im * im), $MachinePrecision] / N[(im + N[(re * N[(im * N[(-1.0 - N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.2e-20], N[Sin[im], $MachinePrecision], If[LessEqual[re, 8.4e+89], N[(t$95$2 * N[(N[(N[(re * N[(1.0 - N[(re * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(re * N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 0.5 + re \cdot 0.16666666666666666\\
        t_1 := re \cdot t\_0\\
        t_2 := im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\\
        \mathbf{if}\;re \leq -8.5 \cdot 10^{-8}:\\
        \;\;\;\;\frac{im \cdot im}{im + re \cdot \left(im \cdot \left(-1 - re \cdot 0.5\right)\right)}\\
        
        \mathbf{elif}\;re \leq 1.2 \cdot 10^{-20}:\\
        \;\;\;\;\sin im\\
        
        \mathbf{elif}\;re \leq 8.4 \cdot 10^{+89}:\\
        \;\;\;\;t\_2 \cdot \left(\frac{re \cdot \left(1 - re \cdot \left(t\_0 \cdot t\_1\right)\right)}{1 - t\_1} + 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2 \cdot \left(re \cdot \left(t\_1 + 1\right) + 1\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if re < -8.49999999999999935e-8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(re, \color{blue}{\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)}\right), im\right)\right) \]
            9. Simplified56.3%

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

            if -8.49999999999999935e-8 < re < 1.19999999999999996e-20

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

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

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

            if 1.19999999999999996e-20 < re < 8.39999999999999945e89

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

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

              \[\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. *-lowering-*.f6429.9%

                \[\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(\frac{1}{6}, 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) \]
            8. Simplified29.9%

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right) \cdot \left(re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right) \cdot re\right), \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) \]
            10. Applied egg-rr65.3%

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

            if 8.39999999999999945e89 < 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-*.f6477.1%

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

              \[\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. *-lowering-*.f6477.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(\frac{1}{6}, 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) \]
            8. Simplified77.1%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{im \cdot im}{im + re \cdot \left(im \cdot \left(-1 - re \cdot 0.5\right)\right)}\\ \mathbf{elif}\;re \leq 1.2 \cdot 10^{-20}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 8.4 \cdot 10^{+89}:\\ \;\;\;\;\left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\right) \cdot \left(\frac{re \cdot \left(1 - re \cdot \left(\left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\right)}{1 - re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right) + 1\right)\right) \cdot \left(re \cdot \left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) + 1\right)\\ \end{array} \]
          7. Add Preprocessing

          Alternative 6: 54.7% accurate, 4.0× speedup?

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

            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} \]
              2. Taylor expanded in re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(re, \color{blue}{\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)}\right), im\right)\right) \]
              9. Simplified56.3%

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

              if -3.89999999999999991 < re < 8.39999999999999945e89

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

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

                \[\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. *-lowering-*.f6442.9%

                  \[\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(\frac{1}{6}, 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) \]
              8. Simplified42.9%

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right) \cdot \left(re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right) \cdot re\right), \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) \]
              10. Applied egg-rr47.4%

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

              if 8.39999999999999945e89 < 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-*.f6477.1%

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

                \[\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. *-lowering-*.f6477.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(\frac{1}{6}, 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) \]
              8. Simplified77.1%

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

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

            Alternative 7: 53.6% accurate, 7.2× speedup?

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

              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} \]
                2. Taylor expanded in re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(re, \color{blue}{\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)}\right), im\right)\right) \]
                9. Simplified56.3%

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

                if -1.6000000000000001 < 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-*.f6457.6%

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

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

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

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

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

              Alternative 8: 53.7% accurate, 7.5× speedup?

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

                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} \]
                  2. Taylor expanded in re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(re, \color{blue}{\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)}\right), im\right)\right) \]
                  9. Simplified56.3%

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

                  if -1.5 < re < 270

                  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. Simplified46.0%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\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), im\right) \]
                    6. Applied egg-rr45.2%

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

                    if 270 < 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-*.f6481.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 48.0% accurate, 7.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\ \mathbf{if}\;re \leq -75000000:\\ \;\;\;\;im \cdot t\_0\\ \mathbf{elif}\;re \leq 105:\\ \;\;\;\;im \cdot \left(\left(re + 1\right) + \left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(re \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(\left(t\_0 + 1\right) \cdot 0.16666666666666666\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (re im)
                   :precision binary64
                   (let* ((t_0 (* -0.16666666666666666 (* im im))))
                     (if (<= re -75000000.0)
                       (* im t_0)
                       (if (<= re 105.0)
                         (* im (+ (+ re 1.0) (* (+ 0.5 (* re 0.16666666666666666)) (* re re))))
                         (* (* re (* re re)) (* im (* (+ t_0 1.0) 0.16666666666666666)))))))
                  double code(double re, double im) {
                  	double t_0 = -0.16666666666666666 * (im * im);
                  	double tmp;
                  	if (re <= -75000000.0) {
                  		tmp = im * t_0;
                  	} else if (re <= 105.0) {
                  		tmp = im * ((re + 1.0) + ((0.5 + (re * 0.16666666666666666)) * (re * re)));
                  	} else {
                  		tmp = (re * (re * re)) * (im * ((t_0 + 1.0) * 0.16666666666666666));
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(re, im)
                      real(8), intent (in) :: re
                      real(8), intent (in) :: im
                      real(8) :: t_0
                      real(8) :: tmp
                      t_0 = (-0.16666666666666666d0) * (im * im)
                      if (re <= (-75000000.0d0)) then
                          tmp = im * t_0
                      else if (re <= 105.0d0) then
                          tmp = im * ((re + 1.0d0) + ((0.5d0 + (re * 0.16666666666666666d0)) * (re * re)))
                      else
                          tmp = (re * (re * re)) * (im * ((t_0 + 1.0d0) * 0.16666666666666666d0))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double re, double im) {
                  	double t_0 = -0.16666666666666666 * (im * im);
                  	double tmp;
                  	if (re <= -75000000.0) {
                  		tmp = im * t_0;
                  	} else if (re <= 105.0) {
                  		tmp = im * ((re + 1.0) + ((0.5 + (re * 0.16666666666666666)) * (re * re)));
                  	} else {
                  		tmp = (re * (re * re)) * (im * ((t_0 + 1.0) * 0.16666666666666666));
                  	}
                  	return tmp;
                  }
                  
                  def code(re, im):
                  	t_0 = -0.16666666666666666 * (im * im)
                  	tmp = 0
                  	if re <= -75000000.0:
                  		tmp = im * t_0
                  	elif re <= 105.0:
                  		tmp = im * ((re + 1.0) + ((0.5 + (re * 0.16666666666666666)) * (re * re)))
                  	else:
                  		tmp = (re * (re * re)) * (im * ((t_0 + 1.0) * 0.16666666666666666))
                  	return tmp
                  
                  function code(re, im)
                  	t_0 = Float64(-0.16666666666666666 * Float64(im * im))
                  	tmp = 0.0
                  	if (re <= -75000000.0)
                  		tmp = Float64(im * t_0);
                  	elseif (re <= 105.0)
                  		tmp = Float64(im * Float64(Float64(re + 1.0) + Float64(Float64(0.5 + Float64(re * 0.16666666666666666)) * Float64(re * re))));
                  	else
                  		tmp = Float64(Float64(re * Float64(re * re)) * Float64(im * Float64(Float64(t_0 + 1.0) * 0.16666666666666666)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(re, im)
                  	t_0 = -0.16666666666666666 * (im * im);
                  	tmp = 0.0;
                  	if (re <= -75000000.0)
                  		tmp = im * t_0;
                  	elseif (re <= 105.0)
                  		tmp = im * ((re + 1.0) + ((0.5 + (re * 0.16666666666666666)) * (re * re)));
                  	else
                  		tmp = (re * (re * re)) * (im * ((t_0 + 1.0) * 0.16666666666666666));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -75000000.0], N[(im * t$95$0), $MachinePrecision], If[LessEqual[re, 105.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] + N[(N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(N[(t$95$0 + 1.0), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\
                  \mathbf{if}\;re \leq -75000000:\\
                  \;\;\;\;im \cdot t\_0\\
                  
                  \mathbf{elif}\;re \leq 105:\\
                  \;\;\;\;im \cdot \left(\left(re + 1\right) + \left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(re \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(\left(t\_0 + 1\right) \cdot 0.16666666666666666\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if re < -7.5e7

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

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

                      \[\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. *-lowering-*.f642.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(\frac{1}{6}, 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) \]
                    8. Simplified2.0%

                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + 0.16666666666666666 \cdot re\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                      8. *-lowering-*.f6415.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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                    11. Simplified15.6%

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

                      \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                    13. Step-by-step derivation
                      1. unpow3N/A

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

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

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

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

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

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

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

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

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

                    if -7.5e7 < re < 105

                    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. Simplified46.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. *-lowering-*.f6444.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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), im\right) \]
                      4. Simplified44.6%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(1, re\right), \mathsf{*.f64}\left(\left(\frac{1}{2} + \frac{1}{6} \cdot re\right), \left(re \cdot re\right)\right)\right), im\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}, \left(\frac{1}{6} \cdot re\right)\right), \left(re \cdot re\right)\right)\right), im\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}, \left(re \cdot \frac{1}{6}\right)\right), \left(re \cdot re\right)\right)\right), im\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), im\right) \]
                        13. *-lowering-*.f6444.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), im\right) \]
                      6. Applied egg-rr44.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 im \]

                      if 105 < 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-*.f6481.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 51.6% accurate, 8.5× speedup?

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

                      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} \]
                        2. Taylor expanded in re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(re, \color{blue}{\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right)\right)}\right), im\right)\right) \]
                        9. Simplified56.3%

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

                        if -190 < 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-*.f6457.6%

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

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

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

                          \[\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) \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification51.1%

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

                      Alternative 11: 44.5% accurate, 8.8× speedup?

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

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

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

                          \[\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. *-lowering-*.f642.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(\frac{1}{6}, 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) \]
                        8. Simplified2.0%

                          \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + 0.16666666666666666 \cdot re\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                          8. *-lowering-*.f6415.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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                        11. Simplified15.1%

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

                          \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                        13. Step-by-step derivation
                          1. unpow3N/A

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                        14. Simplified35.1%

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

                        if -1 < re < 1.54999999999999999e191

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

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

                          \[\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 \color{blue}{im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right) + im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                        7. Step-by-step derivation
                          1. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.54999999999999999e191 < 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. Simplified83.3%

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

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

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

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

                        Alternative 12: 43.9% accurate, 9.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{if}\;re \leq -75000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 40000000000:\\ \;\;\;\;im \cdot \left(re + 1\right)\\ \mathbf{elif}\;re \leq 1.55 \cdot 10^{+191}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                        (FPCore (re im)
                         :precision binary64
                         (let* ((t_0 (* im (* -0.16666666666666666 (* im im)))))
                           (if (<= re -75000000.0)
                             t_0
                             (if (<= re 40000000000.0)
                               (* im (+ re 1.0))
                               (if (<= re 1.55e+191) t_0 (* im (* 0.5 (* re re))))))))
                        double code(double re, double im) {
                        	double t_0 = im * (-0.16666666666666666 * (im * im));
                        	double tmp;
                        	if (re <= -75000000.0) {
                        		tmp = t_0;
                        	} else if (re <= 40000000000.0) {
                        		tmp = im * (re + 1.0);
                        	} else if (re <= 1.55e+191) {
                        		tmp = t_0;
                        	} else {
                        		tmp = im * (0.5 * (re * re));
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(re, im)
                            real(8), intent (in) :: re
                            real(8), intent (in) :: im
                            real(8) :: t_0
                            real(8) :: tmp
                            t_0 = im * ((-0.16666666666666666d0) * (im * im))
                            if (re <= (-75000000.0d0)) then
                                tmp = t_0
                            else if (re <= 40000000000.0d0) then
                                tmp = im * (re + 1.0d0)
                            else if (re <= 1.55d+191) then
                                tmp = t_0
                            else
                                tmp = im * (0.5d0 * (re * re))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double re, double im) {
                        	double t_0 = im * (-0.16666666666666666 * (im * im));
                        	double tmp;
                        	if (re <= -75000000.0) {
                        		tmp = t_0;
                        	} else if (re <= 40000000000.0) {
                        		tmp = im * (re + 1.0);
                        	} else if (re <= 1.55e+191) {
                        		tmp = t_0;
                        	} else {
                        		tmp = im * (0.5 * (re * re));
                        	}
                        	return tmp;
                        }
                        
                        def code(re, im):
                        	t_0 = im * (-0.16666666666666666 * (im * im))
                        	tmp = 0
                        	if re <= -75000000.0:
                        		tmp = t_0
                        	elif re <= 40000000000.0:
                        		tmp = im * (re + 1.0)
                        	elif re <= 1.55e+191:
                        		tmp = t_0
                        	else:
                        		tmp = im * (0.5 * (re * re))
                        	return tmp
                        
                        function code(re, im)
                        	t_0 = Float64(im * Float64(-0.16666666666666666 * Float64(im * im)))
                        	tmp = 0.0
                        	if (re <= -75000000.0)
                        		tmp = t_0;
                        	elseif (re <= 40000000000.0)
                        		tmp = Float64(im * Float64(re + 1.0));
                        	elseif (re <= 1.55e+191)
                        		tmp = t_0;
                        	else
                        		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(re, im)
                        	t_0 = im * (-0.16666666666666666 * (im * im));
                        	tmp = 0.0;
                        	if (re <= -75000000.0)
                        		tmp = t_0;
                        	elseif (re <= 40000000000.0)
                        		tmp = im * (re + 1.0);
                        	elseif (re <= 1.55e+191)
                        		tmp = t_0;
                        	else
                        		tmp = im * (0.5 * (re * re));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[re_, im_] := Block[{t$95$0 = N[(im * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -75000000.0], t$95$0, If[LessEqual[re, 40000000000.0], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.55e+191], t$95$0, N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
                        \mathbf{if}\;re \leq -75000000:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;re \leq 40000000000:\\
                        \;\;\;\;im \cdot \left(re + 1\right)\\
                        
                        \mathbf{elif}\;re \leq 1.55 \cdot 10^{+191}:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if re < -7.5e7 or 4e10 < re < 1.54999999999999999e191

                          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-*.f6475.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. Simplified75.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 + 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. *-lowering-*.f6422.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(\frac{1}{6}, 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) \]
                          8. Simplified22.1%

                            \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + 0.16666666666666666 \cdot re\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                            8. *-lowering-*.f6427.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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                          11. Simplified27.0%

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

                            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                          13. Step-by-step derivation
                            1. unpow3N/A

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                          14. Simplified34.5%

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

                          if -7.5e7 < re < 4e10

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

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

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

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

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

                            if 1.54999999999999999e191 < 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. Simplified83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 47.6% accurate, 10.7× speedup?

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

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

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

                                \[\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. *-lowering-*.f641.9%

                                  \[\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(\frac{1}{6}, 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) \]
                              8. Simplified1.9%

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

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

                                \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                              13. Step-by-step derivation
                                1. unpow3N/A

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                              14. Simplified35.6%

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

                              if -59000 < re < 2.1500000000000001e105

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

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

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

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

                              if 2.1500000000000001e105 < 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. Simplified68.9%

                                  \[\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. *-lowering-*.f6468.9%

                                    \[\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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), im\right) \]
                                4. Simplified68.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(re \cdot \frac{1}{6}\right)\right)\right), im\right) \]
                                  12. *-lowering-*.f6468.9%

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

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

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

                              Alternative 14: 43.7% accurate, 10.7× speedup?

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

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

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

                                  \[\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. *-lowering-*.f641.9%

                                    \[\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(\frac{1}{6}, 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) \]
                                8. Simplified1.9%

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

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

                                  \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                13. Step-by-step derivation
                                  1. unpow3N/A

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                                14. Simplified35.6%

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

                                if -59000 < re < 1.54999999999999999e191

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

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

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

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

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

                                if 1.54999999999999999e191 < 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. Simplified83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 15: 37.7% accurate, 16.9× speedup?

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

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

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

                                    \[\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. *-lowering-*.f642.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(\frac{1}{6}, 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) \]
                                  8. Simplified2.0%

                                    \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + 0.16666666666666666 \cdot re\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\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(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                                    8. *-lowering-*.f6415.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(\frac{1}{6}, re\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                                  11. Simplified15.6%

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

                                    \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                  13. Step-by-step derivation
                                    1. unpow3N/A

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

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

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

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

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

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

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

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

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

                                  if -7.5e7 < 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\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-+.f6467.8%

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

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

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

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

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

                                  Alternative 16: 28.5% accurate, 25.3× speedup?

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

                                    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.f6453.0%

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

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

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

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

                                      if 4.9999999999999996e44 < im

                                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

                                        Alternative 17: 30.1% accurate, 40.6× speedup?

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

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

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

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

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

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

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

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

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

                                          Alternative 18: 26.8% accurate, 203.0× speedup?

                                          \[\begin{array}{l} \\ im \end{array} \]
                                          (FPCore (re im) :precision binary64 im)
                                          double code(double re, double im) {
                                          	return im;
                                          }
                                          
                                          real(8) function code(re, im)
                                              real(8), intent (in) :: re
                                              real(8), intent (in) :: im
                                              code = im
                                          end function
                                          
                                          public static double code(double re, double im) {
                                          	return im;
                                          }
                                          
                                          def code(re, im):
                                          	return im
                                          
                                          function code(re, im)
                                          	return im
                                          end
                                          
                                          function tmp = code(re, im)
                                          	tmp = im;
                                          end
                                          
                                          code[re_, im_] := im
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          im
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 100.0%

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

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

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

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

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

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

                                            Reproduce

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