math.exp on complex, imaginary part

Percentage Accurate: 100.0% → 100.0%
Time: 15.8s
Alternatives: 23
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 23 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 92.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0:\\
\;\;\;\;t\_0\\

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

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


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

    1. Initial program 100.0%

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

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

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

      if 0.0 < (exp.f64 re) < 2

      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-+.f6498.9%

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

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

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

    Alternative 3: 69.4% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{re} \leq 1\\ t_1 := e^{re} \cdot im\\ \mathbf{if}\;t\_0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0:\\ \;\;\;\;\sin im\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (re im)
     :precision binary64
     (let* ((t_0 (<= (exp re) 1.0)) (t_1 (* (exp re) im)))
       (if t_0 t_1 (if t_0 (sin im) t_1))))
    double code(double re, double im) {
    	int t_0 = exp(re) <= 1.0;
    	double t_1 = exp(re) * im;
    	double tmp;
    	if (t_0) {
    		tmp = t_1;
    	} else if (t_0) {
    		tmp = sin(im);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(re, im)
        real(8), intent (in) :: re
        real(8), intent (in) :: im
        logical :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = exp(re) <= 1.0d0
        t_1 = exp(re) * im
        if (t_0) then
            tmp = t_1
        else if (t_0) then
            tmp = sin(im)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double re, double im) {
    	boolean t_0 = Math.exp(re) <= 1.0;
    	double t_1 = Math.exp(re) * im;
    	double tmp;
    	if (t_0) {
    		tmp = t_1;
    	} else if (t_0) {
    		tmp = Math.sin(im);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(re, im):
    	t_0 = math.exp(re) <= 1.0
    	t_1 = math.exp(re) * im
    	tmp = 0
    	if t_0:
    		tmp = t_1
    	elif t_0:
    		tmp = math.sin(im)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(re, im)
    	t_0 = exp(re) <= 1.0
    	t_1 = Float64(exp(re) * im)
    	tmp = 0.0
    	if (t_0)
    		tmp = t_1;
    	elseif (t_0)
    		tmp = sin(im);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(re, im)
    	t_0 = exp(re) <= 1.0;
    	t_1 = exp(re) * im;
    	tmp = 0.0;
    	if (t_0)
    		tmp = t_1;
    	elseif (t_0)
    		tmp = sin(im);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[re_, im_] := Block[{t$95$0 = LessEqual[N[Exp[re], $MachinePrecision], 1.0]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[t$95$0, t$95$1, If[t$95$0, N[Sin[im], $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := e^{re} \leq 1\\
    t_1 := e^{re} \cdot im\\
    \mathbf{if}\;t\_0:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_0:\\
    \;\;\;\;\sin im\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 re) < 1 or 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 \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
      4. Step-by-step derivation
        1. Simplified73.8%

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

        if 1 < (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 \color{blue}{\sin im} \]
        4. Step-by-step derivation
          1. sin-lowering-sin.f6447.7%

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

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

      Alternative 4: 96.4% accurate, 1.5× speedup?

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

        1. Initial program 100.0%

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

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

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

          if -0.440000000000000002 < re < 0.0509999999999999967

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

          if 0.0509999999999999967 < re < 1.8999999999999999e154

          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} + {im}^{2} \cdot \left(\frac{-1}{6} \cdot e^{re} + {im}^{2} \cdot \left(\frac{-1}{5040} \cdot \left({im}^{2} \cdot e^{re}\right) + \frac{1}{120} \cdot e^{re}\right)\right)\right)} \]
          4. Simplified86.7%

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

          if 1.8999999999999999e154 < re

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        Alternative 5: 96.4% accurate, 1.6× speedup?

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

          1. Initial program 100.0%

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

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

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

            if -0.440000000000000002 < re < 0.044999999999999998

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

            if 0.044999999999999998 < re < 1.8999999999999999e154

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

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

            if 1.8999999999999999e154 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

          Alternative 6: 96.3% accurate, 1.6× speedup?

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

            1. Initial program 100.0%

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

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

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

              if -0.56000000000000005 < re < 0.0080000000000000002 or 2.00000000000000007e154 < re

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

              if 0.0080000000000000002 < re < 2.00000000000000007e154

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

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

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

            Alternative 7: 93.0% accurate, 1.7× speedup?

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

              1. Initial program 100.0%

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

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

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

                if -0.440000000000000002 < re < 5.09999999999999996e-5

                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-+.f6498.9%

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

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

                if 5.09999999999999996e-5 < 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-*.f6480.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. Simplified80.0%

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

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

              Alternative 8: 73.3% accurate, 1.8× speedup?

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

                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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                7. Simplified1.9%

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

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

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

                  \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                11. Step-by-step derivation
                  1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                if -125 < re < 5.0000000000000002e-23

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

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

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

                if 5.0000000000000002e-23 < re < 1.01999999999999991e103

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.01999999999999991e103 < 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.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. Simplified77.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(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                  7. Simplified70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 50.5% accurate, 3.9× speedup?

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

                  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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                  7. Simplified1.9%

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

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

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

                    \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                  11. Step-by-step derivation
                    1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                  if -53 < re < 1.79999999999999992e39

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

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

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

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

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

                  if 1.79999999999999992e39 < re < 1.01999999999999991e103

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.01999999999999991e103 < 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.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. Simplified77.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(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                    7. Simplified70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 10: 50.5% accurate, 4.0× speedup?

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

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

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

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

                      \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                    11. Step-by-step derivation
                      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                    if -1.6000000000000001 < re < 1e103

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1e103 < re

                      1. Initial program 100.0%

                        \[e^{re} \cdot \sin im \]
                      2. Add Preprocessing
                      3. Taylor expanded in 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.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. Simplified77.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(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                      7. Simplified70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 11: 50.3% accurate, 4.1× speedup?

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

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

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

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

                        \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                      11. Step-by-step derivation
                        1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                      if -1.6000000000000001 < re < 1.01999999999999991e103

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.01999999999999991e103 < 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.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. Simplified77.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(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                        7. Simplified70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 12: 49.9% accurate, 4.7× speedup?

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

                        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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                        7. Simplified1.9%

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

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

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

                          \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                        11. Step-by-step derivation
                          1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                        if -31 < re < 1.9999999999999999e105

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.9999999999999999e105 < 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.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. Simplified77.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(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                          7. Simplified70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 13: 48.6% accurate, 6.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -1.6:\\ \;\;\;\;-0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot 0.008333333333333333\right)\right)\right)\right)\\ \end{array} \end{array} \]
                        (FPCore (re im)
                         :precision binary64
                         (if (<= re -1.6)
                           (* -0.16666666666666666 (* im (* im im)))
                           (*
                            (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))
                            (*
                             im
                             (+
                              1.0
                              (*
                               im
                               (* im (+ -0.16666666666666666 (* (* im im) 0.008333333333333333)))))))))
                        double code(double re, double im) {
                        	double tmp;
                        	if (re <= -1.6) {
                        		tmp = -0.16666666666666666 * (im * (im * im));
                        	} else {
                        		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * (-0.16666666666666666 + ((im * im) * 0.008333333333333333))))));
                        	}
                        	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 = (-0.16666666666666666d0) * (im * (im * im))
                            else
                                tmp = (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0)))))) * (im * (1.0d0 + (im * (im * ((-0.16666666666666666d0) + ((im * im) * 0.008333333333333333d0))))))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double re, double im) {
                        	double tmp;
                        	if (re <= -1.6) {
                        		tmp = -0.16666666666666666 * (im * (im * im));
                        	} else {
                        		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * (-0.16666666666666666 + ((im * im) * 0.008333333333333333))))));
                        	}
                        	return tmp;
                        }
                        
                        def code(re, im):
                        	tmp = 0
                        	if re <= -1.6:
                        		tmp = -0.16666666666666666 * (im * (im * im))
                        	else:
                        		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * (-0.16666666666666666 + ((im * im) * 0.008333333333333333))))))
                        	return tmp
                        
                        function code(re, im)
                        	tmp = 0.0
                        	if (re <= -1.6)
                        		tmp = Float64(-0.16666666666666666 * Float64(im * Float64(im * im)));
                        	else
                        		tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(im * im) * 0.008333333333333333)))))));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(re, im)
                        	tmp = 0.0;
                        	if (re <= -1.6)
                        		tmp = -0.16666666666666666 * (im * (im * im));
                        	else
                        		tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * (-0.16666666666666666 + ((im * im) * 0.008333333333333333))))));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[re_, im_] := If[LessEqual[re, -1.6], N[(-0.16666666666666666 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;re \leq -1.6:\\
                        \;\;\;\;-0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot 0.008333333333333333\right)\right)\right)\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 \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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                          7. Simplified1.9%

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

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

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

                            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                          11. Step-by-step derivation
                            1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                          if -1.6000000000000001 < re

                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 14: 48.1% accurate, 8.8× speedup?

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

                          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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                          7. Simplified1.9%

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

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

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

                            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                          11. Step-by-step derivation
                            1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                          if -1 < re < 9.200000000000001e71

                          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-*.f6459.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. Simplified59.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\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right) \]
                          7. Step-by-step derivation
                            1. +-commutativeN/A

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

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

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

                          if 9.200000000000001e71 < 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. Simplified77.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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)}, im\right) \]
                            3. Step-by-step derivation
                              1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 15: 47.7% accurate, 8.8× speedup?

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

                            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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            7. Simplified1.9%

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

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

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

                              \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                            11. Step-by-step derivation
                              1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                            if -85 < re < 3.9000000000000001e71

                            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-*.f6459.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. Simplified59.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            7. Simplified51.8%

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

                              \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                            9. 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-*.f6451.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) \]
                            10. Simplified51.0%

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

                            if 3.9000000000000001e71 < 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. Simplified77.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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)}, im\right) \]
                              3. Step-by-step derivation
                                1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 16: 47.9% accurate, 10.1× speedup?

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

                              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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              7. Simplified1.9%

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

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

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

                                \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                              11. Step-by-step derivation
                                1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                              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 \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                              4. Step-by-step derivation
                                1. Simplified62.8%

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 17: 47.8% accurate, 10.7× speedup?

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

                                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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                7. Simplified1.9%

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

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

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

                                  \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                11. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                if -53 < re < 1.60000000000000012e71

                                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-*.f6459.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. Simplified59.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                7. Simplified51.8%

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

                                  \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                9. 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-*.f6451.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) \]
                                10. Simplified51.0%

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

                                if 1.60000000000000012e71 < 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. Simplified77.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 + re \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right)\right)}, im\right) \]
                                  3. Step-by-step derivation
                                    1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 18: 47.8% accurate, 10.7× speedup?

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

                                  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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                  7. Simplified1.9%

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

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

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

                                    \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                  11. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                  if -1.30000000000000004 < re < 2.3e-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. Simplified56.3%

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

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

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

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

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

                                    if 2.3e-5 < 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. Simplified75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 19: 45.2% accurate, 11.9× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -1.55:\\ \;\;\;\;-0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\ \mathbf{elif}\;re \leq 2.3 \cdot 10^{-5}:\\ \;\;\;\;im \cdot \left(re + 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
                                     (if (<= re -1.55)
                                       (* -0.16666666666666666 (* im (* im im)))
                                       (if (<= re 2.3e-5) (* im (+ re 1.0)) (* im (* 0.5 (* re re))))))
                                    double code(double re, double im) {
                                    	double tmp;
                                    	if (re <= -1.55) {
                                    		tmp = -0.16666666666666666 * (im * (im * im));
                                    	} else if (re <= 2.3e-5) {
                                    		tmp = im * (re + 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) :: tmp
                                        if (re <= (-1.55d0)) then
                                            tmp = (-0.16666666666666666d0) * (im * (im * im))
                                        else if (re <= 2.3d-5) then
                                            tmp = im * (re + 1.0d0)
                                        else
                                            tmp = im * (0.5d0 * (re * re))
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double re, double im) {
                                    	double tmp;
                                    	if (re <= -1.55) {
                                    		tmp = -0.16666666666666666 * (im * (im * im));
                                    	} else if (re <= 2.3e-5) {
                                    		tmp = im * (re + 1.0);
                                    	} else {
                                    		tmp = im * (0.5 * (re * re));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(re, im):
                                    	tmp = 0
                                    	if re <= -1.55:
                                    		tmp = -0.16666666666666666 * (im * (im * im))
                                    	elif re <= 2.3e-5:
                                    		tmp = im * (re + 1.0)
                                    	else:
                                    		tmp = im * (0.5 * (re * re))
                                    	return tmp
                                    
                                    function code(re, im)
                                    	tmp = 0.0
                                    	if (re <= -1.55)
                                    		tmp = Float64(-0.16666666666666666 * Float64(im * Float64(im * im)));
                                    	elseif (re <= 2.3e-5)
                                    		tmp = Float64(im * Float64(re + 1.0));
                                    	else
                                    		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(re, im)
                                    	tmp = 0.0;
                                    	if (re <= -1.55)
                                    		tmp = -0.16666666666666666 * (im * (im * im));
                                    	elseif (re <= 2.3e-5)
                                    		tmp = im * (re + 1.0);
                                    	else
                                    		tmp = im * (0.5 * (re * re));
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[re_, im_] := If[LessEqual[re, -1.55], N[(-0.16666666666666666 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.3e-5], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;re \leq -1.55:\\
                                    \;\;\;\;-0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\
                                    
                                    \mathbf{elif}\;re \leq 2.3 \cdot 10^{-5}:\\
                                    \;\;\;\;im \cdot \left(re + 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 < -1.55000000000000004

                                      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-*.f6473.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. Simplified73.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                      7. Simplified1.9%

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

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

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

                                        \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                      11. Step-by-step derivation
                                        1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                      if -1.55000000000000004 < re < 2.3e-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. Simplified56.3%

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

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

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

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

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

                                        if 2.3e-5 < 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. Simplified75.4%

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

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

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

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

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

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

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

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

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

                                        Alternative 20: 39.1% accurate, 11.9× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := -0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\ \mathbf{if}\;re \leq -31:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 3600000000:\\ \;\;\;\;im \cdot \left(re + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                        (FPCore (re im)
                                         :precision binary64
                                         (let* ((t_0 (* -0.16666666666666666 (* im (* im im)))))
                                           (if (<= re -31.0) t_0 (if (<= re 3600000000.0) (* im (+ re 1.0)) t_0))))
                                        double code(double re, double im) {
                                        	double t_0 = -0.16666666666666666 * (im * (im * im));
                                        	double tmp;
                                        	if (re <= -31.0) {
                                        		tmp = t_0;
                                        	} else if (re <= 3600000000.0) {
                                        		tmp = im * (re + 1.0);
                                        	} else {
                                        		tmp = t_0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(re, im)
                                            real(8), intent (in) :: re
                                            real(8), intent (in) :: im
                                            real(8) :: t_0
                                            real(8) :: tmp
                                            t_0 = (-0.16666666666666666d0) * (im * (im * im))
                                            if (re <= (-31.0d0)) then
                                                tmp = t_0
                                            else if (re <= 3600000000.0d0) then
                                                tmp = im * (re + 1.0d0)
                                            else
                                                tmp = t_0
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double re, double im) {
                                        	double t_0 = -0.16666666666666666 * (im * (im * im));
                                        	double tmp;
                                        	if (re <= -31.0) {
                                        		tmp = t_0;
                                        	} else if (re <= 3600000000.0) {
                                        		tmp = im * (re + 1.0);
                                        	} else {
                                        		tmp = t_0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(re, im):
                                        	t_0 = -0.16666666666666666 * (im * (im * im))
                                        	tmp = 0
                                        	if re <= -31.0:
                                        		tmp = t_0
                                        	elif re <= 3600000000.0:
                                        		tmp = im * (re + 1.0)
                                        	else:
                                        		tmp = t_0
                                        	return tmp
                                        
                                        function code(re, im)
                                        	t_0 = Float64(-0.16666666666666666 * Float64(im * Float64(im * im)))
                                        	tmp = 0.0
                                        	if (re <= -31.0)
                                        		tmp = t_0;
                                        	elseif (re <= 3600000000.0)
                                        		tmp = Float64(im * Float64(re + 1.0));
                                        	else
                                        		tmp = t_0;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(re, im)
                                        	t_0 = -0.16666666666666666 * (im * (im * im));
                                        	tmp = 0.0;
                                        	if (re <= -31.0)
                                        		tmp = t_0;
                                        	elseif (re <= 3600000000.0)
                                        		tmp = im * (re + 1.0);
                                        	else
                                        		tmp = t_0;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -31.0], t$95$0, If[LessEqual[re, 3600000000.0], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := -0.16666666666666666 \cdot \left(im \cdot \left(im \cdot im\right)\right)\\
                                        \mathbf{if}\;re \leq -31:\\
                                        \;\;\;\;t\_0\\
                                        
                                        \mathbf{elif}\;re \leq 3600000000:\\
                                        \;\;\;\;im \cdot \left(re + 1\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_0\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if re < -31 or 3.6e9 < 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.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. Simplified77.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 \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right) + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \left(im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                          7. Simplified24.3%

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

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

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

                                            \[\leadsto \color{blue}{\frac{-1}{6} \cdot {im}^{3}} \]
                                          11. Step-by-step derivation
                                            1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                          if -31 < re < 3.6e9

                                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

                                          Alternative 21: 30.3% accurate, 25.3× speedup?

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

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

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

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

                                                if 2.3e-5 < 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. Simplified75.4%

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

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

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

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

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

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

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

                                                  Alternative 22: 30.3% accurate, 40.6× speedup?

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

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

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

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

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

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

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

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

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

                                                    Alternative 23: 27.3% accurate, 203.0× speedup?

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

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

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

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

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

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

                                                        Reproduce

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