powComplex, real part

Percentage Accurate: 40.3% → 76.2%
Time: 4.1s
Alternatives: 8
Speedup: 3.2×

Specification

?
\[\begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \]
(FPCore (x.re x.im y.re y.im)
  :precision binary64
  (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
  (*
   (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
   (cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
    code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}

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 8 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: 40.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \]
(FPCore (x.re x.im y.re y.im)
  :precision binary64
  (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
  (*
   (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
   (cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
    code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}

Alternative 1: 76.2% accurate, 1.2× speedup?

\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq \frac{-7737125245533627}{77371252455336267181195264}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos t\_0\\ \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\ \mathbf{elif}\;y.re \leq 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760:\\ \;\;\;\;\sin \left(t\_0 - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
(FPCore (x.re x.im y.re y.im)
  :precision binary64
  (let* ((t_0 (* y.re (atan2 x.im x.re))))
  (if (<= y.re -7737125245533627/77371252455336267181195264)
    (*
     (exp
      (-
       (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
       (* (atan2 x.im x.re) y.im)))
     (cos t_0))
    (if (<=
         y.re
         7656353255721115/21267647932558653966460912964485513216)
      (* (exp (- (* y.im (atan2 x.im x.re)))) 1)
      (if (<=
           y.re
           340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760)
        (*
         (sin (- t_0 (* -1/2 PI)))
         (pow (sqrt (+ (pow x.im 2) (pow x.re 2))) y.re))
        (*
         (pow (+ (* x.im x.im) (* x.re x.re)) (* y.re 1/2))
         (cos (* (atan2 x.im x.re) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_re <= -1e-10) {
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(t_0);
	} else if (y_46_re <= 3.6e-22) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
	} else if (y_46_re <= 3.4e+164) {
		tmp = sin((t_0 - (-0.5 * ((double) M_PI)))) * pow(sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0))), y_46_re);
	} else {
		tmp = pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_re <= -1e-10) {
		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(t_0);
	} else if (y_46_re <= 3.6e-22) {
		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
	} else if (y_46_re <= 3.4e+164) {
		tmp = Math.sin((t_0 - (-0.5 * Math.PI))) * Math.pow(Math.sqrt((Math.pow(x_46_im, 2.0) + Math.pow(x_46_re, 2.0))), y_46_re);
	} else {
		tmp = Math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	tmp = 0
	if y_46_re <= -1e-10:
		tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(t_0)
	elif y_46_re <= 3.6e-22:
		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
	elif y_46_re <= 3.4e+164:
		tmp = math.sin((t_0 - (-0.5 * math.pi))) * math.pow(math.sqrt((math.pow(x_46_im, 2.0) + math.pow(x_46_re, 2.0))), y_46_re)
	else:
		tmp = math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * math.cos((math.atan2(x_46_im, x_46_re) * y_46_re))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (y_46_re <= -1e-10)
		tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(t_0));
	elseif (y_46_re <= 3.6e-22)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0);
	elseif (y_46_re <= 3.4e+164)
		tmp = Float64(sin(Float64(t_0 - Float64(-0.5 * pi))) * (sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re));
	else
		tmp = Float64((Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re)));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if (y_46_re <= -1e-10)
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(t_0);
	elseif (y_46_re <= 3.6e-22)
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
	elseif (y_46_re <= 3.4e+164)
		tmp = sin((t_0 - (-0.5 * pi))) * (sqrt(((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re);
	else
		tmp = (((x_46_im * x_46_im) + (x_46_re * x_46_re)) ^ (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7737125245533627/77371252455336267181195264], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7656353255721115/21267647932558653966460912964485513216], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision], If[LessEqual[y$46$re, 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760], N[(N[Sin[N[(t$95$0 - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[Power[x$46$im, 2], $MachinePrecision] + N[Power[x$46$re, 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 1/2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq \frac{-7737125245533627}{77371252455336267181195264}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos t\_0\\

\mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\

\mathbf{elif}\;y.re \leq 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760:\\
\;\;\;\;\sin \left(t\_0 - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -1e-10

    1. Initial program 40.3%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Taylor expanded in y.im around 0

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Step-by-step derivation
      1. lower-cos.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lower-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      3. lower-atan2.f6461.7%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    4. Applied rewrites61.7%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if -1e-10 < y.re < 3.5999999999999998e-22

    1. Initial program 40.3%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Taylor expanded in y.im around 0

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Step-by-step derivation
      1. lower-cos.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lower-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      3. lower-atan2.f6461.7%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    4. Applied rewrites61.7%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    5. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    6. Step-by-step derivation
      1. lower-exp.f64N/A

        \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lower-neg.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      3. lower-*.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. lower-atan2.f6453.1%

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    7. Applied rewrites53.1%

      \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    8. Taylor expanded in y.re around 0

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
    9. Step-by-step derivation
      1. Applied rewrites53.4%

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]

      if 3.5999999999999998e-22 < y.re < 3.4000000000000001e164

      1. Initial program 40.3%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Step-by-step derivation
        1. lift-cos.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        2. sin-+PI/2-revN/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
        3. lower-sin.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
        4. lift-+.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        5. associate-+l+N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
        6. +-commutativeN/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right) + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)} \]
        7. lower-+.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right) + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)} \]
      3. Applied rewrites40.1%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re - \pi \cdot \frac{-1}{2}\right) + y.im \cdot \left(\frac{1}{2} \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)} \]
      4. Taylor expanded in y.im around 0

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        2. lower-sin.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
        3. lower--.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
        4. lower-*.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2}} + {x.re}^{2}}\right)}^{y.re} \]
        5. lower-atan2.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re} \]
        6. lower-*.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
        7. lower-PI.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{\color{blue}{2}}}\right)}^{y.re} \]
        8. lower-pow.f64N/A

          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
      6. Applied rewrites52.5%

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]

      if 3.4000000000000001e164 < y.re

      1. Initial program 40.3%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Taylor expanded in y.im around 0

        \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        2. lower-cos.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
        3. lower-*.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
        4. lower-atan2.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
        5. lower-pow.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
        6. lower-sqrt.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
        7. lower-+.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
        8. lower-pow.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
        9. lower-pow.f6452.1%

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
      4. Applied rewrites52.1%

        \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        2. *-commutativeN/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        3. lower-*.f6452.1%

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        4. lift-pow.f64N/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        5. lift-sqrt.f64N/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        6. sqrt-pow2N/A

          \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        7. lift-+.f64N/A

          \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        8. lift-pow.f64N/A

          \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        9. pow2N/A

          \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        10. lift-*.f64N/A

          \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        11. lift-pow.f64N/A

          \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        12. pow2N/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        13. lift-*.f64N/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        14. +-commutativeN/A

          \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        15. lift-+.f64N/A

          \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        16. lower-pow.f64N/A

          \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        17. lift-+.f64N/A

          \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        18. +-commutativeN/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        19. lift-+.f64N/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        20. mult-flipN/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
        21. metadata-evalN/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
        22. lower-*.f6452.1%

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
        23. lift-*.f64N/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        24. *-commutativeN/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        25. lift-*.f6452.1%

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      6. Applied rewrites52.1%

        \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \color{blue}{\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
    10. Recombined 4 regimes into one program.
    11. Add Preprocessing

    Alternative 2: 75.3% accurate, 1.2× speedup?

    \[\begin{array}{l} t_0 := {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\ \;\;\;\;\sin \left(\frac{1}{2} \cdot \pi - t\_1\right) \cdot t\_0\\ \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\ \mathbf{elif}\;y.re \leq 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760:\\ \;\;\;\;\sin \left(t\_1 - \frac{-1}{2} \cdot \pi\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
    (FPCore (x.re x.im y.re y.im)
      :precision binary64
      (let* ((t_0 (pow (sqrt (+ (pow x.im 2) (pow x.re 2))) y.re))
           (t_1 (* y.re (atan2 x.im x.re))))
      (if (<= y.re -7253554917687775/4835703278458516698824704)
        (* (sin (- (* 1/2 PI) t_1)) t_0)
        (if (<=
             y.re
             7656353255721115/21267647932558653966460912964485513216)
          (* (exp (- (* y.im (atan2 x.im x.re)))) 1)
          (if (<=
               y.re
               340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760)
            (* (sin (- t_1 (* -1/2 PI))) t_0)
            (*
             (pow (+ (* x.im x.im) (* x.re x.re)) (* y.re 1/2))
             (cos (* (atan2 x.im x.re) y.re))))))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = pow(sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0))), y_46_re);
    	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
    	double tmp;
    	if (y_46_re <= -1.5e-9) {
    		tmp = sin(((0.5 * ((double) M_PI)) - t_1)) * t_0;
    	} else if (y_46_re <= 3.6e-22) {
    		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
    	} else if (y_46_re <= 3.4e+164) {
    		tmp = sin((t_1 - (-0.5 * ((double) M_PI)))) * t_0;
    	} else {
    		tmp = pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
    	}
    	return tmp;
    }
    
    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = Math.pow(Math.sqrt((Math.pow(x_46_im, 2.0) + Math.pow(x_46_re, 2.0))), y_46_re);
    	double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
    	double tmp;
    	if (y_46_re <= -1.5e-9) {
    		tmp = Math.sin(((0.5 * Math.PI) - t_1)) * t_0;
    	} else if (y_46_re <= 3.6e-22) {
    		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
    	} else if (y_46_re <= 3.4e+164) {
    		tmp = Math.sin((t_1 - (-0.5 * Math.PI))) * t_0;
    	} else {
    		tmp = Math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re));
    	}
    	return tmp;
    }
    
    def code(x_46_re, x_46_im, y_46_re, y_46_im):
    	t_0 = math.pow(math.sqrt((math.pow(x_46_im, 2.0) + math.pow(x_46_re, 2.0))), y_46_re)
    	t_1 = y_46_re * math.atan2(x_46_im, x_46_re)
    	tmp = 0
    	if y_46_re <= -1.5e-9:
    		tmp = math.sin(((0.5 * math.pi) - t_1)) * t_0
    	elif y_46_re <= 3.6e-22:
    		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
    	elif y_46_re <= 3.4e+164:
    		tmp = math.sin((t_1 - (-0.5 * math.pi))) * t_0
    	else:
    		tmp = math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * math.cos((math.atan2(x_46_im, x_46_re) * y_46_re))
    	return tmp
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re
    	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
    	tmp = 0.0
    	if (y_46_re <= -1.5e-9)
    		tmp = Float64(sin(Float64(Float64(0.5 * pi) - t_1)) * t_0);
    	elseif (y_46_re <= 3.6e-22)
    		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0);
    	elseif (y_46_re <= 3.4e+164)
    		tmp = Float64(sin(Float64(t_1 - Float64(-0.5 * pi))) * t_0);
    	else
    		tmp = Float64((Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = sqrt(((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re;
    	t_1 = y_46_re * atan2(x_46_im, x_46_re);
    	tmp = 0.0;
    	if (y_46_re <= -1.5e-9)
    		tmp = sin(((0.5 * pi) - t_1)) * t_0;
    	elseif (y_46_re <= 3.6e-22)
    		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
    	elseif (y_46_re <= 3.4e+164)
    		tmp = sin((t_1 - (-0.5 * pi))) * t_0;
    	else
    		tmp = (((x_46_im * x_46_im) + (x_46_re * x_46_re)) ^ (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
    	end
    	tmp_2 = tmp;
    end
    
    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[N[(N[Power[x$46$im, 2], $MachinePrecision] + N[Power[x$46$re, 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7253554917687775/4835703278458516698824704], N[(N[Sin[N[(N[(1/2 * Pi), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 7656353255721115/21267647932558653966460912964485513216], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision], If[LessEqual[y$46$re, 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760], N[(N[Sin[N[(t$95$1 - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 1/2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    t_0 := {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\
    t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
    \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\
    \;\;\;\;\sin \left(\frac{1}{2} \cdot \pi - t\_1\right) \cdot t\_0\\
    
    \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\
    \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\
    
    \mathbf{elif}\;y.re \leq 340000000000000010835684632195335587940734187291272085893391588303017776817771367411377474482174590749800488441601817097709833895132759223546687528950569012832501760:\\
    \;\;\;\;\sin \left(t\_1 - \frac{-1}{2} \cdot \pi\right) \cdot t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if y.re < -1.5e-9

      1. Initial program 40.3%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Taylor expanded in x.im around -inf

        \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      3. Step-by-step derivation
        1. lower-*.f6418.7%

          \[\leadsto e^{\log \left(-1 \cdot \color{blue}{x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      4. Applied rewrites18.7%

        \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      5. Taylor expanded in x.im around -inf

        \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      6. Step-by-step derivation
        1. lower-*.f6435.9%

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(-1 \cdot \color{blue}{x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      7. Applied rewrites35.9%

        \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      8. Step-by-step derivation
        1. lift-cos.f64N/A

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        2. cos-neg-revN/A

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right)} \]
        3. sin-+PI/2-revN/A

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
        4. lower-sin.f64N/A

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
        5. lower-+.f64N/A

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
      9. Applied rewrites35.6%

        \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(-\left(\log \left(-x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) + \pi \cdot \frac{1}{2}\right)} \]
      10. Taylor expanded in y.im around 0

        \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      11. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        2. lower-sin.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
        3. lower--.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
        4. lower-*.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2}} + {x.re}^{2}}\right)}^{y.re} \]
        5. lower-PI.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re} \]
        6. lower-*.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
        7. lower-atan2.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{\color{blue}{2}}}\right)}^{y.re} \]
        8. lower-pow.f64N/A

          \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
      12. Applied rewrites51.6%

        \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]

      if -1.5e-9 < y.re < 3.5999999999999998e-22

      1. Initial program 40.3%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Taylor expanded in y.im around 0

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. Step-by-step derivation
        1. lower-cos.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        2. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        3. lower-atan2.f6461.7%

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. Applied rewrites61.7%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      5. Taylor expanded in y.re around 0

        \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      6. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        2. lower-neg.f64N/A

          \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        3. lower-*.f64N/A

          \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        4. lower-atan2.f6453.1%

          \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. Applied rewrites53.1%

        \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. Taylor expanded in y.re around 0

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
      9. Step-by-step derivation
        1. Applied rewrites53.4%

          \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]

        if 3.5999999999999998e-22 < y.re < 3.4000000000000001e164

        1. Initial program 40.3%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Step-by-step derivation
          1. lift-cos.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          2. sin-+PI/2-revN/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          3. lower-sin.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          4. lift-+.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
          5. associate-+l+N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right) + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)} \]
          7. lower-+.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \frac{\mathsf{PI}\left(\right)}{2}\right) + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)} \]
        3. Applied rewrites40.1%

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re - \pi \cdot \frac{-1}{2}\right) + y.im \cdot \left(\frac{1}{2} \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)} \]
        4. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        5. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. lower-sin.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
          3. lower--.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
          4. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2}} + {x.re}^{2}}\right)}^{y.re} \]
          5. lower-atan2.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re} \]
          6. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
          7. lower-PI.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{\color{blue}{2}}}\right)}^{y.re} \]
          8. lower-pow.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
        6. Applied rewrites52.5%

          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \frac{-1}{2} \cdot \pi\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]

        if 3.4000000000000001e164 < y.re

        1. Initial program 40.3%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. lower-cos.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
          3. lower-*.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
          4. lower-atan2.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
          5. lower-pow.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
          6. lower-sqrt.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          7. lower-+.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          8. lower-pow.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          9. lower-pow.f6452.1%

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
        4. Applied rewrites52.1%

          \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. *-commutativeN/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          3. lower-*.f6452.1%

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          4. lift-pow.f64N/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          5. lift-sqrt.f64N/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          6. sqrt-pow2N/A

            \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          7. lift-+.f64N/A

            \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          8. lift-pow.f64N/A

            \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          9. pow2N/A

            \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          10. lift-*.f64N/A

            \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          11. lift-pow.f64N/A

            \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          12. pow2N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          13. lift-*.f64N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          14. +-commutativeN/A

            \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          15. lift-+.f64N/A

            \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          16. lower-pow.f64N/A

            \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          17. lift-+.f64N/A

            \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          18. +-commutativeN/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          19. lift-+.f64N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          20. mult-flipN/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
          21. metadata-evalN/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
          22. lower-*.f6452.1%

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
          23. lift-*.f64N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          24. *-commutativeN/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          25. lift-*.f6452.1%

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        6. Applied rewrites52.1%

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \color{blue}{\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      10. Recombined 4 regimes into one program.
      11. Add Preprocessing

      Alternative 3: 75.2% accurate, 1.3× speedup?

      \[\begin{array}{l} \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\ \;\;\;\;\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
      (FPCore (x.re x.im y.re y.im)
        :precision binary64
        (if (<= y.re -7253554917687775/4835703278458516698824704)
        (*
         (sin (- (* 1/2 PI) (* y.re (atan2 x.im x.re))))
         (pow (sqrt (+ (pow x.im 2) (pow x.re 2))) y.re))
        (if (<=
             y.re
             7656353255721115/21267647932558653966460912964485513216)
          (* (exp (- (* y.im (atan2 x.im x.re)))) 1)
          (*
           (pow (+ (* x.im x.im) (* x.re x.re)) (* y.re 1/2))
           (cos (* (atan2 x.im x.re) y.re))))))
      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double tmp;
      	if (y_46_re <= -1.5e-9) {
      		tmp = sin(((0.5 * ((double) M_PI)) - (y_46_re * atan2(x_46_im, x_46_re)))) * pow(sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0))), y_46_re);
      	} else if (y_46_re <= 3.6e-22) {
      		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
      	} else {
      		tmp = pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
      	}
      	return tmp;
      }
      
      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double tmp;
      	if (y_46_re <= -1.5e-9) {
      		tmp = Math.sin(((0.5 * Math.PI) - (y_46_re * Math.atan2(x_46_im, x_46_re)))) * Math.pow(Math.sqrt((Math.pow(x_46_im, 2.0) + Math.pow(x_46_re, 2.0))), y_46_re);
      	} else if (y_46_re <= 3.6e-22) {
      		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
      	} else {
      		tmp = Math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re));
      	}
      	return tmp;
      }
      
      def code(x_46_re, x_46_im, y_46_re, y_46_im):
      	tmp = 0
      	if y_46_re <= -1.5e-9:
      		tmp = math.sin(((0.5 * math.pi) - (y_46_re * math.atan2(x_46_im, x_46_re)))) * math.pow(math.sqrt((math.pow(x_46_im, 2.0) + math.pow(x_46_re, 2.0))), y_46_re)
      	elif y_46_re <= 3.6e-22:
      		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
      	else:
      		tmp = math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * math.cos((math.atan2(x_46_im, x_46_re) * y_46_re))
      	return tmp
      
      function code(x_46_re, x_46_im, y_46_re, y_46_im)
      	tmp = 0.0
      	if (y_46_re <= -1.5e-9)
      		tmp = Float64(sin(Float64(Float64(0.5 * pi) - Float64(y_46_re * atan(x_46_im, x_46_re)))) * (sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re));
      	elseif (y_46_re <= 3.6e-22)
      		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0);
      	else
      		tmp = Float64((Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
      	tmp = 0.0;
      	if (y_46_re <= -1.5e-9)
      		tmp = sin(((0.5 * pi) - (y_46_re * atan2(x_46_im, x_46_re)))) * (sqrt(((x_46_im ^ 2.0) + (x_46_re ^ 2.0))) ^ y_46_re);
      	elseif (y_46_re <= 3.6e-22)
      		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
      	else
      		tmp = (((x_46_im * x_46_im) + (x_46_re * x_46_re)) ^ (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
      	end
      	tmp_2 = tmp;
      end
      
      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -7253554917687775/4835703278458516698824704], N[(N[Sin[N[(N[(1/2 * Pi), $MachinePrecision] - N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[Power[x$46$im, 2], $MachinePrecision] + N[Power[x$46$re, 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7656353255721115/21267647932558653966460912964485513216], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision], N[(N[Power[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 1/2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\
      \;\;\;\;\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\\
      
      \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\
      \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\
      
      \mathbf{else}:\\
      \;\;\;\;{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y.re < -1.5e-9

        1. Initial program 40.3%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Taylor expanded in x.im around -inf

          \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        3. Step-by-step derivation
          1. lower-*.f6418.7%

            \[\leadsto e^{\log \left(-1 \cdot \color{blue}{x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        4. Applied rewrites18.7%

          \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        5. Taylor expanded in x.im around -inf

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        6. Step-by-step derivation
          1. lower-*.f6435.9%

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(-1 \cdot \color{blue}{x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        7. Applied rewrites35.9%

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        8. Step-by-step derivation
          1. lift-cos.f64N/A

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          2. cos-neg-revN/A

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right)} \]
          3. sin-+PI/2-revN/A

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          4. lower-sin.f64N/A

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          5. lower-+.f64N/A

            \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\left(\mathsf{neg}\left(\left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
        9. Applied rewrites35.6%

          \[\leadsto e^{\log \left(-1 \cdot x.im\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(\left(-\left(\log \left(-x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) + \pi \cdot \frac{1}{2}\right)} \]
        10. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        11. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. lower-sin.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
          3. lower--.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
          4. lower-*.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right) - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2}} + {x.re}^{2}}\right)}^{y.re} \]
          5. lower-PI.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re} \]
          6. lower-*.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
          7. lower-atan2.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{\color{blue}{2}}}\right)}^{y.re} \]
          8. lower-pow.f64N/A

            \[\leadsto \sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
        12. Applied rewrites51.6%

          \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \pi - y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]

        if -1.5e-9 < y.re < 3.5999999999999998e-22

        1. Initial program 40.3%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Taylor expanded in y.im around 0

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        3. Step-by-step derivation
          1. lower-cos.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          2. lower-*.f64N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          3. lower-atan2.f6461.7%

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        4. Applied rewrites61.7%

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        5. Taylor expanded in y.re around 0

          \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        6. Step-by-step derivation
          1. lower-exp.f64N/A

            \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          2. lower-neg.f64N/A

            \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          3. lower-*.f64N/A

            \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          4. lower-atan2.f6453.1%

            \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        7. Applied rewrites53.1%

          \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        8. Taylor expanded in y.re around 0

          \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
        9. Step-by-step derivation
          1. Applied rewrites53.4%

            \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]

          if 3.5999999999999998e-22 < y.re

          1. Initial program 40.3%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Taylor expanded in y.im around 0

            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            2. lower-cos.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
            3. lower-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
            4. lower-atan2.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
            5. lower-pow.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
            6. lower-sqrt.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            7. lower-+.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            8. lower-pow.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            9. lower-pow.f6452.1%

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          4. Applied rewrites52.1%

            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            2. *-commutativeN/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            3. lower-*.f6452.1%

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            4. lift-pow.f64N/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            5. lift-sqrt.f64N/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            6. sqrt-pow2N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            7. lift-+.f64N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            8. lift-pow.f64N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            9. pow2N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            10. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            11. lift-pow.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            12. pow2N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            13. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            14. +-commutativeN/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            15. lift-+.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            16. lower-pow.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            17. lift-+.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            18. +-commutativeN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            19. lift-+.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            20. mult-flipN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
            21. metadata-evalN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
            22. lower-*.f6452.1%

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
            23. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            24. *-commutativeN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
            25. lift-*.f6452.1%

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          6. Applied rewrites52.1%

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \color{blue}{\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        10. Recombined 3 regimes into one program.
        11. Add Preprocessing

        Alternative 4: 75.2% accurate, 2.0× speedup?

        \[\begin{array}{l} t_0 := {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
        (FPCore (x.re x.im y.re y.im)
          :precision binary64
          (let* ((t_0
                (*
                 (pow (+ (* x.im x.im) (* x.re x.re)) (* y.re 1/2))
                 (cos (* (atan2 x.im x.re) y.re)))))
          (if (<= y.re -7253554917687775/4835703278458516698824704)
            t_0
            (if (<=
                 y.re
                 7656353255721115/21267647932558653966460912964485513216)
              (* (exp (- (* y.im (atan2 x.im x.re)))) 1)
              t_0))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
        	double tmp;
        	if (y_46_re <= -1.5e-9) {
        		tmp = t_0;
        	} else if (y_46_re <= 3.6e-22) {
        		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x_46re, x_46im, y_46re, y_46im)
        use fmin_fmax_functions
            real(8), intent (in) :: x_46re
            real(8), intent (in) :: x_46im
            real(8), intent (in) :: y_46re
            real(8), intent (in) :: y_46im
            real(8) :: t_0
            real(8) :: tmp
            t_0 = (((x_46im * x_46im) + (x_46re * x_46re)) ** (y_46re * 0.5d0)) * cos((atan2(x_46im, x_46re) * y_46re))
            if (y_46re <= (-1.5d-9)) then
                tmp = t_0
            else if (y_46re <= 3.6d-22) then
                tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * 1.0d0
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = Math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re));
        	double tmp;
        	if (y_46_re <= -1.5e-9) {
        		tmp = t_0;
        	} else if (y_46_re <= 3.6e-22) {
        		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x_46_re, x_46_im, y_46_re, y_46_im):
        	t_0 = math.pow(((x_46_im * x_46_im) + (x_46_re * x_46_re)), (y_46_re * 0.5)) * math.cos((math.atan2(x_46_im, x_46_re) * y_46_re))
        	tmp = 0
        	if y_46_re <= -1.5e-9:
        		tmp = t_0
        	elif y_46_re <= 3.6e-22:
        		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = Float64((Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re)))
        	tmp = 0.0
        	if (y_46_re <= -1.5e-9)
        		tmp = t_0;
        	elseif (y_46_re <= 3.6e-22)
        		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0);
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = (((x_46_im * x_46_im) + (x_46_re * x_46_re)) ^ (y_46_re * 0.5)) * cos((atan2(x_46_im, x_46_re) * y_46_re));
        	tmp = 0.0;
        	if (y_46_re <= -1.5e-9)
        		tmp = t_0;
        	elseif (y_46_re <= 3.6e-22)
        		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 1/2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7253554917687775/4835703278458516698824704], t$95$0, If[LessEqual[y$46$re, 7656353255721115/21267647932558653966460912964485513216], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        t_0 := {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
        \mathbf{if}\;y.re \leq \frac{-7253554917687775}{4835703278458516698824704}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\
        \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y.re < -1.5e-9 or 3.5999999999999998e-22 < y.re

          1. Initial program 40.3%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Taylor expanded in y.im around 0

            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            2. lower-cos.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
            3. lower-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
            4. lower-atan2.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
            5. lower-pow.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
            6. lower-sqrt.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            7. lower-+.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            8. lower-pow.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            9. lower-pow.f6452.1%

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          4. Applied rewrites52.1%

            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            2. *-commutativeN/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            3. lower-*.f6452.1%

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            4. lift-pow.f64N/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            5. lift-sqrt.f64N/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            6. sqrt-pow2N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            7. lift-+.f64N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            8. lift-pow.f64N/A

              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            9. pow2N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            10. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            11. lift-pow.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            12. pow2N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            13. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            14. +-commutativeN/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            15. lift-+.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            16. lower-pow.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            17. lift-+.f64N/A

              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            18. +-commutativeN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            19. lift-+.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            20. mult-flipN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
            21. metadata-evalN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
            22. lower-*.f6452.1%

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
            23. lift-*.f64N/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            24. *-commutativeN/A

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
            25. lift-*.f6452.1%

              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          6. Applied rewrites52.1%

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(y.re \cdot \frac{1}{2}\right)} \cdot \color{blue}{\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

          if -1.5e-9 < y.re < 3.5999999999999998e-22

          1. Initial program 40.3%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Taylor expanded in y.im around 0

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          3. Step-by-step derivation
            1. lower-cos.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            2. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            3. lower-atan2.f6461.7%

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          4. Applied rewrites61.7%

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          5. Taylor expanded in y.re around 0

            \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          6. Step-by-step derivation
            1. lower-exp.f64N/A

              \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            2. lower-neg.f64N/A

              \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            3. lower-*.f64N/A

              \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
            4. lower-atan2.f6453.1%

              \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          7. Applied rewrites53.1%

            \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          8. Taylor expanded in y.re around 0

            \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
          9. Step-by-step derivation
            1. Applied rewrites53.4%

              \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
          10. Recombined 2 regimes into one program.
          11. Add Preprocessing

          Alternative 5: 68.3% accurate, 3.0× speedup?

          \[\begin{array}{l} t_0 := 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -360000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
          (FPCore (x.re x.im y.re y.im)
            :precision binary64
            (let* ((t_0 (* 1 (pow (sqrt (pow x.im 2)) y.re))))
            (if (<= y.re -360000)
              t_0
              (if (<=
                   y.re
                   7656353255721115/21267647932558653966460912964485513216)
                (* (exp (- (* y.im (atan2 x.im x.re)))) 1)
                t_0))))
          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = 1.0 * pow(sqrt(pow(x_46_im, 2.0)), y_46_re);
          	double tmp;
          	if (y_46_re <= -360000.0) {
          		tmp = t_0;
          	} else if (y_46_re <= 3.6e-22) {
          		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x_46re, x_46im, y_46re, y_46im)
          use fmin_fmax_functions
              real(8), intent (in) :: x_46re
              real(8), intent (in) :: x_46im
              real(8), intent (in) :: y_46re
              real(8), intent (in) :: y_46im
              real(8) :: t_0
              real(8) :: tmp
              t_0 = 1.0d0 * (sqrt((x_46im ** 2.0d0)) ** y_46re)
              if (y_46re <= (-360000.0d0)) then
                  tmp = t_0
              else if (y_46re <= 3.6d-22) then
                  tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * 1.0d0
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = 1.0 * Math.pow(Math.sqrt(Math.pow(x_46_im, 2.0)), y_46_re);
          	double tmp;
          	if (y_46_re <= -360000.0) {
          		tmp = t_0;
          	} else if (y_46_re <= 3.6e-22) {
          		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(x_46_re, x_46_im, y_46_re, y_46_im):
          	t_0 = 1.0 * math.pow(math.sqrt(math.pow(x_46_im, 2.0)), y_46_re)
          	tmp = 0
          	if y_46_re <= -360000.0:
          		tmp = t_0
          	elif y_46_re <= 3.6e-22:
          		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
          	else:
          		tmp = t_0
          	return tmp
          
          function code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = Float64(1.0 * (sqrt((x_46_im ^ 2.0)) ^ y_46_re))
          	tmp = 0.0
          	if (y_46_re <= -360000.0)
          		tmp = t_0;
          	elseif (y_46_re <= 3.6e-22)
          		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0);
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = 1.0 * (sqrt((x_46_im ^ 2.0)) ^ y_46_re);
          	tmp = 0.0;
          	if (y_46_re <= -360000.0)
          		tmp = t_0;
          	elseif (y_46_re <= 3.6e-22)
          		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1 * N[Power[N[Sqrt[N[Power[x$46$im, 2], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -360000], t$95$0, If[LessEqual[y$46$re, 7656353255721115/21267647932558653966460912964485513216], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          t_0 := 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{y.re}\\
          \mathbf{if}\;y.re \leq -360000:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;y.re \leq \frac{7656353255721115}{21267647932558653966460912964485513216}:\\
          \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y.re < -3.6e5 or 3.5999999999999998e-22 < y.re

            1. Initial program 40.3%

              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
            2. Taylor expanded in y.im around 0

              \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              2. lower-cos.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
              3. lower-*.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
              4. lower-atan2.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
              5. lower-pow.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
              6. lower-sqrt.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              7. lower-+.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              8. lower-pow.f64N/A

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              9. lower-pow.f6452.1%

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
            4. Applied rewrites52.1%

              \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1 \]
            6. Step-by-step derivation
              1. Applied rewrites26.5%

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1 \]
              2. Taylor expanded in y.re around 0

                \[\leadsto 1 \cdot 1 \]
              3. Step-by-step derivation
                1. Applied rewrites26.6%

                  \[\leadsto 1 \cdot 1 \]
                2. Taylor expanded in x.re around 0

                  \[\leadsto 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{\color{blue}{y.re}} \]
                3. Step-by-step derivation
                  1. lower-pow.f64N/A

                    \[\leadsto 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \]
                  2. lower-sqrt.f64N/A

                    \[\leadsto 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \]
                  3. lower-pow.f6445.2%

                    \[\leadsto 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \]
                4. Applied rewrites45.2%

                  \[\leadsto 1 \cdot {\left(\sqrt{{x.im}^{2}}\right)}^{\color{blue}{y.re}} \]

                if -3.6e5 < y.re < 3.5999999999999998e-22

                1. Initial program 40.3%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                2. Taylor expanded in y.im around 0

                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                3. Step-by-step derivation
                  1. lower-cos.f64N/A

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  3. lower-atan2.f6461.7%

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                4. Applied rewrites61.7%

                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                5. Taylor expanded in y.re around 0

                  \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                6. Step-by-step derivation
                  1. lower-exp.f64N/A

                    \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  2. lower-neg.f64N/A

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  4. lower-atan2.f6453.1%

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                7. Applied rewrites53.1%

                  \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                8. Taylor expanded in y.re around 0

                  \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                9. Step-by-step derivation
                  1. Applied rewrites53.4%

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                10. Recombined 2 regimes into one program.
                11. Add Preprocessing

                Alternative 6: 53.4% accurate, 3.2× speedup?

                \[e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                (FPCore (x.re x.im y.re y.im)
                  :precision binary64
                  (* (exp (- (* y.im (atan2 x.im x.re)))) 1))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	return exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x_46re, x_46im, y_46re, y_46im)
                use fmin_fmax_functions
                    real(8), intent (in) :: x_46re
                    real(8), intent (in) :: x_46im
                    real(8), intent (in) :: y_46re
                    real(8), intent (in) :: y_46im
                    code = exp(-(y_46im * atan2(x_46im, x_46re))) * 1.0d0
                end function
                
                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	return Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * 1.0;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	return math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * 1.0
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	return Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0)
                end
                
                function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * 1.0;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * 1), $MachinePrecision]
                
                e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1
                
                Derivation
                1. Initial program 40.3%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                2. Taylor expanded in y.im around 0

                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                3. Step-by-step derivation
                  1. lower-cos.f64N/A

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  3. lower-atan2.f6461.7%

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                4. Applied rewrites61.7%

                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                5. Taylor expanded in y.re around 0

                  \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                6. Step-by-step derivation
                  1. lower-exp.f64N/A

                    \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  2. lower-neg.f64N/A

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  4. lower-atan2.f6453.1%

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                7. Applied rewrites53.1%

                  \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                8. Taylor expanded in y.re around 0

                  \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                9. Step-by-step derivation
                  1. Applied rewrites53.4%

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                  2. Add Preprocessing

                  Alternative 7: 26.7% accurate, 5.7× speedup?

                  \[\left(1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 1 \]
                  (FPCore (x.re x.im y.re y.im)
                    :precision binary64
                    (* (+ 1 (* -1 (* y.im (atan2 x.im x.re)))) 1))
                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	return (1.0 + (-1.0 * (y_46_im * atan2(x_46_im, x_46_re)))) * 1.0;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x_46re
                      real(8), intent (in) :: x_46im
                      real(8), intent (in) :: y_46re
                      real(8), intent (in) :: y_46im
                      code = (1.0d0 + ((-1.0d0) * (y_46im * atan2(x_46im, x_46re)))) * 1.0d0
                  end function
                  
                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	return (1.0 + (-1.0 * (y_46_im * Math.atan2(x_46_im, x_46_re)))) * 1.0;
                  }
                  
                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                  	return (1.0 + (-1.0 * (y_46_im * math.atan2(x_46_im, x_46_re)))) * 1.0
                  
                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	return Float64(Float64(1.0 + Float64(-1.0 * Float64(y_46_im * atan(x_46_im, x_46_re)))) * 1.0)
                  end
                  
                  function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	tmp = (1.0 + (-1.0 * (y_46_im * atan2(x_46_im, x_46_re)))) * 1.0;
                  end
                  
                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(1 + N[(-1 * N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1), $MachinePrecision]
                  
                  \left(1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 1
                  
                  Derivation
                  1. Initial program 40.3%

                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                  2. Taylor expanded in y.im around 0

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  3. Step-by-step derivation
                    1. lower-cos.f64N/A

                      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                    3. lower-atan2.f6461.7%

                      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  4. Applied rewrites61.7%

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  5. Taylor expanded in y.re around 0

                    \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  6. Step-by-step derivation
                    1. lower-exp.f64N/A

                      \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                    2. lower-neg.f64N/A

                      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                    4. lower-atan2.f6453.1%

                      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  7. Applied rewrites53.1%

                    \[\leadsto \color{blue}{e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                  8. Taylor expanded in y.re around 0

                    \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                  9. Step-by-step derivation
                    1. Applied rewrites53.4%

                      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1 \]
                    2. Taylor expanded in y.im around 0

                      \[\leadsto \left(1 + \color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot 1 \]
                    3. Step-by-step derivation
                      1. lower-+.f64N/A

                        \[\leadsto \left(1 + -1 \cdot \color{blue}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot 1 \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(1 + -1 \cdot \left(y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \cdot 1 \]
                      3. lower-*.f64N/A

                        \[\leadsto \left(1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right)\right) \cdot 1 \]
                      4. lower-atan2.f6426.7%

                        \[\leadsto \left(1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 1 \]
                    4. Applied rewrites26.7%

                      \[\leadsto \left(1 + \color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot 1 \]
                    5. Add Preprocessing

                    Alternative 8: 26.6% accurate, 113.3× speedup?

                    \[1 \cdot 1 \]
                    (FPCore (x.re x.im y.re y.im)
                      :precision binary64
                      (* 1 1))
                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	return 1.0 * 1.0;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_46re
                        real(8), intent (in) :: x_46im
                        real(8), intent (in) :: y_46re
                        real(8), intent (in) :: y_46im
                        code = 1.0d0 * 1.0d0
                    end function
                    
                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	return 1.0 * 1.0;
                    }
                    
                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                    	return 1.0 * 1.0
                    
                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                    	return Float64(1.0 * 1.0)
                    end
                    
                    function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                    	tmp = 1.0 * 1.0;
                    end
                    
                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1 * 1), $MachinePrecision]
                    
                    1 \cdot 1
                    
                    Derivation
                    1. Initial program 40.3%

                      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                    2. Taylor expanded in y.im around 0

                      \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                    3. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                      2. lower-cos.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
                      3. lower-*.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
                      4. lower-atan2.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
                      5. lower-pow.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
                      6. lower-sqrt.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
                      7. lower-+.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
                      8. lower-pow.f64N/A

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
                      9. lower-pow.f6452.1%

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
                    4. Applied rewrites52.1%

                      \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                    5. Taylor expanded in y.re around 0

                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1 \]
                    6. Step-by-step derivation
                      1. Applied rewrites26.5%

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1 \]
                      2. Taylor expanded in y.re around 0

                        \[\leadsto 1 \cdot 1 \]
                      3. Step-by-step derivation
                        1. Applied rewrites26.6%

                          \[\leadsto 1 \cdot 1 \]
                        2. Add Preprocessing

                        Reproduce

                        ?
                        herbie shell --seed 2025285 -o generate:evaluate
                        (FPCore (x.re x.im y.re y.im)
                          :name "powComplex, real part"
                          :precision binary64
                          (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))