math.sin on complex, real part

Percentage Accurate: 100.0% → 100.0%
Time: 11.7s
Alternatives: 24
Speedup: 1.5×

Specification

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

\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\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 24 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} \\ \left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \end{array} \]
(FPCore (re im)
 :precision binary64
 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
	return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
	return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im):
	return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im)
	return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im)))
end
function tmp = code(re, im)
	tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}

Alternative 1: 100.0% accurate, 0.8× speedup?

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

\\
\frac{0.5 \cdot \sin re}{e^{im}} + 0.5 \cdot \left(\sin re \cdot e^{im}\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. distribute-rgt-inN/A

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

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

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

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{2} \cdot \sin re\right) \cdot e^{\mathsf{neg}\left(im\right)}\right), \left(e^{im} \cdot \left(\frac{1}{2} \cdot \sin re\right)\right)\right) \]
    5. exp-negN/A

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{2} \cdot \sin re\right) \cdot \frac{1}{e^{im}}\right), \left(e^{im} \cdot \left(\frac{1}{2} \cdot \sin re\right)\right)\right) \]
    6. un-div-invN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{\color{blue}{im}}\right)\right)\right)\right) \]
    18. exp-lowering-exp.f64100.0%

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

    \[\leadsto \color{blue}{\frac{0.5 \cdot \sin re}{e^{im}} + 0.5 \cdot \left(\sin re \cdot e^{im}\right)} \]
  5. Add Preprocessing

Alternative 2: 100.0% accurate, 1.5× speedup?

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

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

    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
    10. exp-0N/A

      \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
    12. exp-0N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
  4. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\left(1 \cdot \cosh im\right) \cdot \sin re} \]
  5. Final simplification100.0%

    \[\leadsto \sin re \cdot \cosh im \]
  6. Add Preprocessing

Alternative 3: 95.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \mathbf{if}\;im \leq 0.52:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\ \;\;\;\;re \cdot \cosh im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (re im)
 :precision binary64
 (let* ((t_0
         (*
          (sin re)
          (+
           1.0
           (*
            (* im im)
            (+
             0.5
             (*
              im
              (*
               im
               (+
                0.041666666666666664
                (* (* im im) 0.001388888888888889))))))))))
   (if (<= im 0.52) t_0 (if (<= im 7.2e+51) (* re (cosh im)) t_0))))
double code(double re, double im) {
	double t_0 = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
	double tmp;
	if (im <= 0.52) {
		tmp = t_0;
	} else if (im <= 7.2e+51) {
		tmp = re * cosh(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 = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
    if (im <= 0.52d0) then
        tmp = t_0
    else if (im <= 7.2d+51) then
        tmp = re * cosh(im)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double re, double im) {
	double t_0 = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
	double tmp;
	if (im <= 0.52) {
		tmp = t_0;
	} else if (im <= 7.2e+51) {
		tmp = re * Math.cosh(im);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(re, im):
	t_0 = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))))
	tmp = 0
	if im <= 0.52:
		tmp = t_0
	elif im <= 7.2e+51:
		tmp = re * math.cosh(im)
	else:
		tmp = t_0
	return tmp
