math.exp on complex, imaginary part

Percentage Accurate: 100.0% → 100.0%
Time: 24.4s
Alternatives: 17
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 17 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: 69.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;e^{re} \leq 1 \lor \neg \left(e^{re} \leq 2\right):\\
\;\;\;\;e^{re} \cdot im\\

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


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

    1. Initial program 100.0%

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

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

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

      if 1 < (exp.f64 re) < 2

      1. Initial program 99.7%

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

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

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

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

    Alternative 3: 69.1% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{re} \leq 1 \lor \neg \left(e^{re} \leq 2\right):\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im\\ \end{array} \end{array} \]
    (FPCore (re im)
     :precision binary64
     (if (or (<= (exp re) 1.0) (not (<= (exp re) 2.0))) (* (exp re) im) (sin im)))
    double code(double re, double im) {
    	double tmp;
    	if ((exp(re) <= 1.0) || !(exp(re) <= 2.0)) {
    		tmp = exp(re) * im;
    	} else {
    		tmp = sin(im);
    	}
    	return tmp;
    }
    
    real(8) function code(re, im)
        real(8), intent (in) :: re
        real(8), intent (in) :: im
        real(8) :: tmp
        if ((exp(re) <= 1.0d0) .or. (.not. (exp(re) <= 2.0d0))) then
            tmp = exp(re) * im
        else
            tmp = sin(im)
        end if
        code = tmp
    end function
    
    public static double code(double re, double im) {
    	double tmp;
    	if ((Math.exp(re) <= 1.0) || !(Math.exp(re) <= 2.0)) {
    		tmp = Math.exp(re) * im;
    	} else {
    		tmp = Math.sin(im);
    	}
    	return tmp;
    }
    
    def code(re, im):
    	tmp = 0
    	if (math.exp(re) <= 1.0) or not (math.exp(re) <= 2.0):
    		tmp = math.exp(re) * im
    	else:
    		tmp = math.sin(im)
    	return tmp
    
    function code(re, im)
    	tmp = 0.0
    	if ((exp(re) <= 1.0) || !(exp(re) <= 2.0))
    		tmp = Float64(exp(re) * im);
    	else
    		tmp = sin(im);
    	end
    	return tmp
    end
    
    function tmp_2 = code(re, im)
    	tmp = 0.0;
    	if ((exp(re) <= 1.0) || ~((exp(re) <= 2.0)))
    		tmp = exp(re) * im;
    	else
    		tmp = sin(im);
    	end
    	tmp_2 = tmp;
    end
    
    code[re_, im_] := If[Or[LessEqual[N[Exp[re], $MachinePrecision], 1.0], N[Not[LessEqual[N[Exp[re], $MachinePrecision], 2.0]], $MachinePrecision]], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], N[Sin[im], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;e^{re} \leq 1 \lor \neg \left(e^{re} \leq 2\right):\\
    \;\;\;\;e^{re} \cdot im\\
    
    \mathbf{else}:\\
    \;\;\;\;\sin im\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 re) < 1 or 2 < (exp.f64 re)

      1. Initial program 100.0%

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

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

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

        if 1 < (exp.f64 re) < 2

        1. Initial program 99.7%

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

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

          \[\leadsto \color{blue}{\sin im} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification72.1%

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

      Alternative 4: 97.5% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq -0.05 \lor \neg \left(re \leq 0.037\right) \land re \leq 10^{+103}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
      (FPCore (re im)
       :precision binary64
       (if (or (<= re -0.05) (and (not (<= re 0.037)) (<= re 1e+103)))
         (* (exp re) im)
         (*
          (sin im)
          (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
      double code(double re, double im) {
      	double tmp;
      	if ((re <= -0.05) || (!(re <= 0.037) && (re <= 1e+103))) {
      		tmp = exp(re) * im;
      	} else {
      		tmp = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
      	}
      	return tmp;
      }
      
      real(8) function code(re, im)
          real(8), intent (in) :: re
          real(8), intent (in) :: im
          real(8) :: tmp
          if ((re <= (-0.05d0)) .or. (.not. (re <= 0.037d0)) .and. (re <= 1d+103)) then
              tmp = exp(re) * im
          else
              tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
          end if
          code = tmp
      end function
      
      public static double code(double re, double im) {
      	double tmp;
      	if ((re <= -0.05) || (!(re <= 0.037) && (re <= 1e+103))) {
      		tmp = Math.exp(re) * im;
      	} else {
      		tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
      	}
      	return tmp;
      }
      
      def code(re, im):
      	tmp = 0
      	if (re <= -0.05) or (not (re <= 0.037) and (re <= 1e+103)):
      		tmp = math.exp(re) * im
      	else:
      		tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))))
      	return tmp
      
      function code(re, im)
      	tmp = 0.0
      	if ((re <= -0.05) || (!(re <= 0.037) && (re <= 1e+103)))
      		tmp = Float64(exp(re) * im);
      	else
      		tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(re, im)
      	tmp = 0.0;
      	if ((re <= -0.05) || (~((re <= 0.037)) && (re <= 1e+103)))
      		tmp = exp(re) * im;
      	else
      		tmp = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
      	end
      	tmp_2 = tmp;
      end
      
      code[re_, im_] := If[Or[LessEqual[re, -0.05], And[N[Not[LessEqual[re, 0.037]], $MachinePrecision], LessEqual[re, 1e+103]]], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], 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]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;re \leq -0.05 \lor \neg \left(re \leq 0.037\right) \land re \leq 10^{+103}:\\
      \;\;\;\;e^{re} \cdot im\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if re < -0.050000000000000003 or 0.0369999999999999982 < re < 1e103

        1. Initial program 100.0%

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

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

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

          if -0.050000000000000003 < re < 0.0369999999999999982 or 1e103 < re

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -0.05 \lor \neg \left(re \leq 0.037\right) \land re \leq 10^{+103}:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 5: 93.2% accurate, 1.7× speedup?

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

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

            if -1.29999999999999992e-5 < re < 0.0105000000000000007

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -1.3 \cdot 10^{-5} \lor \neg \left(re \leq 0.0105\right):\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\ \end{array} \]
          7. Add Preprocessing

          Alternative 6: 72.8% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 + re \cdot 0.5\\ t_1 := re \cdot t\_0\\ \mathbf{if}\;re \leq -68:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;re \leq 145:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\ \;\;\;\;\frac{im \cdot \left(1 + t\_1 \cdot \left(re \cdot \left(t\_0 \cdot t\_1\right)\right)\right)}{1 + t\_1 \cdot \left(t\_1 + -1\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 (+ 1.0 (* re 0.5))) (t_1 (* re t_0)))
             (if (<= re -68.0)
               (* (+ re 1.0) (* im (* im (* im -0.16666666666666666))))
               (if (<= re 145.0)
                 (sin im)
                 (if (<= re 1.65e+77)
                   (/
                    (* im (+ 1.0 (* t_1 (* re (* t_0 t_1)))))
                    (+ 1.0 (* t_1 (+ t_1 -1.0))))
                   (* im (* 0.16666666666666666 (* re (* re re)))))))))
          double code(double re, double im) {
          	double t_0 = 1.0 + (re * 0.5);
          	double t_1 = re * t_0;
          	double tmp;
          	if (re <= -68.0) {
          		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
          	} else if (re <= 145.0) {
          		tmp = sin(im);
          	} else if (re <= 1.65e+77) {
          		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
          	} 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 = 1.0d0 + (re * 0.5d0)
              t_1 = re * t_0
              if (re <= (-68.0d0)) then
                  tmp = (re + 1.0d0) * (im * (im * (im * (-0.16666666666666666d0))))
              else if (re <= 145.0d0) then
                  tmp = sin(im)
              else if (re <= 1.65d+77) then
                  tmp = (im * (1.0d0 + (t_1 * (re * (t_0 * t_1))))) / (1.0d0 + (t_1 * (t_1 + (-1.0d0))))
              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 = 1.0 + (re * 0.5);
          	double t_1 = re * t_0;
          	double tmp;
          	if (re <= -68.0) {
          		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
          	} else if (re <= 145.0) {
          		tmp = Math.sin(im);
          	} else if (re <= 1.65e+77) {
          		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
          	} else {
          		tmp = im * (0.16666666666666666 * (re * (re * re)));
          	}
          	return tmp;
          }
          
          def code(re, im):
          	t_0 = 1.0 + (re * 0.5)
          	t_1 = re * t_0
          	tmp = 0
          	if re <= -68.0:
          		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)))
          	elif re <= 145.0:
          		tmp = math.sin(im)
          	elif re <= 1.65e+77:
          		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)))
          	else:
          		tmp = im * (0.16666666666666666 * (re * (re * re)))
          	return tmp
          
          function code(re, im)
          	t_0 = Float64(1.0 + Float64(re * 0.5))
          	t_1 = Float64(re * t_0)
          	tmp = 0.0
          	if (re <= -68.0)
          		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(im * Float64(im * -0.16666666666666666))));
          	elseif (re <= 145.0)
          		tmp = sin(im);
          	elseif (re <= 1.65e+77)
          		tmp = Float64(Float64(im * Float64(1.0 + Float64(t_1 * Float64(re * Float64(t_0 * t_1))))) / Float64(1.0 + Float64(t_1 * Float64(t_1 + -1.0))));
          	else
          		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(re, im)
          	t_0 = 1.0 + (re * 0.5);
          	t_1 = re * t_0;
          	tmp = 0.0;
          	if (re <= -68.0)
          		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
          	elseif (re <= 145.0)
          		tmp = sin(im);
          	elseif (re <= 1.65e+77)
          		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
          	else
          		tmp = im * (0.16666666666666666 * (re * (re * re)));
          	end
          	tmp_2 = tmp;
          end
          
          code[re_, im_] := Block[{t$95$0 = N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * t$95$0), $MachinePrecision]}, If[LessEqual[re, -68.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 145.0], N[Sin[im], $MachinePrecision], If[LessEqual[re, 1.65e+77], N[(N[(im * N[(1.0 + N[(t$95$1 * N[(re * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 * N[(t$95$1 + -1.0), $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 := 1 + re \cdot 0.5\\
          t_1 := re \cdot t\_0\\
          \mathbf{if}\;re \leq -68:\\
          \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
          
          \mathbf{elif}\;re \leq 145:\\
          \;\;\;\;\sin im\\
          
          \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\
          \;\;\;\;\frac{im \cdot \left(1 + t\_1 \cdot \left(re \cdot \left(t\_0 \cdot t\_1\right)\right)\right)}{1 + t\_1 \cdot \left(t\_1 + -1\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 < -68

            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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -68 < re < 145

            1. Initial program 100.0%

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

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

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

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

            if 145 < re < 1.6499999999999999e77

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.6499999999999999e77 < 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. Simplified86.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                9. 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-*.f6483.8%

                    \[\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) \]
                10. Simplified83.8%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -68:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;re \leq 145:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\ \;\;\;\;\frac{im \cdot \left(1 + \left(re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(re \cdot \left(\left(1 + re \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot 0.5\right)\right)\right)\right)\right)}{1 + \left(re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(re \cdot \left(1 + re \cdot 0.5\right) + -1\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 7: 49.2% accurate, 3.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 + re \cdot 0.5\\ t_1 := re \cdot t\_0\\ \mathbf{if}\;re \leq -33:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\ \;\;\;\;\frac{im \cdot \left(1 + t\_1 \cdot \left(re \cdot \left(t\_0 \cdot t\_1\right)\right)\right)}{1 + t\_1 \cdot \left(t\_1 + -1\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 (+ 1.0 (* re 0.5))) (t_1 (* re t_0)))
                 (if (<= re -33.0)
                   (* (+ re 1.0) (* im (* im (* im -0.16666666666666666))))
                   (if (<= re 1.65e+77)
                     (/
                      (* im (+ 1.0 (* t_1 (* re (* t_0 t_1)))))
                      (+ 1.0 (* t_1 (+ t_1 -1.0))))
                     (* im (* 0.16666666666666666 (* re (* re re))))))))
              double code(double re, double im) {
              	double t_0 = 1.0 + (re * 0.5);
              	double t_1 = re * t_0;
              	double tmp;
              	if (re <= -33.0) {
              		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
              	} else if (re <= 1.65e+77) {
              		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
              	} 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 = 1.0d0 + (re * 0.5d0)
                  t_1 = re * t_0
                  if (re <= (-33.0d0)) then
                      tmp = (re + 1.0d0) * (im * (im * (im * (-0.16666666666666666d0))))
                  else if (re <= 1.65d+77) then
                      tmp = (im * (1.0d0 + (t_1 * (re * (t_0 * t_1))))) / (1.0d0 + (t_1 * (t_1 + (-1.0d0))))
                  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 = 1.0 + (re * 0.5);
              	double t_1 = re * t_0;
              	double tmp;
              	if (re <= -33.0) {
              		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
              	} else if (re <= 1.65e+77) {
              		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
              	} else {
              		tmp = im * (0.16666666666666666 * (re * (re * re)));
              	}
              	return tmp;
              }
              
              def code(re, im):
              	t_0 = 1.0 + (re * 0.5)
              	t_1 = re * t_0
              	tmp = 0
              	if re <= -33.0:
              		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)))
              	elif re <= 1.65e+77:
              		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)))
              	else:
              		tmp = im * (0.16666666666666666 * (re * (re * re)))
              	return tmp
              
              function code(re, im)
              	t_0 = Float64(1.0 + Float64(re * 0.5))
              	t_1 = Float64(re * t_0)
              	tmp = 0.0
              	if (re <= -33.0)
              		tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(im * Float64(im * -0.16666666666666666))));
              	elseif (re <= 1.65e+77)
              		tmp = Float64(Float64(im * Float64(1.0 + Float64(t_1 * Float64(re * Float64(t_0 * t_1))))) / Float64(1.0 + Float64(t_1 * Float64(t_1 + -1.0))));
              	else
              		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(re, im)
              	t_0 = 1.0 + (re * 0.5);
              	t_1 = re * t_0;
              	tmp = 0.0;
              	if (re <= -33.0)
              		tmp = (re + 1.0) * (im * (im * (im * -0.16666666666666666)));
              	elseif (re <= 1.65e+77)
              		tmp = (im * (1.0 + (t_1 * (re * (t_0 * t_1))))) / (1.0 + (t_1 * (t_1 + -1.0)));
              	else
              		tmp = im * (0.16666666666666666 * (re * (re * re)));
              	end
              	tmp_2 = tmp;
              end
              
              code[re_, im_] := Block[{t$95$0 = N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * t$95$0), $MachinePrecision]}, If[LessEqual[re, -33.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.65e+77], N[(N[(im * N[(1.0 + N[(t$95$1 * N[(re * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 * N[(t$95$1 + -1.0), $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 := 1 + re \cdot 0.5\\
              t_1 := re \cdot t\_0\\
              \mathbf{if}\;re \leq -33:\\
              \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
              
              \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\
              \;\;\;\;\frac{im \cdot \left(1 + t\_1 \cdot \left(re \cdot \left(t\_0 \cdot t\_1\right)\right)\right)}{1 + t\_1 \cdot \left(t\_1 + -1\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 < -33

                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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -33 < re < 1.6499999999999999e77

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.6499999999999999e77 < 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. Simplified86.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                    9. 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-*.f6483.8%

                        \[\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) \]
                    10. Simplified83.8%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -33:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;re \leq 1.65 \cdot 10^{+77}:\\ \;\;\;\;\frac{im \cdot \left(1 + \left(re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(re \cdot \left(\left(1 + re \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot 0.5\right)\right)\right)\right)\right)}{1 + \left(re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(re \cdot \left(1 + re \cdot 0.5\right) + -1\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 8: 48.3% accurate, 6.1× speedup?

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

                    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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -75 < re < 4.5000000000000003e56

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

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

                      \[\leadsto \color{blue}{\left(1 + re \cdot \left(1 + re \cdot 0.5\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, \frac{1}{2}\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, \frac{1}{2}\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, \frac{1}{2}\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. unpow2N/A

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

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

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

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

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

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

                    if 4.5000000000000003e56 < 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-*.f6481.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. Simplified81.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. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 47.9% accurate, 10.1× speedup?

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

                    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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.6000000000000001 < re

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 47.8% accurate, 10.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\ \mathbf{if}\;re \leq -50:\\ \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\ \mathbf{elif}\;re \leq 5.8 \cdot 10^{+56}:\\ \;\;\;\;im \cdot \left(1 + t\_0\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 (* im (* im -0.16666666666666666))))
                       (if (<= re -50.0)
                         (* (+ re 1.0) (* im t_0))
                         (if (<= re 5.8e+56)
                           (* im (+ 1.0 t_0))
                           (* im (* 0.16666666666666666 (* re (* re re))))))))
                    double code(double re, double im) {
                    	double t_0 = im * (im * -0.16666666666666666);
                    	double tmp;
                    	if (re <= -50.0) {
                    		tmp = (re + 1.0) * (im * t_0);
                    	} else if (re <= 5.8e+56) {
                    		tmp = im * (1.0 + t_0);
                    	} 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) :: tmp
                        t_0 = im * (im * (-0.16666666666666666d0))
                        if (re <= (-50.0d0)) then
                            tmp = (re + 1.0d0) * (im * t_0)
                        else if (re <= 5.8d+56) then
                            tmp = im * (1.0d0 + t_0)
                        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 = im * (im * -0.16666666666666666);
                    	double tmp;
                    	if (re <= -50.0) {
                    		tmp = (re + 1.0) * (im * t_0);
                    	} else if (re <= 5.8e+56) {
                    		tmp = im * (1.0 + t_0);
                    	} else {
                    		tmp = im * (0.16666666666666666 * (re * (re * re)));
                    	}
                    	return tmp;
                    }
                    
                    def code(re, im):
                    	t_0 = im * (im * -0.16666666666666666)
                    	tmp = 0
                    	if re <= -50.0:
                    		tmp = (re + 1.0) * (im * t_0)
                    	elif re <= 5.8e+56:
                    		tmp = im * (1.0 + t_0)
                    	else:
                    		tmp = im * (0.16666666666666666 * (re * (re * re)))
                    	return tmp
                    
                    function code(re, im)
                    	t_0 = Float64(im * Float64(im * -0.16666666666666666))
                    	tmp = 0.0
                    	if (re <= -50.0)
                    		tmp = Float64(Float64(re + 1.0) * Float64(im * t_0));
                    	elseif (re <= 5.8e+56)
                    		tmp = Float64(im * Float64(1.0 + t_0));
                    	else
                    		tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re))));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(re, im)
                    	t_0 = im * (im * -0.16666666666666666);
                    	tmp = 0.0;
                    	if (re <= -50.0)
                    		tmp = (re + 1.0) * (im * t_0);
                    	elseif (re <= 5.8e+56)
                    		tmp = im * (1.0 + t_0);
                    	else
                    		tmp = im * (0.16666666666666666 * (re * (re * re)));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -50.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5.8e+56], N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\
                    \mathbf{if}\;re \leq -50:\\
                    \;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
                    
                    \mathbf{elif}\;re \leq 5.8 \cdot 10^{+56}:\\
                    \;\;\;\;im \cdot \left(1 + t\_0\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 < -50

                      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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -50 < re < 5.80000000000000014e56

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

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

                        \[\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. unpow2N/A

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

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

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

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

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

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

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

                      if 5.80000000000000014e56 < 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. Simplified86.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\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) \]
                        10. Simplified73.2%

                          \[\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. Add Preprocessing

                      Alternative 11: 47.6% accurate, 12.7× speedup?

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

                        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-+.f643.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.80000000000000004 < 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. Simplified61.1%

                            \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(im, \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)\right) \]
                          10. Simplified52.0%

                            \[\leadsto im + \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 12: 39.9% accurate, 14.5× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 9 \cdot 10^{+56}:\\ \;\;\;\;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 9e+56)
                           (* im (+ 1.0 (* im (* im -0.16666666666666666))))
                           (* im (* 0.16666666666666666 (* re (* re re))))))
                        double code(double re, double im) {
                        	double tmp;
                        	if (re <= 9e+56) {
                        		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 <= 9d+56) 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 <= 9e+56) {
                        		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 <= 9e+56:
                        		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 <= 9e+56)
                        		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 <= 9e+56)
                        		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, 9e+56], 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 9 \cdot 10^{+56}:\\
                        \;\;\;\;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 < 9.0000000000000006e56

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 9.0000000000000006e56 < 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. Simplified86.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\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) \]
                            10. Simplified73.2%

                              \[\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 13: 39.7% accurate, 14.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 0.000235:\\ \;\;\;\;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 0.000235) im (* im (* 0.16666666666666666 (* re (* re re))))))
                          double code(double re, double im) {
                          	double tmp;
                          	if (re <= 0.000235) {
                          		tmp = 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 <= 0.000235d0) then
                                  tmp = 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 <= 0.000235) {
                          		tmp = im;
                          	} else {
                          		tmp = im * (0.16666666666666666 * (re * (re * re)));
                          	}
                          	return tmp;
                          }
                          
                          def code(re, im):
                          	tmp = 0
                          	if re <= 0.000235:
                          		tmp = im
                          	else:
                          		tmp = im * (0.16666666666666666 * (re * (re * re)))
                          	return tmp
                          
                          function code(re, im)
                          	tmp = 0.0
                          	if (re <= 0.000235)
                          		tmp = 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 <= 0.000235)
                          		tmp = im;
                          	else
                          		tmp = im * (0.16666666666666666 * (re * (re * re)));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[re_, im_] := If[LessEqual[re, 0.000235], im, N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;re \leq 0.000235:\\
                          \;\;\;\;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 < 2.34999999999999993e-4

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

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

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

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

                                if 2.34999999999999993e-4 < re

                                1. Initial program 100.0%

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

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

                                    \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(im \cdot {re}^{3}\right)} \]
                                  9. 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-*.f6458.0%

                                      \[\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) \]
                                  10. Simplified58.0%

                                    \[\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 14: 37.0% accurate, 16.9× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 0.000235:\\ \;\;\;\;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 0.000235) im (* im (* 0.5 (* re re)))))
                                double code(double re, double im) {
                                	double tmp;
                                	if (re <= 0.000235) {
                                		tmp = im;
                                	} else {
                                		tmp = im * (0.5 * (re * re));
                                	}
                                	return tmp;
                                }
                                
                                real(8) function code(re, im)
                                    real(8), intent (in) :: re
                                    real(8), intent (in) :: im
                                    real(8) :: tmp
                                    if (re <= 0.000235d0) then
                                        tmp = im
                                    else
                                        tmp = im * (0.5d0 * (re * re))
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double re, double im) {
                                	double tmp;
                                	if (re <= 0.000235) {
                                		tmp = im;
                                	} else {
                                		tmp = im * (0.5 * (re * re));
                                	}
                                	return tmp;
                                }
                                
                                def code(re, im):
                                	tmp = 0
                                	if re <= 0.000235:
                                		tmp = im
                                	else:
                                		tmp = im * (0.5 * (re * re))
                                	return tmp
                                
                                function code(re, im)
                                	tmp = 0.0
                                	if (re <= 0.000235)
                                		tmp = im;
                                	else
                                		tmp = Float64(im * Float64(0.5 * Float64(re * re)));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(re, im)
                                	tmp = 0.0;
                                	if (re <= 0.000235)
                                		tmp = im;
                                	else
                                		tmp = im * (0.5 * (re * re));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[re_, im_] := If[LessEqual[re, 0.000235], im, N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;re \leq 0.000235:\\
                                \;\;\;\;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 < 2.34999999999999993e-4

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

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

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

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

                                      if 2.34999999999999993e-4 < re

                                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 15: 27.8% accurate, 25.3× speedup?

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

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

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

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

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

                                            if 7.5e14 < im

                                            1. Initial program 100.0%

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

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

                                                \[\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. *-commutativeN/A

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{im + re \cdot \left(im + re \cdot \left(im \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\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. Simplified10.7%

                                                  \[\leadsto im + re \cdot \color{blue}{im} \]
                                                2. Taylor expanded in re around inf

                                                  \[\leadsto \color{blue}{im \cdot re} \]
                                                3. Step-by-step derivation
                                                  1. *-lowering-*.f6411.0%

                                                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{re}\right) \]
                                                4. Simplified11.0%

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 7.5 \cdot 10^{+14}:\\ \;\;\;\;im\\ \mathbf{else}:\\ \;\;\;\;re \cdot im\\ \end{array} \]
                                              9. Add Preprocessing

                                              Alternative 16: 29.3% accurate, 40.6× speedup?

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

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

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

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

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

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

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

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

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

                                                Alternative 17: 26.2% accurate, 203.0× speedup?

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

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

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

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

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

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

                                                    Reproduce

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