math.sin on complex, real part

Percentage Accurate: 100.0% → 100.0%
Time: 12.6s
Alternatives: 19
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 19 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.7× speedup?

\[\begin{array}{l} im_m = \left|im\right| \\ \sin re \cdot \frac{1 - {\left(0 - e^{im\_m \cdot 2}\right)}^{-1}}{2 \cdot e^{0 - im\_m}} \end{array} \]
im_m = (fabs.f64 im)
(FPCore (re im_m)
 :precision binary64
 (*
  (sin re)
  (/
   (- 1.0 (pow (- 0.0 (exp (* im_m 2.0))) -1.0))
   (* 2.0 (exp (- 0.0 im_m))))))
im_m = fabs(im);
double code(double re, double im_m) {
	return sin(re) * ((1.0 - pow((0.0 - exp((im_m * 2.0))), -1.0)) / (2.0 * exp((0.0 - im_m))));
}
im_m = abs(im)
real(8) function code(re, im_m)
    real(8), intent (in) :: re
    real(8), intent (in) :: im_m
    code = sin(re) * ((1.0d0 - ((0.0d0 - exp((im_m * 2.0d0))) ** (-1.0d0))) / (2.0d0 * exp((0.0d0 - im_m))))
end function
im_m = Math.abs(im);
public static double code(double re, double im_m) {
	return Math.sin(re) * ((1.0 - Math.pow((0.0 - Math.exp((im_m * 2.0))), -1.0)) / (2.0 * Math.exp((0.0 - im_m))));
}
im_m = math.fabs(im)
def code(re, im_m):
	return math.sin(re) * ((1.0 - math.pow((0.0 - math.exp((im_m * 2.0))), -1.0)) / (2.0 * math.exp((0.0 - im_m))))
im_m = abs(im)
function code(re, im_m)
	return Float64(sin(re) * Float64(Float64(1.0 - (Float64(0.0 - exp(Float64(im_m * 2.0))) ^ -1.0)) / Float64(2.0 * exp(Float64(0.0 - im_m)))))
end
im_m = abs(im);
function tmp = code(re, im_m)
	tmp = sin(re) * ((1.0 - ((0.0 - exp((im_m * 2.0))) ^ -1.0)) / (2.0 * exp((0.0 - im_m))));
