math.exp on complex, imaginary part

Percentage Accurate: 100.0% → 100.0%
Time: 21.4s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 92.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;e^{re} \leq 1.000002:\\
\;\;\;\;\sin im\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (exp.f64 re) < 0.0 or 1.00000200000000006 < (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. Simplified90.0%

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

      if 0.0 < (exp.f64 re) < 1.00000200000000006

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

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

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

    Alternative 3: 97.8% accurate, 1.6× speedup?

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

      1. Initial program 100.0%

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

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

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

        if -0.11799999999999999 < re < 0.0054999999999999997 or 1.01999999999999991e103 < 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-*.f6499.2%

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

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

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

      Alternative 4: 96.7% accurate, 1.6× speedup?

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

        1. Initial program 100.0%

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

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

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

          if -54 < re < 0.0054999999999999997 or 1.8999999999999999e154 < re

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        Alternative 5: 79.8% accurate, 1.7× speedup?

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

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.35000000000000008e165 < re < -5.60000000000000037e102

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \left(1 - {re}^{3}\right)\right), \left(1 \cdot 1 + \left(re \cdot re + 1 \cdot re\right)\right)\right), im\right) \]
                11. cube-unmultN/A

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(re \cdot re + 1 \cdot re\right)\right)\right), im\right) \]
                17. distribute-rgt-outN/A

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(re \cdot \frac{1 - re \cdot re}{1 - re}\right)\right)\right), im\right) \]
                21. un-div-invN/A

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

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

              if -5.60000000000000037e102 < re < -6.5e20

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

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

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

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

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

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

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

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

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

                \[\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(-0.16666666666666666 + \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\right)\right)} \]
              9. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{sum3}\left(re, \left({re}^{2} \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right), 1\right) \cdot \frac{-1}{6}\right) \cdot {im}^{3} \]
                11. sum3-defineN/A

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

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

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

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

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

              if -6.5e20 < re < 4.7e14

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

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

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

              if 4.7e14 < re < 1.01999999999999991e103

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

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

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

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

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

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

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

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

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

                \[\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(-0.16666666666666666 + \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\right)\right)} \]
              9. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

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

              if 1.01999999999999991e103 < re

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -2.35 \cdot 10^{+165}:\\ \;\;\;\;\frac{im \cdot im}{im + re \cdot \left(im \cdot \left(-1 - re \cdot 0.5\right)\right)}\\ \mathbf{elif}\;re \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;im \cdot \left(\frac{1 - re \cdot re}{1 - re \cdot \left(re \cdot re\right)} \cdot \left(re \cdot \left(re + 1\right) + 1\right)\right)\\ \mathbf{elif}\;re \leq -6.5 \cdot 10^{+20}:\\ \;\;\;\;\left(-0.16666666666666666 + re \cdot \left(\left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) \cdot -0.16666666666666666\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\\ \mathbf{elif}\;re \leq 4.7 \cdot 10^{+14}:\\ \;\;\;\;\sin im\\ \mathbf{elif}\;re \leq 1.02 \cdot 10^{+103}:\\ \;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(-0.16666666666666666 + \left(re \cdot \left(\left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) \cdot -0.16666666666666666\right) + \frac{re \cdot \left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right)}{im \cdot im}\right)\right) + 1\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \]
              7. Add Preprocessing

              Alternative 6: 93.3% accurate, 1.8× speedup?

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

                1. Initial program 100.0%

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

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

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

                  if -0.032000000000000001 < re < 0.0051999999999999998

                  1. Initial program 100.0%

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

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

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

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

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

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

                Alternative 7: 54.7% accurate, 5.6× speedup?

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

                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -2.35000000000000008e165 < re < -6.80000000000000034e101

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \left(1 - {re}^{3}\right)\right), \left(1 \cdot 1 + \left(re \cdot re + 1 \cdot re\right)\right)\right), im\right) \]
                        11. cube-unmultN/A

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(re \cdot re + 1 \cdot re\right)\right)\right), im\right) \]
                        17. distribute-rgt-outN/A

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, re\right)\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(re \cdot \frac{1 - re \cdot re}{1 - re}\right)\right)\right), im\right) \]
                        21. un-div-invN/A

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

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

                      if -6.80000000000000034e101 < re < -6.5e20

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

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

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

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

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

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

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

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

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

                        \[\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(-0.16666666666666666 + \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\right)\right)} \]
                      9. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\mathsf{sum3}\left(re, \left({re}^{2} \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot re\right)\right), 1\right) \cdot \frac{-1}{6}\right) \cdot {im}^{3} \]
                        11. sum3-defineN/A

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

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

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

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

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

                      if -6.5e20 < 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-*.f6489.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. Simplified89.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 \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \frac{1}{6}\right)\right)\right)\right)\right)\right), \color{blue}{im}\right) \]
                      7. Step-by-step derivation
                        1. Simplified46.8%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq -2.35 \cdot 10^{+165}:\\ \;\;\;\;\frac{im \cdot im}{im + re \cdot \left(im \cdot \left(-1 - re \cdot 0.5\right)\right)}\\ \mathbf{elif}\;re \leq -6.8 \cdot 10^{+101}:\\ \;\;\;\;im \cdot \left(\frac{1 - re \cdot re}{1 - re \cdot \left(re \cdot re\right)} \cdot \left(re \cdot \left(re + 1\right) + 1\right)\right)\\ \mathbf{elif}\;re \leq -6.5 \cdot 10^{+20}:\\ \;\;\;\;\left(-0.16666666666666666 + re \cdot \left(\left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) \cdot -0.16666666666666666\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(re \cdot \left(0.5 + re \cdot 0.16666666666666666\right) + 1\right) + 1\right)\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 8: 53.7% accurate, 10.1× speedup?

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

                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.6000000000000001 < re

                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 9: 39.9% accurate, 10.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 9.50000000000000001e47 < re

                            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 39.8% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

                                \[\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(-0.16666666666666666 + \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right) \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\right)\right)} \]
                              9. Step-by-step derivation
                                1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right), \frac{1}{216}\right)\right), re\right), \mathsf{+.f64}\left(\frac{1}{4}, \left(\left(re \cdot \frac{1}{6}\right) \cdot \left(re \cdot \frac{1}{6}\right) - \frac{1}{2} \cdot \left(re \cdot \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(re, \frac{-1}{6}\right)\right)\right)\right)\right)\right)\right)\right) \]
                                16. distribute-rgt-out--N/A

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, re\right)\right), \frac{1}{216}\right)\right), re\right), \mathsf{+.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \frac{1}{6}\right), \mathsf{\_.f64}\left(\left(re \cdot \frac{1}{6}\right), \frac{1}{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(re, \frac{-1}{6}\right)\right)\right)\right)\right)\right)\right)\right) \]
                                20. *-lowering-*.f6429.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.6500000000000001e53 < 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. Simplified80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 11: 39.7% accurate, 11.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{120}\right)\right)\right)\right)\right) \]
                                  10. *-lowering-*.f6429.3%

                                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{120}\right)\right)\right)\right)\right) \]
                                11. Simplified29.3%

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

                                if 1.00000000000000004e48 < re

                                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 39.6% accurate, 13.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \color{blue}{im} \]
                                  2. Final simplification36.5%

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

                                  Alternative 13: 39.8% accurate, 14.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.2e52 < 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. Simplified80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 14: 39.6% accurate, 14.5× speedup?

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

                                      1. Initial program 100.0%

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

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

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

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

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

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

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

                                        if 2.7999999999999998 < 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. Simplified80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 15: 37.0% accurate, 16.9× speedup?

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

                                          1. Initial program 100.0%

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

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

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

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

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

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

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

                                            if 2.7000000000000002 < 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. Simplified80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 16: 28.2% accurate, 25.3× speedup?

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

                                              1. Initial program 100.0%

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

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

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

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

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

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

                                                if 1.08e80 < im

                                                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

                                                  Alternative 17: 29.6% accurate, 40.6× speedup?

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

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

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

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

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

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

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

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

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

                                                    Alternative 18: 26.5% accurate, 203.0× speedup?

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

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

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

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

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

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

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

                                                      Reproduce

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