math.cos on complex, imaginary part

Percentage Accurate: 64.9% → 99.6%
Time: 14.8s
Alternatives: 23
Speedup: 2.8×

Specification

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

\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{-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 23 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: 64.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.6× speedup?

\[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := e^{0 - im\_m} - e^{im\_m}\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -50:\\ \;\;\;\;t\_0 \cdot \left(0.5 \cdot \sin re\right)\\ \mathbf{else}:\\ \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\ \end{array} \end{array} \end{array} \]
im\_m = (fabs.f64 im)
im\_s = (copysign.f64 #s(literal 1 binary64) im)
(FPCore (im_s re im_m)
 :precision binary64
 (let* ((t_0 (- (exp (- 0.0 im_m)) (exp im_m))))
   (*
    im_s
    (if (<= t_0 -50.0)
      (* t_0 (* 0.5 (sin re)))
      (* (* im_m (sin re)) (+ -1.0 (* -0.16666666666666666 (* im_m im_m))))))))
im\_m = fabs(im);
im\_s = copysign(1.0, im);
double code(double im_s, double re, double im_m) {
	double t_0 = exp((0.0 - im_m)) - exp(im_m);
	double tmp;
	if (t_0 <= -50.0) {
		tmp = t_0 * (0.5 * sin(re));
	} else {
		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	}
	return im_s * tmp;
}
im\_m = abs(im)
im\_s = copysign(1.0d0, im)
real(8) function code(im_s, re, im_m)
    real(8), intent (in) :: im_s
    real(8), intent (in) :: re
    real(8), intent (in) :: im_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = exp((0.0d0 - im_m)) - exp(im_m)
    if (t_0 <= (-50.0d0)) then
        tmp = t_0 * (0.5d0 * sin(re))
    else
        tmp = (im_m * sin(re)) * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m)))
    end if
    code = im_s * tmp
end function
im\_m = Math.abs(im);
im\_s = Math.copySign(1.0, im);
public static double code(double im_s, double re, double im_m) {
	double t_0 = Math.exp((0.0 - im_m)) - Math.exp(im_m);
	double tmp;
	if (t_0 <= -50.0) {
		tmp = t_0 * (0.5 * Math.sin(re));
	} else {
		tmp = (im_m * Math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	}
	return im_s * tmp;
}
im\_m = math.fabs(im)
im\_s = math.copysign(1.0, im)
def code(im_s, re, im_m):
	t_0 = math.exp((0.0 - im_m)) - math.exp(im_m)
	tmp = 0
	if t_0 <= -50.0:
		tmp = t_0 * (0.5 * math.sin(re))
	else:
		tmp = (im_m * math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))
	return im_s * tmp
im\_m = abs(im)
im\_s = copysign(1.0, im)
function code(im_s, re, im_m)
	t_0 = Float64(exp(Float64(0.0 - im_m)) - exp(im_m))
	tmp = 0.0
	if (t_0 <= -50.0)
		tmp = Float64(t_0 * Float64(0.5 * sin(re)));
	else
		tmp = Float64(Float64(im_m * sin(re)) * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m))));
	end
	return Float64(im_s * tmp)
end
im\_m = abs(im);
im\_s = sign(im) * abs(1.0);
function tmp_2 = code(im_s, re, im_m)
	t_0 = exp((0.0 - im_m)) - exp(im_m);
	tmp = 0.0;
	if (t_0 <= -50.0)
		tmp = t_0 * (0.5 * sin(re));
	else
		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	end
	tmp_2 = im_s * tmp;