function code(re, im)
	t_0 = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889))))))))
	tmp = 0.0
	if (im <= 0.52)
		tmp = t_0;
	elseif (im <= 7.2e+51)
		tmp = Float64(re * cosh(im));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(re, im)
	t_0 = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
	tmp = 0.0;
	if (im <= 0.52)
		tmp = t_0;
	elseif (im <= 7.2e+51)
		tmp = re * cosh(im);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[re_, im_] := Block[{t$95$0 = N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.52], t$95$0, If[LessEqual[im, 7.2e+51], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{if}\;im \leq 0.52:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \cosh im\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if im < 0.52000000000000002 or 7.20000000000000022e51 < im

    1. Initial program 100.0%

      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
      10. exp-0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
      12. exp-0N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
    4. Applied egg-rr100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
      14. *-lowering-*.f6496.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
    7. Simplified96.9%

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

    if 0.52000000000000002 < im < 7.20000000000000022e51

    1. Initial program 100.0%

      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
      10. exp-0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
      12. exp-0N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
    4. Applied egg-rr100.0%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.52:\\ \;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\ \;\;\;\;re \cdot \cosh im\\ \mathbf{else}:\\ \;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 4: 92.0% accurate, 2.4× speedup?

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

      1. Initial program 100.0%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
      4. Step-by-step derivation
        1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
      5. Simplified95.1%

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

      if 0.299999999999999989 < im < 5.79999999999999999e60

      1. Initial program 100.0%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
        10. exp-0N/A

          \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
        12. exp-0N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
      4. Applied egg-rr100.0%

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

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

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

        if 5.79999999999999999e60 < im < 1.1199999999999999e77

        1. Initial program 100.0%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.3:\\ \;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\ \mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \cosh im\\ \mathbf{elif}\;im \leq 1.12 \cdot 10^{+77}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 5: 84.6% accurate, 2.5× speedup?

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

        1. Initial program 100.0%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in im around 0

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

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

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

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

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

        if 0.0570000000000000021 < im < 5.79999999999999999e60

        1. Initial program 100.0%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
          10. exp-0N/A

            \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
          12. exp-0N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
        4. Applied egg-rr100.0%

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

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

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

          if 5.79999999999999999e60 < im < 1.35000000000000003e154

          1. Initial program 100.0%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in im around 0

            \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
          4. Step-by-step derivation
            1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
          5. Simplified85.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.057:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\ \mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \cosh im\\ \mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 6: 68.5% accurate, 2.7× speedup?

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

          1. Initial program 100.0%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in im around 0

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

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

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

          if 1.18e-7 < im < 5.79999999999999999e60

          1. Initial program 99.9%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
            10. exp-0N/A

              \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
            12. exp-0N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
          4. Applied egg-rr99.9%

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

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

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

            if 5.79999999999999999e60 < im < 5.59999999999999982e141

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
            4. Step-by-step derivation
              1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            5. Simplified84.7%

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

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

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

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

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

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

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

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

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

            if 5.59999999999999982e141 < im

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
            4. Step-by-step derivation
              1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            5. Simplified100.0%

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

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

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

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

                  \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                2. metadata-evalN/A

                  \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 1.18 \cdot 10^{-7}:\\ \;\;\;\;\sin re\\ \mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \cosh im\\ \mathbf{elif}\;im \leq 5.6 \cdot 10^{+141}:\\ \;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 7: 68.3% accurate, 2.9× speedup?

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

              1. Initial program 100.0%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

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

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

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

              if 1.18e-7 < im < 1.75e141

              1. Initial program 100.0%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                13. *-lowering-*.f6473.8%

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

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

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

                  \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                2. fma-defineN/A

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

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

                  \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                5. fma-undefineN/A

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

                  \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
              8. Simplified67.7%

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

                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left({re}^{2} \cdot \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \frac{2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}{{re}^{2}}\right)\right)}\right) \]
              10. Simplified55.0%

                \[\leadsto re \cdot \color{blue}{\left(\left(re \cdot re\right) \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)} \]
              11. Step-by-step derivation
                1. associate-*l*N/A

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

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

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

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

              if 1.75e141 < im

              1. Initial program 100.0%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
              4. Step-by-step derivation
                1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
              5. Simplified100.0%

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

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

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

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

                    \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                  2. metadata-evalN/A

                    \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                  3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
              8. Recombined 3 regimes into one program.
              9. Final simplification68.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 1.18 \cdot 10^{-7}:\\ \;\;\;\;\sin re\\ \mathbf{elif}\;im \leq 1.75 \cdot 10^{+141}:\\ \;\;\;\;re \cdot \left(re \cdot \left(re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 8: 44.6% accurate, 4.7× speedup?

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

                1. Initial program 100.0%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)} \]
                9. Step-by-step derivation
                  1. metadata-evalN/A

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

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

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

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

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

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

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

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

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

                if 5.39999999999999983e51 < im < 4.39999999999999974e142

                1. Initial program 100.0%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                  2. fma-defineN/A

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

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

                    \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                  5. fma-undefineN/A

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

                    \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                8. Simplified84.6%

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

                if 4.39999999999999974e142 < im

                1. Initial program 100.0%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                4. Step-by-step derivation
                  1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                5. Simplified100.0%

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

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

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

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

                      \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                    2. metadata-evalN/A

                      \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                    3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 5.4 \cdot 10^{+51}:\\ \;\;\;\;re \cdot \frac{0.5 \cdot \left(4 + \left(im \cdot im\right) \cdot \left(\left(im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right)\right) \cdot \left(im \cdot \left(-1 - \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right)\right)\right)\right)}{2 + im \cdot \left(im \cdot \left(-1 - \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right)\right)}\\ \mathbf{elif}\;im \leq 4.4 \cdot 10^{+142}:\\ \;\;\;\;re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                10. Add Preprocessing

                Alternative 9: 59.1% accurate, 7.2× speedup?

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

                  1. Initial program 100.0%

                    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                    13. *-lowering-*.f6495.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right)\right) \]
                  8. Simplified60.7%

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

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

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

                      \[\leadsto re \cdot \left(\left(\frac{1}{2} \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(im \cdot \left(\frac{1}{12} + \left(im \cdot im\right) \cdot \frac{1}{360}\right)\right)\right)\right) + re \]
                    4. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(re \cdot \left(\left(\frac{1}{2} \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(im \cdot \left(\frac{1}{12} + \left(im \cdot im\right) \cdot \frac{1}{360}\right)\right)\right)\right)\right), \color{blue}{re}\right) \]
                  10. Applied egg-rr60.2%

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

                  if 132000 < im < 2.0599999999999999e142

                  1. Initial program 100.0%

                    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                    2. fma-defineN/A

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

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

                      \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                    5. fma-undefineN/A

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

                      \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                  8. Simplified67.9%

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

                    \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left({re}^{2} \cdot \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) + \frac{1}{2} \cdot \frac{2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}{{re}^{2}}\right)\right)}\right) \]
                  10. Simplified54.1%

                    \[\leadsto re \cdot \color{blue}{\left(\left(re \cdot re\right) \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)} \]
                  11. Step-by-step derivation
                    1. associate-*l*N/A

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

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

                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(\frac{1}{12} + im \cdot \left(im \cdot \frac{1}{360}\right)\right)\right)\right)\right) \cdot \left(\frac{-1}{12} + \frac{\frac{1}{2}}{re \cdot re}\right)\right)\right), \color{blue}{re}\right)\right) \]
                  12. Applied egg-rr78.4%

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

                  if 2.0599999999999999e142 < im

                  1. Initial program 100.0%

                    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in im around 0

                    \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                  4. Step-by-step derivation
                    1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                  5. Simplified100.0%

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

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

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

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

                        \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                      2. metadata-evalN/A

                        \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                      3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 132000:\\ \;\;\;\;re + \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right) \cdot \left(re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\right)\\ \mathbf{elif}\;im \leq 2.06 \cdot 10^{+142}:\\ \;\;\;\;re \cdot \left(re \cdot \left(re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 10: 58.1% accurate, 7.9× speedup?

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

                    1. Initial program 100.0%

                      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in im around 0

                      \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                    4. Step-by-step derivation
                      1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                    5. Simplified88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 5.7999999999999997e51 < im < 4.7999999999999999e140

                    1. Initial program 100.0%

                      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                      2. fma-defineN/A

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

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

                        \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                      5. fma-undefineN/A

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

                        \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                    8. Simplified84.6%

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

                    if 4.7999999999999999e140 < im

                    1. Initial program 100.0%

                      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in im around 0

                      \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                    4. Step-by-step derivation
                      1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                    5. Simplified100.0%

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

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

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

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

                          \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                        2. metadata-evalN/A

                          \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                        3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification65.7%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 5.8 \cdot 10^{+51}:\\ \;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\\ \mathbf{elif}\;im \leq 4.8 \cdot 10^{+140}:\\ \;\;\;\;re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 11: 54.9% accurate, 7.9× speedup?

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

                      1. Initial program 100.0%

                        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
                        10. exp-0N/A

                          \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
                        11. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
                        12. exp-0N/A

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                      4. Applied egg-rr100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.0500000000000001e51 < im < 6.99999999999999978e140

                      1. Initial program 100.0%

                        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                        2. fma-defineN/A

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

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

                          \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                        5. fma-undefineN/A

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

                          \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                      8. Simplified84.6%

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

                      if 6.99999999999999978e140 < im

                      1. Initial program 100.0%

                        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in im around 0

                        \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                      4. Step-by-step derivation
                        1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                      5. Simplified100.0%

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

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

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

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

                            \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                          2. metadata-evalN/A

                            \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                          3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
                      8. Recombined 3 regimes into one program.
                      9. Add Preprocessing

                      Alternative 12: 53.6% accurate, 9.4× speedup?

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

                        1. Initial program 100.0%

                          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. *-commutativeN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
                          10. exp-0N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
                          12. exp-0N/A

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                        4. Applied egg-rr100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 3.59999999999999968e60 < im < 1.52e141

                        1. Initial program 100.0%

                          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in im around 0

                          \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                        4. Step-by-step derivation
                          1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                        5. Simplified84.7%

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

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

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

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

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

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

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

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

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

                        if 1.52e141 < im

                        1. Initial program 100.0%

                          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in im around 0

                          \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                        4. Step-by-step derivation
                          1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                        5. Simplified100.0%

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

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

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

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

                              \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                            2. metadata-evalN/A

                              \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                            3. pow-sqrN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 3.6 \cdot 10^{+60}:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\right)\\ \mathbf{elif}\;im \leq 1.52 \cdot 10^{+141}:\\ \;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 13: 57.6% accurate, 9.4× speedup?

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

                          1. Initial program 100.0%

                            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. *-commutativeN/A

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
                            10. exp-0N/A

                              \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
                            11. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
                            12. exp-0N/A

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                          4. Applied egg-rr100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                            14. *-lowering-*.f6458.9%

                              \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                          10. Simplified58.9%

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

                          if 5.79999999999999999e60 < im < 9.5999999999999999e140

                          1. Initial program 100.0%

                            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in im around 0

                            \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                          4. Step-by-step derivation
                            1. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                          5. Simplified84.7%

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

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

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

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

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

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

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

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

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

                          if 9.5999999999999999e140 < im

                          1. Initial program 100.0%

                            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in im around 0

                            \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                          4. Step-by-step derivation
                            1. *-rgt-identityN/A

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

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

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

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

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

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

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

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                            9. unpow2N/A

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                            10. associate-*r*N/A

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                            11. *-commutativeN/A

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                            12. *-commutativeN/A

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                            13. associate-*l*N/A

                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                            14. distribute-lft-outN/A

                              \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                          5. Simplified100.0%

                            \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                          6. Taylor expanded in re around 0

                            \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                          7. Step-by-step derivation
                            1. Simplified87.5%

                              \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                            2. Taylor expanded in im around inf

                              \[\leadsto \color{blue}{\frac{1}{24} \cdot \left({im}^{4} \cdot re\right)} \]
                            3. Step-by-step derivation
                              1. associate-*r*N/A

                                \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                              2. metadata-evalN/A

                                \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                              3. pow-sqrN/A

                                \[\leadsto \left(\frac{1}{24} \cdot \left({im}^{2} \cdot {im}^{2}\right)\right) \cdot re \]
                              4. associate-*l*N/A

                                \[\leadsto \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot {im}^{2}\right) \cdot re \]
                              5. *-commutativeN/A

                                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot re \]
                              6. associate-*r*N/A

                                \[\leadsto {im}^{2} \cdot \color{blue}{\left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot re\right)} \]
                              7. associate-*r*N/A

                                \[\leadsto {im}^{2} \cdot \left(\frac{1}{24} \cdot \color{blue}{\left({im}^{2} \cdot re\right)}\right) \]
                              8. unpow2N/A

                                \[\leadsto \left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot \left({im}^{2} \cdot re\right)\right) \]
                              9. associate-*l*N/A

                                \[\leadsto im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)\right)} \]
                              10. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)\right)}\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)}\right)\right) \]
                              12. associate-*r*N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{re}\right)\right)\right) \]
                              13. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(re \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                              14. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                              15. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right) \]
                              16. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right) \]
                              17. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right) \]
                              18. *-lowering-*.f6487.5%

                                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right) \]
                            4. Simplified87.5%

                              \[\leadsto \color{blue}{im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
                          8. Recombined 3 regimes into one program.
                          9. Final simplification64.7%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 5.8 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\\ \mathbf{elif}\;im \leq 9.6 \cdot 10^{+140}:\\ \;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 14: 58.5% accurate, 11.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\ \;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \end{array} \end{array} \]
                          (FPCore (re im)
                           :precision binary64
                           (if (<= re 1.5e+219)
                             (*
                              re
                              (+
                               1.0
                               (*
                                (* im im)
                                (+
                                 0.5
                                 (*
                                  (* im im)
                                  (+ 0.041666666666666664 (* (* im im) 0.001388888888888889)))))))
                             (* re (+ 1.0 (* (* re re) -0.16666666666666666)))))
                          double code(double re, double im) {
                          	double tmp;
                          	if (re <= 1.5e+219) {
                          		tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
                          	} else {
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(re, im)
                              real(8), intent (in) :: re
                              real(8), intent (in) :: im
                              real(8) :: tmp
                              if (re <= 1.5d+219) then
                                  tmp = re * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0))))))
                              else
                                  tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double re, double im) {
                          	double tmp;
                          	if (re <= 1.5e+219) {
                          		tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
                          	} else {
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	}
                          	return tmp;
                          }
                          
                          def code(re, im):
                          	tmp = 0
                          	if re <= 1.5e+219:
                          		tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))
                          	else:
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                          	return tmp
                          
                          function code(re, im)
                          	tmp = 0.0
                          	if (re <= 1.5e+219)
                          		tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))));
                          	else
                          		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(re, im)
                          	tmp = 0.0;
                          	if (re <= 1.5e+219)
                          		tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
                          	else
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[re_, im_] := If[LessEqual[re, 1.5e+219], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\
                          \;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if re < 1.4999999999999999e219

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left(e^{0 - im} + e^{im}\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \sin re\right)} \]
                              2. associate-*r*N/A

                                \[\leadsto \left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin re} \]
                              3. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right), \color{blue}{\sin re}\right) \]
                              4. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \left(e^{0 - im} + e^{im}\right)\right), \sin \color{blue}{re}\right) \]
                              5. +-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \left(e^{im} + e^{0 - im}\right)\right), \sin re\right) \]
                              6. sub0-negN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \left(e^{im} + e^{\mathsf{neg}\left(im\right)}\right)\right), \sin re\right) \]
                              7. cosh-undefN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot \left(2 \cdot \cosh im\right)\right), \sin re\right) \]
                              8. associate-*r*N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{1}{2} \cdot 2\right) \cdot \cosh im\right), \sin \color{blue}{re}\right) \]
                              9. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(\left(1 \cdot \cosh im\right), \sin re\right) \]
                              10. exp-0N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(e^{0} \cdot \cosh im\right), \sin re\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{0}\right), \cosh im\right), \sin \color{blue}{re}\right) \]
                              12. exp-0N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \cosh im\right), \sin re\right) \]
                              13. cosh-lowering-cosh.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \sin re\right) \]
                              14. sin-lowering-sin.f64100.0%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(1, \mathsf{cosh.f64}\left(im\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                            4. Applied egg-rr100.0%

                              \[\leadsto \color{blue}{\left(1 \cdot \cosh im\right) \cdot \sin re} \]
                            5. Taylor expanded in im around 0

                              \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)}, \mathsf{sin.f64}\left(re\right)\right) \]
                            6. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(\color{blue}{re}\right)\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({im}^{2}\right), \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              3. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              5. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \left({im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              6. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(im \cdot im\right) \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              7. associate-*l*N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(im \cdot \left(im \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              9. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              10. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \left(\frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              11. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \left({im}^{2} \cdot \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              12. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              13. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                              14. *-lowering-*.f6493.5%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(re\right)\right) \]
                            7. Simplified93.5%

                              \[\leadsto \color{blue}{\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \cdot \sin re \]
                            8. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{re \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)} \]
                            9. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)}\right) \]
                              2. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)}\right)\right) \]
                              3. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{1}{2} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                              4. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{1}{2}} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{2}} + {im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              6. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{1}{24} + \frac{1}{720} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right) \]
                              8. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{1}{24}} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              9. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{24}} + \frac{1}{720} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              10. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \color{blue}{\left(\frac{1}{720} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                              11. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \left({im}^{2} \cdot \color{blue}{\frac{1}{720}}\right)\right)\right)\right)\right)\right)\right) \]
                              12. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{720}}\right)\right)\right)\right)\right)\right)\right) \]
                              13. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                              14. *-lowering-*.f6464.2%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right) \]
                            10. Simplified64.2%

                              \[\leadsto \color{blue}{re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)} \]

                            if 1.4999999999999999e219 < re

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \color{blue}{\sin re} \]
                            4. Step-by-step derivation
                              1. sin-lowering-sin.f6427.3%

                                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                            5. Simplified27.3%

                              \[\leadsto \color{blue}{\sin re} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                            7. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                              2. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                              3. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                              6. *-lowering-*.f6430.5%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                            8. Simplified30.5%

                              \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]
                          3. Recombined 2 regimes into one program.
                          4. Add Preprocessing

                          Alternative 15: 58.4% accurate, 11.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\ \;\;\;\;re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(0.002777777777777778 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \end{array} \end{array} \]
                          (FPCore (re im)
                           :precision binary64
                           (if (<= re 1.5e+219)
                             (*
                              re
                              (+
                               1.0
                               (*
                                (* 0.5 (* im im))
                                (+ 1.0 (* im (* 0.002777777777777778 (* im (* im im))))))))
                             (* re (+ 1.0 (* (* re re) -0.16666666666666666)))))
                          double code(double re, double im) {
                          	double tmp;
                          	if (re <= 1.5e+219) {
                          		tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))));
                          	} else {
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(re, im)
                              real(8), intent (in) :: re
                              real(8), intent (in) :: im
                              real(8) :: tmp
                              if (re <= 1.5d+219) then
                                  tmp = re * (1.0d0 + ((0.5d0 * (im * im)) * (1.0d0 + (im * (0.002777777777777778d0 * (im * (im * im)))))))
                              else
                                  tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double re, double im) {
                          	double tmp;
                          	if (re <= 1.5e+219) {
                          		tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))));
                          	} else {
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	}
                          	return tmp;
                          }
                          
                          def code(re, im):
                          	tmp = 0
                          	if re <= 1.5e+219:
                          		tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))))
                          	else:
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                          	return tmp
                          
                          function code(re, im)
                          	tmp = 0.0
                          	if (re <= 1.5e+219)
                          		tmp = Float64(re * Float64(1.0 + Float64(Float64(0.5 * Float64(im * im)) * Float64(1.0 + Float64(im * Float64(0.002777777777777778 * Float64(im * Float64(im * im))))))));
                          	else
                          		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(re, im)
                          	tmp = 0.0;
                          	if (re <= 1.5e+219)
                          		tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))));
                          	else
                          		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[re_, im_] := If[LessEqual[re, 1.5e+219], N[(re * N[(1.0 + N[(N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(im * N[(0.002777777777777778 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\
                          \;\;\;\;re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(0.002777777777777778 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if re < 1.4999999999999999e219

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right) \]
                            4. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right)\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                              3. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              5. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right) \]
                              7. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              9. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \color{blue}{\left(\frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                              10. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \left({im}^{2} \cdot \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                              12. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f6493.5%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                            5. Simplified93.5%

                              \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(2 + \left(im \cdot im\right) \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(re \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            7. Step-by-step derivation
                              1. associate-*r*N/A

                                \[\leadsto \left(\frac{1}{2} \cdot re\right) \cdot \color{blue}{\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)} \]
                              2. *-commutativeN/A

                                \[\leadsto \left(re \cdot \frac{1}{2}\right) \cdot \left(\color{blue}{2} + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) \]
                              3. associate-*r*N/A

                                \[\leadsto re \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)}\right) \]
                              5. distribute-rgt-inN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \left(2 \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) \cdot \frac{1}{2}}\right)\right) \]
                              6. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \left(1 + \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)} \cdot \frac{1}{2}\right)\right) \]
                              7. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) \cdot \frac{1}{2}\right)}\right)\right) \]
                              8. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right)\right)\right) \]
                              9. associate-*r*N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                              10. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot {im}^{2}\right), \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({im}^{2}\right)\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              12. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot im\right)\right), \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              14. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right) \]
                              15. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              16. associate-*l*N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right)\right) \]
                            8. Simplified64.2%

                              \[\leadsto \color{blue}{re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)} \]
                            9. Taylor expanded in im around inf

                              \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{360} \cdot {im}^{3}\right)}\right)\right)\right)\right)\right) \]
                            10. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \color{blue}{\left({im}^{3}\right)}\right)\right)\right)\right)\right)\right) \]
                              2. cube-multN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \left(im \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right)\right)\right) \]
                              3. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \left(im \cdot {im}^{\color{blue}{2}}\right)\right)\right)\right)\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \mathsf{*.f64}\left(im, \left(im \cdot \color{blue}{im}\right)\right)\right)\right)\right)\right)\right)\right) \]
                              6. *-lowering-*.f6464.2%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, im\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{360}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right)\right)\right) \]
                            11. Simplified64.2%

                              \[\leadsto re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \color{blue}{\left(0.002777777777777778 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)}\right)\right) \]

                            if 1.4999999999999999e219 < re

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \color{blue}{\sin re} \]
                            4. Step-by-step derivation
                              1. sin-lowering-sin.f6427.3%

                                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                            5. Simplified27.3%

                              \[\leadsto \color{blue}{\sin re} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                            7. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                              2. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                              3. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                              6. *-lowering-*.f6430.5%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                            8. Simplified30.5%

                              \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]
                          3. Recombined 2 regimes into one program.
                          4. Add Preprocessing

                          Alternative 16: 46.3% accurate, 12.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 4.9 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\\ \mathbf{elif}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \end{array} \]
                          (FPCore (re im)
                           :precision binary64
                           (if (<= im 4.9e+60)
                             (*
                              re
                              (+
                               1.0
                               (*
                                (* re re)
                                (+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))
                             (if (<= im 2.1e+79)
                               (* re (* (+ (* im im) 2.0) (+ 0.5 (* re (* re -0.08333333333333333)))))
                               (* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664))))))))
                          double code(double re, double im) {
                          	double tmp;
                          	if (im <= 4.9e+60) {
                          		tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
                          	} else if (im <= 2.1e+79) {
                          		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                          	} else {
                          		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(re, im)
                              real(8), intent (in) :: re
                              real(8), intent (in) :: im
                              real(8) :: tmp
                              if (im <= 4.9d+60) then
                                  tmp = re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))
                              else if (im <= 2.1d+79) then
                                  tmp = re * (((im * im) + 2.0d0) * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
                              else
                                  tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double re, double im) {
                          	double tmp;
                          	if (im <= 4.9e+60) {
                          		tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
                          	} else if (im <= 2.1e+79) {
                          		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                          	} else {
                          		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                          	}
                          	return tmp;
                          }
                          
                          def code(re, im):
                          	tmp = 0
                          	if im <= 4.9e+60:
                          		tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))
                          	elif im <= 2.1e+79:
                          		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))))
                          	else:
                          		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))))
                          	return tmp
                          
                          function code(re, im)
                          	tmp = 0.0
                          	if (im <= 4.9e+60)
                          		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333)))));
                          	elseif (im <= 2.1e+79)
                          		tmp = Float64(re * Float64(Float64(Float64(im * im) + 2.0) * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333)))));
                          	else
                          		tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(re, im)
                          	tmp = 0.0;
                          	if (im <= 4.9e+60)
                          		tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
                          	elseif (im <= 2.1e+79)
                          		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                          	else
                          		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[re_, im_] := If[LessEqual[im, 4.9e+60], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.1e+79], N[(re * N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;im \leq 4.9 \cdot 10^{+60}:\\
                          \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\\
                          
                          \mathbf{elif}\;im \leq 2.1 \cdot 10^{+79}:\\
                          \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if im < 4.9000000000000003e60

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \color{blue}{\sin re} \]
                            4. Step-by-step derivation
                              1. sin-lowering-sin.f6459.6%

                                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                            5. Simplified59.6%

                              \[\leadsto \color{blue}{\sin re} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{re \cdot \left(1 + {re}^{2} \cdot \left(\frac{1}{120} \cdot {re}^{2} - \frac{1}{6}\right)\right)} \]
                            7. Step-by-step derivation
                              1. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + {re}^{2} \cdot \left(\frac{1}{120} \cdot {re}^{2} - \frac{1}{6}\right)\right)}\right) \]
                              2. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left({re}^{2} \cdot \left(\frac{1}{120} \cdot {re}^{2} - \frac{1}{6}\right)\right)}\right)\right) \]
                              3. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\left(\frac{1}{120} \cdot {re}^{2} - \frac{1}{6}\right)}\right)\right)\right) \]
                              4. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \left(\color{blue}{\frac{1}{120} \cdot {re}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \left(\color{blue}{\frac{1}{120} \cdot {re}^{2}} - \frac{1}{6}\right)\right)\right)\right) \]
                              6. sub-negN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \left(\frac{1}{120} \cdot {re}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}\right)\right)\right)\right) \]
                              7. metadata-evalN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \left(\frac{1}{120} \cdot {re}^{2} + \frac{-1}{6}\right)\right)\right)\right) \]
                              8. +-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \left(\frac{-1}{6} + \color{blue}{\frac{1}{120} \cdot {re}^{2}}\right)\right)\right)\right) \]
                              9. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{+.f64}\left(\frac{-1}{6}, \color{blue}{\left(\frac{1}{120} \cdot {re}^{2}\right)}\right)\right)\right)\right) \]
                              10. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{+.f64}\left(\frac{-1}{6}, \left({re}^{2} \cdot \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{1}{120}}\right)\right)\right)\right)\right) \]
                              12. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{120}\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f6440.9%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{120}\right)\right)\right)\right)\right) \]
                            8. Simplified40.9%

                              \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)} \]

                            if 4.9000000000000003e60 < im < 2.10000000000000008e79

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right) \]
                            4. Step-by-step derivation
                              1. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right)\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                              3. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              5. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right) \]
                              7. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                              9. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \color{blue}{\left(\frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                              10. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \left({im}^{2} \cdot \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                              12. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                              13. *-lowering-*.f64100.0%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                            5. Simplified100.0%

                              \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(2 + \left(im \cdot im\right) \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \color{blue}{re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            7. Step-by-step derivation
                              1. distribute-lft-inN/A

                                \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              2. fma-defineN/A

                                \[\leadsto \mathsf{fma}\left(re, \color{blue}{\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              3. *-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(re, \frac{-1}{12} \cdot \left(\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) \cdot \color{blue}{{re}^{2}}\right), re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              4. associate-*r*N/A

                                \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                              5. fma-undefineN/A

                                \[\leadsto re \cdot \left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2}\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              6. distribute-lft-outN/A

                                \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                            8. Simplified100.0%

                              \[\leadsto \color{blue}{re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)} \]
                            9. Taylor expanded in im around 0

                              \[\leadsto \color{blue}{2 \cdot \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right) + {im}^{2} \cdot \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right)} \]
                            10. Step-by-step derivation
                              1. distribute-rgt-outN/A

                                \[\leadsto \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right) \cdot \color{blue}{\left(2 + {im}^{2}\right)} \]
                              2. associate-*l*N/A

                                \[\leadsto re \cdot \color{blue}{\left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) \cdot \left(2 + {im}^{2}\right)\right)} \]
                              3. distribute-rgt-outN/A

                                \[\leadsto re \cdot \left(2 \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)}\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(2 \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) + {im}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right)}\right) \]
                              5. distribute-rgt-outN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) \cdot \color{blue}{\left(2 + {im}^{2}\right)}\right)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right), \color{blue}{\left(2 + {im}^{2}\right)}\right)\right) \]
                              7. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{12} \cdot {re}^{2}\right)\right), \left(\color{blue}{2} + {im}^{2}\right)\right)\right) \]
                              8. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left({re}^{2} \cdot \frac{-1}{12}\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                              9. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(\left(re \cdot re\right) \cdot \frac{-1}{12}\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                              10. associate-*l*N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \left(re \cdot \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                              11. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                              12. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                              13. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                              14. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                              15. *-lowering-*.f64100.0%

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                            11. Simplified100.0%

                              \[\leadsto \color{blue}{re \cdot \left(\left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right) \cdot \left(2 + im \cdot im\right)\right)} \]

                            if 2.10000000000000008e79 < im

                            1. Initial program 100.0%

                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in im around 0

                              \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                            4. Step-by-step derivation
                              1. *-rgt-identityN/A

                                \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                              2. +-commutativeN/A

                                \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                              3. associate-*r*N/A

                                \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                              4. distribute-rgt-outN/A

                                \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                              5. associate-*r*N/A

                                \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                              6. distribute-lft-outN/A

                                \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                              7. *-commutativeN/A

                                \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                              8. associate-*l*N/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                              9. unpow2N/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                              10. associate-*r*N/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                              11. *-commutativeN/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                              12. *-commutativeN/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                              13. associate-*l*N/A

                                \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                              14. distribute-lft-outN/A

                                \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                            5. Simplified100.0%

                              \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                            6. Taylor expanded in re around 0

                              \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                            7. Step-by-step derivation
                              1. Simplified84.3%

                                \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                              2. Taylor expanded in im around inf

                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{24} \cdot {im}^{4}\right)}\right)\right) \]
                              3. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                                2. pow-sqrN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \color{blue}{{im}^{2}}\right)\right)\right)\right) \]
                                3. associate-*l*N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{{im}^{2}}\right)\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({im}^{2} \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                5. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right)\right)\right) \]
                                6. associate-*l*N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right)\right) \]
                                9. *-commutativeN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                10. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                11. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                12. *-lowering-*.f6484.3%

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                              4. Simplified84.3%

                                \[\leadsto re \cdot \left(1 + \color{blue}{im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)}\right) \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification50.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 4.9 \cdot 10^{+60}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\\ \mathbf{elif}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 17: 52.4% accurate, 15.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \end{array} \]
                            (FPCore (re im)
                             :precision binary64
                             (if (<= im 2.1e+79)
                               (* re (* (+ (* im im) 2.0) (+ 0.5 (* re (* re -0.08333333333333333)))))
                               (* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))))
                            double code(double re, double im) {
                            	double tmp;
                            	if (im <= 2.1e+79) {
                            		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                            	} else {
                            		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                            	}
                            	return tmp;
                            }
                            
                            real(8) function code(re, im)
                                real(8), intent (in) :: re
                                real(8), intent (in) :: im
                                real(8) :: tmp
                                if (im <= 2.1d+79) then
                                    tmp = re * (((im * im) + 2.0d0) * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
                                else
                                    tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double re, double im) {
                            	double tmp;
                            	if (im <= 2.1e+79) {
                            		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                            	} else {
                            		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                            	}
                            	return tmp;
                            }
                            
                            def code(re, im):
                            	tmp = 0
                            	if im <= 2.1e+79:
                            		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))))
                            	else:
                            		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))))
                            	return tmp
                            
                            function code(re, im)
                            	tmp = 0.0
                            	if (im <= 2.1e+79)
                            		tmp = Float64(re * Float64(Float64(Float64(im * im) + 2.0) * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333)))));
                            	else
                            		tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(re, im)
                            	tmp = 0.0;
                            	if (im <= 2.1e+79)
                            		tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
                            	else
                            		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
                            \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if im < 2.10000000000000008e79

                              1. Initial program 100.0%

                                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                              2. Add Preprocessing
                              3. Taylor expanded in im around 0

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right) \]
                              4. Step-by-step derivation
                                1. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)}\right)\right) \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                3. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{1} + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                                5. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)}\right)\right)\right)\right) \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right) \]
                                7. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{1}{12}} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right)\right) \]
                                9. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \color{blue}{\left(\frac{1}{360} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
                                10. *-commutativeN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \left({im}^{2} \cdot \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                                11. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{360}}\right)\right)\right)\right)\right)\right)\right) \]
                                12. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                                13. *-lowering-*.f6491.1%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{360}\right)\right)\right)\right)\right)\right)\right) \]
                              5. Simplified91.1%

                                \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(2 + \left(im \cdot im\right) \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)} \]
                              6. Taylor expanded in re around 0

                                \[\leadsto \color{blue}{re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              7. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto re \cdot \left(\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                2. fma-defineN/A

                                  \[\leadsto \mathsf{fma}\left(re, \color{blue}{\frac{-1}{12} \cdot \left({re}^{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                                3. *-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(re, \frac{-1}{12} \cdot \left(\left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right) \cdot \color{blue}{{re}^{2}}\right), re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                                4. associate-*r*N/A

                                  \[\leadsto \mathsf{fma}\left(re, \left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot \color{blue}{{re}^{2}}, re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)\right) \]
                                5. fma-undefineN/A

                                  \[\leadsto re \cdot \left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2}\right) + \color{blue}{re \cdot \left(\frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                                6. distribute-lft-outN/A

                                  \[\leadsto re \cdot \color{blue}{\left(\left(\frac{-1}{12} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right) \cdot {re}^{2} + \frac{1}{2} \cdot \left(2 + {im}^{2} \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{12} + \frac{1}{360} \cdot {im}^{2}\right)\right)\right)\right)} \]
                              8. Simplified57.9%

                                \[\leadsto \color{blue}{re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)} \]
                              9. Taylor expanded in im around 0

                                \[\leadsto \color{blue}{2 \cdot \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right) + {im}^{2} \cdot \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right)} \]
                              10. Step-by-step derivation
                                1. distribute-rgt-outN/A

                                  \[\leadsto \left(re \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right) \cdot \color{blue}{\left(2 + {im}^{2}\right)} \]
                                2. associate-*l*N/A

                                  \[\leadsto re \cdot \color{blue}{\left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) \cdot \left(2 + {im}^{2}\right)\right)} \]
                                3. distribute-rgt-outN/A

                                  \[\leadsto re \cdot \left(2 \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(2 \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) + {im}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right)\right)}\right) \]
                                5. distribute-rgt-outN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right) \cdot \color{blue}{\left(2 + {im}^{2}\right)}\right)\right) \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(\frac{1}{2} + \frac{-1}{12} \cdot {re}^{2}\right), \color{blue}{\left(2 + {im}^{2}\right)}\right)\right) \]
                                7. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{12} \cdot {re}^{2}\right)\right), \left(\color{blue}{2} + {im}^{2}\right)\right)\right) \]
                                8. *-commutativeN/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left({re}^{2} \cdot \frac{-1}{12}\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                                9. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(\left(re \cdot re\right) \cdot \frac{-1}{12}\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                                10. associate-*l*N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \left(re \cdot \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                                11. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                                12. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \left(2 + {im}^{2}\right)\right)\right) \]
                                13. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                                14. unpow2N/A

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                                15. *-lowering-*.f6450.4%

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \frac{-1}{12}\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                              11. Simplified50.4%

                                \[\leadsto \color{blue}{re \cdot \left(\left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right) \cdot \left(2 + im \cdot im\right)\right)} \]

                              if 2.10000000000000008e79 < im

                              1. Initial program 100.0%

                                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                              2. Add Preprocessing
                              3. Taylor expanded in im around 0

                                \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                              4. Step-by-step derivation
                                1. *-rgt-identityN/A

                                  \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                2. +-commutativeN/A

                                  \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                3. associate-*r*N/A

                                  \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                4. distribute-rgt-outN/A

                                  \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                5. associate-*r*N/A

                                  \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                6. distribute-lft-outN/A

                                  \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                7. *-commutativeN/A

                                  \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                8. associate-*l*N/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                9. unpow2N/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                10. associate-*r*N/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                11. *-commutativeN/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                12. *-commutativeN/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                13. associate-*l*N/A

                                  \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                14. distribute-lft-outN/A

                                  \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                              5. Simplified100.0%

                                \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                              6. Taylor expanded in re around 0

                                \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                              7. Step-by-step derivation
                                1. Simplified84.3%

                                  \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                2. Taylor expanded in im around inf

                                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{24} \cdot {im}^{4}\right)}\right)\right) \]
                                3. Step-by-step derivation
                                  1. metadata-evalN/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                                  2. pow-sqrN/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \color{blue}{{im}^{2}}\right)\right)\right)\right) \]
                                  3. associate-*l*N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{{im}^{2}}\right)\right)\right) \]
                                  4. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({im}^{2} \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                  5. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right)\right)\right) \]
                                  6. associate-*l*N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                  7. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                  8. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right)\right) \]
                                  9. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                  10. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                  11. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                  12. *-lowering-*.f6484.3%

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                4. Simplified84.3%

                                  \[\leadsto re \cdot \left(1 + \color{blue}{im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)}\right) \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification57.2%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 18: 44.5% accurate, 17.2× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \end{array} \]
                              (FPCore (re im)
                               :precision binary64
                               (if (<= im 2.1e+79)
                                 (* re (+ 1.0 (* (* re re) -0.16666666666666666)))
                                 (* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))))
                              double code(double re, double im) {
                              	double tmp;
                              	if (im <= 2.1e+79) {
                              		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                              	} else {
                              		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(re, im)
                                  real(8), intent (in) :: re
                                  real(8), intent (in) :: im
                                  real(8) :: tmp
                                  if (im <= 2.1d+79) then
                                      tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                                  else
                                      tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double re, double im) {
                              	double tmp;
                              	if (im <= 2.1e+79) {
                              		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                              	} else {
                              		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                              	}
                              	return tmp;
                              }
                              
                              def code(re, im):
                              	tmp = 0
                              	if im <= 2.1e+79:
                              		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                              	else:
                              		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))))
                              	return tmp
                              
                              function code(re, im)
                              	tmp = 0.0
                              	if (im <= 2.1e+79)
                              		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                              	else
                              		tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(re, im)
                              	tmp = 0.0;
                              	if (im <= 2.1e+79)
                              		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                              	else
                              		tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
                              \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if im < 2.10000000000000008e79

                                1. Initial program 100.0%

                                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in im around 0

                                  \[\leadsto \color{blue}{\sin re} \]
                                4. Step-by-step derivation
                                  1. sin-lowering-sin.f6458.2%

                                    \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                5. Simplified58.2%

                                  \[\leadsto \color{blue}{\sin re} \]
                                6. Taylor expanded in re around 0

                                  \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                                7. Step-by-step derivation
                                  1. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                                  2. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                                  3. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                  4. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                  5. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                                  6. *-lowering-*.f6439.2%

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                                8. Simplified39.2%

                                  \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]

                                if 2.10000000000000008e79 < im

                                1. Initial program 100.0%

                                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in im around 0

                                  \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                4. Step-by-step derivation
                                  1. *-rgt-identityN/A

                                    \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                  2. +-commutativeN/A

                                    \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                  3. associate-*r*N/A

                                    \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                  4. distribute-rgt-outN/A

                                    \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                  5. associate-*r*N/A

                                    \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                  6. distribute-lft-outN/A

                                    \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                  7. *-commutativeN/A

                                    \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                  8. associate-*l*N/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                  9. unpow2N/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                  10. associate-*r*N/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                  11. *-commutativeN/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                  12. *-commutativeN/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                  13. associate-*l*N/A

                                    \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                  14. distribute-lft-outN/A

                                    \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                5. Simplified100.0%

                                  \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                6. Taylor expanded in re around 0

                                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                7. Step-by-step derivation
                                  1. Simplified84.3%

                                    \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                  2. Taylor expanded in im around inf

                                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{24} \cdot {im}^{4}\right)}\right)\right) \]
                                  3. Step-by-step derivation
                                    1. metadata-evalN/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot \color{blue}{2}\right)}\right)\right)\right) \]
                                    2. pow-sqrN/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \color{blue}{{im}^{2}}\right)\right)\right)\right) \]
                                    3. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{{im}^{2}}\right)\right)\right) \]
                                    4. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({im}^{2} \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right)\right)\right) \]
                                    6. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right)\right) \]
                                    8. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right)\right) \]
                                    9. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                    10. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                    11. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                    12. *-lowering-*.f6484.3%

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                  4. Simplified84.3%

                                    \[\leadsto re \cdot \left(1 + \color{blue}{im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)}\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Add Preprocessing

                                Alternative 19: 44.5% accurate, 19.3× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (re im)
                                 :precision binary64
                                 (if (<= im 2.1e+79)
                                   (* re (+ 1.0 (* (* re re) -0.16666666666666666)))
                                   (* re (* im (* im (* im (* im 0.041666666666666664)))))))
                                double code(double re, double im) {
                                	double tmp;
                                	if (im <= 2.1e+79) {
                                		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                	} else {
                                		tmp = re * (im * (im * (im * (im * 0.041666666666666664))));
                                	}
                                	return tmp;
                                }
                                
                                real(8) function code(re, im)
                                    real(8), intent (in) :: re
                                    real(8), intent (in) :: im
                                    real(8) :: tmp
                                    if (im <= 2.1d+79) then
                                        tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                                    else
                                        tmp = re * (im * (im * (im * (im * 0.041666666666666664d0))))
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double re, double im) {
                                	double tmp;
                                	if (im <= 2.1e+79) {
                                		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                	} else {
                                		tmp = re * (im * (im * (im * (im * 0.041666666666666664))));
                                	}
                                	return tmp;
                                }
                                
                                def code(re, im):
                                	tmp = 0
                                	if im <= 2.1e+79:
                                		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                                	else:
                                		tmp = re * (im * (im * (im * (im * 0.041666666666666664))))
                                	return tmp
                                
                                function code(re, im)
                                	tmp = 0.0
                                	if (im <= 2.1e+79)
                                		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                                	else
                                		tmp = Float64(re * Float64(im * Float64(im * Float64(im * Float64(im * 0.041666666666666664)))));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(re, im)
                                	tmp = 0.0;
                                	if (im <= 2.1e+79)
                                		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                	else
                                		tmp = re * (im * (im * (im * (im * 0.041666666666666664))));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(im * N[(im * N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
                                \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if im < 2.10000000000000008e79

                                  1. Initial program 100.0%

                                    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{\sin re} \]
                                  4. Step-by-step derivation
                                    1. sin-lowering-sin.f6458.2%

                                      \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                  5. Simplified58.2%

                                    \[\leadsto \color{blue}{\sin re} \]
                                  6. Taylor expanded in re around 0

                                    \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                                  7. Step-by-step derivation
                                    1. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                                    2. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                                    3. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                                    6. *-lowering-*.f6439.2%

                                      \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                                  8. Simplified39.2%

                                    \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]

                                  if 2.10000000000000008e79 < im

                                  1. Initial program 100.0%

                                    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in im around 0

                                    \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                  4. Step-by-step derivation
                                    1. *-rgt-identityN/A

                                      \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                    2. +-commutativeN/A

                                      \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                    3. associate-*r*N/A

                                      \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                    4. distribute-rgt-outN/A

                                      \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                    5. associate-*r*N/A

                                      \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                    6. distribute-lft-outN/A

                                      \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                    7. *-commutativeN/A

                                      \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                    8. associate-*l*N/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                    9. unpow2N/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                    10. associate-*r*N/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                    11. *-commutativeN/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                    12. *-commutativeN/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                    13. associate-*l*N/A

                                      \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                    14. distribute-lft-outN/A

                                      \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                  5. Simplified100.0%

                                    \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                  6. Taylor expanded in re around 0

                                    \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                  7. Step-by-step derivation
                                    1. Simplified84.3%

                                      \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                    2. Step-by-step derivation
                                      1. associate-*l*N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right)}\right)\right)\right) \]
                                      2. *-commutativeN/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right) \cdot \color{blue}{im}\right)\right)\right) \]
                                      3. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right), \color{blue}{im}\right)\right)\right) \]
                                      4. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right), im\right)\right)\right) \]
                                      5. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(im \cdot im\right) \cdot \frac{1}{24}\right)\right)\right), im\right)\right)\right) \]
                                      6. associate-*l*N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(im \cdot \left(im \cdot \frac{1}{24}\right)\right)\right)\right), im\right)\right)\right) \]
                                      7. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \left(im \cdot \frac{1}{24}\right)\right)\right)\right), im\right)\right)\right) \]
                                      8. *-lowering-*.f6484.3%

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{1}{24}\right)\right)\right)\right), im\right)\right)\right) \]
                                    3. Applied egg-rr84.3%

                                      \[\leadsto re \cdot \left(1 + \color{blue}{\left(im \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right) \cdot im}\right) \]
                                    4. Taylor expanded in im around inf

                                      \[\leadsto \color{blue}{\frac{1}{24} \cdot \left({im}^{4} \cdot re\right)} \]
                                    5. Step-by-step derivation
                                      1. associate-*r*N/A

                                        \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                                      2. *-commutativeN/A

                                        \[\leadsto re \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{4}\right)} \]
                                      3. metadata-evalN/A

                                        \[\leadsto re \cdot \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot \color{blue}{2}\right)}\right) \]
                                      4. pow-sqrN/A

                                        \[\leadsto re \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \color{blue}{{im}^{2}}\right)\right) \]
                                      5. associate-*l*N/A

                                        \[\leadsto re \cdot \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{{im}^{2}}\right) \]
                                      6. *-commutativeN/A

                                        \[\leadsto re \cdot \left({im}^{2} \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                      7. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                      8. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \left(\left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right)\right) \]
                                      9. associate-*l*N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right) \]
                                      10. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right)\right) \]
                                      11. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                      12. *-commutativeN/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right) \]
                                      13. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\left(im \cdot im\right) \cdot \frac{1}{24}\right)\right)\right)\right) \]
                                      14. associate-*l*N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(im \cdot \color{blue}{\left(im \cdot \frac{1}{24}\right)}\right)\right)\right)\right) \]
                                      15. *-commutativeN/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{24} \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
                                      16. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot im\right)}\right)\right)\right)\right) \]
                                      17. *-commutativeN/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(im \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                      18. *-lowering-*.f6484.3%

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right) \]
                                    6. Simplified84.3%

                                      \[\leadsto \color{blue}{re \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)} \]
                                  8. Recombined 2 regimes into one program.
                                  9. Add Preprocessing

                                  Alternative 20: 43.2% accurate, 19.3× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \end{array} \]
                                  (FPCore (re im)
                                   :precision binary64
                                   (if (<= im 2.1e+79)
                                     (* re (+ 1.0 (* (* re re) -0.16666666666666666)))
                                     (* im (* im (* re (* (* im im) 0.041666666666666664))))))
                                  double code(double re, double im) {
                                  	double tmp;
                                  	if (im <= 2.1e+79) {
                                  		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                  	} else {
                                  		tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(re, im)
                                      real(8), intent (in) :: re
                                      real(8), intent (in) :: im
                                      real(8) :: tmp
                                      if (im <= 2.1d+79) then
                                          tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                                      else
                                          tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double re, double im) {
                                  	double tmp;
                                  	if (im <= 2.1e+79) {
                                  		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                  	} else {
                                  		tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(re, im):
                                  	tmp = 0
                                  	if im <= 2.1e+79:
                                  		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                                  	else:
                                  		tmp = im * (im * (re * ((im * im) * 0.041666666666666664)))
                                  	return tmp
                                  
                                  function code(re, im)
                                  	tmp = 0.0
                                  	if (im <= 2.1e+79)
                                  		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                                  	else
                                  		tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664))));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(re, im)
                                  	tmp = 0.0;
                                  	if (im <= 2.1e+79)
                                  		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                  	else
                                  		tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
                                  \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if im < 2.10000000000000008e79

                                    1. Initial program 100.0%

                                      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in im around 0

                                      \[\leadsto \color{blue}{\sin re} \]
                                    4. Step-by-step derivation
                                      1. sin-lowering-sin.f6458.2%

                                        \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                    5. Simplified58.2%

                                      \[\leadsto \color{blue}{\sin re} \]
                                    6. Taylor expanded in re around 0

                                      \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                                    7. Step-by-step derivation
                                      1. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                                      2. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                                      3. *-commutativeN/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                      4. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                      5. unpow2N/A

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                                      6. *-lowering-*.f6439.2%

                                        \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                                    8. Simplified39.2%

                                      \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]

                                    if 2.10000000000000008e79 < im

                                    1. Initial program 100.0%

                                      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in im around 0

                                      \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                    4. Step-by-step derivation
                                      1. *-rgt-identityN/A

                                        \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                      2. +-commutativeN/A

                                        \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                      3. associate-*r*N/A

                                        \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                      4. distribute-rgt-outN/A

                                        \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                      5. associate-*r*N/A

                                        \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                      6. distribute-lft-outN/A

                                        \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                      7. *-commutativeN/A

                                        \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                      8. associate-*l*N/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                      9. unpow2N/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                      10. associate-*r*N/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                      11. *-commutativeN/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                      12. *-commutativeN/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                      13. associate-*l*N/A

                                        \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                      14. distribute-lft-outN/A

                                        \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                    5. Simplified100.0%

                                      \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                    6. Taylor expanded in re around 0

                                      \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                    7. Step-by-step derivation
                                      1. Simplified84.3%

                                        \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                      2. Taylor expanded in im around inf

                                        \[\leadsto \color{blue}{\frac{1}{24} \cdot \left({im}^{4} \cdot re\right)} \]
                                      3. Step-by-step derivation
                                        1. associate-*r*N/A

                                          \[\leadsto \left(\frac{1}{24} \cdot {im}^{4}\right) \cdot \color{blue}{re} \]
                                        2. metadata-evalN/A

                                          \[\leadsto \left(\frac{1}{24} \cdot {im}^{\left(2 \cdot 2\right)}\right) \cdot re \]
                                        3. pow-sqrN/A

                                          \[\leadsto \left(\frac{1}{24} \cdot \left({im}^{2} \cdot {im}^{2}\right)\right) \cdot re \]
                                        4. associate-*l*N/A

                                          \[\leadsto \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot {im}^{2}\right) \cdot re \]
                                        5. *-commutativeN/A

                                          \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot re \]
                                        6. associate-*r*N/A

                                          \[\leadsto {im}^{2} \cdot \color{blue}{\left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot re\right)} \]
                                        7. associate-*r*N/A

                                          \[\leadsto {im}^{2} \cdot \left(\frac{1}{24} \cdot \color{blue}{\left({im}^{2} \cdot re\right)}\right) \]
                                        8. unpow2N/A

                                          \[\leadsto \left(im \cdot im\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot \left({im}^{2} \cdot re\right)\right) \]
                                        9. associate-*l*N/A

                                          \[\leadsto im \cdot \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)\right)} \]
                                        10. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(im \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)\right)}\right) \]
                                        11. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot \left({im}^{2} \cdot re\right)\right)}\right)\right) \]
                                        12. associate-*r*N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{re}\right)\right)\right) \]
                                        13. *-commutativeN/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(re \cdot \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                        14. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{24} \cdot {im}^{2}\right)}\right)\right)\right) \]
                                        15. *-commutativeN/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left({im}^{2} \cdot \color{blue}{\frac{1}{24}}\right)\right)\right)\right) \]
                                        16. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{1}{24}}\right)\right)\right)\right) \]
                                        17. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right) \]
                                        18. *-lowering-*.f6467.8%

                                          \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right) \]
                                      4. Simplified67.8%

                                        \[\leadsto \color{blue}{im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 21: 40.8% accurate, 22.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 1.55 \cdot 10^{+140}:\\ \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\ \end{array} \end{array} \]
                                    (FPCore (re im)
                                     :precision binary64
                                     (if (<= im 1.55e+140)
                                       (* re (+ 1.0 (* (* re re) -0.16666666666666666)))
                                       (* re (* 0.5 (* im im)))))
                                    double code(double re, double im) {
                                    	double tmp;
                                    	if (im <= 1.55e+140) {
                                    		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                    	} else {
                                    		tmp = re * (0.5 * (im * 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.55d+140) then
                                            tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
                                        else
                                            tmp = re * (0.5d0 * (im * im))
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double re, double im) {
                                    	double tmp;
                                    	if (im <= 1.55e+140) {
                                    		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                    	} else {
                                    		tmp = re * (0.5 * (im * im));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(re, im):
                                    	tmp = 0
                                    	if im <= 1.55e+140:
                                    		tmp = re * (1.0 + ((re * re) * -0.16666666666666666))
                                    	else:
                                    		tmp = re * (0.5 * (im * im))
                                    	return tmp
                                    
                                    function code(re, im)
                                    	tmp = 0.0
                                    	if (im <= 1.55e+140)
                                    		tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)));
                                    	else
                                    		tmp = Float64(re * Float64(0.5 * Float64(im * im)));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(re, im)
                                    	tmp = 0.0;
                                    	if (im <= 1.55e+140)
                                    		tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
                                    	else
                                    		tmp = re * (0.5 * (im * im));
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[re_, im_] := If[LessEqual[im, 1.55e+140], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;im \leq 1.55 \cdot 10^{+140}:\\
                                    \;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if im < 1.55e140

                                      1. Initial program 100.0%

                                        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in im around 0

                                        \[\leadsto \color{blue}{\sin re} \]
                                      4. Step-by-step derivation
                                        1. sin-lowering-sin.f6453.5%

                                          \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                      5. Simplified53.5%

                                        \[\leadsto \color{blue}{\sin re} \]
                                      6. Taylor expanded in re around 0

                                        \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
                                      7. Step-by-step derivation
                                        1. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                                        2. +-lowering-+.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right) \]
                                        3. *-commutativeN/A

                                          \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                        4. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right) \]
                                        5. unpow2N/A

                                          \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right) \]
                                        6. *-lowering-*.f6437.8%

                                          \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right) \]
                                      8. Simplified37.8%

                                        \[\leadsto \color{blue}{re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)} \]

                                      if 1.55e140 < im

                                      1. Initial program 100.0%

                                        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in im around 0

                                        \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                      4. Step-by-step derivation
                                        1. *-rgt-identityN/A

                                          \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                        2. +-commutativeN/A

                                          \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                        3. associate-*r*N/A

                                          \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                        4. distribute-rgt-outN/A

                                          \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                        5. associate-*r*N/A

                                          \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                        6. distribute-lft-outN/A

                                          \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                        7. *-commutativeN/A

                                          \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                        8. associate-*l*N/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                        9. unpow2N/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                        10. associate-*r*N/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                        11. *-commutativeN/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                        12. *-commutativeN/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                        13. associate-*l*N/A

                                          \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                        14. distribute-lft-outN/A

                                          \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                      5. Simplified100.0%

                                        \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                      6. Taylor expanded in re around 0

                                        \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                      7. Step-by-step derivation
                                        1. Simplified87.5%

                                          \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                        2. Taylor expanded in im around 0

                                          \[\leadsto \color{blue}{re + \frac{1}{2} \cdot \left({im}^{2} \cdot re\right)} \]
                                        3. Step-by-step derivation
                                          1. *-lft-identityN/A

                                            \[\leadsto 1 \cdot re + \color{blue}{\frac{1}{2}} \cdot \left({im}^{2} \cdot re\right) \]
                                          2. associate-*r*N/A

                                            \[\leadsto 1 \cdot re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \color{blue}{re} \]
                                          3. distribute-rgt-outN/A

                                            \[\leadsto re \cdot \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)} \]
                                          4. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)}\right) \]
                                          5. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{2} \cdot {im}^{2}\right)}\right)\right) \]
                                          6. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                                          7. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                                          8. *-lowering-*.f6484.6%

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                                        4. Simplified84.6%

                                          \[\leadsto \color{blue}{re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)} \]
                                        5. Taylor expanded in im around inf

                                          \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{2} \cdot {im}^{2}\right)}\right) \]
                                        6. Step-by-step derivation
                                          1. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2}\right)}\right)\right) \]
                                          2. unpow2N/A

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot \color{blue}{im}\right)\right)\right) \]
                                          3. *-lowering-*.f6484.6%

                                            \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                                        7. Simplified84.6%

                                          \[\leadsto re \cdot \color{blue}{\left(0.5 \cdot \left(im \cdot im\right)\right)} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Add Preprocessing

                                      Alternative 22: 37.0% accurate, 25.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;im \leq 0.0185:\\ \;\;\;\;re\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\ \end{array} \end{array} \]
                                      (FPCore (re im)
                                       :precision binary64
                                       (if (<= im 0.0185) re (* re (* 0.5 (* im im)))))
                                      double code(double re, double im) {
                                      	double tmp;
                                      	if (im <= 0.0185) {
                                      		tmp = re;
                                      	} else {
                                      		tmp = re * (0.5 * (im * im));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      real(8) function code(re, im)
                                          real(8), intent (in) :: re
                                          real(8), intent (in) :: im
                                          real(8) :: tmp
                                          if (im <= 0.0185d0) then
                                              tmp = re
                                          else
                                              tmp = re * (0.5d0 * (im * im))
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double re, double im) {
                                      	double tmp;
                                      	if (im <= 0.0185) {
                                      		tmp = re;
                                      	} else {
                                      		tmp = re * (0.5 * (im * im));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(re, im):
                                      	tmp = 0
                                      	if im <= 0.0185:
                                      		tmp = re
                                      	else:
                                      		tmp = re * (0.5 * (im * im))
                                      	return tmp
                                      
                                      function code(re, im)
                                      	tmp = 0.0
                                      	if (im <= 0.0185)
                                      		tmp = re;
                                      	else
                                      		tmp = Float64(re * Float64(0.5 * Float64(im * im)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(re, im)
                                      	tmp = 0.0;
                                      	if (im <= 0.0185)
                                      		tmp = re;
                                      	else
                                      		tmp = re * (0.5 * (im * im));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[re_, im_] := If[LessEqual[im, 0.0185], re, N[(re * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;im \leq 0.0185:\\
                                      \;\;\;\;re\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if im < 0.0184999999999999991

                                        1. Initial program 100.0%

                                          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in im around 0

                                          \[\leadsto \color{blue}{\sin re} \]
                                        4. Step-by-step derivation
                                          1. sin-lowering-sin.f6463.7%

                                            \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                        5. Simplified63.7%

                                          \[\leadsto \color{blue}{\sin re} \]
                                        6. Taylor expanded in re around 0

                                          \[\leadsto \color{blue}{re} \]
                                        7. Step-by-step derivation
                                          1. Simplified34.7%

                                            \[\leadsto \color{blue}{re} \]

                                          if 0.0184999999999999991 < im

                                          1. Initial program 100.0%

                                            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in im around 0

                                            \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                          4. Step-by-step derivation
                                            1. *-rgt-identityN/A

                                              \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                            2. +-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                            3. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                            4. distribute-rgt-outN/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                            5. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                            6. distribute-lft-outN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                            7. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            8. associate-*l*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            9. unpow2N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            10. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            11. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            12. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                            13. associate-*l*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                            14. distribute-lft-outN/A

                                              \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                          5. Simplified76.7%

                                            \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                          6. Taylor expanded in re around 0

                                            \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                          7. Step-by-step derivation
                                            1. Simplified64.8%

                                              \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                            2. Taylor expanded in im around 0

                                              \[\leadsto \color{blue}{re + \frac{1}{2} \cdot \left({im}^{2} \cdot re\right)} \]
                                            3. Step-by-step derivation
                                              1. *-lft-identityN/A

                                                \[\leadsto 1 \cdot re + \color{blue}{\frac{1}{2}} \cdot \left({im}^{2} \cdot re\right) \]
                                              2. associate-*r*N/A

                                                \[\leadsto 1 \cdot re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \color{blue}{re} \]
                                              3. distribute-rgt-outN/A

                                                \[\leadsto re \cdot \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)} \]
                                              4. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)}\right) \]
                                              5. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{2} \cdot {im}^{2}\right)}\right)\right) \]
                                              6. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                                              7. unpow2N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                                              8. *-lowering-*.f6445.7%

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                                            4. Simplified45.7%

                                              \[\leadsto \color{blue}{re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)} \]
                                            5. Taylor expanded in im around inf

                                              \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{2} \cdot {im}^{2}\right)}\right) \]
                                            6. Step-by-step derivation
                                              1. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2}\right)}\right)\right) \]
                                              2. unpow2N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot \color{blue}{im}\right)\right)\right) \]
                                              3. *-lowering-*.f6445.7%

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right) \]
                                            7. Simplified45.7%

                                              \[\leadsto re \cdot \color{blue}{\left(0.5 \cdot \left(im \cdot im\right)\right)} \]
                                          8. Recombined 2 regimes into one program.
                                          9. Add Preprocessing

                                          Alternative 23: 48.0% accurate, 34.3× speedup?

                                          \[\begin{array}{l} \\ re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \end{array} \]
                                          (FPCore (re im) :precision binary64 (* re (+ 1.0 (* 0.5 (* im im)))))
                                          double code(double re, double im) {
                                          	return re * (1.0 + (0.5 * (im * im)));
                                          }
                                          
                                          real(8) function code(re, im)
                                              real(8), intent (in) :: re
                                              real(8), intent (in) :: im
                                              code = re * (1.0d0 + (0.5d0 * (im * im)))
                                          end function
                                          
                                          public static double code(double re, double im) {
                                          	return re * (1.0 + (0.5 * (im * im)));
                                          }
                                          
                                          def code(re, im):
                                          	return re * (1.0 + (0.5 * (im * im)))
                                          
                                          function code(re, im)
                                          	return Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im))))
                                          end
                                          
                                          function tmp = code(re, im)
                                          	tmp = re * (1.0 + (0.5 * (im * im)));
                                          end
                                          
                                          code[re_, im_] := N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 100.0%

                                            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in im around 0

                                            \[\leadsto \color{blue}{\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right)} \]
                                          4. Step-by-step derivation
                                            1. *-rgt-identityN/A

                                              \[\leadsto \sin re \cdot 1 + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right) + \frac{1}{2} \cdot \sin re\right) \]
                                            2. +-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \color{blue}{\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)}\right) \]
                                            3. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re + \left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                                            4. distribute-rgt-outN/A

                                              \[\leadsto \sin re \cdot 1 + {im}^{2} \cdot \left(\sin re \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                            5. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + \left({im}^{2} \cdot \sin re\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)} \]
                                            6. distribute-lft-outN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\left({im}^{2} \cdot \sin re\right) \cdot \frac{1}{2} + \color{blue}{\left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)}\right) \]
                                            7. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\left(\sin re \cdot {im}^{2}\right) \cdot \frac{1}{2} + \left(\color{blue}{{im}^{2}} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            8. associate-*l*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left({im}^{2} \cdot \frac{1}{2}\right) + \color{blue}{\left({im}^{2} \cdot \sin re\right)} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            9. unpow2N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(\left(im \cdot im\right) \cdot \frac{1}{2}\right) + \left({im}^{2} \cdot \sin \color{blue}{re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            10. associate-*r*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(im \cdot \frac{1}{2}\right)\right) + \left({im}^{2} \cdot \color{blue}{\sin re}\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            11. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left({im}^{2} \cdot \sin re\right) \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \]
                                            12. *-commutativeN/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \left(\sin re \cdot {im}^{2}\right) \cdot \left(\color{blue}{\frac{1}{24}} \cdot {im}^{2}\right)\right) \]
                                            13. associate-*l*N/A

                                              \[\leadsto \sin re \cdot 1 + \left(\sin re \cdot \left(im \cdot \left(\frac{1}{2} \cdot im\right)\right) + \sin re \cdot \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)}\right) \]
                                            14. distribute-lft-outN/A

                                              \[\leadsto \sin re \cdot 1 + \sin re \cdot \color{blue}{\left(im \cdot \left(\frac{1}{2} \cdot im\right) + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)} \]
                                          5. Simplified89.1%

                                            \[\leadsto \color{blue}{\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)} \]
                                          6. Taylor expanded in re around 0

                                            \[\leadsto \mathsf{*.f64}\left(\color{blue}{re}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right) \]
                                          7. Step-by-step derivation
                                            1. Simplified61.2%

                                              \[\leadsto \color{blue}{re} \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \]
                                            2. Taylor expanded in im around 0

                                              \[\leadsto \color{blue}{re + \frac{1}{2} \cdot \left({im}^{2} \cdot re\right)} \]
                                            3. Step-by-step derivation
                                              1. *-lft-identityN/A

                                                \[\leadsto 1 \cdot re + \color{blue}{\frac{1}{2}} \cdot \left({im}^{2} \cdot re\right) \]
                                              2. associate-*r*N/A

                                                \[\leadsto 1 \cdot re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \color{blue}{re} \]
                                              3. distribute-rgt-outN/A

                                                \[\leadsto re \cdot \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)} \]
                                              4. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{1}{2} \cdot {im}^{2}\right)}\right) \]
                                              5. +-lowering-+.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{2} \cdot {im}^{2}\right)}\right)\right) \]
                                              6. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                                              7. unpow2N/A

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                                              8. *-lowering-*.f6451.5%

                                                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                                            4. Simplified51.5%

                                              \[\leadsto \color{blue}{re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)} \]
                                            5. Add Preprocessing

                                            Alternative 24: 26.5% accurate, 309.0× speedup?

                                            \[\begin{array}{l} \\ re \end{array} \]
                                            (FPCore (re im) :precision binary64 re)
                                            double code(double re, double im) {
                                            	return re;
                                            }
                                            
                                            real(8) function code(re, im)
                                                real(8), intent (in) :: re
                                                real(8), intent (in) :: im
                                                code = re
                                            end function
                                            
                                            public static double code(double re, double im) {
                                            	return re;
                                            }
                                            
                                            def code(re, im):
                                            	return re
                                            
                                            function code(re, im)
                                            	return re
                                            end
                                            
                                            function tmp = code(re, im)
                                            	tmp = re;
                                            end
                                            
                                            code[re_, im_] := re
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            re
                                            \end{array}
                                            
                                            Derivation
                                            1. Initial program 100.0%

                                              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in im around 0

                                              \[\leadsto \color{blue}{\sin re} \]
                                            4. Step-by-step derivation
                                              1. sin-lowering-sin.f6447.1%

                                                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
                                            5. Simplified47.1%

                                              \[\leadsto \color{blue}{\sin re} \]
                                            6. Taylor expanded in re around 0

                                              \[\leadsto \color{blue}{re} \]
                                            7. Step-by-step derivation
                                              1. Simplified26.0%

                                                \[\leadsto \color{blue}{re} \]
                                              2. Add Preprocessing

                                              Reproduce

                                              ?
                                              herbie shell --seed 2024144 
                                              (FPCore (re im)
                                                :name "math.sin on complex, real part"
                                                :precision binary64
                                                (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))