math.exp on complex, imaginary part

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 93.0% 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 1:\\ \;\;\;\;\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) 1.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) <= 1.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) <= 1.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) <= 1.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) <= 1.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) <= 1.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) <= 1.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], 1.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 1:\\
\;\;\;\;\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 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. Simplified84.7%

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

      if 0.0 < (exp.f64 re) < 1

      1. Initial program 100.0%

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

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

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

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

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

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

    Alternative 3: 92.8% 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 1:\\ \;\;\;\;\sin im\\ \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) 1.0) (sin im) 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) <= 1.0) {
    		tmp = sin(im);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(re, im)
        real(8), intent (in) :: re
        real(8), intent (in) :: im
        real(8) :: t_0
        real(8) :: tmp
        t_0 = exp(re) * im
        if (exp(re) <= 0.0d0) then
            tmp = t_0
        else if (exp(re) <= 1.0d0) then
            tmp = sin(im)
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double re, double im) {
    	double t_0 = Math.exp(re) * im;
    	double tmp;
    	if (Math.exp(re) <= 0.0) {
    		tmp = t_0;
    	} else if (Math.exp(re) <= 1.0) {
    		tmp = Math.sin(im);
    	} 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) <= 1.0:
    		tmp = math.sin(im)
    	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) <= 1.0)
    		tmp = sin(im);
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(re, im)
    	t_0 = exp(re) * im;
    	tmp = 0.0;
    	if (exp(re) <= 0.0)
    		tmp = t_0;
    	elseif (exp(re) <= 1.0)
    		tmp = sin(im);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 1.0], N[Sin[im], $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 1:\\
    \;\;\;\;\sin im\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 re) < 0.0 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. Simplified84.7%

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

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

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

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

      Alternative 4: 97.4% accurate, 1.6× speedup?

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

        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.0400000000000000008 < re < 1.3000000000000001e-8

          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.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. Simplified99.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. Step-by-step derivation
            1. flip3-+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
            10. *-lowering-*.f6499.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
          10. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.3000000000000001e-8 < re < 1.0500000000000001e103

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.0500000000000001e103 < re

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 97.4% accurate, 1.6× speedup?

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

          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.0074000000000000003 < re < 1.3000000000000001e-8

            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.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. Simplified99.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 \]

            if 1.3000000000000001e-8 < re < 1.0500000000000001e103

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.0500000000000001e103 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 97.4% accurate, 1.6× speedup?

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

            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.0179999999999999986 < re < 1.3000000000000001e-8

              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.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. Simplified99.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. Step-by-step derivation
                1. flip3-+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.3000000000000001e-8 < re < 1e103

              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1e103 < re

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 97.4% accurate, 1.6× speedup?

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

              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.030499999999999999 < re < 1.3000000000000001e-8

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

                if 1.3000000000000001e-8 < re < 1.0500000000000001e103

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 1.0500000000000001e103 < re

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 97.3% accurate, 1.6× speedup?

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

                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.00154999999999999995 < re < 1.3000000000000001e-8

                  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.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. Simplified99.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. Step-by-step derivation
                    1. flip3-+N/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(1 - re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    3. --lowering--.f6499.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                  10. Simplified99.3%

                    \[\leadsto \frac{1}{\color{blue}{1 - re}} \cdot \sin im \]

                  if 1.3000000000000001e-8 < re < 1.0500000000000001e103

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.0500000000000001e103 < re

                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 97.1% accurate, 1.6× speedup?

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

                  1. Initial program 100.0%

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

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

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

                    if -0.00209999999999999987 < re < 1.3000000000000001e-8

                    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.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. Simplified99.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. Step-by-step derivation
                      1. flip3-+N/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(1 - re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                      3. --lowering--.f6499.3%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    10. Simplified99.3%

                      \[\leadsto \frac{1}{\color{blue}{1 - re}} \cdot \sin im \]

                    if 8.19999999999999959e99 < re

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                    8. Simplified98.0%

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

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

                  Alternative 10: 93.6% accurate, 1.7× speedup?

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

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

                      if -0.0085000000000000006 < re < 1.3000000000000001e-8

                      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.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. Simplified99.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. Step-by-step derivation
                        1. flip3-+N/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(1 - re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                        3. --lowering--.f6499.3%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, re\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                      10. Simplified99.3%

                        \[\leadsto \frac{1}{\color{blue}{1 - re}} \cdot \sin im \]
                    5. Recombined 2 regimes into one program.
                    6. Final simplification92.2%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.0085:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\ \;\;\;\;\sin im \cdot \frac{1}{1 - re}\\ \mathbf{else}:\\ \;\;\;\;e^{re} \cdot im\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 11: 84.3% accurate, 1.8× speedup?

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                      5. Simplified1.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. Step-by-step derivation
                        1. flip3-+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                        9. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                        10. *-lowering-*.f6483.2%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                      10. Simplified83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -8.8e20 < re < 4.5e-10

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

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

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

                      if 4.5e-10 < re < 5.5e132

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 5.5e132 < 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. Simplified78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 12: 60.3% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                          9. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                          10. *-lowering-*.f6485.6%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                        10. Simplified85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.2e-123 < re < 9.9999999999999991e130

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9.9999999999999991e130 < 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. Simplified78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 13: 58.3% accurate, 7.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            10. *-lowering-*.f6485.6%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                          10. Simplified85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -2.4499999999999999e-123 < 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-*.f6487.6%

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 14: 58.0% accurate, 7.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            10. *-lowering-*.f6485.6%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                          10. Simplified85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.79999999999999996e-123 < 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-*.f6487.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 15: 58.3% accurate, 8.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            10. *-lowering-*.f6485.6%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                          10. Simplified85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -8.0000000000000005e-123 < re < 3.7e71

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 3.7e71 < 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
                            7. Simplified69.5%

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

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

                          Alternative 16: 58.4% accurate, 9.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                              9. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                              10. *-lowering-*.f6493.0%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \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)\right), \mathsf{sin.f64}\left(im\right)\right) \]
                            10. Simplified93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 160 < 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-*.f6469.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 17: 38.9% accurate, 10.1× speedup?

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

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

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

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

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

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

                              if 1.22e46 < im

                              1. Initial program 99.9%

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

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

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

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

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

                                \[\leadsto \color{blue}{re \cdot \sin im} \]
                              7. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \sin im \cdot \color{blue}{re} \]
                                2. *-lowering-*.f64N/A

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(im\right), re\right) \]
                              8. Simplified3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 18: 39.2% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 4.2499999999999998e71 < 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({re}^{3}\right)}\right)\right) \]
                                  6. cube-multN/A

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right)\right) \]
                                  7. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot {re}^{\color{blue}{2}}\right)\right)\right) \]
                                  8. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
                                  9. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                  10. *-lowering-*.f6469.5%

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
                                7. Simplified69.5%

                                  \[\leadsto \color{blue}{im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification42.2%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 4.25 \cdot 10^{+71}:\\ \;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 19: 38.5% accurate, 12.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 1.22 \cdot 10^{+46}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
                              (FPCore (re im)
                               :precision binary64
                               (if (<= im 1.22e+46)
                                 (* im (+ 1.0 (* re (* re (* re 0.16666666666666666)))))
                                 (* im (* re (+ 1.0 (* im (* im -0.16666666666666666)))))))
                              double code(double re, double im) {
                              	double tmp;
                              	if (im <= 1.22e+46) {
                              		tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))));
                              	} else {
                              		tmp = im * (re * (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 (im <= 1.22d+46) then
                                      tmp = im * (1.0d0 + (re * (re * (re * 0.16666666666666666d0))))
                                  else
                                      tmp = im * (re * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double re, double im) {
                              	double tmp;
                              	if (im <= 1.22e+46) {
                              		tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))));
                              	} else {
                              		tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
                              	}
                              	return tmp;
                              }
                              
                              def code(re, im):
                              	tmp = 0
                              	if im <= 1.22e+46:
                              		tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))))
                              	else:
                              		tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))))
                              	return tmp
                              
                              function code(re, im)
                              	tmp = 0.0
                              	if (im <= 1.22e+46)
                              		tmp = Float64(im * Float64(1.0 + Float64(re * Float64(re * Float64(re * 0.16666666666666666)))));
                              	else
                              		tmp = Float64(im * Float64(re * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(re, im)
                              	tmp = 0.0;
                              	if (im <= 1.22e+46)
                              		tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))));
                              	else
                              		tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[re_, im_] := If[LessEqual[im, 1.22e+46], N[(im * N[(1.0 + N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;im \leq 1.22 \cdot 10^{+46}:\\
                              \;\;\;\;im \cdot \left(1 + re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;im \cdot \left(re \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if im < 1.22e46

                                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.8%

                                    \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                  2. Taylor expanded in re around 0

                                    \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)} \]
                                  3. Step-by-step derivation
                                    1. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)\right)}\right) \]
                                    2. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right) \]
                                    3. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right)\right) \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)}\right)\right)\right)\right) \]
                                    5. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right), \color{blue}{\left(\frac{1}{2} \cdot im\right)}\right)\right)\right)\right)\right) \]
                                    6. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\left(im \cdot re\right) \cdot \frac{1}{6}\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    7. associate-*l*N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(re \cdot \frac{1}{6}\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(\frac{1}{6} \cdot re\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    9. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(\frac{1}{6} \cdot re\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    10. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(re \cdot \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    11. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                    12. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(im \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                    13. *-lowering-*.f6446.4%

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                  4. Simplified46.4%

                                    \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(im \cdot \left(re \cdot 0.16666666666666666\right) + im \cdot 0.5\right)\right)} \]
                                  5. Taylor expanded in re around inf

                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right)\right)}\right)\right) \]
                                  6. Step-by-step derivation
                                    1. unpow2N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{1}{6} \cdot \left(im \cdot \left(re \cdot \color{blue}{re}\right)\right)\right)\right)\right) \]
                                    2. associate-*r*N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{1}{6} \cdot \left(\left(im \cdot re\right) \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                    3. associate-*l*N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right) \cdot \color{blue}{re}\right)\right)\right) \]
                                    4. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                    5. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                    6. associate-*r*N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\left(\frac{1}{6} \cdot im\right) \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                    7. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(\frac{1}{6} \cdot im\right)}\right)\right)\right)\right) \]
                                    8. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot im\right)}\right)\right)\right)\right) \]
                                    9. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(im \cdot \color{blue}{\frac{1}{6}}\right)\right)\right)\right)\right) \]
                                    10. *-lowering-*.f6446.1%

                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{6}}\right)\right)\right)\right)\right) \]
                                  7. Simplified46.1%

                                    \[\leadsto im + re \cdot \color{blue}{\left(re \cdot \left(re \cdot \left(im \cdot 0.16666666666666666\right)\right)\right)} \]
                                  8. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{im \cdot \left(1 + \frac{1}{6} \cdot {re}^{3}\right)} \]
                                  9. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(1 + \frac{1}{6} \cdot {re}^{3}\right)}\right) \]
                                    2. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)}\right)\right) \]
                                    3. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left({re}^{3} \cdot \color{blue}{\frac{1}{6}}\right)\right)\right) \]
                                    4. cube-multN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(\left(re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{6}\right)\right)\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(\left(re \cdot {re}^{2}\right) \cdot \frac{1}{6}\right)\right)\right) \]
                                    6. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(re \cdot \color{blue}{\left({re}^{2} \cdot \frac{1}{6}\right)}\right)\right)\right) \]
                                    7. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(re \cdot \left(\frac{1}{6} \cdot \color{blue}{{re}^{2}}\right)\right)\right)\right) \]
                                    8. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(re \cdot \left(\frac{1}{6} \cdot \left(re \cdot \color{blue}{re}\right)\right)\right)\right)\right) \]
                                    9. associate-*r*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(re \cdot \left(\left(\frac{1}{6} \cdot re\right) \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                    10. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \color{blue}{\left(\left(\frac{1}{6} \cdot re\right) \cdot re\right)}\right)\right)\right) \]
                                    11. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \left(\left(re \cdot \frac{1}{6}\right) \cdot re\right)\right)\right)\right) \]
                                    12. associate-*r*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(\frac{1}{6} \cdot re\right)}\right)\right)\right)\right) \]
                                    13. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot re\right)}\right)\right)\right)\right) \]
                                    14. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\frac{1}{6}}\right)\right)\right)\right)\right) \]
                                    15. *-lowering-*.f6447.9%

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\frac{1}{6}}\right)\right)\right)\right)\right) \]
                                  10. Simplified47.9%

                                    \[\leadsto \color{blue}{im \cdot \left(1 + re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)} \]

                                  if 1.22e46 < im

                                  1. Initial program 99.9%

                                    \[e^{re} \cdot \sin im \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in re around 0

                                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + re\right)}, \mathsf{sin.f64}\left(im\right)\right) \]
                                  4. Step-by-step derivation
                                    1. +-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                    2. +-lowering-+.f6459.0%

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                  5. Simplified59.0%

                                    \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
                                  6. Taylor expanded in re around inf

                                    \[\leadsto \color{blue}{re \cdot \sin im} \]
                                  7. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \sin im \cdot \color{blue}{re} \]
                                    2. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\sin im, \color{blue}{re}\right) \]
                                    3. sin-lowering-sin.f643.5%

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(im\right), re\right) \]
                                  8. Simplified3.5%

                                    \[\leadsto \color{blue}{\sin im \cdot re} \]
                                  9. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{im \cdot \left(re + \frac{-1}{6} \cdot \left({im}^{2} \cdot re\right)\right)} \]
                                  10. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto im \cdot \left(re + \left({im}^{2} \cdot re\right) \cdot \color{blue}{\frac{-1}{6}}\right) \]
                                    2. associate-*r*N/A

                                      \[\leadsto im \cdot \left(re + {im}^{2} \cdot \color{blue}{\left(re \cdot \frac{-1}{6}\right)}\right) \]
                                    3. *-commutativeN/A

                                      \[\leadsto im \cdot \left(re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot \color{blue}{re}\right)\right) \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot re\right)\right)}\right) \]
                                    5. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(re + {im}^{2} \cdot \left(re \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                    6. associate-*r*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(re + \left({im}^{2} \cdot re\right) \cdot \color{blue}{\frac{-1}{6}}\right)\right) \]
                                    7. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(re + \frac{-1}{6} \cdot \color{blue}{\left({im}^{2} \cdot re\right)}\right)\right) \]
                                    8. associate-*r*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{re}\right)\right) \]
                                    9. distribute-rgt1-inN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(\left(\frac{-1}{6} \cdot {im}^{2} + 1\right) \cdot \color{blue}{re}\right)\right) \]
                                    10. +-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right) \cdot re\right)\right) \]
                                    11. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left(1 + \frac{-1}{6} \cdot {im}^{2}\right), \color{blue}{re}\right)\right) \]
                                    12. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {im}^{2}\right)\right), re\right)\right) \]
                                    13. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \frac{-1}{6}\right)\right), re\right)\right) \]
                                    14. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \frac{-1}{6}\right)\right), re\right)\right) \]
                                    15. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(im \cdot \frac{-1}{6}\right)\right)\right), re\right)\right) \]
                                    16. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)\right), re\right)\right) \]
                                    17. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(\frac{-1}{6} \cdot im\right)\right)\right), re\right)\right) \]
                                    18. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \frac{-1}{6}\right)\right)\right), re\right)\right) \]
                                    19. *-lowering-*.f6412.9%

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{6}\right)\right)\right), re\right)\right) \]
                                  11. Simplified12.9%

                                    \[\leadsto \color{blue}{im \cdot \left(\left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right) \cdot re\right)} \]
                                5. Recombined 2 regimes into one program.
                                6. Final simplification40.4%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 1.22 \cdot 10^{+46}:\\ \;\;\;\;im \cdot \left(1 + re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \]
                                7. Add Preprocessing

                                Alternative 20: 39.1% accurate, 14.5× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 3.9 \cdot 10^{+71}:\\ \;\;\;\;im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (re im)
                                 :precision binary64
                                 (if (<= re 3.9e+71)
                                   (* im (+ 1.0 (* im (* im -0.16666666666666666))))
                                   (* im (* 0.16666666666666666 (* re (* re re))))))
                                double code(double re, double im) {
                                	double tmp;
                                	if (re <= 3.9e+71) {
                                		tmp = im * (1.0 + (im * (im * -0.16666666666666666)));
                                	} else {
                                		tmp = im * (0.16666666666666666 * (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 <= 3.9d+71) then
                                        tmp = im * (1.0d0 + (im * (im * (-0.16666666666666666d0))))
                                    else
                                        tmp = im * (0.16666666666666666d0 * (re * (re * re)))
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double re, double im) {
                                	double tmp;
                                	if (re <= 3.9e+71) {
                                		tmp = im * (1.0 + (im * (im * -0.16666666666666666)));
                                	} else {
                                		tmp = im * (0.16666666666666666 * (re * (re * re)));
                                	}
                                	return tmp;
                                }
                                
                                def code(re, im):
                                	tmp = 0
                                	if re <= 3.9e+71:
                                		tmp = im * (1.0 + (im * (im * -0.16666666666666666)))
                                	else:
                                		tmp = im * (0.16666666666666666 * (re * (re * re)))
                                	return tmp
                                
                                function code(re, im)
                                	tmp = 0.0
                                	if (re <= 3.9e+71)
                                		tmp = Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))));
                                	else
                                		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(re, im)
                                	tmp = 0.0;
                                	if (re <= 3.9e+71)
                                		tmp = im * (1.0 + (im * (im * -0.16666666666666666)));
                                	else
                                		tmp = im * (0.16666666666666666 * (re * (re * re)));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[re_, im_] := If[LessEqual[re, 3.9e+71], N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;re \leq 3.9 \cdot 10^{+71}:\\
                                \;\;\;\;im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if re < 3.9000000000000001e71

                                  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.f6465.5%

                                      \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                                  5. Simplified65.5%

                                    \[\leadsto \color{blue}{\sin im} \]
                                  6. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{im \cdot \left(1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                                  7. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
                                    2. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right)}\right)\right) \]
                                    3. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left({im}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                    4. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \frac{-1}{6}\right)\right)\right) \]
                                    5. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right)\right)\right) \]
                                    6. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \frac{-1}{6}\right)}\right)\right)\right) \]
                                    7. *-lowering-*.f6434.7%

                                      \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                                  8. Simplified34.7%

                                    \[\leadsto \color{blue}{im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\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. Simplified75.0%

                                      \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                    2. Taylor expanded in re around 0

                                      \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)} \]
                                    3. Step-by-step derivation
                                      1. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)\right)}\right) \]
                                      2. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right) \]
                                      3. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right)\right) \]
                                      4. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)}\right)\right)\right)\right) \]
                                      5. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right), \color{blue}{\left(\frac{1}{2} \cdot im\right)}\right)\right)\right)\right)\right) \]
                                      6. *-commutativeN/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\left(im \cdot re\right) \cdot \frac{1}{6}\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      7. associate-*l*N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(re \cdot \frac{1}{6}\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      8. *-commutativeN/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(\frac{1}{6} \cdot re\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      9. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(\frac{1}{6} \cdot re\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      10. *-commutativeN/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(re \cdot \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      11. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                      12. *-commutativeN/A

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(im \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                      13. *-lowering-*.f6462.3%

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                    4. Simplified62.3%

                                      \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(im \cdot \left(re \cdot 0.16666666666666666\right) + im \cdot 0.5\right)\right)} \]
                                    5. Taylor expanded in re around inf

                                      \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                                    6. Step-by-step derivation
                                      1. *-commutativeN/A

                                        \[\leadsto \left(im \cdot {re}^{3}\right) \cdot \color{blue}{\frac{1}{6}} \]
                                      2. associate-*l*N/A

                                        \[\leadsto im \cdot \color{blue}{\left({re}^{3} \cdot \frac{1}{6}\right)} \]
                                      3. *-commutativeN/A

                                        \[\leadsto im \cdot \left(\frac{1}{6} \cdot \color{blue}{{re}^{3}}\right) \]
                                      4. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)}\right) \]
                                      5. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({re}^{3}\right)}\right)\right) \]
                                      6. cube-multN/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right)\right) \]
                                      7. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot {re}^{\color{blue}{2}}\right)\right)\right) \]
                                      8. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
                                      9. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                      10. *-lowering-*.f6469.5%

                                        \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
                                    7. Simplified69.5%

                                      \[\leadsto \color{blue}{im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Add Preprocessing

                                  Alternative 21: 39.0% accurate, 14.5× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 185:\\ \;\;\;\;im + re \cdot im\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
                                  (FPCore (re im)
                                   :precision binary64
                                   (if (<= re 185.0)
                                     (+ im (* re im))
                                     (* im (* 0.16666666666666666 (* re (* re re))))))
                                  double code(double re, double im) {
                                  	double tmp;
                                  	if (re <= 185.0) {
                                  		tmp = im + (re * im);
                                  	} else {
                                  		tmp = im * (0.16666666666666666 * (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 <= 185.0d0) then
                                          tmp = im + (re * im)
                                      else
                                          tmp = im * (0.16666666666666666d0 * (re * (re * re)))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double re, double im) {
                                  	double tmp;
                                  	if (re <= 185.0) {
                                  		tmp = im + (re * im);
                                  	} else {
                                  		tmp = im * (0.16666666666666666 * (re * (re * re)));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(re, im):
                                  	tmp = 0
                                  	if re <= 185.0:
                                  		tmp = im + (re * im)
                                  	else:
                                  		tmp = im * (0.16666666666666666 * (re * (re * re)))
                                  	return tmp
                                  
                                  function code(re, im)
                                  	tmp = 0.0
                                  	if (re <= 185.0)
                                  		tmp = Float64(im + Float64(re * im));
                                  	else
                                  		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(re, im)
                                  	tmp = 0.0;
                                  	if (re <= 185.0)
                                  		tmp = im + (re * im);
                                  	else
                                  		tmp = im * (0.16666666666666666 * (re * (re * re)));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[re_, im_] := If[LessEqual[re, 185.0], N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;re \leq 185:\\
                                  \;\;\;\;im + re \cdot im\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if re < 185

                                    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. Simplified64.0%

                                        \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                      2. Taylor expanded in re around 0

                                        \[\leadsto \color{blue}{im + re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)} \]
                                      3. Step-by-step derivation
                                        1. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)\right)}\right) \]
                                        2. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right) \]
                                        3. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(\frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                        4. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(im \cdot re\right)}\right)\right)\right)\right) \]
                                        5. *-lowering-*.f6435.0%

                                          \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{re}\right)\right)\right)\right)\right) \]
                                      4. Simplified35.0%

                                        \[\leadsto \color{blue}{im + re \cdot \left(im + 0.5 \cdot \left(im \cdot re\right)\right)} \]
                                      5. Taylor expanded in re around 0

                                        \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{im}\right)\right) \]
                                      6. Step-by-step derivation
                                        1. Simplified35.1%

                                          \[\leadsto im + re \cdot \color{blue}{im} \]

                                        if 185 < 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. Simplified72.3%

                                            \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                          2. Taylor expanded in re around 0

                                            \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)} \]
                                          3. Step-by-step derivation
                                            1. +-lowering-+.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)\right)}\right) \]
                                            2. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right) \]
                                            3. +-lowering-+.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)\right)}\right)\right)\right) \]
                                            4. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot re\right) + \frac{1}{2} \cdot im\right)}\right)\right)\right)\right) \]
                                            5. +-lowering-+.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\frac{1}{6} \cdot \left(im \cdot re\right)\right), \color{blue}{\left(\frac{1}{2} \cdot im\right)}\right)\right)\right)\right)\right) \]
                                            6. *-commutativeN/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(\left(im \cdot re\right) \cdot \frac{1}{6}\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            7. associate-*l*N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(re \cdot \frac{1}{6}\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            8. *-commutativeN/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\left(im \cdot \left(\frac{1}{6} \cdot re\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            9. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(\frac{1}{6} \cdot re\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            10. *-commutativeN/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \left(re \cdot \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            11. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot im\right)\right)\right)\right)\right)\right) \]
                                            12. *-commutativeN/A

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \left(im \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                            13. *-lowering-*.f6450.3%

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right) \]
                                          4. Simplified50.3%

                                            \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(im \cdot \left(re \cdot 0.16666666666666666\right) + im \cdot 0.5\right)\right)} \]
                                          5. Taylor expanded in re around inf

                                            \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                                          6. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto \left(im \cdot {re}^{3}\right) \cdot \color{blue}{\frac{1}{6}} \]
                                            2. associate-*l*N/A

                                              \[\leadsto im \cdot \color{blue}{\left({re}^{3} \cdot \frac{1}{6}\right)} \]
                                            3. *-commutativeN/A

                                              \[\leadsto im \cdot \left(\frac{1}{6} \cdot \color{blue}{{re}^{3}}\right) \]
                                            4. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{6} \cdot {re}^{3}\right)}\right) \]
                                            5. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \color{blue}{\left({re}^{3}\right)}\right)\right) \]
                                            6. cube-multN/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot \color{blue}{\left(re \cdot re\right)}\right)\right)\right) \]
                                            7. unpow2N/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \left(re \cdot {re}^{\color{blue}{2}}\right)\right)\right) \]
                                            8. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
                                            9. unpow2N/A

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
                                            10. *-lowering-*.f6456.1%

                                              \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
                                          7. Simplified56.1%

                                            \[\leadsto \color{blue}{im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)} \]
                                        5. Recombined 2 regimes into one program.
                                        6. Add Preprocessing

                                        Alternative 22: 36.5% accurate, 16.9× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 200:\\ \;\;\;\;im + re \cdot im\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
                                        (FPCore (re im)
                                         :precision binary64
                                         (if (<= re 200.0) (+ im (* re im)) (* im (* 0.5 (* re re)))))
                                        double code(double re, double im) {
                                        	double tmp;
                                        	if (re <= 200.0) {
                                        		tmp = im + (re * im);
                                        	} else {
                                        		tmp = im * (0.5 * (re * re));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(re, im)
                                            real(8), intent (in) :: re
                                            real(8), intent (in) :: im
                                            real(8) :: tmp
                                            if (re <= 200.0d0) then
                                                tmp = im + (re * im)
                                            else
                                                tmp = im * (0.5d0 * (re * re))
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double re, double im) {
                                        	double tmp;
                                        	if (re <= 200.0) {
                                        		tmp = im + (re * im);
                                        	} else {
                                        		tmp = im * (0.5 * (re * re));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(re, im):
                                        	tmp = 0
                                        	if re <= 200.0:
                                        		tmp = im + (re * im)
                                        	else:
                                        		tmp = im * (0.5 * (re * re))
                                        	return tmp
                                        
                                        function code(re, im)
                                        	tmp = 0.0
                                        	if (re <= 200.0)
                                        		tmp = Float64(im + Float64(re * im));
                                        	else
                                        		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(re, im)
                                        	tmp = 0.0;
                                        	if (re <= 200.0)
                                        		tmp = im + (re * im);
                                        	else
                                        		tmp = im * (0.5 * (re * re));
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[re_, im_] := If[LessEqual[re, 200.0], N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;re \leq 200:\\
                                        \;\;\;\;im + re \cdot im\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if re < 200

                                          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. Simplified64.0%

                                              \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                            2. Taylor expanded in re around 0

                                              \[\leadsto \color{blue}{im + re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)} \]
                                            3. Step-by-step derivation
                                              1. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)\right)}\right) \]
                                              2. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right) \]
                                              3. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(\frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                              4. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(im \cdot re\right)}\right)\right)\right)\right) \]
                                              5. *-lowering-*.f6435.0%

                                                \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{re}\right)\right)\right)\right)\right) \]
                                            4. Simplified35.0%

                                              \[\leadsto \color{blue}{im + re \cdot \left(im + 0.5 \cdot \left(im \cdot re\right)\right)} \]
                                            5. Taylor expanded in re around 0

                                              \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{im}\right)\right) \]
                                            6. Step-by-step derivation
                                              1. Simplified35.1%

                                                \[\leadsto im + re \cdot \color{blue}{im} \]

                                              if 200 < 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. Simplified72.3%

                                                  \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                2. Taylor expanded in re around 0

                                                  \[\leadsto \color{blue}{im + re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)} \]
                                                3. Step-by-step derivation
                                                  1. +-lowering-+.f64N/A

                                                    \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)\right)}\right) \]
                                                  2. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right) \]
                                                  3. +-lowering-+.f64N/A

                                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(\frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                                  4. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(im \cdot re\right)}\right)\right)\right)\right) \]
                                                  5. *-lowering-*.f6441.4%

                                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{re}\right)\right)\right)\right)\right) \]
                                                4. Simplified41.4%

                                                  \[\leadsto \color{blue}{im + re \cdot \left(im + 0.5 \cdot \left(im \cdot re\right)\right)} \]
                                                5. Taylor expanded in re around inf

                                                  \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(im \cdot {re}^{2}\right)} \]
                                                6. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \left(im \cdot {re}^{2}\right) \cdot \color{blue}{\frac{1}{2}} \]
                                                  2. associate-*l*N/A

                                                    \[\leadsto im \cdot \color{blue}{\left({re}^{2} \cdot \frac{1}{2}\right)} \]
                                                  3. unpow2N/A

                                                    \[\leadsto im \cdot \left(\left(re \cdot re\right) \cdot \frac{1}{2}\right) \]
                                                  4. associate-*r*N/A

                                                    \[\leadsto im \cdot \left(re \cdot \color{blue}{\left(re \cdot \frac{1}{2}\right)}\right) \]
                                                  5. *-commutativeN/A

                                                    \[\leadsto im \cdot \left(re \cdot \left(\frac{1}{2} \cdot \color{blue}{re}\right)\right) \]
                                                  6. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{1}{2} \cdot re\right)\right)}\right) \]
                                                  7. *-commutativeN/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \left(\left(\frac{1}{2} \cdot re\right) \cdot \color{blue}{re}\right)\right) \]
                                                  8. associate-*l*N/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \left(\frac{1}{2} \cdot \color{blue}{\left(re \cdot re\right)}\right)\right) \]
                                                  9. unpow2N/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \left(\frac{1}{2} \cdot {re}^{\color{blue}{2}}\right)\right) \]
                                                  10. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
                                                  11. unpow2N/A

                                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
                                                  12. *-lowering-*.f6447.2%

                                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
                                                7. Simplified47.2%

                                                  \[\leadsto \color{blue}{im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)} \]
                                              5. Recombined 2 regimes into one program.
                                              6. Add Preprocessing

                                              Alternative 23: 28.3% accurate, 25.3× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 4.3 \cdot 10^{+20}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \end{array} \]
                                              (FPCore (re im) :precision binary64 (if (<= im 4.3e+20) im (* re im)))
                                              double code(double re, double im) {
                                              	double tmp;
                                              	if (im <= 4.3e+20) {
                                              		tmp = im;
                                              	} else {
                                              		tmp = re * im;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              real(8) function code(re, im)
                                                  real(8), intent (in) :: re
                                                  real(8), intent (in) :: im
                                                  real(8) :: tmp
                                                  if (im <= 4.3d+20) then
                                                      tmp = im
                                                  else
                                                      tmp = re * im
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double re, double im) {
                                              	double tmp;
                                              	if (im <= 4.3e+20) {
                                              		tmp = im;
                                              	} else {
                                              		tmp = re * im;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(re, im):
                                              	tmp = 0
                                              	if im <= 4.3e+20:
                                              		tmp = im
                                              	else:
                                              		tmp = re * im
                                              	return tmp
                                              
                                              function code(re, im)
                                              	tmp = 0.0
                                              	if (im <= 4.3e+20)
                                              		tmp = im;
                                              	else
                                              		tmp = Float64(re * im);
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(re, im)
                                              	tmp = 0.0;
                                              	if (im <= 4.3e+20)
                                              		tmp = im;
                                              	else
                                              		tmp = re * im;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[re_, im_] := If[LessEqual[im, 4.3e+20], im, N[(re * im), $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;im \leq 4.3 \cdot 10^{+20}:\\
                                              \;\;\;\;im\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;re \cdot im\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if im < 4.3e20

                                                1. Initial program 100.0%

                                                  \[e^{re} \cdot \sin im \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in re around 0

                                                  \[\leadsto \color{blue}{\sin im} \]
                                                4. Step-by-step derivation
                                                  1. sin-lowering-sin.f6451.5%

                                                    \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                                                5. Simplified51.5%

                                                  \[\leadsto \color{blue}{\sin im} \]
                                                6. Taylor expanded in im around 0

                                                  \[\leadsto \color{blue}{im} \]
                                                7. Step-by-step derivation
                                                  1. Simplified33.8%

                                                    \[\leadsto \color{blue}{im} \]

                                                  if 4.3e20 < im

                                                  1. Initial program 99.9%

                                                    \[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-+.f6457.8%

                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                                  5. Simplified57.8%

                                                    \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
                                                  6. Taylor expanded in re around inf

                                                    \[\leadsto \color{blue}{re \cdot \sin im} \]
                                                  7. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \sin im \cdot \color{blue}{re} \]
                                                    2. *-lowering-*.f64N/A

                                                      \[\leadsto \mathsf{*.f64}\left(\sin im, \color{blue}{re}\right) \]
                                                    3. sin-lowering-sin.f643.6%

                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(im\right), re\right) \]
                                                  8. Simplified3.6%

                                                    \[\leadsto \color{blue}{\sin im \cdot re} \]
                                                  9. Taylor expanded in im around 0

                                                    \[\leadsto \color{blue}{im \cdot re} \]
                                                  10. Step-by-step derivation
                                                    1. *-lowering-*.f648.4%

                                                      \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{re}\right) \]
                                                  11. Simplified8.4%

                                                    \[\leadsto \color{blue}{im \cdot re} \]
                                                8. Recombined 2 regimes into one program.
                                                9. Final simplification28.0%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 4.3 \cdot 10^{+20}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 24: 29.9% accurate, 40.6× speedup?

                                                \[\begin{array}{l} \\ im + re \cdot im \end{array} \]
                                                (FPCore (re im) :precision binary64 (+ im (* re im)))
                                                double code(double re, double im) {
                                                	return im + (re * im);
                                                }
                                                
                                                real(8) function code(re, im)
                                                    real(8), intent (in) :: re
                                                    real(8), intent (in) :: im
                                                    code = im + (re * im)
                                                end function
                                                
                                                public static double code(double re, double im) {
                                                	return im + (re * im);
                                                }
                                                
                                                def code(re, im):
                                                	return im + (re * im)
                                                
                                                function code(re, im)
                                                	return Float64(im + Float64(re * im))
                                                end
                                                
                                                function tmp = code(re, im)
                                                	tmp = im + (re * im);
                                                end
                                                
                                                code[re_, im_] := N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                im + re \cdot im
                                                \end{array}
                                                
                                                Derivation
                                                1. Initial program 100.0%

                                                  \[e^{re} \cdot \sin im \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in im around 0

                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(re\right), \color{blue}{im}\right) \]
                                                4. Step-by-step derivation
                                                  1. Simplified66.1%

                                                    \[\leadsto e^{re} \cdot \color{blue}{im} \]
                                                  2. Taylor expanded in re around 0

                                                    \[\leadsto \color{blue}{im + re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)} \]
                                                  3. Step-by-step derivation
                                                    1. +-lowering-+.f64N/A

                                                      \[\leadsto \mathsf{+.f64}\left(im, \color{blue}{\left(re \cdot \left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)\right)}\right) \]
                                                    2. *-lowering-*.f64N/A

                                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im + \frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right) \]
                                                    3. +-lowering-+.f64N/A

                                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \color{blue}{\left(\frac{1}{2} \cdot \left(im \cdot re\right)\right)}\right)\right)\right) \]
                                                    4. *-lowering-*.f64N/A

                                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(im \cdot re\right)}\right)\right)\right)\right) \]
                                                    5. *-lowering-*.f6436.6%

                                                      \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{re}\right)\right)\right)\right)\right) \]
                                                  4. Simplified36.6%

                                                    \[\leadsto \color{blue}{im + re \cdot \left(im + 0.5 \cdot \left(im \cdot re\right)\right)} \]
                                                  5. Taylor expanded in re around 0

                                                    \[\leadsto \mathsf{+.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{im}\right)\right) \]
                                                  6. Step-by-step derivation
                                                    1. Simplified29.2%

                                                      \[\leadsto im + re \cdot \color{blue}{im} \]
                                                    2. Add Preprocessing

                                                    Alternative 25: 29.9% accurate, 40.6× speedup?

                                                    \[\begin{array}{l} \\ im \cdot \left(re + 1\right) \end{array} \]
                                                    (FPCore (re im) :precision binary64 (* im (+ re 1.0)))
                                                    double code(double re, double im) {
                                                    	return im * (re + 1.0);
                                                    }
                                                    
                                                    real(8) function code(re, im)
                                                        real(8), intent (in) :: re
                                                        real(8), intent (in) :: im
                                                        code = im * (re + 1.0d0)
                                                    end function
                                                    
                                                    public static double code(double re, double im) {
                                                    	return im * (re + 1.0);
                                                    }
                                                    
                                                    def code(re, im):
                                                    	return im * (re + 1.0)
                                                    
                                                    function code(re, im)
                                                    	return Float64(im * Float64(re + 1.0))
                                                    end
                                                    
                                                    function tmp = code(re, im)
                                                    	tmp = im * (re + 1.0);
                                                    end
                                                    
                                                    code[re_, im_] := N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    im \cdot \left(re + 1\right)
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 100.0%

                                                      \[e^{re} \cdot \sin im \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in re around 0

                                                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + re\right)}, \mathsf{sin.f64}\left(im\right)\right) \]
                                                    4. Step-by-step derivation
                                                      1. +-commutativeN/A

                                                        \[\leadsto \mathsf{*.f64}\left(\left(re + 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                                      2. +-lowering-+.f6453.5%

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \mathsf{sin.f64}\left(\color{blue}{im}\right)\right) \]
                                                    5. Simplified53.5%

                                                      \[\leadsto \color{blue}{\left(re + 1\right)} \cdot \sin im \]
                                                    6. Taylor expanded in im around 0

                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(re, 1\right), \color{blue}{im}\right) \]
                                                    7. Step-by-step derivation
                                                      1. Simplified29.2%

                                                        \[\leadsto \left(re + 1\right) \cdot \color{blue}{im} \]
                                                      2. Final simplification29.2%

                                                        \[\leadsto im \cdot \left(re + 1\right) \]
                                                      3. Add Preprocessing

                                                      Alternative 26: 26.8% accurate, 203.0× speedup?

                                                      \[\begin{array}{l} \\ im \end{array} \]
                                                      (FPCore (re im) :precision binary64 im)
                                                      double code(double re, double im) {
                                                      	return im;
                                                      }
                                                      
                                                      real(8) function code(re, im)
                                                          real(8), intent (in) :: re
                                                          real(8), intent (in) :: im
                                                          code = im
                                                      end function
                                                      
                                                      public static double code(double re, double im) {
                                                      	return im;
                                                      }
                                                      
                                                      def code(re, im):
                                                      	return im
                                                      
                                                      function code(re, im)
                                                      	return im
                                                      end
                                                      
                                                      function tmp = code(re, im)
                                                      	tmp = im;
                                                      end
                                                      
                                                      code[re_, im_] := im
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      im
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Initial program 100.0%

                                                        \[e^{re} \cdot \sin im \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in re around 0

                                                        \[\leadsto \color{blue}{\sin im} \]
                                                      4. Step-by-step derivation
                                                        1. sin-lowering-sin.f6452.8%

                                                          \[\leadsto \mathsf{sin.f64}\left(im\right) \]
                                                      5. Simplified52.8%

                                                        \[\leadsto \color{blue}{\sin im} \]
                                                      6. Taylor expanded in im around 0

                                                        \[\leadsto \color{blue}{im} \]
                                                      7. Step-by-step derivation
                                                        1. Simplified26.8%

                                                          \[\leadsto \color{blue}{im} \]
                                                        2. Add Preprocessing

                                                        Reproduce

                                                        ?
                                                        herbie shell --seed 2024158 
                                                        (FPCore (re im)
                                                          :name "math.exp on complex, imaginary part"
                                                          :precision binary64
                                                          (* (exp re) (sin im)))