end
im\_m = N[Abs[im], $MachinePrecision]
im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(N[Exp[N[(0.0 - im$95$m), $MachinePrecision]], $MachinePrecision] - N[Exp[im$95$m], $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[t$95$0, -50.0], N[(t$95$0 * N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
im\_m = \left|im\right|
\\
im\_s = \mathsf{copysign}\left(1, im\right)

\\
\begin{array}{l}
t_0 := e^{0 - im\_m} - e^{im\_m}\\
im\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -50:\\
\;\;\;\;t\_0 \cdot \left(0.5 \cdot \sin re\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (exp.f64 (neg.f64 im)) (exp.f64 im)) < -50

    1. Initial program 100.0%

      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
    2. Add Preprocessing

    if -50 < (-.f64 (exp.f64 (neg.f64 im)) (exp.f64 im))

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.5% accurate, 0.7× speedup?

\[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;e^{0 - im\_m} - e^{im\_m} \leq -50:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(1 - e^{im\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\ \end{array} \end{array} \]
im\_m = (fabs.f64 im)
im\_s = (copysign.f64 #s(literal 1 binary64) im)
(FPCore (im_s re im_m)
 :precision binary64
 (*
  im_s
  (if (<= (- (exp (- 0.0 im_m)) (exp im_m)) -50.0)
    (* (* 0.5 (sin re)) (- 1.0 (exp im_m)))
    (* (* im_m (sin re)) (+ -1.0 (* -0.16666666666666666 (* im_m im_m)))))))
im\_m = fabs(im);
im\_s = copysign(1.0, im);
double code(double im_s, double re, double im_m) {
	double tmp;
	if ((exp((0.0 - im_m)) - exp(im_m)) <= -50.0) {
		tmp = (0.5 * sin(re)) * (1.0 - exp(im_m));
	} else {
		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	}
	return im_s * tmp;
}
im\_m = abs(im)
im\_s = copysign(1.0d0, im)
real(8) function code(im_s, re, im_m)
    real(8), intent (in) :: im_s
    real(8), intent (in) :: re
    real(8), intent (in) :: im_m
    real(8) :: tmp
    if ((exp((0.0d0 - im_m)) - exp(im_m)) <= (-50.0d0)) then
        tmp = (0.5d0 * sin(re)) * (1.0d0 - exp(im_m))
    else
        tmp = (im_m * sin(re)) * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m)))
    end if
    code = im_s * tmp
end function
im\_m = Math.abs(im);
im\_s = Math.copySign(1.0, im);
public static double code(double im_s, double re, double im_m) {
	double tmp;
	if ((Math.exp((0.0 - im_m)) - Math.exp(im_m)) <= -50.0) {
		tmp = (0.5 * Math.sin(re)) * (1.0 - Math.exp(im_m));
	} else {
		tmp = (im_m * Math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	}
	return im_s * tmp;
}
im\_m = math.fabs(im)
im\_s = math.copysign(1.0, im)
def code(im_s, re, im_m):
	tmp = 0
	if (math.exp((0.0 - im_m)) - math.exp(im_m)) <= -50.0:
		tmp = (0.5 * math.sin(re)) * (1.0 - math.exp(im_m))
	else:
		tmp = (im_m * math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))
	return im_s * tmp
im\_m = abs(im)
im\_s = copysign(1.0, im)
function code(im_s, re, im_m)
	tmp = 0.0
	if (Float64(exp(Float64(0.0 - im_m)) - exp(im_m)) <= -50.0)
		tmp = Float64(Float64(0.5 * sin(re)) * Float64(1.0 - exp(im_m)));
	else
		tmp = Float64(Float64(im_m * sin(re)) * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m))));
	end
	return Float64(im_s * tmp)
end
im\_m = abs(im);
im\_s = sign(im) * abs(1.0);
function tmp_2 = code(im_s, re, im_m)
	tmp = 0.0;
	if ((exp((0.0 - im_m)) - exp(im_m)) <= -50.0)
		tmp = (0.5 * sin(re)) * (1.0 - exp(im_m));
	else
		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
	end
	tmp_2 = im_s * tmp;
end
im\_m = N[Abs[im], $MachinePrecision]
im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[N[(N[Exp[N[(0.0 - im$95$m), $MachinePrecision]], $MachinePrecision] - N[Exp[im$95$m], $MachinePrecision]), $MachinePrecision], -50.0], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[Exp[im$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
im\_m = \left|im\right|
\\
im\_s = \mathsf{copysign}\left(1, im\right)

\\
im\_s \cdot \begin{array}{l}
\mathbf{if}\;e^{0 - im\_m} - e^{im\_m} \leq -50:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(1 - e^{im\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (exp.f64 (neg.f64 im)) (exp.f64 im)) < -50

    1. Initial program 100.0%

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

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

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

      if -50 < (-.f64 (exp.f64 (neg.f64 im)) (exp.f64 im))

      1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 97.0% accurate, 1.5× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\\ t_1 := im\_m \cdot t\_0\\ t_2 := 0.5 \cdot \sin re\\ t_3 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\ t_4 := t\_3 - -2\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 2 \cdot 10^{+22}:\\ \;\;\;\;\frac{\left(0.5 \cdot \left(im\_m \cdot \sin re\right)\right) \cdot \left(-8 + t\_1 \cdot \left(t\_0 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot t\_0\right)\right)\right)}{4 + t\_1 \cdot \left(t\_1 - -2\right)}\\ \mathbf{elif}\;im\_m \leq 3.3 \cdot 10^{+44}:\\ \;\;\;\;\frac{t\_2}{im\_m} \cdot \frac{\left(im\_m \cdot \left(-2 + t\_3\right)\right) \cdot \left(im\_m \cdot t\_4\right)}{t\_4}\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0
             (*
              im_m
              (+
               -0.3333333333333333
               (*
                im_m
                (*
                 im_m
                 (+
                  -0.016666666666666666
                  (* (* im_m im_m) -0.0003968253968253968)))))))
            (t_1 (* im_m t_0))
            (t_2 (* 0.5 (sin re)))
            (t_3
             (*
              im_m
              (*
               im_m
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968)))))))))
            (t_4 (- t_3 -2.0)))
       (*
        im_s
        (if (<= im_m 2e+22)
          (/
           (*
            (* 0.5 (* im_m (sin re)))
            (+ -8.0 (* t_1 (* t_0 (* (* im_m im_m) t_0)))))
           (+ 4.0 (* t_1 (- t_1 -2.0))))
          (if (<= im_m 3.3e+44)
            (* (/ t_2 im_m) (/ (* (* im_m (+ -2.0 t_3)) (* im_m t_4)) t_4))
            (*
             t_2
             (*
              im_m
              (+
               -2.0
               (*
                (* im_m im_m)
                (+
                 -0.3333333333333333
                 (*
                  -0.0003968253968253968
                  (* (* im_m im_m) (* im_m im_m)))))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))));
    	double t_1 = im_m * t_0;
    	double t_2 = 0.5 * sin(re);
    	double t_3 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	double t_4 = t_3 - -2.0;
    	double tmp;
    	if (im_m <= 2e+22) {
    		tmp = ((0.5 * (im_m * sin(re))) * (-8.0 + (t_1 * (t_0 * ((im_m * im_m) * t_0))))) / (4.0 + (t_1 * (t_1 - -2.0)));
    	} else if (im_m <= 3.3e+44) {
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_3)) * (im_m * t_4)) / t_4);
    	} else {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: t_4
        real(8) :: tmp
        t_0 = im_m * ((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0))))))
        t_1 = im_m * t_0
        t_2 = 0.5d0 * sin(re)
        t_3 = im_m * (im_m * ((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))))
        t_4 = t_3 - (-2.0d0)
        if (im_m <= 2d+22) then
            tmp = ((0.5d0 * (im_m * sin(re))) * ((-8.0d0) + (t_1 * (t_0 * ((im_m * im_m) * t_0))))) / (4.0d0 + (t_1 * (t_1 - (-2.0d0))))
        else if (im_m <= 3.3d+44) then
            tmp = (t_2 / im_m) * (((im_m * ((-2.0d0) + t_3)) * (im_m * t_4)) / t_4)
        else
            tmp = t_2 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((-0.0003968253968253968d0) * ((im_m * im_m) * (im_m * im_m)))))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))));
    	double t_1 = im_m * t_0;
    	double t_2 = 0.5 * Math.sin(re);
    	double t_3 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	double t_4 = t_3 - -2.0;
    	double tmp;
    	if (im_m <= 2e+22) {
    		tmp = ((0.5 * (im_m * Math.sin(re))) * (-8.0 + (t_1 * (t_0 * ((im_m * im_m) * t_0))))) / (4.0 + (t_1 * (t_1 - -2.0)));
    	} else if (im_m <= 3.3e+44) {
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_3)) * (im_m * t_4)) / t_4);
    	} else {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))
    	t_1 = im_m * t_0
    	t_2 = 0.5 * math.sin(re)
    	t_3 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))))
    	t_4 = t_3 - -2.0
    	tmp = 0
    	if im_m <= 2e+22:
    		tmp = ((0.5 * (im_m * math.sin(re))) * (-8.0 + (t_1 * (t_0 * ((im_m * im_m) * t_0))))) / (4.0 + (t_1 * (t_1 - -2.0)))
    	elif im_m <= 3.3e+44:
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_3)) * (im_m * t_4)) / t_4)
    	else:
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(im_m * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968))))))
    	t_1 = Float64(im_m * t_0)
    	t_2 = Float64(0.5 * sin(re))
    	t_3 = Float64(im_m * Float64(im_m * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968))))))))
    	t_4 = Float64(t_3 - -2.0)
    	tmp = 0.0
    	if (im_m <= 2e+22)
    		tmp = Float64(Float64(Float64(0.5 * Float64(im_m * sin(re))) * Float64(-8.0 + Float64(t_1 * Float64(t_0 * Float64(Float64(im_m * im_m) * t_0))))) / Float64(4.0 + Float64(t_1 * Float64(t_1 - -2.0))));
    	elseif (im_m <= 3.3e+44)
    		tmp = Float64(Float64(t_2 / im_m) * Float64(Float64(Float64(im_m * Float64(-2.0 + t_3)) * Float64(im_m * t_4)) / t_4));
    	else
    		tmp = Float64(t_2 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(-0.0003968253968253968 * Float64(Float64(im_m * im_m) * Float64(im_m * im_m))))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))));
    	t_1 = im_m * t_0;
    	t_2 = 0.5 * sin(re);
    	t_3 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	t_4 = t_3 - -2.0;
    	tmp = 0.0;
    	if (im_m <= 2e+22)
    		tmp = ((0.5 * (im_m * sin(re))) * (-8.0 + (t_1 * (t_0 * ((im_m * im_m) * t_0))))) / (4.0 + (t_1 * (t_1 - -2.0)));
    	elseif (im_m <= 3.3e+44)
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_3)) * (im_m * t_4)) / t_4);
    	else
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(im$95$m * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im$95$m * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(im$95$m * N[(im$95$m * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - -2.0), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 2e+22], N[(N[(N[(0.5 * N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-8.0 + N[(t$95$1 * N[(t$95$0 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.0 + N[(t$95$1 * N[(t$95$1 - -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 3.3e+44], N[(N[(t$95$2 / im$95$m), $MachinePrecision] * N[(N[(N[(im$95$m * N[(-2.0 + t$95$3), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * t$95$4), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.0003968253968253968 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\\
    t_1 := im\_m \cdot t\_0\\
    t_2 := 0.5 \cdot \sin re\\
    t_3 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\
    t_4 := t\_3 - -2\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 2 \cdot 10^{+22}:\\
    \;\;\;\;\frac{\left(0.5 \cdot \left(im\_m \cdot \sin re\right)\right) \cdot \left(-8 + t\_1 \cdot \left(t\_0 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot t\_0\right)\right)\right)}{4 + t\_1 \cdot \left(t\_1 - -2\right)}\\
    
    \mathbf{elif}\;im\_m \leq 3.3 \cdot 10^{+44}:\\
    \;\;\;\;\frac{t\_2}{im\_m} \cdot \frac{\left(im\_m \cdot \left(-2 + t\_3\right)\right) \cdot \left(im\_m \cdot t\_4\right)}{t\_4}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 2e22

      1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6491.6%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Applied egg-rr63.2%

        \[\leadsto \color{blue}{\frac{\left(0.5 \cdot \left(\sin re \cdot im\right)\right) \cdot \left(-8 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(\left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)}{4 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) - -2\right)}} \]

      if 2e22 < im < 3.30000000000000013e44

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*l*N/A

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{-1}{2520}\right), im\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr6.5%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \color{blue}{\left(im \cdot -0.0003968253968253968\right) \cdot im}\right)\right)\right)\right) \]
      8. Applied egg-rr100.0%

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

      if 3.30000000000000013e44 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \color{blue}{-0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)}\right)\right)\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 2 \cdot 10^{+22}:\\ \;\;\;\;\frac{\left(0.5 \cdot \left(im \cdot \sin re\right)\right) \cdot \left(-8 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(\left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right)}{4 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) - -2\right)}\\ \mathbf{elif}\;im \leq 3.3 \cdot 10^{+44}:\\ \;\;\;\;\frac{0.5 \cdot \sin re}{im} \cdot \frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2}\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 97.2% accurate, 1.7× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := \left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\\ t_1 := -0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\\ t_2 := 0.5 \cdot \sin re\\ t_3 := -0.3333333333333333 + im\_m \cdot \left(im\_m \cdot t\_1\right)\\ t_4 := im\_m \cdot \left(im\_m \cdot t\_3\right)\\ t_5 := t\_4 - -2\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 700:\\ \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot t\_1\right)\right)\right)\\ \mathbf{elif}\;im\_m \leq 3.45 \cdot 10^{+22}:\\ \;\;\;\;\frac{\left(\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right) \cdot \left(im\_m \cdot re\right)\right) \cdot \left(-8 + t\_4 \cdot \left(t\_0 \cdot \left(t\_3 \cdot t\_3\right)\right)\right)}{4 + t\_4 \cdot t\_5}\\ \mathbf{elif}\;im\_m \leq 10^{+43}:\\ \;\;\;\;\frac{t\_2}{im\_m} \cdot \frac{\left(im\_m \cdot \left(-2 + t\_4\right)\right) \cdot \left(im\_m \cdot t\_5\right)}{t\_5}\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot t\_0\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0 (* (* im_m im_m) (* im_m im_m)))
            (t_1
             (+ -0.016666666666666666 (* im_m (* im_m -0.0003968253968253968))))
            (t_2 (* 0.5 (sin re)))
            (t_3 (+ -0.3333333333333333 (* im_m (* im_m t_1))))
            (t_4 (* im_m (* im_m t_3)))
            (t_5 (- t_4 -2.0)))
       (*
        im_s
        (if (<= im_m 700.0)
          (*
           t_2
           (*
            im_m
            (+
             -2.0
             (* (* im_m im_m) (+ -0.3333333333333333 (* (* im_m im_m) t_1))))))
          (if (<= im_m 3.45e+22)
            (/
             (*
              (*
               (+
                0.5
                (*
                 (* re re)
                 (+ -0.08333333333333333 (* re (* re 0.004166666666666667)))))
               (* im_m re))
              (+ -8.0 (* t_4 (* t_0 (* t_3 t_3)))))
             (+ 4.0 (* t_4 t_5)))
            (if (<= im_m 1e+43)
              (* (/ t_2 im_m) (/ (* (* im_m (+ -2.0 t_4)) (* im_m t_5)) t_5))
              (*
               t_2
               (*
                im_m
                (+
                 -2.0
                 (*
                  (* im_m im_m)
                  (+ -0.3333333333333333 (* -0.0003968253968253968 t_0))))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = (im_m * im_m) * (im_m * im_m);
    	double t_1 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	double t_2 = 0.5 * sin(re);
    	double t_3 = -0.3333333333333333 + (im_m * (im_m * t_1));
    	double t_4 = im_m * (im_m * t_3);
    	double t_5 = t_4 - -2.0;
    	double tmp;
    	if (im_m <= 700.0) {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_1)))));
    	} else if (im_m <= 3.45e+22) {
    		tmp = (((0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667))))) * (im_m * re)) * (-8.0 + (t_4 * (t_0 * (t_3 * t_3))))) / (4.0 + (t_4 * t_5));
    	} else if (im_m <= 1e+43) {
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_4)) * (im_m * t_5)) / t_5);
    	} else {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * t_0)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: t_4
        real(8) :: t_5
        real(8) :: tmp
        t_0 = (im_m * im_m) * (im_m * im_m)
        t_1 = (-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0)))
        t_2 = 0.5d0 * sin(re)
        t_3 = (-0.3333333333333333d0) + (im_m * (im_m * t_1))
        t_4 = im_m * (im_m * t_3)
        t_5 = t_4 - (-2.0d0)
        if (im_m <= 700.0d0) then
            tmp = t_2 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * t_1)))))
        else if (im_m <= 3.45d+22) then
            tmp = (((0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0))))) * (im_m * re)) * ((-8.0d0) + (t_4 * (t_0 * (t_3 * t_3))))) / (4.0d0 + (t_4 * t_5))
        else if (im_m <= 1d+43) then
            tmp = (t_2 / im_m) * (((im_m * ((-2.0d0) + t_4)) * (im_m * t_5)) / t_5)
        else
            tmp = t_2 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((-0.0003968253968253968d0) * t_0)))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = (im_m * im_m) * (im_m * im_m);
    	double t_1 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	double t_2 = 0.5 * Math.sin(re);
    	double t_3 = -0.3333333333333333 + (im_m * (im_m * t_1));
    	double t_4 = im_m * (im_m * t_3);
    	double t_5 = t_4 - -2.0;
    	double tmp;
    	if (im_m <= 700.0) {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_1)))));
    	} else if (im_m <= 3.45e+22) {
    		tmp = (((0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667))))) * (im_m * re)) * (-8.0 + (t_4 * (t_0 * (t_3 * t_3))))) / (4.0 + (t_4 * t_5));
    	} else if (im_m <= 1e+43) {
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_4)) * (im_m * t_5)) / t_5);
    	} else {
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * t_0)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = (im_m * im_m) * (im_m * im_m)
    	t_1 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968))
    	t_2 = 0.5 * math.sin(re)
    	t_3 = -0.3333333333333333 + (im_m * (im_m * t_1))
    	t_4 = im_m * (im_m * t_3)
    	t_5 = t_4 - -2.0
    	tmp = 0
    	if im_m <= 700.0:
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_1)))))
    	elif im_m <= 3.45e+22:
    		tmp = (((0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667))))) * (im_m * re)) * (-8.0 + (t_4 * (t_0 * (t_3 * t_3))))) / (4.0 + (t_4 * t_5))
    	elif im_m <= 1e+43:
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_4)) * (im_m * t_5)) / t_5)
    	else:
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * t_0)))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(Float64(im_m * im_m) * Float64(im_m * im_m))
    	t_1 = Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))
    	t_2 = Float64(0.5 * sin(re))
    	t_3 = Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * t_1)))
    	t_4 = Float64(im_m * Float64(im_m * t_3))
    	t_5 = Float64(t_4 - -2.0)
    	tmp = 0.0
    	if (im_m <= 700.0)
    		tmp = Float64(t_2 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * t_1))))));
    	elseif (im_m <= 3.45e+22)
    		tmp = Float64(Float64(Float64(Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667))))) * Float64(im_m * re)) * Float64(-8.0 + Float64(t_4 * Float64(t_0 * Float64(t_3 * t_3))))) / Float64(4.0 + Float64(t_4 * t_5)));
    	elseif (im_m <= 1e+43)
    		tmp = Float64(Float64(t_2 / im_m) * Float64(Float64(Float64(im_m * Float64(-2.0 + t_4)) * Float64(im_m * t_5)) / t_5));
    	else
    		tmp = Float64(t_2 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(-0.0003968253968253968 * t_0))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = (im_m * im_m) * (im_m * im_m);
    	t_1 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	t_2 = 0.5 * sin(re);
    	t_3 = -0.3333333333333333 + (im_m * (im_m * t_1));
    	t_4 = im_m * (im_m * t_3);
    	t_5 = t_4 - -2.0;
    	tmp = 0.0;
    	if (im_m <= 700.0)
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_1)))));
    	elseif (im_m <= 3.45e+22)
    		tmp = (((0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667))))) * (im_m * re)) * (-8.0 + (t_4 * (t_0 * (t_3 * t_3))))) / (4.0 + (t_4 * t_5));
    	elseif (im_m <= 1e+43)
    		tmp = (t_2 / im_m) * (((im_m * (-2.0 + t_4)) * (im_m * t_5)) / t_5);
    	else
    		tmp = t_2 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * t_0)))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(im$95$m * N[(im$95$m * t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - -2.0), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 700.0], N[(t$95$2 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 3.45e+22], N[(N[(N[(N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * re), $MachinePrecision]), $MachinePrecision] * N[(-8.0 + N[(t$95$4 * N[(t$95$0 * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.0 + N[(t$95$4 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 1e+43], N[(N[(t$95$2 / im$95$m), $MachinePrecision] * N[(N[(N[(im$95$m * N[(-2.0 + t$95$4), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * t$95$5), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.0003968253968253968 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := \left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\\
    t_1 := -0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\\
    t_2 := 0.5 \cdot \sin re\\
    t_3 := -0.3333333333333333 + im\_m \cdot \left(im\_m \cdot t\_1\right)\\
    t_4 := im\_m \cdot \left(im\_m \cdot t\_3\right)\\
    t_5 := t\_4 - -2\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 700:\\
    \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot t\_1\right)\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 3.45 \cdot 10^{+22}:\\
    \;\;\;\;\frac{\left(\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right) \cdot \left(im\_m \cdot re\right)\right) \cdot \left(-8 + t\_4 \cdot \left(t\_0 \cdot \left(t\_3 \cdot t\_3\right)\right)\right)}{4 + t\_4 \cdot t\_5}\\
    
    \mathbf{elif}\;im\_m \leq 10^{+43}:\\
    \;\;\;\;\frac{t\_2}{im\_m} \cdot \frac{\left(im\_m \cdot \left(-2 + t\_4\right)\right) \cdot \left(im\_m \cdot t\_5\right)}{t\_5}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot t\_0\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if im < 700

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6495.2%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*l*N/A

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{-1}{2520}\right), im\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr95.2%

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

      if 700 < im < 3.4499999999999999e22

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified3.4%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6427.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified27.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr63.2%

        \[\leadsto \color{blue}{\frac{\left(\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right) \cdot \left(re \cdot im\right)\right) \cdot \left(-8 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right)}{4 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)}} \]

      if 3.4499999999999999e22 < im < 1.00000000000000001e43

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*l*N/A

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{-1}{2520}\right), im\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr6.5%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \color{blue}{\left(im \cdot -0.0003968253968253968\right) \cdot im}\right)\right)\right)\right) \]
      8. Applied egg-rr100.0%

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

      if 1.00000000000000001e43 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 700:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\ \mathbf{elif}\;im \leq 3.45 \cdot 10^{+22}:\\ \;\;\;\;\frac{\left(\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right) \cdot \left(im \cdot re\right)\right) \cdot \left(-8 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right)}{4 + \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)}\\ \mathbf{elif}\;im \leq 10^{+43}:\\ \;\;\;\;\frac{0.5 \cdot \sin re}{im} \cdot \frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2}\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 95.4% accurate, 2.3× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := -0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\\ t_1 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot t\_0\right)\right)\right)\\ t_2 := t\_1 - -2\\ t_3 := 0.5 \cdot \sin re\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 600:\\ \;\;\;\;t\_3 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot t\_0\right)\right)\right)\\ \mathbf{elif}\;im\_m \leq 9.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{\left(im\_m \cdot \left(-2 + t\_1\right)\right) \cdot \left(im\_m \cdot t\_2\right)}{t\_2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0
             (+ -0.016666666666666666 (* im_m (* im_m -0.0003968253968253968))))
            (t_1 (* im_m (* im_m (+ -0.3333333333333333 (* im_m (* im_m t_0))))))
            (t_2 (- t_1 -2.0))
            (t_3 (* 0.5 (sin re))))
       (*
        im_s
        (if (<= im_m 600.0)
          (*
           t_3
           (*
            im_m
            (+
             -2.0
             (* (* im_m im_m) (+ -0.3333333333333333 (* (* im_m im_m) t_0))))))
          (if (<= im_m 9.5e+37)
            (*
             (/ (* (* im_m (+ -2.0 t_1)) (* im_m t_2)) t_2)
             (/
              (*
               re
               (+
                0.5
                (*
                 (* re re)
                 (+ -0.08333333333333333 (* re (* re 0.004166666666666667))))))
              im_m))
            (*
             t_3
             (*
              im_m
              (+
               -2.0
               (*
                (* im_m im_m)
                (+
                 -0.3333333333333333
                 (*
                  -0.0003968253968253968
                  (* (* im_m im_m) (* im_m im_m)))))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	double t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * t_0))));
    	double t_2 = t_1 - -2.0;
    	double t_3 = 0.5 * sin(re);
    	double tmp;
    	if (im_m <= 600.0) {
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_0)))));
    	} else if (im_m <= 9.5e+37) {
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	} else {
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: tmp
        t_0 = (-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0)))
        t_1 = im_m * (im_m * ((-0.3333333333333333d0) + (im_m * (im_m * t_0))))
        t_2 = t_1 - (-2.0d0)
        t_3 = 0.5d0 * sin(re)
        if (im_m <= 600.0d0) then
            tmp = t_3 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * t_0)))))
        else if (im_m <= 9.5d+37) then
            tmp = (((im_m * ((-2.0d0) + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))) / im_m)
        else
            tmp = t_3 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((-0.0003968253968253968d0) * ((im_m * im_m) * (im_m * im_m)))))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	double t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * t_0))));
    	double t_2 = t_1 - -2.0;
    	double t_3 = 0.5 * Math.sin(re);
    	double tmp;
    	if (im_m <= 600.0) {
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_0)))));
    	} else if (im_m <= 9.5e+37) {
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	} else {
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968))
    	t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * t_0))))
    	t_2 = t_1 - -2.0
    	t_3 = 0.5 * math.sin(re)
    	tmp = 0
    	if im_m <= 600.0:
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_0)))))
    	elif im_m <= 9.5e+37:
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m)
    	else:
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))
    	t_1 = Float64(im_m * Float64(im_m * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * t_0)))))
    	t_2 = Float64(t_1 - -2.0)
    	t_3 = Float64(0.5 * sin(re))
    	tmp = 0.0
    	if (im_m <= 600.0)
    		tmp = Float64(t_3 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * t_0))))));
    	elseif (im_m <= 9.5e+37)
    		tmp = Float64(Float64(Float64(Float64(im_m * Float64(-2.0 + t_1)) * Float64(im_m * t_2)) / t_2) * Float64(Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667)))))) / im_m));
    	else
    		tmp = Float64(t_3 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(-0.0003968253968253968 * Float64(Float64(im_m * im_m) * Float64(im_m * im_m))))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = -0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968));
    	t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * t_0))));
    	t_2 = t_1 - -2.0;
    	t_3 = 0.5 * sin(re);
    	tmp = 0.0;
    	if (im_m <= 600.0)
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * t_0)))));
    	elseif (im_m <= 9.5e+37)
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	else
    		tmp = t_3 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im$95$m * N[(im$95$m * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - -2.0), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 600.0], N[(t$95$3 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 9.5e+37], N[(N[(N[(N[(im$95$m * N[(-2.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im$95$m), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.0003968253968253968 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := -0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\\
    t_1 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot t\_0\right)\right)\right)\\
    t_2 := t\_1 - -2\\
    t_3 := 0.5 \cdot \sin re\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 600:\\
    \;\;\;\;t\_3 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot t\_0\right)\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 9.5 \cdot 10^{+37}:\\
    \;\;\;\;\frac{\left(im\_m \cdot \left(-2 + t\_1\right)\right) \cdot \left(im\_m \cdot t\_2\right)}{t\_2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im\_m}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 600

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6495.2%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*l*N/A

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{-1}{2520}\right), im\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Applied egg-rr95.2%

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

      if 600 < im < 9.4999999999999995e37

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f644.3%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6443.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified43.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr42.9%

        \[\leadsto \color{blue}{\frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im} \cdot \frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2}} \]

      if 9.4999999999999995e37 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6496.2%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \color{blue}{-0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)}\right)\right)\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification92.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 600:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\ \mathbf{elif}\;im \leq 9.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im}\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 95.3% accurate, 2.3× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := 0.5 \cdot \sin re\\ t_1 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\ t_2 := t\_1 - -2\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 620:\\ \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right)\\ \mathbf{elif}\;im\_m \leq 9.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{\left(im\_m \cdot \left(-2 + t\_1\right)\right) \cdot \left(im\_m \cdot t\_2\right)}{t\_2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0 (* 0.5 (sin re)))
            (t_1
             (*
              im_m
              (*
               im_m
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968)))))))))
            (t_2 (- t_1 -2.0)))
       (*
        im_s
        (if (<= im_m 620.0)
          (*
           t_0
           (*
            im_m
            (+
             -2.0
             (*
              (* im_m im_m)
              (+ -0.3333333333333333 (* (* im_m im_m) -0.016666666666666666))))))
          (if (<= im_m 9.5e+37)
            (*
             (/ (* (* im_m (+ -2.0 t_1)) (* im_m t_2)) t_2)
             (/
              (*
               re
               (+
                0.5
                (*
                 (* re re)
                 (+ -0.08333333333333333 (* re (* re 0.004166666666666667))))))
              im_m))
            (*
             t_0
             (*
              im_m
              (+
               -2.0
               (*
                (* im_m im_m)
                (+
                 -0.3333333333333333
                 (*
                  -0.0003968253968253968
                  (* (* im_m im_m) (* im_m im_m)))))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = 0.5 * sin(re);
    	double t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	double t_2 = t_1 - -2.0;
    	double tmp;
    	if (im_m <= 620.0) {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	} else if (im_m <= 9.5e+37) {
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	} else {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_0 = 0.5d0 * sin(re)
        t_1 = im_m * (im_m * ((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))))
        t_2 = t_1 - (-2.0d0)
        if (im_m <= 620.0d0) then
            tmp = t_0 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * (-0.016666666666666666d0))))))
        else if (im_m <= 9.5d+37) then
            tmp = (((im_m * ((-2.0d0) + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))) / im_m)
        else
            tmp = t_0 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((-0.0003968253968253968d0) * ((im_m * im_m) * (im_m * im_m)))))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = 0.5 * Math.sin(re);
    	double t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	double t_2 = t_1 - -2.0;
    	double tmp;
    	if (im_m <= 620.0) {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	} else if (im_m <= 9.5e+37) {
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	} else {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = 0.5 * math.sin(re)
    	t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))))
    	t_2 = t_1 - -2.0
    	tmp = 0
    	if im_m <= 620.0:
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))))
    	elif im_m <= 9.5e+37:
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m)
    	else:
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(0.5 * sin(re))
    	t_1 = Float64(im_m * Float64(im_m * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968))))))))
    	t_2 = Float64(t_1 - -2.0)
    	tmp = 0.0
    	if (im_m <= 620.0)
    		tmp = Float64(t_0 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * -0.016666666666666666))))));
    	elseif (im_m <= 9.5e+37)
    		tmp = Float64(Float64(Float64(Float64(im_m * Float64(-2.0 + t_1)) * Float64(im_m * t_2)) / t_2) * Float64(Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667)))))) / im_m));
    	else
    		tmp = Float64(t_0 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(-0.0003968253968253968 * Float64(Float64(im_m * im_m) * Float64(im_m * im_m))))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = 0.5 * sin(re);
    	t_1 = im_m * (im_m * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))));
    	t_2 = t_1 - -2.0;
    	tmp = 0.0;
    	if (im_m <= 620.0)
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	elseif (im_m <= 9.5e+37)
    		tmp = (((im_m * (-2.0 + t_1)) * (im_m * t_2)) / t_2) * ((re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))) / im_m);
    	else
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (-0.0003968253968253968 * ((im_m * im_m) * (im_m * im_m)))))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im$95$m * N[(im$95$m * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - -2.0), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 620.0], N[(t$95$0 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 9.5e+37], N[(N[(N[(N[(im$95$m * N[(-2.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im$95$m), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.0003968253968253968 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := 0.5 \cdot \sin re\\
    t_1 := im\_m \cdot \left(im\_m \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\\
    t_2 := t\_1 - -2\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 620:\\
    \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 9.5 \cdot 10^{+37}:\\
    \;\;\;\;\frac{\left(im\_m \cdot \left(-2 + t\_1\right)\right) \cdot \left(im\_m \cdot t\_2\right)}{t\_2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im\_m}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 620

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 620 < im < 9.4999999999999995e37

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f644.3%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6443.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified43.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr42.9%

        \[\leadsto \color{blue}{\frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im} \cdot \frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2}} \]

      if 9.4999999999999995e37 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6496.2%

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in im around inf

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \color{blue}{-0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)}\right)\right)\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification92.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 620:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot -0.016666666666666666\right)\right)\right)\\ \mathbf{elif}\;im \leq 9.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{\left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2\right)\right)}{im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right) - -2} \cdot \frac{re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)}{im}\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.0003968253968253968 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 93.8% accurate, 2.4× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := 0.5 \cdot \sin re\\ t_1 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 450:\\ \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right)\\ \mathbf{elif}\;im\_m \leq 10^{+62}:\\ \;\;\;\;t\_1 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_1 \cdot \left(im\_m \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0 (* 0.5 (sin re)))
            (t_1
             (*
              re
              (+
               0.5
               (*
                (* re re)
                (+ -0.08333333333333333 (* re (* re 0.004166666666666667))))))))
       (*
        im_s
        (if (<= im_m 450.0)
          (*
           t_0
           (*
            im_m
            (+
             -2.0
             (*
              (* im_m im_m)
              (+ -0.3333333333333333 (* (* im_m im_m) -0.016666666666666666))))))
          (if (<= im_m 1e+62)
            (+
             (*
              t_1
              (*
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968))))))
               (* im_m (* im_m im_m))))
             (* t_1 (* im_m -2.0)))
            (*
             t_0
             (*
              im_m
              (+
               -2.0
               (* -0.016666666666666666 (* (* im_m im_m) (* im_m im_m)))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = 0.5 * sin(re);
    	double t_1 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double tmp;
    	if (im_m <= 450.0) {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	} else if (im_m <= 1e+62) {
    		tmp = (t_1 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_1 * (im_m * -2.0));
    	} else {
    		tmp = t_0 * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = 0.5d0 * sin(re)
        t_1 = re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))
        if (im_m <= 450.0d0) then
            tmp = t_0 * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * (-0.016666666666666666d0))))))
        else if (im_m <= 1d+62) then
            tmp = (t_1 * (((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))) * (im_m * (im_m * im_m)))) + (t_1 * (im_m * (-2.0d0)))
        else
            tmp = t_0 * (im_m * ((-2.0d0) + ((-0.016666666666666666d0) * ((im_m * im_m) * (im_m * im_m)))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = 0.5 * Math.sin(re);
    	double t_1 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double tmp;
    	if (im_m <= 450.0) {
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	} else if (im_m <= 1e+62) {
    		tmp = (t_1 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_1 * (im_m * -2.0));
    	} else {
    		tmp = t_0 * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = 0.5 * math.sin(re)
    	t_1 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))
    	tmp = 0
    	if im_m <= 450.0:
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))))
    	elif im_m <= 1e+62:
    		tmp = (t_1 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_1 * (im_m * -2.0))
    	else:
    		tmp = t_0 * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(0.5 * sin(re))
    	t_1 = Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667))))))
    	tmp = 0.0
    	if (im_m <= 450.0)
    		tmp = Float64(t_0 * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * -0.016666666666666666))))));
    	elseif (im_m <= 1e+62)
    		tmp = Float64(Float64(t_1 * Float64(Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))))) * Float64(im_m * Float64(im_m * im_m)))) + Float64(t_1 * Float64(im_m * -2.0)));
    	else
    		tmp = Float64(t_0 * Float64(im_m * Float64(-2.0 + Float64(-0.016666666666666666 * Float64(Float64(im_m * im_m) * Float64(im_m * im_m))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = 0.5 * sin(re);
    	t_1 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	tmp = 0.0;
    	if (im_m <= 450.0)
    		tmp = t_0 * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666)))));
    	elseif (im_m <= 1e+62)
    		tmp = (t_1 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_1 * (im_m * -2.0));
    	else
    		tmp = t_0 * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 450.0], N[(t$95$0 * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 1e+62], N[(N[(t$95$1 * N[(N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(im$95$m * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(im$95$m * N[(-2.0 + N[(-0.016666666666666666 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := 0.5 \cdot \sin re\\
    t_1 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 450:\\
    \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 10^{+62}:\\
    \;\;\;\;t\_1 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_1 \cdot \left(im\_m \cdot -2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \left(im\_m \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 450

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 450 < im < 1.00000000000000004e62

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6448.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified48.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr48.0%

        \[\leadsto \color{blue}{\left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) + \left(im \cdot -2\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right)} \]

      if 1.00000000000000004e62 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 450:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot -0.016666666666666666\right)\right)\right)\\ \mathbf{elif}\;im \leq 10^{+62}:\\ \;\;\;\;\left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) + \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 93.6% accurate, 2.4× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 600:\\ \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\ \mathbf{elif}\;im\_m \leq 10^{+62}:\\ \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im\_m \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0
             (*
              re
              (+
               0.5
               (*
                (* re re)
                (+ -0.08333333333333333 (* re (* re 0.004166666666666667))))))))
       (*
        im_s
        (if (<= im_m 600.0)
          (* (* im_m (sin re)) (+ -1.0 (* -0.16666666666666666 (* im_m im_m))))
          (if (<= im_m 1e+62)
            (+
             (*
              t_0
              (*
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968))))))
               (* im_m (* im_m im_m))))
             (* t_0 (* im_m -2.0)))
            (*
             (* 0.5 (sin re))
             (*
              im_m
              (+
               -2.0
               (* -0.016666666666666666 (* (* im_m im_m) (* im_m im_m)))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double tmp;
    	if (im_m <= 600.0) {
    		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	} else if (im_m <= 1e+62) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = (0.5 * sin(re)) * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: tmp
        t_0 = re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))
        if (im_m <= 600.0d0) then
            tmp = (im_m * sin(re)) * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m)))
        else if (im_m <= 1d+62) then
            tmp = (t_0 * (((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * (-2.0d0)))
        else
            tmp = (0.5d0 * sin(re)) * (im_m * ((-2.0d0) + ((-0.016666666666666666d0) * ((im_m * im_m) * (im_m * im_m)))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double tmp;
    	if (im_m <= 600.0) {
    		tmp = (im_m * Math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	} else if (im_m <= 1e+62) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = (0.5 * Math.sin(re)) * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))
    	tmp = 0
    	if im_m <= 600.0:
    		tmp = (im_m * math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))
    	elif im_m <= 1e+62:
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0))
    	else:
    		tmp = (0.5 * math.sin(re)) * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667))))))
    	tmp = 0.0
    	if (im_m <= 600.0)
    		tmp = Float64(Float64(im_m * sin(re)) * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m))));
    	elseif (im_m <= 1e+62)
    		tmp = Float64(Float64(t_0 * Float64(Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))))) * Float64(im_m * Float64(im_m * im_m)))) + Float64(t_0 * Float64(im_m * -2.0)));
    	else
    		tmp = Float64(Float64(0.5 * sin(re)) * Float64(im_m * Float64(-2.0 + Float64(-0.016666666666666666 * Float64(Float64(im_m * im_m) * Float64(im_m * im_m))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	tmp = 0.0;
    	if (im_m <= 600.0)
    		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	elseif (im_m <= 1e+62)
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	else
    		tmp = (0.5 * sin(re)) * (im_m * (-2.0 + (-0.016666666666666666 * ((im_m * im_m) * (im_m * im_m)))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 600.0], N[(N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 1e+62], N[(N[(t$95$0 * N[(N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(im$95$m * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(-2.0 + N[(-0.016666666666666666 * N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 600:\\
    \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 10^{+62}:\\
    \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im\_m \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 600

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 600 < im < 1.00000000000000004e62

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6448.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified48.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr48.0%

        \[\leadsto \color{blue}{\left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) + \left(im \cdot -2\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right)} \]

      if 1.00000000000000004e62 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 600:\\ \;\;\;\;\left(im \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{elif}\;im \leq 10^{+62}:\\ \;\;\;\;\left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) + \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + -0.016666666666666666 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 91.1% accurate, 2.5× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 620:\\ \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\ \mathbf{elif}\;im\_m \leq 1.65 \cdot 10^{+95}:\\ \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right)\\ \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (*
      im_s
      (if (<= im_m 620.0)
        (* (* im_m (sin re)) (+ -1.0 (* -0.16666666666666666 (* im_m im_m))))
        (if (<= im_m 1.65e+95)
          (*
           (* re (+ 0.5 (* re (* re (* (* re re) 0.004166666666666667)))))
           (*
            im_m
            (+
             -2.0
             (*
              (* im_m im_m)
              (+
               -0.3333333333333333
               (*
                (* im_m im_m)
                (+
                 -0.016666666666666666
                 (* (* im_m im_m) -0.0003968253968253968))))))))
          (*
           (* 0.5 (sin re))
           (* im_m (+ -2.0 (* (* im_m im_m) -0.3333333333333333))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (im_m <= 620.0) {
    		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	} else if (im_m <= 1.65e+95) {
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	} else {
    		tmp = (0.5 * sin(re)) * (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333)));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: tmp
        if (im_m <= 620.0d0) then
            tmp = (im_m * sin(re)) * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m)))
        else if (im_m <= 1.65d+95) then
            tmp = (re * (0.5d0 + (re * (re * ((re * re) * 0.004166666666666667d0))))) * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0))))))))
        else
            tmp = (0.5d0 * sin(re)) * (im_m * ((-2.0d0) + ((im_m * im_m) * (-0.3333333333333333d0))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (im_m <= 620.0) {
    		tmp = (im_m * Math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	} else if (im_m <= 1.65e+95) {
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	} else {
    		tmp = (0.5 * Math.sin(re)) * (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333)));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	tmp = 0
    	if im_m <= 620.0:
    		tmp = (im_m * math.sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))
    	elif im_m <= 1.65e+95:
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))
    	else:
    		tmp = (0.5 * math.sin(re)) * (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333)))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	tmp = 0.0
    	if (im_m <= 620.0)
    		tmp = Float64(Float64(im_m * sin(re)) * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m))));
    	elseif (im_m <= 1.65e+95)
    		tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(Float64(re * re) * 0.004166666666666667))))) * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968))))))));
    	else
    		tmp = Float64(Float64(0.5 * sin(re)) * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * -0.3333333333333333))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	tmp = 0.0;
    	if (im_m <= 620.0)
    		tmp = (im_m * sin(re)) * (-1.0 + (-0.16666666666666666 * (im_m * im_m)));
    	elseif (im_m <= 1.65e+95)
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	else
    		tmp = (0.5 * sin(re)) * (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333)));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[im$95$m, 620.0], N[(N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 1.65e+95], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 620:\\
    \;\;\;\;\left(im\_m \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\
    
    \mathbf{elif}\;im\_m \leq 1.65 \cdot 10^{+95}:\\
    \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 620

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 620 < im < 1.6499999999999999e95

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6454.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified54.0%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6459.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified59.2%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f6459.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      11. Simplified59.2%

        \[\leadsto \left(re \cdot \left(0.5 + re \cdot \color{blue}{\left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)}\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]

      if 1.6499999999999999e95 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 620:\\ \;\;\;\;\left(im \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{elif}\;im \leq 1.65 \cdot 10^{+95}:\\ \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 90.1% accurate, 2.6× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\ t_1 := im\_m \cdot \sin re\\ t_2 := -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 480:\\ \;\;\;\;t\_1 \cdot \left(-1 + t\_2\right)\\ \mathbf{elif}\;im\_m \leq 2.1 \cdot 10^{+153}:\\ \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0
             (*
              re
              (+
               0.5
               (*
                (* re re)
                (+ -0.08333333333333333 (* re (* re 0.004166666666666667)))))))
            (t_1 (* im_m (sin re)))
            (t_2 (* -0.16666666666666666 (* im_m im_m))))
       (*
        im_s
        (if (<= im_m 480.0)
          (* t_1 (+ -1.0 t_2))
          (if (<= im_m 2.1e+153)
            (+
             (*
              t_0
              (*
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968))))))
               (* im_m (* im_m im_m))))
             (* t_0 (* im_m -2.0)))
            (* t_1 t_2))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double t_1 = im_m * sin(re);
    	double t_2 = -0.16666666666666666 * (im_m * im_m);
    	double tmp;
    	if (im_m <= 480.0) {
    		tmp = t_1 * (-1.0 + t_2);
    	} else if (im_m <= 2.1e+153) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = t_1 * t_2;
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_0 = re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))
        t_1 = im_m * sin(re)
        t_2 = (-0.16666666666666666d0) * (im_m * im_m)
        if (im_m <= 480.0d0) then
            tmp = t_1 * ((-1.0d0) + t_2)
        else if (im_m <= 2.1d+153) then
            tmp = (t_0 * (((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * (-2.0d0)))
        else
            tmp = t_1 * t_2
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double t_1 = im_m * Math.sin(re);
    	double t_2 = -0.16666666666666666 * (im_m * im_m);
    	double tmp;
    	if (im_m <= 480.0) {
    		tmp = t_1 * (-1.0 + t_2);
    	} else if (im_m <= 2.1e+153) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = t_1 * t_2;
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))
    	t_1 = im_m * math.sin(re)
    	t_2 = -0.16666666666666666 * (im_m * im_m)
    	tmp = 0
    	if im_m <= 480.0:
    		tmp = t_1 * (-1.0 + t_2)
    	elif im_m <= 2.1e+153:
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0))
    	else:
    		tmp = t_1 * t_2
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667))))))
    	t_1 = Float64(im_m * sin(re))
    	t_2 = Float64(-0.16666666666666666 * Float64(im_m * im_m))
    	tmp = 0.0
    	if (im_m <= 480.0)
    		tmp = Float64(t_1 * Float64(-1.0 + t_2));
    	elseif (im_m <= 2.1e+153)
    		tmp = Float64(Float64(t_0 * Float64(Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))))) * Float64(im_m * Float64(im_m * im_m)))) + Float64(t_0 * Float64(im_m * -2.0)));
    	else
    		tmp = Float64(t_1 * t_2);
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	t_1 = im_m * sin(re);
    	t_2 = -0.16666666666666666 * (im_m * im_m);
    	tmp = 0.0;
    	if (im_m <= 480.0)
    		tmp = t_1 * (-1.0 + t_2);
    	elseif (im_m <= 2.1e+153)
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	else
    		tmp = t_1 * t_2;
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 480.0], N[(t$95$1 * N[(-1.0 + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[im$95$m, 2.1e+153], N[(N[(t$95$0 * N[(N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(im$95$m * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$2), $MachinePrecision]]]), $MachinePrecision]]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\
    t_1 := im\_m \cdot \sin re\\
    t_2 := -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 480:\\
    \;\;\;\;t\_1 \cdot \left(-1 + t\_2\right)\\
    
    \mathbf{elif}\;im\_m \leq 2.1 \cdot 10^{+153}:\\
    \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1 \cdot t\_2\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 480

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 480 < im < 2.10000000000000017e153

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6463.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified63.9%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6468.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified68.0%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr68.0%

        \[\leadsto \color{blue}{\left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) + \left(im \cdot -2\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right)} \]

      if 2.10000000000000017e153 < im

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 480:\\ \;\;\;\;\left(im \cdot \sin re\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \mathbf{elif}\;im \leq 2.1 \cdot 10^{+153}:\\ \;\;\;\;\left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) + \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(im \cdot \sin re\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 89.9% accurate, 2.6× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\ t_1 := im\_m \cdot \sin re\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 0.00145:\\ \;\;\;\;0 - t\_1\\ \mathbf{elif}\;im\_m \leq 8 \cdot 10^{+153}:\\ \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(-0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\ \end{array} \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (let* ((t_0
             (*
              re
              (+
               0.5
               (*
                (* re re)
                (+ -0.08333333333333333 (* re (* re 0.004166666666666667)))))))
            (t_1 (* im_m (sin re))))
       (*
        im_s
        (if (<= im_m 0.00145)
          (- 0.0 t_1)
          (if (<= im_m 8e+153)
            (+
             (*
              t_0
              (*
               (+
                -0.3333333333333333
                (*
                 im_m
                 (*
                  im_m
                  (+
                   -0.016666666666666666
                   (* im_m (* im_m -0.0003968253968253968))))))
               (* im_m (* im_m im_m))))
             (* t_0 (* im_m -2.0)))
            (* t_1 (* -0.16666666666666666 (* im_m im_m))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double t_1 = im_m * sin(re);
    	double tmp;
    	if (im_m <= 0.00145) {
    		tmp = 0.0 - t_1;
    	} else if (im_m <= 8e+153) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = t_1 * (-0.16666666666666666 * (im_m * im_m));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * 0.004166666666666667d0)))))
        t_1 = im_m * sin(re)
        if (im_m <= 0.00145d0) then
            tmp = 0.0d0 - t_1
        else if (im_m <= 8d+153) then
            tmp = (t_0 * (((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + (im_m * (im_m * (-0.0003968253968253968d0))))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * (-2.0d0)))
        else
            tmp = t_1 * ((-0.16666666666666666d0) * (im_m * im_m))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	double t_1 = im_m * Math.sin(re);
    	double tmp;
    	if (im_m <= 0.00145) {
    		tmp = 0.0 - t_1;
    	} else if (im_m <= 8e+153) {
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	} else {
    		tmp = t_1 * (-0.16666666666666666 * (im_m * im_m));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))))
    	t_1 = im_m * math.sin(re)
    	tmp = 0
    	if im_m <= 0.00145:
    		tmp = 0.0 - t_1
    	elif im_m <= 8e+153:
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0))
    	else:
    		tmp = t_1 * (-0.16666666666666666 * (im_m * im_m))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	t_0 = Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * 0.004166666666666667))))))
    	t_1 = Float64(im_m * sin(re))
    	tmp = 0.0
    	if (im_m <= 0.00145)
    		tmp = Float64(0.0 - t_1);
    	elseif (im_m <= 8e+153)
    		tmp = Float64(Float64(t_0 * Float64(Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(im_m * Float64(im_m * -0.0003968253968253968)))))) * Float64(im_m * Float64(im_m * im_m)))) + Float64(t_0 * Float64(im_m * -2.0)));
    	else
    		tmp = Float64(t_1 * Float64(-0.16666666666666666 * Float64(im_m * im_m)));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	t_0 = re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * 0.004166666666666667)))));
    	t_1 = im_m * sin(re);
    	tmp = 0.0;
    	if (im_m <= 0.00145)
    		tmp = 0.0 - t_1;
    	elseif (im_m <= 8e+153)
    		tmp = (t_0 * ((-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + (im_m * (im_m * -0.0003968253968253968)))))) * (im_m * (im_m * im_m)))) + (t_0 * (im_m * -2.0));
    	else
    		tmp = t_1 * (-0.16666666666666666 * (im_m * im_m));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[im$95$m, 0.00145], N[(0.0 - t$95$1), $MachinePrecision], If[LessEqual[im$95$m, 8e+153], N[(N[(t$95$0 * N[(N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(im$95$m * N[(im$95$m * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(im$95$m * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    \begin{array}{l}
    t_0 := re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\\
    t_1 := im\_m \cdot \sin re\\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 0.00145:\\
    \;\;\;\;0 - t\_1\\
    
    \mathbf{elif}\;im\_m \leq 8 \cdot 10^{+153}:\\
    \;\;\;\;t\_0 \cdot \left(\left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + im\_m \cdot \left(im\_m \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(im\_m \cdot im\_m\right)\right)\right) + t\_0 \cdot \left(im\_m \cdot -2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1 \cdot \left(-0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if im < 0.00145

      1. Initial program 57.2%

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

        \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
        2. neg-sub0N/A

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

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
        4. *-commutativeN/A

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

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
        6. sin-lowering-sin.f6464.7%

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
      5. Simplified64.7%

        \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
      6. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(\sin re \cdot im\right) \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto \sin re \cdot \color{blue}{\left(\mathsf{neg}\left(im\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\mathsf{neg}\left(im\right)\right)}\right) \]
        4. sin-lowering-sin.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{neg.f64}\left(im\right)\right) \]
      7. Applied egg-rr64.7%

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

      if 0.00145 < im < 8e153

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
        9. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
        12. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        16. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
        17. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        18. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
        19. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
        20. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        21. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        22. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6461.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified61.6%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left({re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(re \cdot re\right) \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \frac{-1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{-1}{12} + \frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6465.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified65.3%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Applied egg-rr65.3%

        \[\leadsto \color{blue}{\left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) + \left(im \cdot -2\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right)} \]

      if 8e153 < im

      1. Initial program 100.0%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
      4. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
        2. distribute-rgt-outN/A

          \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
        4. unpow2N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
        7. +-commutativeN/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
        11. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
        15. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
        18. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
        19. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
      5. Simplified100.0%

        \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
      6. Taylor expanded in im around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
      7. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left({im}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{6}\right)\right) \]
        4. *-lowering-*.f64100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{6}\right)\right) \]
      8. Simplified100.0%

        \[\leadsto \left(\sin re \cdot im\right) \cdot \color{blue}{\left(\left(im \cdot im\right) \cdot -0.16666666666666666\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification68.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.00145:\\ \;\;\;\;0 - im \cdot \sin re\\ \mathbf{elif}\;im \leq 8 \cdot 10^{+153}:\\ \;\;\;\;\left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(\left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) + \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(im \cdot \sin re\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 84.2% accurate, 2.8× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;im\_m \leq 0.0024:\\ \;\;\;\;0 - im\_m \cdot \sin re\\ \mathbf{else}:\\ \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\ \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (*
      im_s
      (if (<= im_m 0.0024)
        (- 0.0 (* im_m (sin re)))
        (*
         (* re (+ 0.5 (* re (* re (* (* re re) 0.004166666666666667)))))
         (*
          im_m
          (+
           -2.0
           (*
            (* im_m im_m)
            (+
             -0.3333333333333333
             (*
              (* im_m im_m)
              (+
               -0.016666666666666666
               (* (* im_m im_m) -0.0003968253968253968)))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (im_m <= 0.0024) {
    		tmp = 0.0 - (im_m * sin(re));
    	} else {
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: tmp
        if (im_m <= 0.0024d0) then
            tmp = 0.0d0 - (im_m * sin(re))
        else
            tmp = (re * (0.5d0 + (re * (re * ((re * re) * 0.004166666666666667d0))))) * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0))))))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (im_m <= 0.0024) {
    		tmp = 0.0 - (im_m * Math.sin(re));
    	} else {
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	tmp = 0
    	if im_m <= 0.0024:
    		tmp = 0.0 - (im_m * math.sin(re))
    	else:
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	tmp = 0.0
    	if (im_m <= 0.0024)
    		tmp = Float64(0.0 - Float64(im_m * sin(re)));
    	else
    		tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(Float64(re * re) * 0.004166666666666667))))) * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968))))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	tmp = 0.0;
    	if (im_m <= 0.0024)
    		tmp = 0.0 - (im_m * sin(re));
    	else
    		tmp = (re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[im$95$m, 0.0024], N[(0.0 - N[(im$95$m * N[Sin[re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;im\_m \leq 0.0024:\\
    \;\;\;\;0 - im\_m \cdot \sin re\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if im < 0.00239999999999999979

      1. Initial program 57.2%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
        2. neg-sub0N/A

          \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
        6. sin-lowering-sin.f6464.7%

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
      5. Simplified64.7%

        \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
      6. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(\sin re \cdot im\right) \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto \sin re \cdot \color{blue}{\left(\mathsf{neg}\left(im\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\sin re, \color{blue}{\left(\mathsf{neg}\left(im\right)\right)}\right) \]
        4. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right) \]
        5. neg-lowering-neg.f6464.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), \mathsf{neg.f64}\left(im\right)\right) \]
      7. Applied egg-rr64.7%

        \[\leadsto \color{blue}{\sin re \cdot \left(-im\right)} \]

      if 0.00239999999999999979 < im

      1. Initial program 100.0%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
        9. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
        12. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        16. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
        17. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        18. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
        19. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
        20. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        21. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        22. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6476.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified76.3%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Taylor expanded in re around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left({re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(re \cdot re\right) \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \frac{-1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{-1}{12} + \frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        14. *-lowering-*.f6467.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. Simplified67.4%

        \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
      9. Taylor expanded in re around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{240} \cdot {re}^{3}\right)}\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left({re}^{3} \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        2. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(\left(re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(\left(re \cdot {re}^{2}\right) \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f6467.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      11. Simplified67.4%

        \[\leadsto \left(re \cdot \left(0.5 + re \cdot \color{blue}{\left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)}\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification65.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;im \leq 0.0024:\\ \;\;\;\;0 - im \cdot \sin re\\ \mathbf{else}:\\ \;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 59.1% accurate, 8.8× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \left(\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (*
      im_s
      (*
       (* re (+ 0.5 (* re (* re (* (* re re) 0.004166666666666667)))))
       (*
        im_m
        (+
         -2.0
         (*
          (* im_m im_m)
          (+
           -0.3333333333333333
           (*
            (* im_m im_m)
            (+
             -0.016666666666666666
             (* (* im_m im_m) -0.0003968253968253968))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	return im_s * ((re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))));
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        code = im_s * ((re * (0.5d0 + (re * (re * ((re * re) * 0.004166666666666667d0))))) * (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0)))))))))
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	return im_s * ((re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))));
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	return im_s * ((re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))))
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	return Float64(im_s * Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(Float64(re * re) * 0.004166666666666667))))) * Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968)))))))))
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp = code(im_s, re, im_m)
    	tmp = im_s * ((re * (0.5 + (re * (re * ((re * re) * 0.004166666666666667))))) * (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))));
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := N[(im$95$s * N[(N[(re * N[(0.5 + N[(re * N[(re * N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    im\_s \cdot \left(\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right) \cdot \left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 67.7%

      \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
      17. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
      19. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
      20. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
      21. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
      22. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      23. *-lowering-*.f6491.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified91.1%

      \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
    6. Taylor expanded in re around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(\frac{1}{2} + {re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left({re}^{2} \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(\left(re \cdot re\right) \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \left(re \cdot \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} - \frac{1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \left(\mathsf{neg}\left(\frac{1}{12}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2} + \frac{-1}{12}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{-1}{12} + \frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6460.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{-1}{12}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
    8. Simplified60.1%

      \[\leadsto \color{blue}{\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
    9. Taylor expanded in re around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{240} \cdot {re}^{3}\right)}\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left({re}^{3} \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      2. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(\left(re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(\left(re \cdot {re}^{2}\right) \cdot \frac{1}{240}\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \left(re \cdot \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left(\frac{1}{240} \cdot {re}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \left({re}^{2} \cdot \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6460.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{240}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
    11. Simplified60.1%

      \[\leadsto \left(re \cdot \left(0.5 + re \cdot \color{blue}{\left(re \cdot \left(\left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)}\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \]
    12. Add Preprocessing

    Alternative 14: 58.9% accurate, 10.3× speedup?

    \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\ \end{array} \end{array} \]
    im\_m = (fabs.f64 im)
    im\_s = (copysign.f64 #s(literal 1 binary64) im)
    (FPCore (im_s re im_m)
     :precision binary64
     (*
      im_s
      (if (<= re 4.5e+24)
        (*
         (*
          im_m
          (+
           -2.0
           (*
            (* im_m im_m)
            (+
             -0.3333333333333333
             (*
              im_m
              (*
               im_m
               (+
                -0.016666666666666666
                (* (* im_m im_m) -0.0003968253968253968))))))))
         (* 0.5 re))
        (if (<= re 1.12e+150)
          (*
           (* im_m im_m)
           (*
            im_m
            (*
             -0.16666666666666666
             (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))))
          (/ 1.0 (* (/ re -1.0) (/ im_m (* re (* re (* im_m im_m))))))))))
    im\_m = fabs(im);
    im\_s = copysign(1.0, im);
    double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (re <= 4.5e+24) {
    		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))) * (0.5 * re);
    	} else if (re <= 1.12e+150) {
    		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
    	} else {
    		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = abs(im)
    im\_s = copysign(1.0d0, im)
    real(8) function code(im_s, re, im_m)
        real(8), intent (in) :: im_s
        real(8), intent (in) :: re
        real(8), intent (in) :: im_m
        real(8) :: tmp
        if (re <= 4.5d+24) then
            tmp = (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0))))))))) * (0.5d0 * re)
        else if (re <= 1.12d+150) then
            tmp = (im_m * im_m) * (im_m * ((-0.16666666666666666d0) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))))
        else
            tmp = 1.0d0 / ((re / (-1.0d0)) * (im_m / (re * (re * (im_m * im_m)))))
        end if
        code = im_s * tmp
    end function
    
    im\_m = Math.abs(im);
    im\_s = Math.copySign(1.0, im);
    public static double code(double im_s, double re, double im_m) {
    	double tmp;
    	if (re <= 4.5e+24) {
    		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))) * (0.5 * re);
    	} else if (re <= 1.12e+150) {
    		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
    	} else {
    		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
    	}
    	return im_s * tmp;
    }
    
    im\_m = math.fabs(im)
    im\_s = math.copysign(1.0, im)
    def code(im_s, re, im_m):
    	tmp = 0
    	if re <= 4.5e+24:
    		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))) * (0.5 * re)
    	elif re <= 1.12e+150:
    		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))))
    	else:
    		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))))
    	return im_s * tmp
    
    im\_m = abs(im)
    im\_s = copysign(1.0, im)
    function code(im_s, re, im_m)
    	tmp = 0.0
    	if (re <= 4.5e+24)
    		tmp = Float64(Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968)))))))) * Float64(0.5 * re));
    	elseif (re <= 1.12e+150)
    		tmp = Float64(Float64(im_m * im_m) * Float64(im_m * Float64(-0.16666666666666666 * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))))));
    	else
    		tmp = Float64(1.0 / Float64(Float64(re / -1.0) * Float64(im_m / Float64(re * Float64(re * Float64(im_m * im_m))))));
    	end
    	return Float64(im_s * tmp)
    end
    
    im\_m = abs(im);
    im\_s = sign(im) * abs(1.0);
    function tmp_2 = code(im_s, re, im_m)
    	tmp = 0.0;
    	if (re <= 4.5e+24)
    		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968)))))))) * (0.5 * re);
    	elseif (re <= 1.12e+150)
    		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
    	else
    		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
    	end
    	tmp_2 = im_s * tmp;
    end
    
    im\_m = N[Abs[im], $MachinePrecision]
    im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[re, 4.5e+24], N[(N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.12e+150], N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * N[(-0.16666666666666666 * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re / -1.0), $MachinePrecision] * N[(im$95$m / N[(re * N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    im\_m = \left|im\right|
    \\
    im\_s = \mathsf{copysign}\left(1, im\right)
    
    \\
    im\_s \cdot \begin{array}{l}
    \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\
    \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\
    
    \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\
    \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if re < 4.50000000000000019e24

      1. Initial program 71.7%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
        9. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
        12. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        16. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
        17. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        18. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
        19. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
        20. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        21. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
        22. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        23. *-lowering-*.f6491.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
      5. Simplified91.0%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(im \cdot \left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right) + \color{blue}{-2}\right)\right)\right) \]
        2. distribute-rgt-inN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im + \color{blue}{-2 \cdot im}\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im\right), \color{blue}{\left(-2 \cdot im\right)}\right)\right) \]
      7. Applied egg-rr91.0%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) + im \cdot -2\right)} \]
      8. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \left(\left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \left(\left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right), \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{-1}{60}, \left(\left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right), \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{-1}{60}, \left(im \cdot \left(im \cdot \frac{-1}{2520}\right)\right)\right), \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(im, \left(im \cdot \frac{-1}{2520}\right)\right)\right), \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{2520}\right)\right)\right), \left(im \cdot im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
        8. *-lowering-*.f6491.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \frac{-1}{2520}\right)\right)\right), \mathsf{*.f64}\left(im, im\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
      9. Applied egg-rr91.0%

        \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + \color{blue}{\left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right) \cdot \left(im \cdot im\right)}\right)\right) + im \cdot -2\right) \]
      10. Taylor expanded in re around 0

        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(re \cdot \left(-2 \cdot im + {im}^{3} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)\right)} \]
      11. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{1}{2} \cdot re\right) \cdot \color{blue}{\left(-2 \cdot im + {im}^{3} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(-2 \cdot im + {im}^{3} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot re\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot im + {im}^{3} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right), \color{blue}{\left(\frac{1}{2} \cdot re\right)}\right) \]
      12. Simplified68.9%

        \[\leadsto \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot -0.0003968253968253968 + -0.016666666666666666\right)\right) + -0.3333333333333333\right)\right)\right) \cdot \left(0.5 \cdot re\right)} \]

      if 4.50000000000000019e24 < re < 1.12e150

      1. Initial program 55.5%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
      4. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
        2. distribute-rgt-outN/A

          \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
        4. unpow2N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
        7. +-commutativeN/A

          \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
        11. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
        15. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
        18. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
        19. *-lowering-*.f6481.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
      5. Simplified81.0%

        \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
      6. Taylor expanded in re around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}, im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {re}^{2}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        6. *-lowering-*.f6437.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
      8. Simplified37.2%

        \[\leadsto \left(\color{blue}{\left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)} \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right) \]
      9. Taylor expanded in im around inf

        \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)} \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \cdot \color{blue}{\frac{-1}{6}} \]
        2. associate-*r*N/A

          \[\leadsto {im}^{3} \cdot \color{blue}{\left(\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right) \cdot \frac{-1}{6}\right)} \]
        3. *-commutativeN/A

          \[\leadsto {im}^{3} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right) \]
        4. unpow3N/A

          \[\leadsto \left(\left(im \cdot im\right) \cdot im\right) \cdot \left(\color{blue}{\frac{-1}{6}} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \left({im}^{2} \cdot im\right) \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
        6. associate-*l*N/A

          \[\leadsto {im}^{2} \cdot \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)} \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)}\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)}\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
        17. *-lowering-*.f6437.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
      11. Simplified37.9%

        \[\leadsto \color{blue}{\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\right)\right)} \]

      if 1.12e150 < re

      1. Initial program 52.8%

        \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in im around 0

        \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
        2. neg-sub0N/A

          \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
        6. sin-lowering-sin.f6452.3%

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
      5. Simplified52.3%

        \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
      6. Taylor expanded in re around 0

        \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
      7. Step-by-step derivation
        1. Simplified15.8%

          \[\leadsto 0 - \color{blue}{re} \cdot im \]
        2. Step-by-step derivation
          1. flip--N/A

            \[\leadsto \frac{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}{\color{blue}{0 + re \cdot im}} \]
          2. clear-numN/A

            \[\leadsto \frac{1}{\color{blue}{\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}}} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)}\right) \]
          4. +-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot im\right), \color{blue}{\left(0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)}\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)\right)\right) \]
          7. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \color{blue}{\left(re \cdot im\right)} \cdot \left(re \cdot im\right)\right)\right)\right) \]
          8. +-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(re \cdot im + \color{blue}{0}\right)\right)\right)\right) \]
          10. distribute-rgt-outN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
          11. +-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 + \color{blue}{\left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 \cdot 0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
          13. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \color{blue}{\left(0 \cdot 0 + \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
          14. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
          15. +-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
          16. distribute-rgt-outN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \color{blue}{\left(re \cdot im + 0\right)}\right)\right)\right)\right) \]
          17. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right)\right) \]
          18. +-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
          19. associate-*l*N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(re \cdot \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
          20. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
          21. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot im\right)}\right)\right)\right)\right)\right) \]
        3. Applied egg-rr23.5%

          \[\leadsto \color{blue}{\frac{1}{\frac{re \cdot im}{0 - re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}} \]
        4. Step-by-step derivation
          1. sub0-negN/A

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\mathsf{neg}\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right) \]
          2. neg-mul-1N/A

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{-1 \cdot \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}}\right)\right) \]
          3. times-fracN/A

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re}{-1} \cdot \color{blue}{\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{re}{-1}\right), \color{blue}{\left(\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)}\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \left(\frac{\color{blue}{im}}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(re \cdot im\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
          9. associate-*l*N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
          11. *-lowering-*.f6436.5%

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right) \]
        5. Applied egg-rr36.5%

          \[\leadsto \frac{1}{\color{blue}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification61.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}\\ \end{array} \]
      10. Add Preprocessing

      Alternative 15: 58.4% accurate, 10.3× speedup?

      \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;0.5 \cdot \left(\left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot re\right)\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\ \end{array} \end{array} \]
      im\_m = (fabs.f64 im)
      im\_s = (copysign.f64 #s(literal 1 binary64) im)
      (FPCore (im_s re im_m)
       :precision binary64
       (*
        im_s
        (if (<= re 4.5e+24)
          (*
           0.5
           (*
            (+
             -2.0
             (*
              (* im_m im_m)
              (+
               -0.3333333333333333
               (*
                im_m
                (*
                 im_m
                 (+
                  -0.016666666666666666
                  (* (* im_m im_m) -0.0003968253968253968)))))))
            (* im_m re)))
          (if (<= re 1.12e+150)
            (*
             (* im_m im_m)
             (*
              im_m
              (*
               -0.16666666666666666
               (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))))
            (/ 1.0 (* (/ re -1.0) (/ im_m (* re (* re (* im_m im_m))))))))))
      im\_m = fabs(im);
      im\_s = copysign(1.0, im);
      double code(double im_s, double re, double im_m) {
      	double tmp;
      	if (re <= 4.5e+24) {
      		tmp = 0.5 * ((-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))) * (im_m * re));
      	} else if (re <= 1.12e+150) {
      		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
      	} else {
      		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
      	}
      	return im_s * tmp;
      }
      
      im\_m = abs(im)
      im\_s = copysign(1.0d0, im)
      real(8) function code(im_s, re, im_m)
          real(8), intent (in) :: im_s
          real(8), intent (in) :: re
          real(8), intent (in) :: im_m
          real(8) :: tmp
          if (re <= 4.5d+24) then
              tmp = 0.5d0 * (((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + (im_m * (im_m * ((-0.016666666666666666d0) + ((im_m * im_m) * (-0.0003968253968253968d0)))))))) * (im_m * re))
          else if (re <= 1.12d+150) then
              tmp = (im_m * im_m) * (im_m * ((-0.16666666666666666d0) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))))
          else
              tmp = 1.0d0 / ((re / (-1.0d0)) * (im_m / (re * (re * (im_m * im_m)))))
          end if
          code = im_s * tmp
      end function
      
      im\_m = Math.abs(im);
      im\_s = Math.copySign(1.0, im);
      public static double code(double im_s, double re, double im_m) {
      	double tmp;
      	if (re <= 4.5e+24) {
      		tmp = 0.5 * ((-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))) * (im_m * re));
      	} else if (re <= 1.12e+150) {
      		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
      	} else {
      		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
      	}
      	return im_s * tmp;
      }
      
      im\_m = math.fabs(im)
      im\_s = math.copysign(1.0, im)
      def code(im_s, re, im_m):
      	tmp = 0
      	if re <= 4.5e+24:
      		tmp = 0.5 * ((-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))) * (im_m * re))
      	elif re <= 1.12e+150:
      		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))))
      	else:
      		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))))
      	return im_s * tmp
      
      im\_m = abs(im)
      im\_s = copysign(1.0, im)
      function code(im_s, re, im_m)
      	tmp = 0.0
      	if (re <= 4.5e+24)
      		tmp = Float64(0.5 * Float64(Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(im_m * Float64(im_m * Float64(-0.016666666666666666 + Float64(Float64(im_m * im_m) * -0.0003968253968253968))))))) * Float64(im_m * re)));
      	elseif (re <= 1.12e+150)
      		tmp = Float64(Float64(im_m * im_m) * Float64(im_m * Float64(-0.16666666666666666 * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))))));
      	else
      		tmp = Float64(1.0 / Float64(Float64(re / -1.0) * Float64(im_m / Float64(re * Float64(re * Float64(im_m * im_m))))));
      	end
      	return Float64(im_s * tmp)
      end
      
      im\_m = abs(im);
      im\_s = sign(im) * abs(1.0);
      function tmp_2 = code(im_s, re, im_m)
      	tmp = 0.0;
      	if (re <= 4.5e+24)
      		tmp = 0.5 * ((-2.0 + ((im_m * im_m) * (-0.3333333333333333 + (im_m * (im_m * (-0.016666666666666666 + ((im_m * im_m) * -0.0003968253968253968))))))) * (im_m * re));
      	elseif (re <= 1.12e+150)
      		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
      	else
      		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
      	end
      	tmp_2 = im_s * tmp;
      end
      
      im\_m = N[Abs[im], $MachinePrecision]
      im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[re, 4.5e+24], N[(0.5 * N[(N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(im$95$m * N[(im$95$m * N[(-0.016666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im$95$m * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.12e+150], N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * N[(-0.16666666666666666 * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re / -1.0), $MachinePrecision] * N[(im$95$m / N[(re * N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      im\_m = \left|im\right|
      \\
      im\_s = \mathsf{copysign}\left(1, im\right)
      
      \\
      im\_s \cdot \begin{array}{l}
      \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\
      \;\;\;\;0.5 \cdot \left(\left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + im\_m \cdot \left(im\_m \cdot \left(-0.016666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im\_m \cdot re\right)\right)\\
      
      \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\
      \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if re < 4.50000000000000019e24

        1. Initial program 71.7%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in im around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
          2. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
          3. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
          9. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
          14. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
          16. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
          17. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
          18. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
          19. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
          21. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
          22. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
          23. *-lowering-*.f6491.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
        5. Simplified91.0%

          \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
        6. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left(im \cdot \color{blue}{\left(im \cdot \frac{-1}{2520}\right)}\right)\right)\right)\right)\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left(\left(im \cdot \frac{-1}{2520}\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot \frac{-1}{2520}\right), \color{blue}{im}\right)\right)\right)\right)\right)\right)\right)\right) \]
          4. *-lowering-*.f6491.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, \frac{-1}{2520}\right), im\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. Applied egg-rr91.0%

          \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \color{blue}{\left(im \cdot -0.0003968253968253968\right) \cdot im}\right)\right)\right)\right) \]
        8. Taylor expanded in re around 0

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(im \cdot \left(re \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)\right)} \]
        9. Simplified68.4%

          \[\leadsto \color{blue}{0.5 \cdot \left(\left(\left(im \cdot im\right) \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot -0.0003968253968253968 + -0.016666666666666666\right)\right) + -0.3333333333333333\right) + -2\right) \cdot \left(im \cdot re\right)\right)} \]

        if 4.50000000000000019e24 < re < 1.12e150

        1. Initial program 55.5%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in im around 0

          \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
          2. distribute-rgt-outN/A

            \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
          4. unpow2N/A

            \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
          7. +-commutativeN/A

            \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
          11. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
          15. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
          18. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
          19. *-lowering-*.f6481.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
        5. Simplified81.0%

          \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
        6. Taylor expanded in re around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}, im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {re}^{2}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          6. *-lowering-*.f6437.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
        8. Simplified37.2%

          \[\leadsto \left(\color{blue}{\left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)} \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right) \]
        9. Taylor expanded in im around inf

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \cdot \color{blue}{\frac{-1}{6}} \]
          2. associate-*r*N/A

            \[\leadsto {im}^{3} \cdot \color{blue}{\left(\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right) \cdot \frac{-1}{6}\right)} \]
          3. *-commutativeN/A

            \[\leadsto {im}^{3} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right) \]
          4. unpow3N/A

            \[\leadsto \left(\left(im \cdot im\right) \cdot im\right) \cdot \left(\color{blue}{\frac{-1}{6}} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \left({im}^{2} \cdot im\right) \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
          6. associate-*l*N/A

            \[\leadsto {im}^{2} \cdot \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)} \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)}\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)}\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          17. *-lowering-*.f6437.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
        11. Simplified37.9%

          \[\leadsto \color{blue}{\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\right)\right)} \]

        if 1.12e150 < re

        1. Initial program 52.8%

          \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in im around 0

          \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
          2. neg-sub0N/A

            \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
          6. sin-lowering-sin.f6452.3%

            \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
        5. Simplified52.3%

          \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
        6. Taylor expanded in re around 0

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
        7. Step-by-step derivation
          1. Simplified15.8%

            \[\leadsto 0 - \color{blue}{re} \cdot im \]
          2. Step-by-step derivation
            1. flip--N/A

              \[\leadsto \frac{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}{\color{blue}{0 + re \cdot im}} \]
            2. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)}\right) \]
            4. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot im\right), \color{blue}{\left(0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)}\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \color{blue}{\left(re \cdot im\right)} \cdot \left(re \cdot im\right)\right)\right)\right) \]
            8. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right) \]
            9. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(re \cdot im + \color{blue}{0}\right)\right)\right)\right) \]
            10. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
            11. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 + \color{blue}{\left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 \cdot 0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
            13. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \color{blue}{\left(0 \cdot 0 + \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
            14. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
            15. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
            16. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \color{blue}{\left(re \cdot im + 0\right)}\right)\right)\right)\right) \]
            17. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right)\right) \]
            18. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
            19. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(re \cdot \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
            20. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
            21. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot im\right)}\right)\right)\right)\right)\right) \]
          3. Applied egg-rr23.5%

            \[\leadsto \color{blue}{\frac{1}{\frac{re \cdot im}{0 - re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}} \]
          4. Step-by-step derivation
            1. sub0-negN/A

              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\mathsf{neg}\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right) \]
            2. neg-mul-1N/A

              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{-1 \cdot \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}}\right)\right) \]
            3. times-fracN/A

              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re}{-1} \cdot \color{blue}{\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{re}{-1}\right), \color{blue}{\left(\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)}\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \left(\frac{\color{blue}{im}}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(re \cdot im\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
            9. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
            11. *-lowering-*.f6436.5%

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right) \]
          5. Applied egg-rr36.5%

            \[\leadsto \frac{1}{\color{blue}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification61.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;0.5 \cdot \left(\left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) \cdot \left(im \cdot re\right)\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 16: 57.5% accurate, 11.4× speedup?

        \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\ \end{array} \end{array} \]
        im\_m = (fabs.f64 im)
        im\_s = (copysign.f64 #s(literal 1 binary64) im)
        (FPCore (im_s re im_m)
         :precision binary64
         (*
          im_s
          (if (<= re 4.5e+24)
            (*
             (*
              im_m
              (+
               -2.0
               (*
                (* im_m im_m)
                (+ -0.3333333333333333 (* (* im_m im_m) -0.016666666666666666)))))
             (* 0.5 re))
            (if (<= re 1.12e+150)
              (*
               (* im_m im_m)
               (*
                im_m
                (*
                 -0.16666666666666666
                 (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))))
              (/ 1.0 (* (/ re -1.0) (/ im_m (* re (* re (* im_m im_m))))))))))
        im\_m = fabs(im);
        im\_s = copysign(1.0, im);
        double code(double im_s, double re, double im_m) {
        	double tmp;
        	if (re <= 4.5e+24) {
        		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666))))) * (0.5 * re);
        	} else if (re <= 1.12e+150) {
        		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
        	} else {
        		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
        	}
        	return im_s * tmp;
        }
        
        im\_m = abs(im)
        im\_s = copysign(1.0d0, im)
        real(8) function code(im_s, re, im_m)
            real(8), intent (in) :: im_s
            real(8), intent (in) :: re
            real(8), intent (in) :: im_m
            real(8) :: tmp
            if (re <= 4.5d+24) then
                tmp = (im_m * ((-2.0d0) + ((im_m * im_m) * ((-0.3333333333333333d0) + ((im_m * im_m) * (-0.016666666666666666d0)))))) * (0.5d0 * re)
            else if (re <= 1.12d+150) then
                tmp = (im_m * im_m) * (im_m * ((-0.16666666666666666d0) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))))
            else
                tmp = 1.0d0 / ((re / (-1.0d0)) * (im_m / (re * (re * (im_m * im_m)))))
            end if
            code = im_s * tmp
        end function
        
        im\_m = Math.abs(im);
        im\_s = Math.copySign(1.0, im);
        public static double code(double im_s, double re, double im_m) {
        	double tmp;
        	if (re <= 4.5e+24) {
        		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666))))) * (0.5 * re);
        	} else if (re <= 1.12e+150) {
        		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
        	} else {
        		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
        	}
        	return im_s * tmp;
        }
        
        im\_m = math.fabs(im)
        im\_s = math.copysign(1.0, im)
        def code(im_s, re, im_m):
        	tmp = 0
        	if re <= 4.5e+24:
        		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666))))) * (0.5 * re)
        	elif re <= 1.12e+150:
        		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))))
        	else:
        		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))))
        	return im_s * tmp
        
        im\_m = abs(im)
        im\_s = copysign(1.0, im)
        function code(im_s, re, im_m)
        	tmp = 0.0
        	if (re <= 4.5e+24)
        		tmp = Float64(Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * Float64(-0.3333333333333333 + Float64(Float64(im_m * im_m) * -0.016666666666666666))))) * Float64(0.5 * re));
        	elseif (re <= 1.12e+150)
        		tmp = Float64(Float64(im_m * im_m) * Float64(im_m * Float64(-0.16666666666666666 * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))))));
        	else
        		tmp = Float64(1.0 / Float64(Float64(re / -1.0) * Float64(im_m / Float64(re * Float64(re * Float64(im_m * im_m))))));
        	end
        	return Float64(im_s * tmp)
        end
        
        im\_m = abs(im);
        im\_s = sign(im) * abs(1.0);
        function tmp_2 = code(im_s, re, im_m)
        	tmp = 0.0;
        	if (re <= 4.5e+24)
        		tmp = (im_m * (-2.0 + ((im_m * im_m) * (-0.3333333333333333 + ((im_m * im_m) * -0.016666666666666666))))) * (0.5 * re);
        	elseif (re <= 1.12e+150)
        		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
        	else
        		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
        	end
        	tmp_2 = im_s * tmp;
        end
        
        im\_m = N[Abs[im], $MachinePrecision]
        im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[re, 4.5e+24], N[(N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.12e+150], N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * N[(-0.16666666666666666 * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re / -1.0), $MachinePrecision] * N[(im$95$m / N[(re * N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
        
        \begin{array}{l}
        im\_m = \left|im\right|
        \\
        im\_s = \mathsf{copysign}\left(1, im\right)
        
        \\
        im\_s \cdot \begin{array}{l}
        \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\
        \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot \left(-0.3333333333333333 + \left(im\_m \cdot im\_m\right) \cdot -0.016666666666666666\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\
        
        \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\
        \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if re < 4.50000000000000019e24

          1. Initial program 71.7%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in im around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right) - 2\right)\right)}\right) \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right) - 2\right)}\right)\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
            3. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right) + -2\right)\right)\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right)}\right)\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right)\right)}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{60} \cdot {im}^{2} - \frac{1}{3}\right)}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{60} \cdot {im}^{2}} - \frac{1}{3}\right)\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{60} \cdot {im}^{2}} - \frac{1}{3}\right)\right)\right)\right)\right) \]
            9. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} \cdot {im}^{2} + \frac{-1}{3}\right)\right)\right)\right)\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{\frac{-1}{60} \cdot {im}^{2}}\right)\right)\right)\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left(\frac{-1}{60} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right) \]
            13. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{60}}\right)\right)\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{60}}\right)\right)\right)\right)\right)\right) \]
            15. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{60}\right)\right)\right)\right)\right)\right) \]
            16. *-lowering-*.f6490.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{60}\right)\right)\right)\right)\right)\right) \]
          5. Simplified90.0%

            \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot -0.016666666666666666\right)\right)\right)} \]
          6. Taylor expanded in re around 0

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot re\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{60}\right)\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. *-lowering-*.f6467.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, re\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{60}\right)\right)\right)\right)\right)\right) \]
          8. Simplified67.9%

            \[\leadsto \color{blue}{\left(0.5 \cdot re\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot -0.016666666666666666\right)\right)\right) \]

          if 4.50000000000000019e24 < re < 1.12e150

          1. Initial program 55.5%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in im around 0

            \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
            2. distribute-rgt-outN/A

              \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
            3. associate-*r*N/A

              \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
            4. unpow2N/A

              \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
            5. associate-*r*N/A

              \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
            6. *-commutativeN/A

              \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
            7. +-commutativeN/A

              \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
            11. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
            12. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
            15. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
            17. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
            18. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
            19. *-lowering-*.f6481.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
          5. Simplified81.0%

            \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
          6. Taylor expanded in re around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}, im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {re}^{2}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            6. *-lowering-*.f6437.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
          8. Simplified37.2%

            \[\leadsto \left(\color{blue}{\left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)} \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right) \]
          9. Taylor expanded in im around inf

            \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)} \]
          10. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \cdot \color{blue}{\frac{-1}{6}} \]
            2. associate-*r*N/A

              \[\leadsto {im}^{3} \cdot \color{blue}{\left(\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right) \cdot \frac{-1}{6}\right)} \]
            3. *-commutativeN/A

              \[\leadsto {im}^{3} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right) \]
            4. unpow3N/A

              \[\leadsto \left(\left(im \cdot im\right) \cdot im\right) \cdot \left(\color{blue}{\frac{-1}{6}} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \left({im}^{2} \cdot im\right) \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
            6. associate-*l*N/A

              \[\leadsto {im}^{2} \cdot \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)} \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)}\right) \]
            8. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)}\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
            17. *-lowering-*.f6437.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
          11. Simplified37.9%

            \[\leadsto \color{blue}{\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\right)\right)} \]

          if 1.12e150 < re

          1. Initial program 52.8%

            \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in im around 0

            \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
            2. neg-sub0N/A

              \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
            6. sin-lowering-sin.f6452.3%

              \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
          5. Simplified52.3%

            \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
          6. Taylor expanded in re around 0

            \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
          7. Step-by-step derivation
            1. Simplified15.8%

              \[\leadsto 0 - \color{blue}{re} \cdot im \]
            2. Step-by-step derivation
              1. flip--N/A

                \[\leadsto \frac{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}{\color{blue}{0 + re \cdot im}} \]
              2. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}}} \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)}\right) \]
              4. +-lft-identityN/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot im\right), \color{blue}{\left(0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \color{blue}{\left(re \cdot im\right)} \cdot \left(re \cdot im\right)\right)\right)\right) \]
              8. +-lft-identityN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(re \cdot im + \color{blue}{0}\right)\right)\right)\right) \]
              10. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
              11. +-lft-identityN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 + \color{blue}{\left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 \cdot 0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
              13. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \color{blue}{\left(0 \cdot 0 + \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
              14. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
              15. +-lft-identityN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
              16. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \color{blue}{\left(re \cdot im + 0\right)}\right)\right)\right)\right) \]
              17. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right)\right) \]
              18. +-lft-identityN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
              19. associate-*l*N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(re \cdot \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
              20. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
              21. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot im\right)}\right)\right)\right)\right)\right) \]
            3. Applied egg-rr23.5%

              \[\leadsto \color{blue}{\frac{1}{\frac{re \cdot im}{0 - re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}} \]
            4. Step-by-step derivation
              1. sub0-negN/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\mathsf{neg}\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right) \]
              2. neg-mul-1N/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{-1 \cdot \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}}\right)\right) \]
              3. times-fracN/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re}{-1} \cdot \color{blue}{\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{re}{-1}\right), \color{blue}{\left(\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)}\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \left(\frac{\color{blue}{im}}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(re \cdot im\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
              9. associate-*l*N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
              11. *-lowering-*.f6436.5%

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right) \]
            5. Applied egg-rr36.5%

              \[\leadsto \frac{1}{\color{blue}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}} \]
          8. Recombined 3 regimes into one program.
          9. Final simplification61.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot -0.016666666666666666\right)\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}\\ \end{array} \]
          10. Add Preprocessing

          Alternative 17: 55.3% accurate, 11.4× speedup?

          \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := re \cdot \left(im\_m \cdot im\_m\right)\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;im\_m \cdot \left(t\_0 \cdot \left(-0.16666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.008333333333333333\right) - re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot t\_0}}\\ \end{array} \end{array} \end{array} \]
          im\_m = (fabs.f64 im)
          im\_s = (copysign.f64 #s(literal 1 binary64) im)
          (FPCore (im_s re im_m)
           :precision binary64
           (let* ((t_0 (* re (* im_m im_m))))
             (*
              im_s
              (if (<= re 4.5e+24)
                (*
                 im_m
                 (-
                  (*
                   t_0
                   (+ -0.16666666666666666 (* (* im_m im_m) -0.008333333333333333)))
                  re))
                (if (<= re 1.12e+150)
                  (*
                   (* im_m im_m)
                   (*
                    im_m
                    (*
                     -0.16666666666666666
                     (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))))
                  (/ 1.0 (* (/ re -1.0) (/ im_m (* re t_0)))))))))
          im\_m = fabs(im);
          im\_s = copysign(1.0, im);
          double code(double im_s, double re, double im_m) {
          	double t_0 = re * (im_m * im_m);
          	double tmp;
          	if (re <= 4.5e+24) {
          		tmp = im_m * ((t_0 * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re);
          	} else if (re <= 1.12e+150) {
          		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
          	} else {
          		tmp = 1.0 / ((re / -1.0) * (im_m / (re * t_0)));
          	}
          	return im_s * tmp;
          }
          
          im\_m = abs(im)
          im\_s = copysign(1.0d0, im)
          real(8) function code(im_s, re, im_m)
              real(8), intent (in) :: im_s
              real(8), intent (in) :: re
              real(8), intent (in) :: im_m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = re * (im_m * im_m)
              if (re <= 4.5d+24) then
                  tmp = im_m * ((t_0 * ((-0.16666666666666666d0) + ((im_m * im_m) * (-0.008333333333333333d0)))) - re)
              else if (re <= 1.12d+150) then
                  tmp = (im_m * im_m) * (im_m * ((-0.16666666666666666d0) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))))
              else
                  tmp = 1.0d0 / ((re / (-1.0d0)) * (im_m / (re * t_0)))
              end if
              code = im_s * tmp
          end function
          
          im\_m = Math.abs(im);
          im\_s = Math.copySign(1.0, im);
          public static double code(double im_s, double re, double im_m) {
          	double t_0 = re * (im_m * im_m);
          	double tmp;
          	if (re <= 4.5e+24) {
          		tmp = im_m * ((t_0 * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re);
          	} else if (re <= 1.12e+150) {
          		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
          	} else {
          		tmp = 1.0 / ((re / -1.0) * (im_m / (re * t_0)));
          	}
          	return im_s * tmp;
          }
          
          im\_m = math.fabs(im)
          im\_s = math.copysign(1.0, im)
          def code(im_s, re, im_m):
          	t_0 = re * (im_m * im_m)
          	tmp = 0
          	if re <= 4.5e+24:
          		tmp = im_m * ((t_0 * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re)
          	elif re <= 1.12e+150:
          		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))))
          	else:
          		tmp = 1.0 / ((re / -1.0) * (im_m / (re * t_0)))
          	return im_s * tmp
          
          im\_m = abs(im)
          im\_s = copysign(1.0, im)
          function code(im_s, re, im_m)
          	t_0 = Float64(re * Float64(im_m * im_m))
          	tmp = 0.0
          	if (re <= 4.5e+24)
          		tmp = Float64(im_m * Float64(Float64(t_0 * Float64(-0.16666666666666666 + Float64(Float64(im_m * im_m) * -0.008333333333333333))) - re));
          	elseif (re <= 1.12e+150)
          		tmp = Float64(Float64(im_m * im_m) * Float64(im_m * Float64(-0.16666666666666666 * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))))));
          	else
          		tmp = Float64(1.0 / Float64(Float64(re / -1.0) * Float64(im_m / Float64(re * t_0))));
          	end
          	return Float64(im_s * tmp)
          end
          
          im\_m = abs(im);
          im\_s = sign(im) * abs(1.0);
          function tmp_2 = code(im_s, re, im_m)
          	t_0 = re * (im_m * im_m);
          	tmp = 0.0;
          	if (re <= 4.5e+24)
          		tmp = im_m * ((t_0 * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re);
          	elseif (re <= 1.12e+150)
          		tmp = (im_m * im_m) * (im_m * (-0.16666666666666666 * (re * (1.0 + (-0.16666666666666666 * (re * re))))));
          	else
          		tmp = 1.0 / ((re / -1.0) * (im_m / (re * t_0)));
          	end
          	tmp_2 = im_s * tmp;
          end
          
          im\_m = N[Abs[im], $MachinePrecision]
          im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[re, 4.5e+24], N[(im$95$m * N[(N[(t$95$0 * N[(-0.16666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.12e+150], N[(N[(im$95$m * im$95$m), $MachinePrecision] * N[(im$95$m * N[(-0.16666666666666666 * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re / -1.0), $MachinePrecision] * N[(im$95$m / N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
          
          \begin{array}{l}
          im\_m = \left|im\right|
          \\
          im\_s = \mathsf{copysign}\left(1, im\right)
          
          \\
          \begin{array}{l}
          t_0 := re \cdot \left(im\_m \cdot im\_m\right)\\
          im\_s \cdot \begin{array}{l}
          \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\
          \;\;\;\;im\_m \cdot \left(t\_0 \cdot \left(-0.16666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.008333333333333333\right) - re\right)\\
          
          \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\
          \;\;\;\;\left(im\_m \cdot im\_m\right) \cdot \left(im\_m \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot t\_0}}\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if re < 4.50000000000000019e24

            1. Initial program 71.7%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
              2. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
              3. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
              9. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
              12. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
              14. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
              16. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
              17. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
              18. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
              19. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
              20. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
              21. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
              22. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
              23. *-lowering-*.f6491.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
            5. Simplified91.0%

              \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
            6. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(im \cdot \left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right) + \color{blue}{-2}\right)\right)\right) \]
              2. distribute-rgt-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im + \color{blue}{-2 \cdot im}\right)\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im\right), \color{blue}{\left(-2 \cdot im\right)}\right)\right) \]
            7. Applied egg-rr91.0%

              \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) + im \cdot -2\right)} \]
            8. Taylor expanded in re around 0

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot re\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
            9. Step-by-step derivation
              1. *-lowering-*.f6468.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, re\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)}, \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
            10. Simplified68.9%

              \[\leadsto \color{blue}{\left(0.5 \cdot re\right)} \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) + im \cdot -2\right) \]
            11. Taylor expanded in im around 0

              \[\leadsto \color{blue}{im \cdot \left(-1 \cdot re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right)} \]
            12. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(-1 \cdot re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right)}\right) \]
              2. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) + \color{blue}{-1 \cdot re}\right)\right) \]
              3. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) + \left(\mathsf{neg}\left(re\right)\right)\right)\right) \]
              4. unsub-negN/A

                \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) - \color{blue}{re}\right)\right) \]
              5. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(im, \mathsf{\_.f64}\left(\left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right), \color{blue}{re}\right)\right) \]
            13. Simplified65.5%

              \[\leadsto \color{blue}{im \cdot \left(\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right) - re\right)} \]

            if 4.50000000000000019e24 < re < 1.12e150

            1. Initial program 55.5%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
            4. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
              2. distribute-rgt-outN/A

                \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
              4. unpow2N/A

                \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
              5. associate-*r*N/A

                \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
              6. *-commutativeN/A

                \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
              7. +-commutativeN/A

                \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
              11. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
              12. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
              15. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
              17. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
              18. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
              19. *-lowering-*.f6481.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
            5. Simplified81.0%

              \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
            6. Taylor expanded in re around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}, im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {re}^{2}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
              6. *-lowering-*.f6437.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, im\right)\right)\right)\right) \]
            8. Simplified37.2%

              \[\leadsto \left(\color{blue}{\left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)} \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right) \]
            9. Taylor expanded in im around inf

              \[\leadsto \color{blue}{\frac{-1}{6} \cdot \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)} \]
            10. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left({im}^{3} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \cdot \color{blue}{\frac{-1}{6}} \]
              2. associate-*r*N/A

                \[\leadsto {im}^{3} \cdot \color{blue}{\left(\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right) \cdot \frac{-1}{6}\right)} \]
              3. *-commutativeN/A

                \[\leadsto {im}^{3} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right) \]
              4. unpow3N/A

                \[\leadsto \left(\left(im \cdot im\right) \cdot im\right) \cdot \left(\color{blue}{\frac{-1}{6}} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \left({im}^{2} \cdot im\right) \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right) \]
              6. associate-*l*N/A

                \[\leadsto {im}^{2} \cdot \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)} \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)}\right) \]
              8. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{6} \cdot \left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)\right)}\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left(re \cdot \left(1 + \frac{-1}{6} \cdot {re}^{2}\right)\right)}\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \color{blue}{\left(1 + \frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{6} \cdot {re}^{2}\right)}\right)\right)\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \left({re}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({re}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right)\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(re \cdot re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
              17. *-lowering-*.f6437.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{-1}{6}\right)\right)\right)\right)\right)\right) \]
            11. Simplified37.9%

              \[\leadsto \color{blue}{\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\right)\right)} \]

            if 1.12e150 < re

            1. Initial program 52.8%

              \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in im around 0

              \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
              2. neg-sub0N/A

                \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
              3. --lowering--.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
              6. sin-lowering-sin.f6452.3%

                \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
            5. Simplified52.3%

              \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
            6. Taylor expanded in re around 0

              \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
            7. Step-by-step derivation
              1. Simplified15.8%

                \[\leadsto 0 - \color{blue}{re} \cdot im \]
              2. Step-by-step derivation
                1. flip--N/A

                  \[\leadsto \frac{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}{\color{blue}{0 + re \cdot im}} \]
                2. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)}\right) \]
                4. +-lft-identityN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot im\right), \color{blue}{\left(0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)}\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)\right)\right) \]
                7. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \color{blue}{\left(re \cdot im\right)} \cdot \left(re \cdot im\right)\right)\right)\right) \]
                8. +-lft-identityN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right) \]
                9. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(re \cdot im + \color{blue}{0}\right)\right)\right)\right) \]
                10. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
                11. +-lft-identityN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 + \color{blue}{\left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 \cdot 0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
                13. --lowering--.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \color{blue}{\left(0 \cdot 0 + \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
                14. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
                15. +-lft-identityN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
                16. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \color{blue}{\left(re \cdot im + 0\right)}\right)\right)\right)\right) \]
                17. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right)\right) \]
                18. +-lft-identityN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
                19. associate-*l*N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(re \cdot \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                21. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot im\right)}\right)\right)\right)\right)\right) \]
              3. Applied egg-rr23.5%

                \[\leadsto \color{blue}{\frac{1}{\frac{re \cdot im}{0 - re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}} \]
              4. Step-by-step derivation
                1. sub0-negN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\mathsf{neg}\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right) \]
                2. neg-mul-1N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{-1 \cdot \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}}\right)\right) \]
                3. times-fracN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re}{-1} \cdot \color{blue}{\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{re}{-1}\right), \color{blue}{\left(\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)}\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \left(\frac{\color{blue}{im}}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                8. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(re \cdot im\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
                9. associate-*l*N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
                11. *-lowering-*.f6436.5%

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right) \]
              5. Applied egg-rr36.5%

                \[\leadsto \frac{1}{\color{blue}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification59.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;im \cdot \left(\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right) - re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 18: 53.9% accurate, 12.3× speedup?

            \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\ \end{array} \end{array} \]
            im\_m = (fabs.f64 im)
            im\_s = (copysign.f64 #s(literal 1 binary64) im)
            (FPCore (im_s re im_m)
             :precision binary64
             (*
              im_s
              (if (<= re 1.35e+110)
                (* (* im_m (+ -2.0 (* (* im_m im_m) -0.3333333333333333))) (* 0.5 re))
                (if (<= re 1.12e+150)
                  (* re (* im_m (+ -1.0 (* (* re re) 0.16666666666666666))))
                  (/ 1.0 (* (/ re -1.0) (/ im_m (* re (* re (* im_m im_m))))))))))
            im\_m = fabs(im);
            im\_s = copysign(1.0, im);
            double code(double im_s, double re, double im_m) {
            	double tmp;
            	if (re <= 1.35e+110) {
            		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
            	} else if (re <= 1.12e+150) {
            		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
            	} else {
            		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
            	}
            	return im_s * tmp;
            }
            
            im\_m = abs(im)
            im\_s = copysign(1.0d0, im)
            real(8) function code(im_s, re, im_m)
                real(8), intent (in) :: im_s
                real(8), intent (in) :: re
                real(8), intent (in) :: im_m
                real(8) :: tmp
                if (re <= 1.35d+110) then
                    tmp = (im_m * ((-2.0d0) + ((im_m * im_m) * (-0.3333333333333333d0)))) * (0.5d0 * re)
                else if (re <= 1.12d+150) then
                    tmp = re * (im_m * ((-1.0d0) + ((re * re) * 0.16666666666666666d0)))
                else
                    tmp = 1.0d0 / ((re / (-1.0d0)) * (im_m / (re * (re * (im_m * im_m)))))
                end if
                code = im_s * tmp
            end function
            
            im\_m = Math.abs(im);
            im\_s = Math.copySign(1.0, im);
            public static double code(double im_s, double re, double im_m) {
            	double tmp;
            	if (re <= 1.35e+110) {
            		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
            	} else if (re <= 1.12e+150) {
            		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
            	} else {
            		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
            	}
            	return im_s * tmp;
            }
            
            im\_m = math.fabs(im)
            im\_s = math.copysign(1.0, im)
            def code(im_s, re, im_m):
            	tmp = 0
            	if re <= 1.35e+110:
            		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re)
            	elif re <= 1.12e+150:
            		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)))
            	else:
            		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))))
            	return im_s * tmp
            
            im\_m = abs(im)
            im\_s = copysign(1.0, im)
            function code(im_s, re, im_m)
            	tmp = 0.0
            	if (re <= 1.35e+110)
            		tmp = Float64(Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * -0.3333333333333333))) * Float64(0.5 * re));
            	elseif (re <= 1.12e+150)
            		tmp = Float64(re * Float64(im_m * Float64(-1.0 + Float64(Float64(re * re) * 0.16666666666666666))));
            	else
            		tmp = Float64(1.0 / Float64(Float64(re / -1.0) * Float64(im_m / Float64(re * Float64(re * Float64(im_m * im_m))))));
            	end
            	return Float64(im_s * tmp)
            end
            
            im\_m = abs(im);
            im\_s = sign(im) * abs(1.0);
            function tmp_2 = code(im_s, re, im_m)
            	tmp = 0.0;
            	if (re <= 1.35e+110)
            		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
            	elseif (re <= 1.12e+150)
            		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
            	else
            		tmp = 1.0 / ((re / -1.0) * (im_m / (re * (re * (im_m * im_m)))));
            	end
            	tmp_2 = im_s * tmp;
            end
            
            im\_m = N[Abs[im], $MachinePrecision]
            im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[re, 1.35e+110], N[(N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.12e+150], N[(re * N[(im$95$m * N[(-1.0 + N[(N[(re * re), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(re / -1.0), $MachinePrecision] * N[(im$95$m / N[(re * N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            im\_m = \left|im\right|
            \\
            im\_s = \mathsf{copysign}\left(1, im\right)
            
            \\
            im\_s \cdot \begin{array}{l}
            \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\
            \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\
            
            \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\
            \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im\_m}{re \cdot \left(re \cdot \left(im\_m \cdot im\_m\right)\right)}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if re < 1.35000000000000005e110

              1. Initial program 70.1%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left(\frac{-1}{3} \cdot {im}^{2} - 2\right)\right)}\right) \]
              4. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{3} \cdot {im}^{2} - 2\right)}\right)\right) \]
                2. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(\frac{-1}{3} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
                3. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(\frac{-1}{3} \cdot {im}^{2} + -2\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{\frac{-1}{3} \cdot {im}^{2}}\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left(\frac{-1}{3} \cdot {im}^{2}\right)}\right)\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \left({im}^{2} \cdot \color{blue}{\frac{-1}{3}}\right)\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{3}}\right)\right)\right)\right) \]
                8. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{3}\right)\right)\right)\right) \]
                9. *-lowering-*.f6485.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
              5. Simplified85.0%

                \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right)} \]
              6. Taylor expanded in re around 0

                \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot re\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
              7. Step-by-step derivation
                1. *-lowering-*.f6459.3%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, re\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
              8. Simplified59.3%

                \[\leadsto \color{blue}{\left(0.5 \cdot re\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right) \]

              if 1.35000000000000005e110 < re < 1.12e150

              1. Initial program 64.2%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
                2. neg-sub0N/A

                  \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
                3. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
                6. sin-lowering-sin.f6439.9%

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
              5. Simplified39.9%

                \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
              6. Taylor expanded in re around 0

                \[\leadsto \color{blue}{re \cdot \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)} \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)}\right) \]
                2. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(im\right)\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(\left(im \cdot {re}^{2}\right) \cdot \frac{1}{6} + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                4. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                5. neg-mul-1N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + -1 \cdot \color{blue}{im}\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + im \cdot \color{blue}{-1}\right)\right) \]
                7. distribute-lft-outN/A

                  \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\left({re}^{2} \cdot \frac{1}{6}\right), \color{blue}{-1}\right)\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                11. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                12. *-lowering-*.f6462.9%

                  \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
              8. Simplified62.9%

                \[\leadsto \color{blue}{re \cdot \left(im \cdot \left(\left(re \cdot re\right) \cdot 0.16666666666666666 + -1\right)\right)} \]

              if 1.12e150 < re

              1. Initial program 52.8%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
                2. neg-sub0N/A

                  \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
                3. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
                6. sin-lowering-sin.f6452.3%

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
              5. Simplified52.3%

                \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
              6. Taylor expanded in re around 0

                \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
              7. Step-by-step derivation
                1. Simplified15.8%

                  \[\leadsto 0 - \color{blue}{re} \cdot im \]
                2. Step-by-step derivation
                  1. flip--N/A

                    \[\leadsto \frac{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}{\color{blue}{0 + re \cdot im}} \]
                  2. clear-numN/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}}} \]
                  3. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{0 + re \cdot im}{0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)}\right) \]
                  4. +-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)}\right)\right) \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(re \cdot im\right), \color{blue}{\left(0 \cdot 0 - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)}\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(\color{blue}{0 \cdot 0} - \left(re \cdot im\right) \cdot \left(re \cdot im\right)\right)\right)\right) \]
                  7. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \color{blue}{\left(re \cdot im\right)} \cdot \left(re \cdot im\right)\right)\right)\right) \]
                  8. +-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(re \cdot im\right) \cdot \left(re \cdot im + \color{blue}{0}\right)\right)\right)\right) \]
                  10. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
                  11. +-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 + \color{blue}{\left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                  12. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \left(0 - \left(0 \cdot 0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
                  13. --lowering--.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \color{blue}{\left(0 \cdot 0 + \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + 0 \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
                  14. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(0 + \left(\color{blue}{\left(re \cdot im\right) \cdot \left(re \cdot im\right)} + 0 \cdot \left(re \cdot im\right)\right)\right)\right)\right)\right) \]
                  15. +-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot im\right) + \color{blue}{0 \cdot \left(re \cdot im\right)}\right)\right)\right)\right) \]
                  16. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \color{blue}{\left(re \cdot im + 0\right)}\right)\right)\right)\right) \]
                  17. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(0 + \color{blue}{re \cdot im}\right)\right)\right)\right)\right) \]
                  18. +-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(\left(re \cdot im\right) \cdot \left(re \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
                  19. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \left(re \cdot \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                  20. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                  21. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(re, im\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot im\right)}\right)\right)\right)\right)\right) \]
                3. Applied egg-rr23.5%

                  \[\leadsto \color{blue}{\frac{1}{\frac{re \cdot im}{0 - re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}} \]
                4. Step-by-step derivation
                  1. sub0-negN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{\mathsf{neg}\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right) \]
                  2. neg-mul-1N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re \cdot im}{-1 \cdot \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}}\right)\right) \]
                  3. times-fracN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{re}{-1} \cdot \color{blue}{\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}}\right)\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{re}{-1}\right), \color{blue}{\left(\frac{im}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)}\right)\right) \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \left(\frac{\color{blue}{im}}{re \cdot \left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right) \]
                  6. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \color{blue}{\left(re \cdot \left(im \cdot \left(re \cdot im\right)\right)\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot \left(re \cdot im\right)\right)}\right)\right)\right)\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(\left(re \cdot im\right) \cdot \color{blue}{im}\right)\right)\right)\right)\right) \]
                  9. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \left(re \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \color{blue}{\left(im \cdot im\right)}\right)\right)\right)\right)\right) \]
                  11. *-lowering-*.f6436.5%

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(re, -1\right), \mathsf{/.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right)\right)\right) \]
                5. Applied egg-rr36.5%

                  \[\leadsto \frac{1}{\color{blue}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}} \]
              8. Recombined 3 regimes into one program.
              9. Final simplification56.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 1.12 \cdot 10^{+150}:\\ \;\;\;\;re \cdot \left(im \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{re}{-1} \cdot \frac{im}{re \cdot \left(re \cdot \left(im \cdot im\right)\right)}}\\ \end{array} \]
              10. Add Preprocessing

              Alternative 19: 53.6% accurate, 14.6× speedup?

              \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\ \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\\ \end{array} \end{array} \]
              im\_m = (fabs.f64 im)
              im\_s = (copysign.f64 #s(literal 1 binary64) im)
              (FPCore (im_s re im_m)
               :precision binary64
               (*
                im_s
                (if (<= re 1.35e+110)
                  (* (* im_m (+ -2.0 (* (* im_m im_m) -0.3333333333333333))) (* 0.5 re))
                  (if (<= re 2.8e+227)
                    (* re (* im_m (+ -1.0 (* (* re re) 0.16666666666666666))))
                    (* im_m (* re (+ -1.0 (* -0.16666666666666666 (* im_m im_m)))))))))
              im\_m = fabs(im);
              im\_s = copysign(1.0, im);
              double code(double im_s, double re, double im_m) {
              	double tmp;
              	if (re <= 1.35e+110) {
              		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
              	} else if (re <= 2.8e+227) {
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	} else {
              		tmp = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	}
              	return im_s * tmp;
              }
              
              im\_m = abs(im)
              im\_s = copysign(1.0d0, im)
              real(8) function code(im_s, re, im_m)
                  real(8), intent (in) :: im_s
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im_m
                  real(8) :: tmp
                  if (re <= 1.35d+110) then
                      tmp = (im_m * ((-2.0d0) + ((im_m * im_m) * (-0.3333333333333333d0)))) * (0.5d0 * re)
                  else if (re <= 2.8d+227) then
                      tmp = re * (im_m * ((-1.0d0) + ((re * re) * 0.16666666666666666d0)))
                  else
                      tmp = im_m * (re * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m))))
                  end if
                  code = im_s * tmp
              end function
              
              im\_m = Math.abs(im);
              im\_s = Math.copySign(1.0, im);
              public static double code(double im_s, double re, double im_m) {
              	double tmp;
              	if (re <= 1.35e+110) {
              		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
              	} else if (re <= 2.8e+227) {
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	} else {
              		tmp = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	}
              	return im_s * tmp;
              }
              
              im\_m = math.fabs(im)
              im\_s = math.copysign(1.0, im)
              def code(im_s, re, im_m):
              	tmp = 0
              	if re <= 1.35e+110:
              		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re)
              	elif re <= 2.8e+227:
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)))
              	else:
              		tmp = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))))
              	return im_s * tmp
              
              im\_m = abs(im)
              im\_s = copysign(1.0, im)
              function code(im_s, re, im_m)
              	tmp = 0.0
              	if (re <= 1.35e+110)
              		tmp = Float64(Float64(im_m * Float64(-2.0 + Float64(Float64(im_m * im_m) * -0.3333333333333333))) * Float64(0.5 * re));
              	elseif (re <= 2.8e+227)
              		tmp = Float64(re * Float64(im_m * Float64(-1.0 + Float64(Float64(re * re) * 0.16666666666666666))));
              	else
              		tmp = Float64(im_m * Float64(re * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m)))));
              	end
              	return Float64(im_s * tmp)
              end
              
              im\_m = abs(im);
              im\_s = sign(im) * abs(1.0);
              function tmp_2 = code(im_s, re, im_m)
              	tmp = 0.0;
              	if (re <= 1.35e+110)
              		tmp = (im_m * (-2.0 + ((im_m * im_m) * -0.3333333333333333))) * (0.5 * re);
              	elseif (re <= 2.8e+227)
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	else
              		tmp = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	end
              	tmp_2 = im_s * tmp;
              end
              
              im\_m = N[Abs[im], $MachinePrecision]
              im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[im$95$s_, re_, im$95$m_] := N[(im$95$s * If[LessEqual[re, 1.35e+110], N[(N[(im$95$m * N[(-2.0 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.8e+227], N[(re * N[(im$95$m * N[(-1.0 + N[(N[(re * re), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im$95$m * N[(re * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
              
              \begin{array}{l}
              im\_m = \left|im\right|
              \\
              im\_s = \mathsf{copysign}\left(1, im\right)
              
              \\
              im\_s \cdot \begin{array}{l}
              \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\
              \;\;\;\;\left(im\_m \cdot \left(-2 + \left(im\_m \cdot im\_m\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\
              
              \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\
              \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if re < 1.35000000000000005e110

                1. Initial program 70.1%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left(\frac{-1}{3} \cdot {im}^{2} - 2\right)\right)}\right) \]
                4. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left(\frac{-1}{3} \cdot {im}^{2} - 2\right)}\right)\right) \]
                  2. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(\frac{-1}{3} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
                  3. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(\frac{-1}{3} \cdot {im}^{2} + -2\right)\right)\right) \]
                  4. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{\frac{-1}{3} \cdot {im}^{2}}\right)\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left(\frac{-1}{3} \cdot {im}^{2}\right)}\right)\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \left({im}^{2} \cdot \color{blue}{\frac{-1}{3}}\right)\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{3}}\right)\right)\right)\right) \]
                  8. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{3}\right)\right)\right)\right) \]
                  9. *-lowering-*.f6485.0%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
                5. Simplified85.0%

                  \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right)} \]
                6. Taylor expanded in re around 0

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot re\right)}, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
                7. Step-by-step derivation
                  1. *-lowering-*.f6459.3%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, re\right), \mathsf{*.f64}\left(\color{blue}{im}, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{3}\right)\right)\right)\right) \]
                8. Simplified59.3%

                  \[\leadsto \color{blue}{\left(0.5 \cdot re\right)} \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right) \]

                if 1.35000000000000005e110 < re < 2.79999999999999984e227

                1. Initial program 61.1%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
                  2. neg-sub0N/A

                    \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
                  3. --lowering--.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
                  4. *-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
                  6. sin-lowering-sin.f6443.4%

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
                5. Simplified43.4%

                  \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
                6. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{re \cdot \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)}\right) \]
                  2. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(im\right)\right)}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(\left(im \cdot {re}^{2}\right) \cdot \frac{1}{6} + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                  4. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                  5. neg-mul-1N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + -1 \cdot \color{blue}{im}\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + im \cdot \color{blue}{-1}\right)\right) \]
                  7. distribute-lft-outN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\left({re}^{2} \cdot \frac{1}{6}\right), \color{blue}{-1}\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                  11. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                  12. *-lowering-*.f6436.9%

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                8. Simplified36.9%

                  \[\leadsto \color{blue}{re \cdot \left(im \cdot \left(\left(re \cdot re\right) \cdot 0.16666666666666666 + -1\right)\right)} \]

                if 2.79999999999999984e227 < re

                1. Initial program 47.6%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
                4. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                  2. distribute-rgt-outN/A

                    \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
                  3. associate-*r*N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                  4. unpow2N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
                  7. +-commutativeN/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                  11. sin-lowering-sin.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
                  12. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
                  15. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
                  16. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
                  17. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                  18. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                  19. *-lowering-*.f6478.6%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                5. Simplified78.6%

                  \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
                6. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} - 1\right)}\right)\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \]
                  4. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + -1\right)\right)\right) \]
                  5. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(-1 + \color{blue}{\frac{-1}{6} \cdot {im}^{2}}\right)\right)\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right)}\right)\right)\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \left({im}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                  9. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{6}\right)\right)\right)\right) \]
                  10. *-lowering-*.f6434.7%

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{6}\right)\right)\right)\right) \]
                8. Simplified34.7%

                  \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification55.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot -0.3333333333333333\right)\right) \cdot \left(0.5 \cdot re\right)\\ \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\ \;\;\;\;re \cdot \left(im \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 20: 50.7% accurate, 14.6× speedup?

              \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ \begin{array}{l} t_0 := im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\\ im\_s \cdot \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\ \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
              im\_m = (fabs.f64 im)
              im\_s = (copysign.f64 #s(literal 1 binary64) im)
              (FPCore (im_s re im_m)
               :precision binary64
               (let* ((t_0 (* im_m (* re (+ -1.0 (* -0.16666666666666666 (* im_m im_m)))))))
                 (*
                  im_s
                  (if (<= re 1.35e+110)
                    t_0
                    (if (<= re 2.8e+227)
                      (* re (* im_m (+ -1.0 (* (* re re) 0.16666666666666666))))
                      t_0)))))
              im\_m = fabs(im);
              im\_s = copysign(1.0, im);
              double code(double im_s, double re, double im_m) {
              	double t_0 = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	double tmp;
              	if (re <= 1.35e+110) {
              		tmp = t_0;
              	} else if (re <= 2.8e+227) {
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	} else {
              		tmp = t_0;
              	}
              	return im_s * tmp;
              }
              
              im\_m = abs(im)
              im\_s = copysign(1.0d0, im)
              real(8) function code(im_s, re, im_m)
                  real(8), intent (in) :: im_s
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im_m
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = im_m * (re * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m))))
                  if (re <= 1.35d+110) then
                      tmp = t_0
                  else if (re <= 2.8d+227) then
                      tmp = re * (im_m * ((-1.0d0) + ((re * re) * 0.16666666666666666d0)))
                  else
                      tmp = t_0
                  end if
                  code = im_s * tmp
              end function
              
              im\_m = Math.abs(im);
              im\_s = Math.copySign(1.0, im);
              public static double code(double im_s, double re, double im_m) {
              	double t_0 = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	double tmp;
              	if (re <= 1.35e+110) {
              		tmp = t_0;
              	} else if (re <= 2.8e+227) {
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	} else {
              		tmp = t_0;
              	}
              	return im_s * tmp;
              }
              
              im\_m = math.fabs(im)
              im\_s = math.copysign(1.0, im)
              def code(im_s, re, im_m):
              	t_0 = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))))
              	tmp = 0
              	if re <= 1.35e+110:
              		tmp = t_0
              	elif re <= 2.8e+227:
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)))
              	else:
              		tmp = t_0
              	return im_s * tmp
              
              im\_m = abs(im)
              im\_s = copysign(1.0, im)
              function code(im_s, re, im_m)
              	t_0 = Float64(im_m * Float64(re * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m)))))
              	tmp = 0.0
              	if (re <= 1.35e+110)
              		tmp = t_0;
              	elseif (re <= 2.8e+227)
              		tmp = Float64(re * Float64(im_m * Float64(-1.0 + Float64(Float64(re * re) * 0.16666666666666666))));
              	else
              		tmp = t_0;
              	end
              	return Float64(im_s * tmp)
              end
              
              im\_m = abs(im);
              im\_s = sign(im) * abs(1.0);
              function tmp_2 = code(im_s, re, im_m)
              	t_0 = im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m))));
              	tmp = 0.0;
              	if (re <= 1.35e+110)
              		tmp = t_0;
              	elseif (re <= 2.8e+227)
              		tmp = re * (im_m * (-1.0 + ((re * re) * 0.16666666666666666)));
              	else
              		tmp = t_0;
              	end
              	tmp_2 = im_s * tmp;
              end
              
              im\_m = N[Abs[im], $MachinePrecision]
              im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[im$95$s_, re_, im$95$m_] := Block[{t$95$0 = N[(im$95$m * N[(re * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(im$95$s * If[LessEqual[re, 1.35e+110], t$95$0, If[LessEqual[re, 2.8e+227], N[(re * N[(im$95$m * N[(-1.0 + N[(N[(re * re), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]), $MachinePrecision]]
              
              \begin{array}{l}
              im\_m = \left|im\right|
              \\
              im\_s = \mathsf{copysign}\left(1, im\right)
              
              \\
              \begin{array}{l}
              t_0 := im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\\
              im\_s \cdot \begin{array}{l}
              \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\
              \;\;\;\;re \cdot \left(im\_m \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if re < 1.35000000000000005e110 or 2.79999999999999984e227 < re

                1. Initial program 68.3%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
                4. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                  2. distribute-rgt-outN/A

                    \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
                  3. associate-*r*N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                  4. unpow2N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
                  7. +-commutativeN/A

                    \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                  11. sin-lowering-sin.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
                  12. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
                  15. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
                  16. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
                  17. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                  18. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                  19. *-lowering-*.f6480.5%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
                5. Simplified80.5%

                  \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
                6. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} - 1\right)}\right)\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \]
                  4. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + -1\right)\right)\right) \]
                  5. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(-1 + \color{blue}{\frac{-1}{6} \cdot {im}^{2}}\right)\right)\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right)}\right)\right)\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \left({im}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                  9. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{6}\right)\right)\right)\right) \]
                  10. *-lowering-*.f6453.4%

                    \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{6}\right)\right)\right)\right) \]
                8. Simplified53.4%

                  \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)} \]

                if 1.35000000000000005e110 < re < 2.79999999999999984e227

                1. Initial program 61.1%

                  \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in im around 0

                  \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
                  2. neg-sub0N/A

                    \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
                  3. --lowering--.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
                  4. *-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
                  6. sin-lowering-sin.f6443.4%

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
                5. Simplified43.4%

                  \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
                6. Taylor expanded in re around 0

                  \[\leadsto \color{blue}{re \cdot \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) - im\right)}\right) \]
                  2. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(\frac{1}{6} \cdot \left(im \cdot {re}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(im\right)\right)}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(\left(im \cdot {re}^{2}\right) \cdot \frac{1}{6} + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                  4. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + \left(\mathsf{neg}\left(\color{blue}{im}\right)\right)\right)\right) \]
                  5. neg-mul-1N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + -1 \cdot \color{blue}{im}\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \left({re}^{2} \cdot \frac{1}{6}\right) + im \cdot \color{blue}{-1}\right)\right) \]
                  7. distribute-lft-outN/A

                    \[\leadsto \mathsf{*.f64}\left(re, \left(im \cdot \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \color{blue}{\left({re}^{2} \cdot \frac{1}{6} + -1\right)}\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\left({re}^{2} \cdot \frac{1}{6}\right), \color{blue}{-1}\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({re}^{2}\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                  11. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(re \cdot re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                  12. *-lowering-*.f6436.9%

                    \[\leadsto \mathsf{*.f64}\left(re, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(re, re\right), \frac{1}{6}\right), -1\right)\right)\right) \]
                8. Simplified36.9%

                  \[\leadsto \color{blue}{re \cdot \left(im \cdot \left(\left(re \cdot re\right) \cdot 0.16666666666666666 + -1\right)\right)} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification52.0%

                \[\leadsto \begin{array}{l} \mathbf{if}\;re \leq 1.35 \cdot 10^{+110}:\\ \;\;\;\;im \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \mathbf{elif}\;re \leq 2.8 \cdot 10^{+227}:\\ \;\;\;\;re \cdot \left(im \cdot \left(-1 + \left(re \cdot re\right) \cdot 0.16666666666666666\right)\right)\\ \mathbf{else}:\\ \;\;\;\;im \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 21: 55.3% accurate, 18.1× speedup?

              \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \left(im\_m \cdot \left(\left(re \cdot \left(im\_m \cdot im\_m\right)\right) \cdot \left(-0.16666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.008333333333333333\right) - re\right)\right) \end{array} \]
              im\_m = (fabs.f64 im)
              im\_s = (copysign.f64 #s(literal 1 binary64) im)
              (FPCore (im_s re im_m)
               :precision binary64
               (*
                im_s
                (*
                 im_m
                 (-
                  (*
                   (* re (* im_m im_m))
                   (+ -0.16666666666666666 (* (* im_m im_m) -0.008333333333333333)))
                  re))))
              im\_m = fabs(im);
              im\_s = copysign(1.0, im);
              double code(double im_s, double re, double im_m) {
              	return im_s * (im_m * (((re * (im_m * im_m)) * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re));
              }
              
              im\_m = abs(im)
              im\_s = copysign(1.0d0, im)
              real(8) function code(im_s, re, im_m)
                  real(8), intent (in) :: im_s
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im_m
                  code = im_s * (im_m * (((re * (im_m * im_m)) * ((-0.16666666666666666d0) + ((im_m * im_m) * (-0.008333333333333333d0)))) - re))
              end function
              
              im\_m = Math.abs(im);
              im\_s = Math.copySign(1.0, im);
              public static double code(double im_s, double re, double im_m) {
              	return im_s * (im_m * (((re * (im_m * im_m)) * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re));
              }
              
              im\_m = math.fabs(im)
              im\_s = math.copysign(1.0, im)
              def code(im_s, re, im_m):
              	return im_s * (im_m * (((re * (im_m * im_m)) * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re))
              
              im\_m = abs(im)
              im\_s = copysign(1.0, im)
              function code(im_s, re, im_m)
              	return Float64(im_s * Float64(im_m * Float64(Float64(Float64(re * Float64(im_m * im_m)) * Float64(-0.16666666666666666 + Float64(Float64(im_m * im_m) * -0.008333333333333333))) - re)))
              end
              
              im\_m = abs(im);
              im\_s = sign(im) * abs(1.0);
              function tmp = code(im_s, re, im_m)
              	tmp = im_s * (im_m * (((re * (im_m * im_m)) * (-0.16666666666666666 + ((im_m * im_m) * -0.008333333333333333))) - re));
              end
              
              im\_m = N[Abs[im], $MachinePrecision]
              im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[im$95$s_, re_, im$95$m_] := N[(im$95$s * N[(im$95$m * N[(N[(N[(re * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im$95$m * im$95$m), $MachinePrecision] * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              im\_m = \left|im\right|
              \\
              im\_s = \mathsf{copysign}\left(1, im\right)
              
              \\
              im\_s \cdot \left(im\_m \cdot \left(\left(re \cdot \left(im\_m \cdot im\_m\right)\right) \cdot \left(-0.16666666666666666 + \left(im\_m \cdot im\_m\right) \cdot -0.008333333333333333\right) - re\right)\right)
              \end{array}
              
              Derivation
              1. Initial program 67.7%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \color{blue}{\left(im \cdot \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)\right)}\right) \]
              4. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) - 2\right)}\right)\right) \]
                2. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + \color{blue}{\left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right) \]
                3. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right) + -2\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \left(-2 + \color{blue}{{im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \color{blue}{\left({im}^{2} \cdot \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)\right)}\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) - \frac{1}{3}\right)}\right)\right)\right)\right) \]
                7. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)} - \frac{1}{3}\right)\right)\right)\right)\right) \]
                9. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right) + \frac{-1}{3}\right)\right)\right)\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{3} + \color{blue}{{im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right) \]
                12. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{\left({im}^{2} \cdot \left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)\right)}\right)\right)\right)\right)\right) \]
                13. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2} - \frac{1}{60}\right)}\right)\right)\right)\right)\right)\right) \]
                14. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\left(im \cdot im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
                15. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\color{blue}{\frac{-1}{2520} \cdot {im}^{2}} - \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
                16. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{60}\right)\right)}\right)\right)\right)\right)\right)\right)\right) \]
                17. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{2520} \cdot {im}^{2} + \frac{-1}{60}\right)\right)\right)\right)\right)\right)\right) \]
                18. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \left(\frac{-1}{60} + \color{blue}{\frac{-1}{2520} \cdot {im}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
                19. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \color{blue}{\left(\frac{-1}{2520} \cdot {im}^{2}\right)}\right)\right)\right)\right)\right)\right)\right) \]
                20. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \left({im}^{2} \cdot \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
                21. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{2520}}\right)\right)\right)\right)\right)\right)\right)\right) \]
                22. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
                23. *-lowering-*.f6491.1%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)\right) \]
              5. Simplified91.1%

                \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(im \cdot im\right) \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right)} \]
              6. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(im \cdot \left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right) + \color{blue}{-2}\right)\right)\right) \]
                2. distribute-rgt-inN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im + \color{blue}{-2 \cdot im}\right)\right) \]
                3. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{sin.f64}\left(re\right)\right), \mathsf{+.f64}\left(\left(\left(\left(im \cdot im\right) \cdot \left(\frac{-1}{3} + \left(im \cdot im\right) \cdot \left(\frac{-1}{60} + \left(im \cdot im\right) \cdot \frac{-1}{2520}\right)\right)\right) \cdot im\right), \color{blue}{\left(-2 \cdot im\right)}\right)\right) \]
              7. Applied egg-rr91.1%

                \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{\left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) + im \cdot -2\right)} \]
              8. Taylor expanded in re around 0

                \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot re\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
              9. Step-by-step derivation
                1. *-lowering-*.f6458.7%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, re\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(im, \mathsf{+.f64}\left(\frac{-1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{2520}\right)\right)\right)\right)\right)\right)\right)}, \mathsf{*.f64}\left(im, -2\right)\right)\right) \]
              10. Simplified58.7%

                \[\leadsto \color{blue}{\left(0.5 \cdot re\right)} \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + \left(im \cdot im\right) \cdot -0.0003968253968253968\right)\right)\right)\right) + im \cdot -2\right) \]
              11. Taylor expanded in im around 0

                \[\leadsto \color{blue}{im \cdot \left(-1 \cdot re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right)} \]
              12. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(-1 \cdot re + {im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right)}\right) \]
                2. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) + \color{blue}{-1 \cdot re}\right)\right) \]
                3. mul-1-negN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) + \left(\mathsf{neg}\left(re\right)\right)\right)\right) \]
                4. unsub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right) - \color{blue}{re}\right)\right) \]
                5. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{\_.f64}\left(\left({im}^{2} \cdot \left(\frac{-1}{6} \cdot re + \frac{-1}{120} \cdot \left({im}^{2} \cdot re\right)\right)\right), \color{blue}{re}\right)\right) \]
              13. Simplified56.1%

                \[\leadsto \color{blue}{im \cdot \left(\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right) - re\right)} \]
              14. Add Preprocessing

              Alternative 22: 50.7% accurate, 28.0× speedup?

              \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \left(im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right) \end{array} \]
              im\_m = (fabs.f64 im)
              im\_s = (copysign.f64 #s(literal 1 binary64) im)
              (FPCore (im_s re im_m)
               :precision binary64
               (* im_s (* im_m (* re (+ -1.0 (* -0.16666666666666666 (* im_m im_m)))))))
              im\_m = fabs(im);
              im\_s = copysign(1.0, im);
              double code(double im_s, double re, double im_m) {
              	return im_s * (im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))));
              }
              
              im\_m = abs(im)
              im\_s = copysign(1.0d0, im)
              real(8) function code(im_s, re, im_m)
                  real(8), intent (in) :: im_s
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im_m
                  code = im_s * (im_m * (re * ((-1.0d0) + ((-0.16666666666666666d0) * (im_m * im_m)))))
              end function
              
              im\_m = Math.abs(im);
              im\_s = Math.copySign(1.0, im);
              public static double code(double im_s, double re, double im_m) {
              	return im_s * (im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))));
              }
              
              im\_m = math.fabs(im)
              im\_s = math.copysign(1.0, im)
              def code(im_s, re, im_m):
              	return im_s * (im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))))
              
              im\_m = abs(im)
              im\_s = copysign(1.0, im)
              function code(im_s, re, im_m)
              	return Float64(im_s * Float64(im_m * Float64(re * Float64(-1.0 + Float64(-0.16666666666666666 * Float64(im_m * im_m))))))
              end
              
              im\_m = abs(im);
              im\_s = sign(im) * abs(1.0);
              function tmp = code(im_s, re, im_m)
              	tmp = im_s * (im_m * (re * (-1.0 + (-0.16666666666666666 * (im_m * im_m)))));
              end
              
              im\_m = N[Abs[im], $MachinePrecision]
              im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[im$95$s_, re_, im$95$m_] := N[(im$95$s * N[(im$95$m * N[(re * N[(-1.0 + N[(-0.16666666666666666 * N[(im$95$m * im$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              im\_m = \left|im\right|
              \\
              im\_s = \mathsf{copysign}\left(1, im\right)
              
              \\
              im\_s \cdot \left(im\_m \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im\_m \cdot im\_m\right)\right)\right)\right)
              \end{array}
              
              Derivation
              1. Initial program 67.7%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \color{blue}{im \cdot \left(-1 \cdot \sin re + \frac{-1}{6} \cdot \left({im}^{2} \cdot \sin re\right)\right)} \]
              4. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto im \cdot \left(-1 \cdot \sin re + \left(\frac{-1}{6} \cdot {im}^{2}\right) \cdot \color{blue}{\sin re}\right) \]
                2. distribute-rgt-outN/A

                  \[\leadsto im \cdot \left(\sin re \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)}\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(im \cdot \sin re\right) \cdot \color{blue}{\left(-1 + \frac{-1}{6} \cdot {im}^{2}\right)} \]
                4. unpow2N/A

                  \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \frac{-1}{6} \cdot \left(im \cdot \color{blue}{im}\right)\right) \]
                5. associate-*r*N/A

                  \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + \left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(im \cdot \sin re\right) \cdot \left(-1 + im \cdot \color{blue}{\left(\frac{-1}{6} \cdot im\right)}\right) \]
                7. +-commutativeN/A

                  \[\leadsto \left(im \cdot \sin re\right) \cdot \left(im \cdot \left(\frac{-1}{6} \cdot im\right) + \color{blue}{-1}\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(im \cdot \sin re\right), \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)}\right) \]
                9. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\sin re \cdot im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\sin re, im\right), \left(\color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)} + -1\right)\right) \]
                11. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(\color{blue}{im} \cdot \left(\frac{-1}{6} \cdot im\right) + -1\right)\right) \]
                12. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \left(-1 + \color{blue}{im \cdot \left(\frac{-1}{6} \cdot im\right)}\right)\right) \]
                13. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(im \cdot \left(\frac{-1}{6} \cdot im\right)\right)}\right)\right) \]
                14. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\left(\frac{-1}{6} \cdot im\right) \cdot \color{blue}{im}\right)\right)\right) \]
                15. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot \color{blue}{\left(im \cdot im\right)}\right)\right)\right) \]
                16. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \left(\frac{-1}{6} \cdot {im}^{\color{blue}{2}}\right)\right)\right) \]
                17. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \color{blue}{\left({im}^{2}\right)}\right)\right)\right) \]
                18. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \left(im \cdot \color{blue}{im}\right)\right)\right)\right) \]
                19. *-lowering-*.f6478.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right), \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(im, \color{blue}{im}\right)\right)\right)\right) \]
              5. Simplified78.8%

                \[\leadsto \color{blue}{\left(\sin re \cdot im\right) \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)} \]
              6. Taylor expanded in re around 0

                \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)} \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \color{blue}{\left(re \cdot \left(\frac{-1}{6} \cdot {im}^{2} - 1\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2} - 1\right)}\right)\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(\frac{-1}{6} \cdot {im}^{2} + -1\right)\right)\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \left(-1 + \color{blue}{\frac{-1}{6} \cdot {im}^{2}}\right)\right)\right) \]
                6. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{-1}{6} \cdot {im}^{2}\right)}\right)\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \left({im}^{2} \cdot \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left({im}^{2}\right), \color{blue}{\frac{-1}{6}}\right)\right)\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\left(im \cdot im\right), \frac{-1}{6}\right)\right)\right)\right) \]
                10. *-lowering-*.f6450.2%

                  \[\leadsto \mathsf{*.f64}\left(im, \mathsf{*.f64}\left(re, \mathsf{+.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(im, im\right), \frac{-1}{6}\right)\right)\right)\right) \]
              8. Simplified50.2%

                \[\leadsto \color{blue}{im \cdot \left(re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)} \]
              9. Final simplification50.2%

                \[\leadsto im \cdot \left(re \cdot \left(-1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right) \]
              10. Add Preprocessing

              Alternative 23: 33.5% accurate, 61.6× speedup?

              \[\begin{array}{l} im\_m = \left|im\right| \\ im\_s = \mathsf{copysign}\left(1, im\right) \\ im\_s \cdot \left(0 - im\_m \cdot re\right) \end{array} \]
              im\_m = (fabs.f64 im)
              im\_s = (copysign.f64 #s(literal 1 binary64) im)
              (FPCore (im_s re im_m) :precision binary64 (* im_s (- 0.0 (* im_m re))))
              im\_m = fabs(im);
              im\_s = copysign(1.0, im);
              double code(double im_s, double re, double im_m) {
              	return im_s * (0.0 - (im_m * re));
              }
              
              im\_m = abs(im)
              im\_s = copysign(1.0d0, im)
              real(8) function code(im_s, re, im_m)
                  real(8), intent (in) :: im_s
                  real(8), intent (in) :: re
                  real(8), intent (in) :: im_m
                  code = im_s * (0.0d0 - (im_m * re))
              end function
              
              im\_m = Math.abs(im);
              im\_s = Math.copySign(1.0, im);
              public static double code(double im_s, double re, double im_m) {
              	return im_s * (0.0 - (im_m * re));
              }
              
              im\_m = math.fabs(im)
              im\_s = math.copysign(1.0, im)
              def code(im_s, re, im_m):
              	return im_s * (0.0 - (im_m * re))
              
              im\_m = abs(im)
              im\_s = copysign(1.0, im)
              function code(im_s, re, im_m)
              	return Float64(im_s * Float64(0.0 - Float64(im_m * re)))
              end
              
              im\_m = abs(im);
              im\_s = sign(im) * abs(1.0);
              function tmp = code(im_s, re, im_m)
              	tmp = im_s * (0.0 - (im_m * re));
              end
              
              im\_m = N[Abs[im], $MachinePrecision]
              im\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[im]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[im$95$s_, re_, im$95$m_] := N[(im$95$s * N[(0.0 - N[(im$95$m * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              im\_m = \left|im\right|
              \\
              im\_s = \mathsf{copysign}\left(1, im\right)
              
              \\
              im\_s \cdot \left(0 - im\_m \cdot re\right)
              \end{array}
              
              Derivation
              1. Initial program 67.7%

                \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in im around 0

                \[\leadsto \color{blue}{-1 \cdot \left(im \cdot \sin re\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(im \cdot \sin re\right) \]
                2. neg-sub0N/A

                  \[\leadsto 0 - \color{blue}{im \cdot \sin re} \]
                3. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(im \cdot \sin re\right)}\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \left(\sin re \cdot \color{blue}{im}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\sin re, \color{blue}{im}\right)\right) \]
                6. sin-lowering-sin.f6449.9%

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(re\right), im\right)\right) \]
              5. Simplified49.9%

                \[\leadsto \color{blue}{0 - \sin re \cdot im} \]
              6. Taylor expanded in re around 0

                \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(\color{blue}{re}, im\right)\right) \]
              7. Step-by-step derivation
                1. Simplified32.8%

                  \[\leadsto 0 - \color{blue}{re} \cdot im \]
                2. Step-by-step derivation
                  1. sub0-negN/A

                    \[\leadsto \mathsf{neg}\left(re \cdot im\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \mathsf{neg}\left(im \cdot re\right) \]
                  3. distribute-lft-neg-inN/A

                    \[\leadsto \left(\mathsf{neg}\left(im\right)\right) \cdot \color{blue}{re} \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(im\right)\right), \color{blue}{re}\right) \]
                  5. neg-lowering-neg.f6432.8%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(im\right), re\right) \]
                3. Applied egg-rr32.8%

                  \[\leadsto \color{blue}{\left(-im\right) \cdot re} \]
                4. Final simplification32.8%

                  \[\leadsto 0 - im \cdot re \]
                5. Add Preprocessing

                Developer Target 1: 99.8% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left|im\right| < 1:\\ \;\;\;\;-\sin re \cdot \left(\left(im + \left(\left(0.16666666666666666 \cdot im\right) \cdot im\right) \cdot im\right) + \left(\left(\left(\left(0.008333333333333333 \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right)\\ \end{array} \end{array} \]
                (FPCore (re im)
                 :precision binary64
                 (if (< (fabs im) 1.0)
                   (-
                    (*
                     (sin re)
                     (+
                      (+ im (* (* (* 0.16666666666666666 im) im) im))
                      (* (* (* (* (* 0.008333333333333333 im) im) im) im) im))))
                   (* (* 0.5 (sin re)) (- (exp (- im)) (exp im)))))
                double code(double re, double im) {
                	double tmp;
                	if (fabs(im) < 1.0) {
                		tmp = -(sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)));
                	} else {
                		tmp = (0.5 * sin(re)) * (exp(-im) - exp(im));
                	}
                	return tmp;
                }
                
                real(8) function code(re, im)
                    real(8), intent (in) :: re
                    real(8), intent (in) :: im
                    real(8) :: tmp
                    if (abs(im) < 1.0d0) then
                        tmp = -(sin(re) * ((im + (((0.16666666666666666d0 * im) * im) * im)) + (((((0.008333333333333333d0 * im) * im) * im) * im) * im)))
                    else
                        tmp = (0.5d0 * sin(re)) * (exp(-im) - exp(im))
                    end if
                    code = tmp
                end function
                
                public static double code(double re, double im) {
                	double tmp;
                	if (Math.abs(im) < 1.0) {
                		tmp = -(Math.sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)));
                	} else {
                		tmp = (0.5 * Math.sin(re)) * (Math.exp(-im) - Math.exp(im));
                	}
                	return tmp;
                }
                
                def code(re, im):
                	tmp = 0
                	if math.fabs(im) < 1.0:
                		tmp = -(math.sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)))
                	else:
                		tmp = (0.5 * math.sin(re)) * (math.exp(-im) - math.exp(im))
                	return tmp
                
                function code(re, im)
                	tmp = 0.0
                	if (abs(im) < 1.0)
                		tmp = Float64(-Float64(sin(re) * Float64(Float64(im + Float64(Float64(Float64(0.16666666666666666 * im) * im) * im)) + Float64(Float64(Float64(Float64(Float64(0.008333333333333333 * im) * im) * im) * im) * im))));
                	else
                		tmp = Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) - exp(im)));
                	end
                	return tmp
                end
                
                function tmp_2 = code(re, im)
                	tmp = 0.0;
                	if (abs(im) < 1.0)
                		tmp = -(sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)));
                	else
                		tmp = (0.5 * sin(re)) * (exp(-im) - exp(im));
                	end
                	tmp_2 = tmp;
                end
                
                code[re_, im_] := If[Less[N[Abs[im], $MachinePrecision], 1.0], (-N[(N[Sin[re], $MachinePrecision] * N[(N[(im + N[(N[(N[(0.16666666666666666 * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(0.008333333333333333 * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] - N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\left|im\right| < 1:\\
                \;\;\;\;-\sin re \cdot \left(\left(im + \left(\left(0.16666666666666666 \cdot im\right) \cdot im\right) \cdot im\right) + \left(\left(\left(\left(0.008333333333333333 \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right)\\
                
                
                \end{array}
                \end{array}
                

                Reproduce

                ?
                herbie shell --seed 2024154 
                (FPCore (re im)
                  :name "math.cos on complex, imaginary part"
                  :precision binary64
                
                  :alt
                  (! :herbie-platform default (if (< (fabs im) 1) (- (* (sin re) (+ im (* 1/6 im im im) (* 1/120 im im im im im)))) (* (* 1/2 (sin re)) (- (exp (- im)) (exp im)))))
                
                  (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))