end
im_m = N[Abs[im], $MachinePrecision]
code[re_, im$95$m_] := N[(N[Sin[re], $MachinePrecision] * N[(N[(1.0 - N[Power[N[(0.0 - N[Exp[N[(im$95$m * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[Exp[N[(0.0 - im$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
im_m = \left|im\right|

\\
\sin re \cdot \frac{1 - {\left(0 - e^{im\_m \cdot 2}\right)}^{-1}}{2 \cdot e^{0 - im\_m}}
\end{array}
Derivation
  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
  4. Add Preprocessing
  5. Applied egg-rr73.8%

    \[\leadsto \sin re \cdot \color{blue}{\frac{1 - {\left(-e^{im \cdot 2}\right)}^{-1}}{e^{0 - im} \cdot 2}} \]
  6. Final simplification73.8%

    \[\leadsto \sin re \cdot \frac{1 - {\left(0 - e^{im \cdot 2}\right)}^{-1}}{2 \cdot e^{0 - im}} \]
  7. Add Preprocessing

Alternative 2: 100.0% accurate, 1.5× speedup?

\[\begin{array}{l} im_m = \left|im\right| \\ \sin re \cdot \cosh im\_m \end{array} \]
im_m = (fabs.f64 im)
(FPCore (re im_m) :precision binary64 (* (sin re) (cosh im_m)))
im_m = fabs(im);
double code(double re, double im_m) {
	return sin(re) * cosh(im_m);
}
im_m = abs(im)
real(8) function code(re, im_m)
    real(8), intent (in) :: re
    real(8), intent (in) :: im_m
    code = sin(re) * cosh(im_m)
end function
im_m = Math.abs(im);
public static double code(double re, double im_m) {
	return Math.sin(re) * Math.cosh(im_m);
}
im_m = math.fabs(im)
def code(re, im_m):
	return math.sin(re) * math.cosh(im_m)
im_m = abs(im)
function code(re, im_m)
	return Float64(sin(re) * cosh(im_m))
end
im_m = abs(im);
function tmp = code(re, im_m)
	tmp = sin(re) * cosh(im_m);
end
im_m = N[Abs[im], $MachinePrecision]
code[re_, im$95$m_] := N[(N[Sin[re], $MachinePrecision] * N[Cosh[im$95$m], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
im_m = \left|im\right|

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \cosh im\right) \]
    13. rem-log-expN/A

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{cosh.f64}\left(\log \left(e^{im}\right)\right)\right) \]
    15. rem-log-exp100.0%

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

    \[\leadsto \color{blue}{\sin re \cdot \cosh im} \]
  7. Add Preprocessing

Alternative 3: 79.7% accurate, 2.5× speedup?

\[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 0.0125:\\ \;\;\;\;re \cdot \cosh im\_m\\ \mathbf{else}:\\ \;\;\;\;\sin re \cdot \left(1 + \left(im\_m \cdot im\_m\right) \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(0.041666666666666664 + \left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\ \end{array} \end{array} \]
im_m = (fabs.f64 im)
(FPCore (re im_m)
 :precision binary64
 (if (<= re 0.0125)
   (* re (cosh im_m))
   (*
    (sin re)
    (+
     1.0
     (*
      (* im_m im_m)
      (+
       0.5
       (*
        im_m
        (*
         im_m
         (+
          0.041666666666666664
          (* (* im_m im_m) 0.001388888888888889))))))))))
im_m = fabs(im);
double code(double re, double im_m) {
	double tmp;
	if (re <= 0.0125) {
		tmp = re * cosh(im_m);
	} else {
		tmp = sin(re) * (1.0 + ((im_m * im_m) * (0.5 + (im_m * (im_m * (0.041666666666666664 + ((im_m * im_m) * 0.001388888888888889)))))));
	}
	return tmp;
}
im_m = abs(im)
real(8) function code(re, im_m)
    real(8), intent (in) :: re
    real(8), intent (in) :: im_m
    real(8) :: tmp
    if (re <= 0.0125d0) then
        tmp = re * cosh(im_m)
    else
        tmp = sin(re) * (1.0d0 + ((im_m * im_m) * (0.5d0 + (im_m * (im_m * (0.041666666666666664d0 + ((im_m * im_m) * 0.001388888888888889d0)))))))
    end if
    code = tmp
end function
im_m = Math.abs(im);
public static double code(double re, double im_m) {
	double tmp;
	if (re <= 0.0125) {
		tmp = re * Math.cosh(im_m);
	} else {
		tmp = Math.sin(re) * (1.0 + ((im_m * im_m) * (0.5 + (im_m * (im_m * (0.041666666666666664 + ((im_m * im_m) * 0.001388888888888889)))))));
	}
	return tmp;
}
im_m = math.fabs(im)
def code(re, im_m):
	tmp = 0
	if re <= 0.0125:
		tmp = re * math.cosh(im_m)
	else:
		tmp = math.sin(re) * (1.0 + ((im_m * im_m) * (0.5 + (im_m * (im_m * (0.041666666666666664 + ((im_m * im_m) * 0.001388888888888889)))))))
	return tmp
im_m = abs(im)
function code(re, im_m)
	tmp = 0.0
	if (re <= 0.0125)
		tmp = Float64(re * cosh(im_m));
	else
		tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im_m * im_m) * Float64(0.5 + Float64(im_m * Float64(im_m * Float64(0.041666666666666664 + Float64(Float64(im_m * im_m) * 0.001388888888888889))))))));
	end
	return tmp
end
im_m = abs(im);
function tmp_2 = code(re, im_m)
	tmp = 0.0;
	if (re <= 0.0125)
		tmp = re * cosh(im_m);
	else
		tmp = sin(re) * (1.0 + ((im_m * im_m) * (0.5 + (im_m * (im_m * (0.041666666666666664 + ((im_m * im_m) * 0.001388888888888889)))))));
	end
	tmp_2 = tmp;
end
im_m = N[Abs[im], $MachinePrecision]
code[re_, im$95$m_] := If[LessEqual[re, 0.0125], N[(re * N[Cosh[im$95$m], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(0.5 + N[(im$95$m * N[(im$95$m * N[(0.041666666666666664 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
im_m = \left|im\right|

\\
\begin{array}{l}
\mathbf{if}\;re \leq 0.0125:\\
\;\;\;\;re \cdot \cosh im\_m\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if re < 0.012500000000000001

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \cosh im\right) \]
      13. rem-log-expN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{cosh.f64}\left(\log \left(e^{im}\right)\right)\right) \]
      15. rem-log-exp100.0%

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

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

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

        \[\leadsto \color{blue}{re} \cdot \cosh im \]

      if 0.012500000000000001 < re

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \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) \]
        3. unpow2N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \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) \]
        6. unpow2N/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \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), \color{blue}{\frac{1}{720}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        15. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \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)\right) \]
        16. *-lowering-*.f6496.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \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)\right) \]
      7. Simplified96.9%

        \[\leadsto \sin re \cdot \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)} \]
    9. Recombined 2 regimes into one program.
    10. Add Preprocessing

    Alternative 4: 92.4% accurate, 2.5× speedup?

    \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} t_0 := \sin re \cdot \left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right)\\ \mathbf{if}\;im\_m \leq 360:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+67}:\\ \;\;\;\;re \cdot \cosh im\_m\\ \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    im_m = (fabs.f64 im)
    (FPCore (re im_m)
     :precision binary64
     (let* ((t_0 (* (sin re) (+ 1.0 (* (* im_m im_m) 0.5)))))
       (if (<= im_m 360.0)
         t_0
         (if (<= im_m 1.35e+67)
           (* re (cosh im_m))
           (if (<= im_m 1.35e+154)
             (*
              (+
               1.0
               (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664)))))
              (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))
             t_0)))))
    im_m = fabs(im);
    double code(double re, double im_m) {
    	double t_0 = sin(re) * (1.0 + ((im_m * im_m) * 0.5));
    	double tmp;
    	if (im_m <= 360.0) {
    		tmp = t_0;
    	} else if (im_m <= 1.35e+67) {
    		tmp = re * cosh(im_m);
    	} else if (im_m <= 1.35e+154) {
    		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    im_m = abs(im)
    real(8) function code(re, im_m)
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: tmp
        t_0 = sin(re) * (1.0d0 + ((im_m * im_m) * 0.5d0))
        if (im_m <= 360.0d0) then
            tmp = t_0
        else if (im_m <= 1.35d+67) then
            tmp = re * cosh(im_m)
        else if (im_m <= 1.35d+154) then
            tmp = (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0))))) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    im_m = Math.abs(im);
    public static double code(double re, double im_m) {
    	double t_0 = Math.sin(re) * (1.0 + ((im_m * im_m) * 0.5));
    	double tmp;
    	if (im_m <= 360.0) {
    		tmp = t_0;
    	} else if (im_m <= 1.35e+67) {
    		tmp = re * Math.cosh(im_m);
    	} else if (im_m <= 1.35e+154) {
    		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    im_m = math.fabs(im)
    def code(re, im_m):
    	t_0 = math.sin(re) * (1.0 + ((im_m * im_m) * 0.5))
    	tmp = 0
    	if im_m <= 360.0:
    		tmp = t_0
    	elif im_m <= 1.35e+67:
    		tmp = re * math.cosh(im_m)
    	elif im_m <= 1.35e+154:
    		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))))
    	else:
    		tmp = t_0
    	return tmp
    
    im_m = abs(im)
    function code(re, im_m)
    	t_0 = Float64(sin(re) * Float64(1.0 + Float64(Float64(im_m * im_m) * 0.5)))
    	tmp = 0.0
    	if (im_m <= 360.0)
    		tmp = t_0;
    	elseif (im_m <= 1.35e+67)
    		tmp = Float64(re * cosh(im_m));
    	elseif (im_m <= 1.35e+154)
    		tmp = Float64(Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))) * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    im_m = abs(im);
    function tmp_2 = code(re, im_m)
    	t_0 = sin(re) * (1.0 + ((im_m * im_m) * 0.5));
    	tmp = 0.0;
    	if (im_m <= 360.0)
    		tmp = t_0;
    	elseif (im_m <= 1.35e+67)
    		tmp = re * cosh(im_m);
    	elseif (im_m <= 1.35e+154)
    		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    im_m = N[Abs[im], $MachinePrecision]
    code[re_, im$95$m_] := Block[{t$95$0 = N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im$95$m, 360.0], t$95$0, If[LessEqual[im$95$m, 1.35e+67], N[(re * N[Cosh[im$95$m], $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 1.35e+154], N[(N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    im_m = \left|im\right|
    
    \\
    \begin{array}{l}
    t_0 := \sin re \cdot \left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right)\\
    \mathbf{if}\;im\_m \leq 360:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+67}:\\
    \;\;\;\;re \cdot \cosh im\_m\\
    
    \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+154}:\\
    \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 360 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. Step-by-step derivation
        1. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 360 < im < 1.35e67

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \cosh im\right) \]
        13. rem-log-expN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{cosh.f64}\left(\log \left(e^{im}\right)\right)\right) \]
        15. rem-log-exp100.0%

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

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

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

          \[\leadsto \color{blue}{re} \cdot \cosh im \]

        if 1.35e67 < im < 1.35000000000000003e154

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
        4. Add Preprocessing
        5. 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)} \]
        6. Step-by-step derivation
          1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 78.6% accurate, 2.6× speedup?

      \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 0.0126:\\ \;\;\;\;re \cdot \cosh im\_m\\ \mathbf{else}:\\ \;\;\;\;\sin re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right)\\ \end{array} \end{array} \]
      im_m = (fabs.f64 im)
      (FPCore (re im_m)
       :precision binary64
       (if (<= re 0.0126)
         (* re (cosh im_m))
         (*
          (sin re)
          (+ 1.0 (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664))))))))
      im_m = fabs(im);
      double code(double re, double im_m) {
      	double tmp;
      	if (re <= 0.0126) {
      		tmp = re * cosh(im_m);
      	} else {
      		tmp = sin(re) * (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664)))));
      	}
      	return tmp;
      }
      
      im_m = abs(im)
      real(8) function code(re, im_m)
          real(8), intent (in) :: re
          real(8), intent (in) :: im_m
          real(8) :: tmp
          if (re <= 0.0126d0) then
              tmp = re * cosh(im_m)
          else
              tmp = sin(re) * (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0)))))
          end if
          code = tmp
      end function
      
      im_m = Math.abs(im);
      public static double code(double re, double im_m) {
      	double tmp;
      	if (re <= 0.0126) {
      		tmp = re * Math.cosh(im_m);
      	} else {
      		tmp = Math.sin(re) * (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664)))));
      	}
      	return tmp;
      }
      
      im_m = math.fabs(im)
      def code(re, im_m):
      	tmp = 0
      	if re <= 0.0126:
      		tmp = re * math.cosh(im_m)
      	else:
      		tmp = math.sin(re) * (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664)))))
      	return tmp
      
      im_m = abs(im)
      function code(re, im_m)
      	tmp = 0.0
      	if (re <= 0.0126)
      		tmp = Float64(re * cosh(im_m));
      	else
      		tmp = Float64(sin(re) * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))));
      	end
      	return tmp
      end
      
      im_m = abs(im);
      function tmp_2 = code(re, im_m)
      	tmp = 0.0;
      	if (re <= 0.0126)
      		tmp = re * cosh(im_m);
      	else
      		tmp = sin(re) * (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664)))));
      	end
      	tmp_2 = tmp;
      end
      
      im_m = N[Abs[im], $MachinePrecision]
      code[re_, im$95$m_] := If[LessEqual[re, 0.0126], N[(re * N[Cosh[im$95$m], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      im_m = \left|im\right|
      
      \\
      \begin{array}{l}
      \mathbf{if}\;re \leq 0.0126:\\
      \;\;\;\;re \cdot \cosh im\_m\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if re < 0.0126

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \cosh im\right) \]
          13. rem-log-expN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{cosh.f64}\left(\log \left(e^{im}\right)\right)\right) \]
          15. rem-log-exp100.0%

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

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

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

            \[\leadsto \color{blue}{re} \cdot \cosh im \]

          if 0.0126 < re

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
          4. Add Preprocessing
          5. 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)} \]
          6. Step-by-step derivation
            1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
        9. Recombined 2 regimes into one program.
        10. Add Preprocessing

        Alternative 6: 85.9% accurate, 2.7× speedup?

        \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;im\_m \leq 0.000112:\\ \;\;\;\;\sin re\\ \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+67}:\\ \;\;\;\;re \cdot \cosh im\_m\\ \mathbf{else}:\\ \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
        im_m = (fabs.f64 im)
        (FPCore (re im_m)
         :precision binary64
         (if (<= im_m 0.000112)
           (sin re)
           (if (<= im_m 1.35e+67)
             (* re (cosh im_m))
             (*
              (+ 1.0 (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664)))))
              (* re (+ 1.0 (* -0.16666666666666666 (* re re))))))))
        im_m = fabs(im);
        double code(double re, double im_m) {
        	double tmp;
        	if (im_m <= 0.000112) {
        		tmp = sin(re);
        	} else if (im_m <= 1.35e+67) {
        		tmp = re * cosh(im_m);
        	} else {
        		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
        	}
        	return tmp;
        }
        
        im_m = abs(im)
        real(8) function code(re, im_m)
            real(8), intent (in) :: re
            real(8), intent (in) :: im_m
            real(8) :: tmp
            if (im_m <= 0.000112d0) then
                tmp = sin(re)
            else if (im_m <= 1.35d+67) then
                tmp = re * cosh(im_m)
            else
                tmp = (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0))))) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))
            end if
            code = tmp
        end function
        
        im_m = Math.abs(im);
        public static double code(double re, double im_m) {
        	double tmp;
        	if (im_m <= 0.000112) {
        		tmp = Math.sin(re);
        	} else if (im_m <= 1.35e+67) {
        		tmp = re * Math.cosh(im_m);
        	} else {
        		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
        	}
        	return tmp;
        }
        
        im_m = math.fabs(im)
        def code(re, im_m):
        	tmp = 0
        	if im_m <= 0.000112:
        		tmp = math.sin(re)
        	elif im_m <= 1.35e+67:
        		tmp = re * math.cosh(im_m)
        	else:
        		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))))
        	return tmp
        
        im_m = abs(im)
        function code(re, im_m)
        	tmp = 0.0
        	if (im_m <= 0.000112)
        		tmp = sin(re);
        	elseif (im_m <= 1.35e+67)
        		tmp = Float64(re * cosh(im_m));
        	else
        		tmp = Float64(Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))) * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))));
        	end
        	return tmp
        end
        
        im_m = abs(im);
        function tmp_2 = code(re, im_m)
        	tmp = 0.0;
        	if (im_m <= 0.000112)
        		tmp = sin(re);
        	elseif (im_m <= 1.35e+67)
        		tmp = re * cosh(im_m);
        	else
        		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
        	end
        	tmp_2 = tmp;
        end
        
        im_m = N[Abs[im], $MachinePrecision]
        code[re_, im$95$m_] := If[LessEqual[im$95$m, 0.000112], N[Sin[re], $MachinePrecision], If[LessEqual[im$95$m, 1.35e+67], N[(re * N[Cosh[im$95$m], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        im_m = \left|im\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;im\_m \leq 0.000112:\\
        \;\;\;\;\sin re\\
        
        \mathbf{elif}\;im\_m \leq 1.35 \cdot 10^{+67}:\\
        \;\;\;\;re \cdot \cosh im\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if im < 1.11999999999999998e-4

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.11999999999999998e-4 < im < 1.35e67

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \cosh im\right) \]
            13. rem-log-expN/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{cosh.f64}\left(\log \left(e^{im}\right)\right)\right) \]
            15. rem-log-exp100.0%

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

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

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

              \[\leadsto \color{blue}{re} \cdot \cosh im \]

            if 1.35e67 < im

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 80.2% accurate, 2.9× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;im\_m \leq 0.000105:\\ \;\;\;\;\sin re\\ \mathbf{else}:\\ \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= im_m 0.000105)
             (sin re)
             (*
              (+ 1.0 (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664)))))
              (*
               re
               (+
                1.0
                (*
                 (* re re)
                 (+
                  -0.16666666666666666
                  (*
                   re
                   (*
                    re
                    (+
                     0.008333333333333333
                     (* (* re re) -0.0001984126984126984)))))))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (im_m <= 0.000105) {
          		tmp = sin(re);
          	} else {
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (im_m <= 0.000105d0) then
                  tmp = sin(re)
              else
                  tmp = (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0))))) * (re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (im_m <= 0.000105) {
          		tmp = Math.sin(re);
          	} else {
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if im_m <= 0.000105:
          		tmp = math.sin(re)
          	else:
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (im_m <= 0.000105)
          		tmp = sin(re);
          	else
          		tmp = Float64(Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984)))))))));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (im_m <= 0.000105)
          		tmp = sin(re);
          	else
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[im$95$m, 0.000105], N[Sin[re], $MachinePrecision], N[(N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;im\_m \leq 0.000105:\\
          \;\;\;\;\sin re\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if im < 1.05e-4

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.05e-4 < im

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + {re}^{2} \cdot \left({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \frac{-1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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} + {re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              10. 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}, \left(\left(re \cdot re\right) \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              11. associate-*l*N/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 \cdot \left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              12. *-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(re, \left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              13. *-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(re, \mathsf{*.f64}\left(re, \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              14. +-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              15. *-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}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \left({re}^{2} \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              16. *-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              17. 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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
              18. *-lowering-*.f6470.2%

                \[\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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            10. Simplified70.2%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.000105:\\ \;\;\;\;\sin re\\ \mathbf{else}:\\ \;\;\;\;\left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 8: 56.5% accurate, 8.8× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right) \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (*
            (+ 1.0 (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664)))))
            (*
             re
             (+
              1.0
              (*
               (* re re)
               (+
                -0.16666666666666666
                (*
                 re
                 (*
                  re
                  (+ 0.008333333333333333 (* (* re re) -0.0001984126984126984))))))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	return (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              code = (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0))))) * (re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	return (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	return (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))))
          
          im_m = abs(im)
          function code(re, im_m)
          	return Float64(Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984)))))))))
          end
          
          im_m = abs(im);
          function tmp = code(re, im_m)
          	tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := N[(N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\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. Step-by-step derivation
            1. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
          4. Add Preprocessing
          5. 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)} \]
          6. Step-by-step derivation
            1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + {re}^{2} \cdot \left({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \frac{-1}{6}\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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} + {re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            10. 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}, \left(\left(re \cdot re\right) \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            11. associate-*l*N/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 \cdot \left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            12. *-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(re, \left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            13. *-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(re, \mathsf{*.f64}\left(re, \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            14. +-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \left(\frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            15. *-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}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \left({re}^{2} \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            16. *-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            17. 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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
            18. *-lowering-*.f6461.9%

              \[\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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right)\right) \]
          10. Simplified61.9%

            \[\leadsto \color{blue}{\left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)} \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \]
          11. Final simplification61.9%

            \[\leadsto \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right) \]
          12. Add Preprocessing

          Alternative 9: 58.1% accurate, 9.1× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 2.5e+34)
             (*
              re
              (+
               1.0
               (*
                im_m
                (*
                 im_m
                 (+ 0.5 (* im_m (* im_m (* (* im_m im_m) 0.001388888888888889))))))))
             (*
              (+ 1.0 (* (* im_m im_m) 0.5))
              (*
               re
               (+
                1.0
                (*
                 re
                 (*
                  re
                  (+
                   -0.16666666666666666
                   (*
                    re
                    (*
                     re
                     (+
                      0.008333333333333333
                      (* (* re re) -0.0001984126984126984))))))))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 2.5d+34) then
                  tmp = re * (1.0d0 + (im_m * (im_m * (0.5d0 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889d0)))))))
              else
                  tmp = (1.0d0 + ((im_m * im_m) * 0.5d0)) * (re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0))))))))))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 2.5e+34:
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))))
          	else:
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 2.5e+34)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(im_m * Float64(im_m * Float64(Float64(im_m * im_m) * 0.001388888888888889))))))));
          	else
          		tmp = Float64(Float64(1.0 + Float64(Float64(im_m * im_m) * 0.5)) * Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 2.5e+34)
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	else
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 2.5e+34], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(im$95$m * N[(im$95$m * N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 2.4999999999999999e34

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\left({im}^{2} \cdot \left(\frac{1}{720} \cdot {im}^{2}\right)\right) \cdot \sin re + \left(\color{blue}{{im}^{2} \cdot \left(\frac{1}{24} \cdot \sin re\right)} + \frac{1}{2} \cdot \sin re\right)\right)\right)\right) \]
            7. Simplified93.3%

              \[\leadsto \color{blue}{\sin re + \left(im \cdot im\right) \cdot \left(\sin re \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \]
            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. *-commutativeN/A

                \[\leadsto \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) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\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), \color{blue}{re}\right) \]
            10. Simplified62.0%

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.4999999999999999e34 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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) \]
            10. Simplified77.5%

              \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \sin re} \]
            11. 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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \frac{1}{6}\right)\right)\right)}\right) \]
            12. 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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \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}{{re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)} - \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) - \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right) + \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}{{re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)}\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({re}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)}\right)\right)\right)\right)\right)\right) \]
              11. 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}, \left(\left(re \cdot re\right) \cdot \left(\color{blue}{\frac{1}{120}} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)\right)\right)\right)\right)\right)\right) \]
              12. 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, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{\left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
              13. *-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(re, \color{blue}{\left(re \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
              14. *-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(re, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{120} + \frac{-1}{5040} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right)\right)\right)\right) \]
              15. +-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \color{blue}{\left(\frac{-1}{5040} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
              16. *-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}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \left({re}^{2} \cdot \color{blue}{\frac{-1}{5040}}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
              17. *-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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{5040}}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
              18. 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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
              19. *-lowering-*.f6434.2%

                \[\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(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \]
            13. Simplified34.2%

              \[\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 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification56.1%

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

          Alternative 10: 58.0% accurate, 11.9× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 2.5e+34)
             (*
              re
              (+
               1.0
               (*
                im_m
                (*
                 im_m
                 (+ 0.5 (* im_m (* im_m (* (* im_m im_m) 0.001388888888888889))))))))
             (*
              (+ 1.0 (* im_m (* im_m (+ 0.5 (* (* im_m im_m) 0.041666666666666664)))))
              (* -0.16666666666666666 (* re (* re re))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (-0.16666666666666666 * (re * (re * re)));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 2.5d+34) then
                  tmp = re * (1.0d0 + (im_m * (im_m * (0.5d0 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889d0)))))))
              else
                  tmp = (1.0d0 + (im_m * (im_m * (0.5d0 + ((im_m * im_m) * 0.041666666666666664d0))))) * ((-0.16666666666666666d0) * (re * (re * re)))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (-0.16666666666666666 * (re * (re * re)));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 2.5e+34:
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))))
          	else:
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (-0.16666666666666666 * (re * (re * re)))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 2.5e+34)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(im_m * Float64(im_m * Float64(Float64(im_m * im_m) * 0.001388888888888889))))))));
          	else
          		tmp = Float64(Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(Float64(im_m * im_m) * 0.041666666666666664))))) * Float64(-0.16666666666666666 * Float64(re * Float64(re * re))));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 2.5e+34)
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	else
          		tmp = (1.0 + (im_m * (im_m * (0.5 + ((im_m * im_m) * 0.041666666666666664))))) * (-0.16666666666666666 * (re * (re * re)));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 2.5e+34], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(im$95$m * N[(im$95$m * N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + \left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 2.4999999999999999e34

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\left({im}^{2} \cdot \left(\frac{1}{720} \cdot {im}^{2}\right)\right) \cdot \sin re + \left(\color{blue}{{im}^{2} \cdot \left(\frac{1}{24} \cdot \sin re\right)} + \frac{1}{2} \cdot \sin re\right)\right)\right)\right) \]
            7. Simplified93.3%

              \[\leadsto \color{blue}{\sin re + \left(im \cdot im\right) \cdot \left(\sin re \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \]
            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. *-commutativeN/A

                \[\leadsto \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) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\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), \color{blue}{re}\right) \]
            10. Simplified62.0%

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.4999999999999999e34 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 57.9% accurate, 12.9× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 2.5e+34)
             (*
              re
              (+
               1.0
               (*
                im_m
                (*
                 im_m
                 (+ 0.5 (* im_m (* im_m (* (* im_m im_m) 0.001388888888888889))))))))
             (*
              (+ 1.0 (* (* im_m im_m) 0.5))
              (* re (+ 1.0 (* re (* re -0.16666666666666666)))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 2.5d+34) then
                  tmp = re * (1.0d0 + (im_m * (im_m * (0.5d0 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889d0)))))))
              else
                  tmp = (1.0d0 + ((im_m * im_m) * 0.5d0)) * (re * (1.0d0 + (re * (re * (-0.16666666666666666d0)))))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 2.5e+34:
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))))
          	else:
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 2.5e+34)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(im_m * Float64(im_m * Float64(Float64(im_m * im_m) * 0.001388888888888889))))))));
          	else
          		tmp = Float64(Float64(1.0 + Float64(Float64(im_m * im_m) * 0.5)) * Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 2.5e+34)
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * ((im_m * im_m) * 0.001388888888888889)))))));
          	else
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 2.5e+34], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(im$95$m * N[(im$95$m * N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 2.4999999999999999e34

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\left({im}^{2} \cdot \left(\frac{1}{720} \cdot {im}^{2}\right)\right) \cdot \sin re + \left(\color{blue}{{im}^{2} \cdot \left(\frac{1}{24} \cdot \sin re\right)} + \frac{1}{2} \cdot \sin re\right)\right)\right)\right) \]
            7. Simplified93.3%

              \[\leadsto \color{blue}{\sin re + \left(im \cdot im\right) \cdot \left(\sin re \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)} \]
            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. *-commutativeN/A

                \[\leadsto \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) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\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), \color{blue}{re}\right) \]
            10. Simplified62.0%

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.4999999999999999e34 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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}{\frac{-1}{6}}\right)\right)\right)\right)\right) \]
            13. Simplified34.2%

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

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

          Alternative 12: 55.6% accurate, 14.0× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot 0.041666666666666664\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 2.5e+34)
             (*
              re
              (+ 1.0 (* im_m (* im_m (+ 0.5 (* im_m (* im_m 0.041666666666666664)))))))
             (*
              (+ 1.0 (* (* im_m im_m) 0.5))
              (* re (+ 1.0 (* re (* re -0.16666666666666666)))))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 2.5d+34) then
                  tmp = re * (1.0d0 + (im_m * (im_m * (0.5d0 + (im_m * (im_m * 0.041666666666666664d0))))))
              else
                  tmp = (1.0d0 + ((im_m * im_m) * 0.5d0)) * (re * (1.0d0 + (re * (re * (-0.16666666666666666d0)))))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 2.5e+34) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	} else {
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 2.5e+34:
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))))
          	else:
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 2.5e+34)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(im_m * Float64(im_m * 0.041666666666666664)))))));
          	else
          		tmp = Float64(Float64(1.0 + Float64(Float64(im_m * im_m) * 0.5)) * Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 2.5e+34)
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	else
          		tmp = (1.0 + ((im_m * im_m) * 0.5)) * (re * (1.0 + (re * (re * -0.16666666666666666))));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 2.5e+34], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(im$95$m * N[(im$95$m * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot 0.041666666666666664\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + \left(im\_m \cdot im\_m\right) \cdot 0.5\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 2.4999999999999999e34

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{1}{24}\right), im\right)\right)\right)\right)\right), re\right) \]
            12. Applied egg-rr61.0%

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

            if 2.4999999999999999e34 < re

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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}{\frac{-1}{6}}\right)\right)\right)\right)\right) \]
            13. Simplified34.2%

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

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

          Alternative 13: 55.6% accurate, 15.4× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot 0.041666666666666664\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 6.3e+156)
             (*
              re
              (+ 1.0 (* im_m (* im_m (+ 0.5 (* im_m (* im_m 0.041666666666666664)))))))
             (* re (* -0.16666666666666666 (* re re)))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 6.3d+156) then
                  tmp = re * (1.0d0 + (im_m * (im_m * (0.5d0 + (im_m * (im_m * 0.041666666666666664d0))))))
              else
                  tmp = re * ((-0.16666666666666666d0) * (re * re))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 6.3e+156:
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))))
          	else:
          		tmp = re * (-0.16666666666666666 * (re * re))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 6.3e+156)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(0.5 + Float64(im_m * Float64(im_m * 0.041666666666666664)))))));
          	else
          		tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re)));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 6.3e+156)
          		tmp = re * (1.0 + (im_m * (im_m * (0.5 + (im_m * (im_m * 0.041666666666666664))))));
          	else
          		tmp = re * (-0.16666666666666666 * (re * re));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 6.3e+156], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(0.5 + N[(im$95$m * N[(im$95$m * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(0.5 + im\_m \cdot \left(im\_m \cdot 0.041666666666666664\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 6.29999999999999982e156

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

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

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

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \sin re\right)\right) + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              4. associate-*r*N/A

                \[\leadsto \left(\sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \sin re\right) + {im}^{\color{blue}{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              5. distribute-rgt1-inN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              6. associate-*r*N/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left({im}^{2} \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin re} \]
              7. *-commutativeN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \sin \color{blue}{re} \]
              8. distribute-rgt-outN/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) + \frac{1}{2} \cdot {im}^{2}\right)} \]
              9. +-commutativeN/A

                \[\leadsto \sin re \cdot \left(\frac{1}{2} \cdot {im}^{2} + \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right)}\right) \]
              10. associate-+l+N/A

                \[\leadsto \sin re \cdot \left(\left(\frac{1}{2} \cdot {im}^{2} + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) + \color{blue}{1}\right) \]
            7. Simplified91.2%

              \[\leadsto \color{blue}{\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right), \color{blue}{re}\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right)\right), re\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              12. *-lowering-*.f6458.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
            10. Simplified58.1%

              \[\leadsto \color{blue}{\left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot re} \]
            11. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(im \cdot \left(im \cdot \frac{1}{24}\right)\right)\right)\right)\right)\right), re\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(im \cdot \frac{1}{24}\right) \cdot im\right)\right)\right)\right)\right), re\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot \frac{1}{24}\right), im\right)\right)\right)\right)\right), re\right) \]
              4. *-lowering-*.f6458.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{1}{24}\right), im\right)\right)\right)\right)\right), re\right) \]
            12. Applied egg-rr58.1%

              \[\leadsto \left(1 + im \cdot \left(im \cdot \left(0.5 + \color{blue}{\left(im \cdot 0.041666666666666664\right) \cdot im}\right)\right)\right) \cdot re \]

            if 6.29999999999999982e156 < re

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6458.5%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified58.5%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
            9. 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. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
              5. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
            10. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            11. Taylor expanded in re around inf

              \[\leadsto \color{blue}{\frac{-1}{6} \cdot {re}^{3}} \]
            12. Step-by-step derivation
              1. unpow3N/A

                \[\leadsto \frac{-1}{6} \cdot \left(\left(re \cdot re\right) \cdot \color{blue}{re}\right) \]
              2. unpow2N/A

                \[\leadsto \frac{-1}{6} \cdot \left({re}^{2} \cdot re\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{6} \cdot {re}^{2}\right) \cdot \color{blue}{re} \]
              4. *-commutativeN/A

                \[\leadsto re \cdot \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
              8. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
            13. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification55.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 14: 55.4% accurate, 17.2× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 6.3e+156)
             (* re (+ 1.0 (* im_m (* im_m (* (* im_m im_m) 0.041666666666666664)))))
             (* re (* -0.16666666666666666 (* re re)))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * ((im_m * im_m) * 0.041666666666666664))));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 6.3d+156) then
                  tmp = re * (1.0d0 + (im_m * (im_m * ((im_m * im_m) * 0.041666666666666664d0))))
              else
                  tmp = re * ((-0.16666666666666666d0) * (re * re))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * ((im_m * im_m) * 0.041666666666666664))));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 6.3e+156:
          		tmp = re * (1.0 + (im_m * (im_m * ((im_m * im_m) * 0.041666666666666664))))
          	else:
          		tmp = re * (-0.16666666666666666 * (re * re))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 6.3e+156)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * Float64(Float64(im_m * im_m) * 0.041666666666666664)))));
          	else
          		tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re)));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 6.3e+156)
          		tmp = re * (1.0 + (im_m * (im_m * ((im_m * im_m) * 0.041666666666666664))));
          	else
          		tmp = re * (-0.16666666666666666 * (re * re));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 6.3e+156], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * N[(N[(im$95$m * im$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot \left(\left(im\_m \cdot im\_m\right) \cdot 0.041666666666666664\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 6.29999999999999982e156

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

                \[\leadsto \sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)}\right) \]
              2. associate-+r+N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)} \]
              3. associate-*r*N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \sin re\right)\right) + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              4. associate-*r*N/A

                \[\leadsto \left(\sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \sin re\right) + {im}^{\color{blue}{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              5. distribute-rgt1-inN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              6. associate-*r*N/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left({im}^{2} \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin re} \]
              7. *-commutativeN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \sin \color{blue}{re} \]
              8. distribute-rgt-outN/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) + \frac{1}{2} \cdot {im}^{2}\right)} \]
              9. +-commutativeN/A

                \[\leadsto \sin re \cdot \left(\frac{1}{2} \cdot {im}^{2} + \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right)}\right) \]
              10. associate-+l+N/A

                \[\leadsto \sin re \cdot \left(\left(\frac{1}{2} \cdot {im}^{2} + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) + \color{blue}{1}\right) \]
            7. Simplified91.2%

              \[\leadsto \color{blue}{\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right), \color{blue}{re}\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right)\right), re\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              12. *-lowering-*.f6458.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
            10. Simplified58.1%

              \[\leadsto \color{blue}{\left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot re} \]
            11. Taylor expanded in im around inf

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{24} \cdot {im}^{3}\right)}\right)\right), re\right) \]
            12. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left({im}^{3} \cdot \frac{1}{24}\right)\right)\right), re\right) \]
              2. cube-multN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(\left(im \cdot \left(im \cdot im\right)\right) \cdot \frac{1}{24}\right)\right)\right), re\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(\left(im \cdot {im}^{2}\right) \cdot \frac{1}{24}\right)\right)\right), re\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right), re\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right), re\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{24}\right)\right)\right)\right), re\right) \]
              9. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\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), re\right) \]
              10. *-lowering-*.f6457.7%

                \[\leadsto \mathsf{*.f64}\left(\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), re\right) \]
            13. Simplified57.7%

              \[\leadsto \left(1 + im \cdot \color{blue}{\left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)}\right) \cdot re \]

            if 6.29999999999999982e156 < re

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6458.5%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified58.5%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
            9. 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. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
              5. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
            10. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            11. Taylor expanded in re around inf

              \[\leadsto \color{blue}{\frac{-1}{6} \cdot {re}^{3}} \]
            12. Step-by-step derivation
              1. unpow3N/A

                \[\leadsto \frac{-1}{6} \cdot \left(\left(re \cdot re\right) \cdot \color{blue}{re}\right) \]
              2. unpow2N/A

                \[\leadsto \frac{-1}{6} \cdot \left({re}^{2} \cdot re\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{6} \cdot {re}^{2}\right) \cdot \color{blue}{re} \]
              4. *-commutativeN/A

                \[\leadsto re \cdot \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
              8. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
            13. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification54.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 15: 47.9% accurate, 22.0× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re + \left(im\_m \cdot im\_m\right) \cdot \left(re \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 6.3e+156)
             (+ re (* (* im_m im_m) (* re 0.5)))
             (* re (* -0.16666666666666666 (* re re)))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re + ((im_m * im_m) * (re * 0.5));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 6.3d+156) then
                  tmp = re + ((im_m * im_m) * (re * 0.5d0))
              else
                  tmp = re * ((-0.16666666666666666d0) * (re * re))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re + ((im_m * im_m) * (re * 0.5));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 6.3e+156:
          		tmp = re + ((im_m * im_m) * (re * 0.5))
          	else:
          		tmp = re * (-0.16666666666666666 * (re * re))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 6.3e+156)
          		tmp = Float64(re + Float64(Float64(im_m * im_m) * Float64(re * 0.5)));
          	else
          		tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re)));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 6.3e+156)
          		tmp = re + ((im_m * im_m) * (re * 0.5));
          	else
          		tmp = re * (-0.16666666666666666 * (re * re));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 6.3e+156], N[(re + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\
          \;\;\;\;re + \left(im\_m \cdot im\_m\right) \cdot \left(re \cdot 0.5\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 6.29999999999999982e156

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

                \[\leadsto \sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)}\right) \]
              2. associate-+r+N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)} \]
              3. associate-*r*N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \sin re\right)\right) + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              4. associate-*r*N/A

                \[\leadsto \left(\sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \sin re\right) + {im}^{\color{blue}{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              5. distribute-rgt1-inN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              6. associate-*r*N/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left({im}^{2} \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin re} \]
              7. *-commutativeN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \sin \color{blue}{re} \]
              8. distribute-rgt-outN/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) + \frac{1}{2} \cdot {im}^{2}\right)} \]
              9. +-commutativeN/A

                \[\leadsto \sin re \cdot \left(\frac{1}{2} \cdot {im}^{2} + \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right)}\right) \]
              10. associate-+l+N/A

                \[\leadsto \sin re \cdot \left(\left(\frac{1}{2} \cdot {im}^{2} + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) + \color{blue}{1}\right) \]
            7. Simplified91.2%

              \[\leadsto \color{blue}{\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right), \color{blue}{re}\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right)\right), re\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              12. *-lowering-*.f6458.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
            10. Simplified58.1%

              \[\leadsto \color{blue}{\left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot re} \]
            11. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right) + 1\right) \cdot re \]
              2. distribute-lft1-inN/A

                \[\leadsto \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right)\right) \cdot re + \color{blue}{re} \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(im \cdot \left(im \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right)\right) \cdot re\right), \color{blue}{re}\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(im \cdot im\right) \cdot \left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right)\right) \cdot re\right), re\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(im \cdot im\right) \cdot \left(\left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right) \cdot re\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(im \cdot im\right), \left(\left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right) \cdot re\right)\right), re\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right) \cdot re\right)\right), re\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(\left(\frac{1}{2} + \left(im \cdot im\right) \cdot \frac{1}{24}\right), re\right)\right), re\right) \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \left(\left(im \cdot im\right) \cdot \frac{1}{24}\right)\right), re\right)\right), re\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right), re\right)\right), re\right) \]
              11. *-lowering-*.f6453.6%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right), re\right)\right), re\right) \]
            12. Applied egg-rr53.6%

              \[\leadsto \color{blue}{\left(im \cdot im\right) \cdot \left(\left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right) \cdot re\right) + re} \]
            13. Taylor expanded in im around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \color{blue}{\left(\frac{1}{2} \cdot re\right)}\right), re\right) \]
            14. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(re \cdot \frac{1}{2}\right)\right), re\right) \]
              2. *-lowering-*.f6446.4%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(re, \frac{1}{2}\right)\right), re\right) \]
            15. Simplified46.4%

              \[\leadsto \left(im \cdot im\right) \cdot \color{blue}{\left(re \cdot 0.5\right)} + re \]

            if 6.29999999999999982e156 < re

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6458.5%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified58.5%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
            9. 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. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
              5. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
            10. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            11. Taylor expanded in re around inf

              \[\leadsto \color{blue}{\frac{-1}{6} \cdot {re}^{3}} \]
            12. Step-by-step derivation
              1. unpow3N/A

                \[\leadsto \frac{-1}{6} \cdot \left(\left(re \cdot re\right) \cdot \color{blue}{re}\right) \]
              2. unpow2N/A

                \[\leadsto \frac{-1}{6} \cdot \left({re}^{2} \cdot re\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{6} \cdot {re}^{2}\right) \cdot \color{blue}{re} \]
              4. *-commutativeN/A

                \[\leadsto re \cdot \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
              8. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
            13. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification44.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re + \left(im \cdot im\right) \cdot \left(re \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 16: 47.9% accurate, 22.0× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 6.3e+156)
             (* re (+ 1.0 (* im_m (* im_m 0.5))))
             (* re (* -0.16666666666666666 (* re re)))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * 0.5)));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 6.3d+156) then
                  tmp = re * (1.0d0 + (im_m * (im_m * 0.5d0)))
              else
                  tmp = re * ((-0.16666666666666666d0) * (re * re))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 6.3e+156) {
          		tmp = re * (1.0 + (im_m * (im_m * 0.5)));
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 6.3e+156:
          		tmp = re * (1.0 + (im_m * (im_m * 0.5)))
          	else:
          		tmp = re * (-0.16666666666666666 * (re * re))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 6.3e+156)
          		tmp = Float64(re * Float64(1.0 + Float64(im_m * Float64(im_m * 0.5))));
          	else
          		tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re)));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 6.3e+156)
          		tmp = re * (1.0 + (im_m * (im_m * 0.5)));
          	else
          		tmp = re * (-0.16666666666666666 * (re * re));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 6.3e+156], N[(re * N[(1.0 + N[(im$95$m * N[(im$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\
          \;\;\;\;re \cdot \left(1 + im\_m \cdot \left(im\_m \cdot 0.5\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 6.29999999999999982e156

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. 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)} \]
            6. Step-by-step derivation
              1. distribute-lft-inN/A

                \[\leadsto \sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)}\right) \]
              2. associate-+r+N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\frac{1}{24} \cdot \left({im}^{2} \cdot \sin re\right)\right)\right) + \color{blue}{{im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right)} \]
              3. associate-*r*N/A

                \[\leadsto \left(\sin re + {im}^{2} \cdot \left(\left(\frac{1}{24} \cdot {im}^{2}\right) \cdot \sin re\right)\right) + {im}^{2} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              4. associate-*r*N/A

                \[\leadsto \left(\sin re + \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \sin re\right) + {im}^{\color{blue}{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              5. distribute-rgt1-inN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \color{blue}{{im}^{2}} \cdot \left(\frac{1}{2} \cdot \sin re\right) \]
              6. associate-*r*N/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left({im}^{2} \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin re} \]
              7. *-commutativeN/A

                \[\leadsto \left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) \cdot \sin re + \left(\frac{1}{2} \cdot {im}^{2}\right) \cdot \sin \color{blue}{re} \]
              8. distribute-rgt-outN/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right) + \frac{1}{2} \cdot {im}^{2}\right)} \]
              9. +-commutativeN/A

                \[\leadsto \sin re \cdot \left(\frac{1}{2} \cdot {im}^{2} + \color{blue}{\left({im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right) + 1\right)}\right) \]
              10. associate-+l+N/A

                \[\leadsto \sin re \cdot \left(\left(\frac{1}{2} \cdot {im}^{2} + {im}^{2} \cdot \left(\frac{1}{24} \cdot {im}^{2}\right)\right) + \color{blue}{1}\right) \]
            7. Simplified91.2%

              \[\leadsto \color{blue}{\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right) \cdot \color{blue}{re} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(1 + {im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right), \color{blue}{re}\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({im}^{2} \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\left(im \cdot im\right) \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right), re\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(im \cdot \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \left(im \cdot \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \left(\frac{1}{2} + \frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right), re\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{1}{24} \cdot {im}^{2}\right)\right)\right)\right)\right), re\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \left({im}^{2} \cdot \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left({im}^{2}\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
              12. *-lowering-*.f6458.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{1}{24}\right)\right)\right)\right)\right), re\right) \]
            10. Simplified58.1%

              \[\leadsto \color{blue}{\left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot re} \]
            11. Taylor expanded in im around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{1}{2} \cdot im\right)}\right)\right), re\right) \]
            12. Step-by-step derivation
              1. *-lowering-*.f6446.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{1}{2}, im\right)\right)\right), re\right) \]
            13. Simplified46.4%

              \[\leadsto \left(1 + im \cdot \color{blue}{\left(0.5 \cdot im\right)}\right) \cdot re \]

            if 6.29999999999999982e156 < re

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6458.5%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified58.5%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
            9. 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. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
              5. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
            10. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            11. Taylor expanded in re around inf

              \[\leadsto \color{blue}{\frac{-1}{6} \cdot {re}^{3}} \]
            12. Step-by-step derivation
              1. unpow3N/A

                \[\leadsto \frac{-1}{6} \cdot \left(\left(re \cdot re\right) \cdot \color{blue}{re}\right) \]
              2. unpow2N/A

                \[\leadsto \frac{-1}{6} \cdot \left({re}^{2} \cdot re\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{6} \cdot {re}^{2}\right) \cdot \color{blue}{re} \]
              4. *-commutativeN/A

                \[\leadsto re \cdot \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
              8. *-lowering-*.f6429.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
            13. Simplified29.7%

              \[\leadsto \color{blue}{re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification44.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 6.3 \cdot 10^{+156}:\\ \;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 17: 30.2% accurate, 25.7× speedup?

          \[\begin{array}{l} im_m = \left|im\right| \\ \begin{array}{l} \mathbf{if}\;re \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;re\\ \mathbf{else}:\\ \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\ \end{array} \end{array} \]
          im_m = (fabs.f64 im)
          (FPCore (re im_m)
           :precision binary64
           (if (<= re 1.02e+18) re (* re (* -0.16666666666666666 (* re re)))))
          im_m = fabs(im);
          double code(double re, double im_m) {
          	double tmp;
          	if (re <= 1.02e+18) {
          		tmp = re;
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = abs(im)
          real(8) function code(re, im_m)
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: tmp
              if (re <= 1.02d+18) then
                  tmp = re
              else
                  tmp = re * ((-0.16666666666666666d0) * (re * re))
              end if
              code = tmp
          end function
          
          im_m = Math.abs(im);
          public static double code(double re, double im_m) {
          	double tmp;
          	if (re <= 1.02e+18) {
          		tmp = re;
          	} else {
          		tmp = re * (-0.16666666666666666 * (re * re));
          	}
          	return tmp;
          }
          
          im_m = math.fabs(im)
          def code(re, im_m):
          	tmp = 0
          	if re <= 1.02e+18:
          		tmp = re
          	else:
          		tmp = re * (-0.16666666666666666 * (re * re))
          	return tmp
          
          im_m = abs(im)
          function code(re, im_m)
          	tmp = 0.0
          	if (re <= 1.02e+18)
          		tmp = re;
          	else
          		tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re)));
          	end
          	return tmp
          end
          
          im_m = abs(im);
          function tmp_2 = code(re, im_m)
          	tmp = 0.0;
          	if (re <= 1.02e+18)
          		tmp = re;
          	else
          		tmp = re * (-0.16666666666666666 * (re * re));
          	end
          	tmp_2 = tmp;
          end
          
          im_m = N[Abs[im], $MachinePrecision]
          code[re_, im$95$m_] := If[LessEqual[re, 1.02e+18], re, N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          im_m = \left|im\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;re \leq 1.02 \cdot 10^{+18}:\\
          \;\;\;\;re\\
          
          \mathbf{else}:\\
          \;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if re < 1.02e18

            1. Initial program 100.0%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
            2. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6451.0%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified51.0%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re} \]
            9. Step-by-step derivation
              1. Simplified31.8%

                \[\leadsto \color{blue}{re} \]

              if 1.02e18 < re

              1. Initial program 100.0%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right) \]
              2. Step-by-step derivation
                1. associate-*l*N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
                3. associate-*l*N/A

                  \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
                5. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
                7. distribute-rgt-inN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
                9. exp-diffN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
                10. associate-*l/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
                11. exp-0N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
                13. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
                14. exp-lowering-exp.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
                15. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
                16. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
                17. exp-lowering-exp.f64100.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
              4. Add Preprocessing
              5. Taylor expanded in im around 0

                \[\leadsto \color{blue}{\sin re} \]
              6. Step-by-step derivation
                1. sin-lowering-sin.f6441.9%

                  \[\leadsto \mathsf{sin.f64}\left(re\right) \]
              7. Simplified41.9%

                \[\leadsto \color{blue}{\sin re} \]
              8. Taylor expanded in re around 0

                \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
              9. 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. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
                5. *-lowering-*.f6421.6%

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
              10. Simplified21.6%

                \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
              11. Taylor expanded in re around inf

                \[\leadsto \color{blue}{\frac{-1}{6} \cdot {re}^{3}} \]
              12. Step-by-step derivation
                1. unpow3N/A

                  \[\leadsto \frac{-1}{6} \cdot \left(\left(re \cdot re\right) \cdot \color{blue}{re}\right) \]
                2. unpow2N/A

                  \[\leadsto \frac{-1}{6} \cdot \left({re}^{2} \cdot re\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{6} \cdot {re}^{2}\right) \cdot \color{blue}{re} \]
                4. *-commutativeN/A

                  \[\leadsto re \cdot \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)} \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right) \]
                7. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right) \]
                8. *-lowering-*.f6421.6%

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right) \]
              13. Simplified21.6%

                \[\leadsto \color{blue}{re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            10. Recombined 2 regimes into one program.
            11. Add Preprocessing

            Alternative 18: 34.1% accurate, 34.3× speedup?

            \[\begin{array}{l} im_m = \left|im\right| \\ re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right) \end{array} \]
            im_m = (fabs.f64 im)
            (FPCore (re im_m)
             :precision binary64
             (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))
            im_m = fabs(im);
            double code(double re, double im_m) {
            	return re * (1.0 + (-0.16666666666666666 * (re * re)));
            }
            
            im_m = abs(im)
            real(8) function code(re, im_m)
                real(8), intent (in) :: re
                real(8), intent (in) :: im_m
                code = re * (1.0d0 + ((-0.16666666666666666d0) * (re * re)))
            end function
            
            im_m = Math.abs(im);
            public static double code(double re, double im_m) {
            	return re * (1.0 + (-0.16666666666666666 * (re * re)));
            }
            
            im_m = math.fabs(im)
            def code(re, im_m):
            	return re * (1.0 + (-0.16666666666666666 * (re * re)))
            
            im_m = abs(im)
            function code(re, im_m)
            	return Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re))))
            end
            
            im_m = abs(im);
            function tmp = code(re, im_m)
            	tmp = re * (1.0 + (-0.16666666666666666 * (re * re)));
            end
            
            im_m = N[Abs[im], $MachinePrecision]
            code[re_, im$95$m_] := N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            im_m = \left|im\right|
            
            \\
            re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\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. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6449.0%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified49.0%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)} \]
            9. 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. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({re}^{2}\right)}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(re \cdot \color{blue}{re}\right)\right)\right)\right) \]
              5. *-lowering-*.f6435.7%

                \[\leadsto \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{re}\right)\right)\right)\right) \]
            10. Simplified35.7%

              \[\leadsto \color{blue}{re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)} \]
            11. Add Preprocessing

            Alternative 19: 26.1% accurate, 309.0× speedup?

            \[\begin{array}{l} im_m = \left|im\right| \\ re \end{array} \]
            im_m = (fabs.f64 im)
            (FPCore (re im_m) :precision binary64 re)
            im_m = fabs(im);
            double code(double re, double im_m) {
            	return re;
            }
            
            im_m = abs(im)
            real(8) function code(re, im_m)
                real(8), intent (in) :: re
                real(8), intent (in) :: im_m
                code = re
            end function
            
            im_m = Math.abs(im);
            public static double code(double re, double im_m) {
            	return re;
            }
            
            im_m = math.fabs(im)
            def code(re, im_m):
            	return re
            
            im_m = abs(im)
            function code(re, im_m)
            	return re
            end
            
            im_m = abs(im);
            function tmp = code(re, im_m)
            	tmp = re;
            end
            
            im_m = N[Abs[im], $MachinePrecision]
            code[re_, im$95$m_] := re
            
            \begin{array}{l}
            im_m = \left|im\right|
            
            \\
            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. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \left(\sin re \cdot \left(e^{0 - im} + e^{im}\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
              3. associate-*l*N/A

                \[\leadsto \sin re \cdot \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\left(e^{0 - im} + e^{im}\right) \cdot \frac{1}{2}\right)}\right) \]
              5. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\color{blue}{\left(e^{0 - im} + e^{im}\right)} \cdot \frac{1}{2}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\frac{1}{2} \cdot \color{blue}{\left(e^{0 - im} + e^{im}\right)}\right)\right) \]
              7. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(e^{0 - im} \cdot \frac{1}{2} + \color{blue}{e^{im} \cdot \frac{1}{2}}\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(e^{0 - im} \cdot \frac{1}{2}\right), \color{blue}{\left(e^{im} \cdot \frac{1}{2}\right)}\right)\right) \]
              9. exp-diffN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0}}{e^{im}} \cdot \frac{1}{2}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              10. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{e^{0} \cdot \frac{1}{2}}{e^{im}}\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              11. exp-0N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot \frac{1}{2}}{e^{im}}\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{e^{im}}\right), \left(e^{\color{blue}{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \left(e^{im}\right)\right), \left(\color{blue}{e^{im}} \cdot \frac{1}{2}\right)\right)\right) \]
              14. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(e^{im} \cdot \frac{1}{2}\right)\right)\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \left(\frac{1}{2} \cdot \color{blue}{e^{im}}\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(e^{im}\right)}\right)\right)\right) \]
              17. exp-lowering-exp.f64100.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{exp.f64}\left(im\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\sin re \cdot \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in im around 0

              \[\leadsto \color{blue}{\sin re} \]
            6. Step-by-step derivation
              1. sin-lowering-sin.f6449.0%

                \[\leadsto \mathsf{sin.f64}\left(re\right) \]
            7. Simplified49.0%

              \[\leadsto \color{blue}{\sin re} \]
            8. Taylor expanded in re around 0

              \[\leadsto \color{blue}{re} \]
            9. Step-by-step derivation
              1. Simplified25.5%

                \[\leadsto \color{blue}{re} \]
              2. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024164 
              (FPCore (re im)
                :name "math.sin on complex, real part"
                :precision binary64
                (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))