
(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)))
(sin (+ (* 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))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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}
\\
\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 \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)))
(sin (+ (* 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))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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}
\\
\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 \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 5.8e+67)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 5.8e+67) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 5.8e+67) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 5.8e+67], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 5.8 \cdot 10^{+67}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < 5.80000000000000047e67Initial program 48.9%
cancel-sign-sub-inv48.9%
fma-define48.9%
hypot-define48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-out48.9%
fma-define48.9%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
if 5.80000000000000047e67 < y.re Initial program 26.8%
exp-diff19.5%
exp-to-pow19.5%
hypot-define19.5%
*-commutative19.5%
exp-prod19.5%
fma-define19.5%
hypot-define46.3%
*-commutative46.3%
Simplified46.3%
Taylor expanded in y.im around 0 44.1%
Taylor expanded in y.re around 0 24.5%
unpow224.5%
unpow224.5%
hypot-undefine70.9%
Simplified70.9%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_2 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -11500.0)
(* t_1 (sin (+ t_0 (fabs t_2))))
(if (<= y.re 112.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (sin t_2) t_1)))))
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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -11500.0) {
tmp = t_1 * sin((t_0 + fabs(t_2)));
} else if (y_46_re <= 112.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin(t_2) * t_1;
}
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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -11500.0) tmp = Float64(t_1 * sin(Float64(t_0 + abs(t_2)))); elseif (y_46_re <= 112.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(t_2) * t_1); end return 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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -11500.0], N[(t$95$1 * N[Sin[N[(t$95$0 + N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 112.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -11500:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + \left|t\_2\right|\right)\\
\mathbf{elif}\;y.re \leq 112:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_2 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -11500Initial program 47.1%
add-sqr-sqrt34.3%
sqrt-unprod38.6%
pow238.6%
*-commutative38.6%
hypot-define64.3%
Applied egg-rr64.3%
unpow264.3%
rem-sqrt-square90.1%
hypot-undefine50.0%
unpow250.0%
unpow250.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-undefine90.1%
Simplified90.1%
if -11500 < y.re < 112Initial program 49.0%
exp-diff48.2%
exp-to-pow48.2%
hypot-define48.2%
*-commutative48.2%
exp-prod47.7%
fma-define47.6%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.re around 0 79.1%
rec-exp79.1%
distribute-lft-neg-in79.1%
Simplified79.1%
if 112 < y.re Initial program 32.7%
Taylor expanded in y.re around 0 34.7%
unpow234.7%
unpow234.7%
hypot-undefine71.5%
Simplified71.5%
Final simplification80.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -11500.0)
(* t_0 (sqrt (pow (sin t_1) 2.0)))
(if (<= y.re 126.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -11500.0) {
tmp = t_0 * sqrt(pow(sin(t_1), 2.0));
} else if (y_46_re <= 126.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -11500.0) tmp = Float64(t_0 * sqrt((sin(t_1) ^ 2.0))); elseif (y_46_re <= 126.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -11500.0], N[(t$95$0 * N[Sqrt[N[Power[N[Sin[t$95$1], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 126.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -11500:\\
\;\;\;\;t\_0 \cdot \sqrt{{\sin t\_1}^{2}}\\
\mathbf{elif}\;y.re \leq 126:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -11500Initial program 47.1%
Taylor expanded in y.im around 0 87.2%
add-sqr-sqrt55.8%
sqrt-unprod88.6%
pow288.6%
Applied egg-rr88.6%
if -11500 < y.re < 126Initial program 49.0%
exp-diff48.2%
exp-to-pow48.2%
hypot-define48.2%
*-commutative48.2%
exp-prod47.7%
fma-define47.6%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.re around 0 79.1%
rec-exp79.1%
distribute-lft-neg-in79.1%
Simplified79.1%
if 126 < y.re Initial program 32.7%
Taylor expanded in y.re around 0 34.7%
unpow234.7%
unpow234.7%
hypot-undefine71.5%
Simplified71.5%
Final simplification80.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -11500.0)
(* t_1 (sin t_0))
(if (<= y.re 118.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)))))
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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -11500.0) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 118.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
}
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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -11500.0) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 118.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); end return 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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -11500.0], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 118.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -11500:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 118:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -11500Initial program 47.1%
Taylor expanded in y.im around 0 87.2%
if -11500 < y.re < 118Initial program 49.0%
exp-diff48.2%
exp-to-pow48.2%
hypot-define48.2%
*-commutative48.2%
exp-prod47.7%
fma-define47.6%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.re around 0 79.1%
rec-exp79.1%
distribute-lft-neg-in79.1%
Simplified79.1%
if 118 < y.re Initial program 32.7%
Taylor expanded in y.re around 0 34.7%
unpow234.7%
unpow234.7%
hypot-undefine71.5%
Simplified71.5%
Final simplification79.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -11500.0)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(if (<= y.re 1450.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -11500.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else if (y_46_re <= 1450.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -11500.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_1)); elseif (y_46_re <= 1450.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -11500.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1450.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -11500:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 1450:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -11500Initial program 47.1%
Taylor expanded in y.im around 0 87.2%
if -11500 < y.re < 1450Initial program 49.0%
exp-diff48.2%
exp-to-pow48.2%
hypot-define48.2%
*-commutative48.2%
exp-prod47.7%
fma-define47.6%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.re around 0 79.1%
rec-exp79.1%
distribute-lft-neg-in79.1%
Simplified79.1%
if 1450 < y.re Initial program 32.7%
exp-diff24.5%
exp-to-pow24.5%
hypot-define24.5%
*-commutative24.5%
exp-prod22.4%
fma-define22.4%
hypot-define46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in y.im around 0 47.1%
Taylor expanded in y.re around 0 26.7%
unpow226.7%
unpow226.7%
hypot-undefine69.6%
Simplified69.6%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.im -1.5e+73)
(* t_2 (sin t_1))
(if (<= y.im 4e-42)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.im x.re) y.re))
(if (<= y.im 1.2e-9)
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_im <= -1.5e+73) {
tmp = t_2 * sin(t_1);
} else if (y_46_im <= 4e-42) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1.2e-9) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_1 * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_im <= -1.5e+73) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_im <= 4e-42) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 1.2e-9) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_1 * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.5e+73], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4e-42], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e-9], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{+73}:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{-42}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\end{array}
\end{array}
if y.im < -1.50000000000000005e73Initial program 54.7%
Taylor expanded in y.im around 0 68.5%
if -1.50000000000000005e73 < y.im < 4.00000000000000015e-42Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-define44.6%
*-commutative44.6%
exp-prod44.6%
fma-define44.6%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y.im around 0 62.3%
unpow262.3%
unpow262.3%
hypot-undefine83.7%
Simplified83.7%
if 4.00000000000000015e-42 < y.im < 1.2e-9Initial program 56.8%
exp-diff56.8%
exp-to-pow56.8%
hypot-define56.8%
*-commutative56.8%
exp-prod56.8%
fma-define56.8%
hypot-define64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y.im around 0 64.0%
Taylor expanded in y.re around 0 71.1%
unpow271.1%
unpow271.1%
hypot-undefine99.7%
Simplified99.7%
if 1.2e-9 < y.im Initial program 38.0%
Taylor expanded in y.im around 0 64.7%
Taylor expanded in y.re around 0 66.1%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(t_3 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(t_4 (* t_3 (sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -1.5e+73)
t_2
(if (<= y.im -1.8e-256)
t_4
(if (<= y.im 1.16e-66)
(* t_3 (sin t_1))
(if (<= y.im 1.2e-9) t_4 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0);
double t_4 = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.5e+73) {
tmp = t_2;
} else if (y_46_im <= -1.8e-256) {
tmp = t_4;
} else if (y_46_im <= 1.16e-66) {
tmp = t_3 * sin(t_1);
} else if (y_46_im <= 1.2e-9) {
tmp = t_4;
} else {
tmp = t_2;
}
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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_3 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0);
double t_4 = t_3 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.5e+73) {
tmp = t_2;
} else if (y_46_im <= -1.8e-256) {
tmp = t_4;
} else if (y_46_im <= 1.16e-66) {
tmp = t_3 * Math.sin(t_1);
} else if (y_46_im <= 1.2e-9) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_3 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0) t_4 = t_3 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -1.5e+73: tmp = t_2 elif y_46_im <= -1.8e-256: tmp = t_4 elif y_46_im <= 1.16e-66: tmp = t_3 * math.sin(t_1) elif y_46_im <= 1.2e-9: tmp = t_4 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) t_3 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) t_4 = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -1.5e+73) tmp = t_2; elseif (y_46_im <= -1.8e-256) tmp = t_4; elseif (y_46_im <= 1.16e-66) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_im <= 1.2e-9) tmp = t_4; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_3 = (hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + t_0); t_4 = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -1.5e+73) tmp = t_2; elseif (y_46_im <= -1.8e-256) tmp = t_4; elseif (y_46_im <= 1.16e-66) tmp = t_3 * sin(t_1); elseif (y_46_im <= 1.2e-9) tmp = t_4; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.5e+73], t$95$2, If[LessEqual[y$46$im, -1.8e-256], t$95$4, If[LessEqual[y$46$im, 1.16e-66], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e-9], t$95$4, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_3 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
t_4 := t\_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -1.8 \cdot 10^{-256}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq 1.16 \cdot 10^{-66}:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-9}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -1.50000000000000005e73 or 1.2e-9 < y.im Initial program 44.7%
Taylor expanded in y.im around 0 66.2%
Taylor expanded in y.re around 0 63.6%
if -1.50000000000000005e73 < y.im < -1.8000000000000001e-256 or 1.16000000000000002e-66 < y.im < 1.2e-9Initial program 40.5%
exp-diff40.5%
exp-to-pow40.5%
hypot-define40.5%
*-commutative40.5%
exp-prod40.5%
fma-define40.5%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.im around 0 76.9%
Taylor expanded in y.re around 0 41.4%
unpow241.4%
unpow241.4%
hypot-undefine83.1%
Simplified83.1%
if -1.8000000000000001e-256 < y.im < 1.16000000000000002e-66Initial program 56.0%
exp-diff56.0%
exp-to-pow56.0%
hypot-define56.0%
*-commutative56.0%
exp-prod56.0%
fma-define56.0%
hypot-define89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y.im around 0 89.2%
Taylor expanded in y.im around 0 73.5%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_4 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(t_5 (* t_4 (sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -5e+71)
(* t_3 t_2)
(if (<= y.im -2.6e-256)
t_5
(if (<= y.im 1.16e-66)
(* t_4 t_2)
(if (<= y.im 1.2e-9) t_5 (* t_1 t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_4 = pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0);
double t_5 = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -5e+71) {
tmp = t_3 * t_2;
} else if (y_46_im <= -2.6e-256) {
tmp = t_5;
} else if (y_46_im <= 1.16e-66) {
tmp = t_4 * t_2;
} else if (y_46_im <= 1.2e-9) {
tmp = t_5;
} else {
tmp = t_1 * t_3;
}
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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_4 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0);
double t_5 = t_4 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -5e+71) {
tmp = t_3 * t_2;
} else if (y_46_im <= -2.6e-256) {
tmp = t_5;
} else if (y_46_im <= 1.16e-66) {
tmp = t_4 * t_2;
} else if (y_46_im <= 1.2e-9) {
tmp = t_5;
} else {
tmp = t_1 * t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_4 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0) t_5 = t_4 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -5e+71: tmp = t_3 * t_2 elif y_46_im <= -2.6e-256: tmp = t_5 elif y_46_im <= 1.16e-66: tmp = t_4 * t_2 elif y_46_im <= 1.2e-9: tmp = t_5 else: tmp = t_1 * t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_4 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) t_5 = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -5e+71) tmp = Float64(t_3 * t_2); elseif (y_46_im <= -2.6e-256) tmp = t_5; elseif (y_46_im <= 1.16e-66) tmp = Float64(t_4 * t_2); elseif (y_46_im <= 1.2e-9) tmp = t_5; else tmp = Float64(t_1 * t_3); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_4 = (hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + t_0); t_5 = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -5e+71) tmp = t_3 * t_2; elseif (y_46_im <= -2.6e-256) tmp = t_5; elseif (y_46_im <= 1.16e-66) tmp = t_4 * t_2; elseif (y_46_im <= 1.2e-9) tmp = t_5; else tmp = t_1 * t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+71], N[(t$95$3 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, -2.6e-256], t$95$5, If[LessEqual[y$46$im, 1.16e-66], N[(t$95$4 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 1.2e-9], t$95$5, N[(t$95$1 * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_4 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
t_5 := t\_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+71}:\\
\;\;\;\;t\_3 \cdot t\_2\\
\mathbf{elif}\;y.im \leq -2.6 \cdot 10^{-256}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y.im \leq 1.16 \cdot 10^{-66}:\\
\;\;\;\;t\_4 \cdot t\_2\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-9}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_3\\
\end{array}
\end{array}
if y.im < -4.99999999999999972e71Initial program 54.5%
Taylor expanded in y.im around 0 67.7%
if -4.99999999999999972e71 < y.im < -2.6000000000000001e-256 or 1.16000000000000002e-66 < y.im < 1.2e-9Initial program 40.3%
exp-diff40.3%
exp-to-pow40.3%
hypot-define40.3%
*-commutative40.3%
exp-prod40.3%
fma-define40.3%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around 0 78.6%
Taylor expanded in y.re around 0 41.2%
unpow241.2%
unpow241.2%
hypot-undefine83.9%
Simplified83.9%
if -2.6000000000000001e-256 < y.im < 1.16000000000000002e-66Initial program 56.0%
exp-diff56.0%
exp-to-pow56.0%
hypot-define56.0%
*-commutative56.0%
exp-prod56.0%
fma-define56.0%
hypot-define89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y.im around 0 89.2%
Taylor expanded in y.im around 0 73.5%
if 1.2e-9 < y.im Initial program 38.0%
Taylor expanded in y.im around 0 64.7%
Taylor expanded in y.re around 0 66.1%
Final simplification74.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -1.25e-22)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 6.4e+97)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -1.25e-22) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 6.4e+97) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46im <= (-1.25d-22)) then
tmp = t_2 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 6.4d+97) then
tmp = t_1 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = t_2 * exp(((y_46re * log(x_46im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -1.25e-22) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 6.4e+97) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -1.25e-22: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 6.4e+97: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -1.25e-22) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 6.4e+97) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -1.25e-22) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 6.4e+97) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = t_2 * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -1.25e-22], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.4e+97], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;x.im \leq -1.25 \cdot 10^{-22}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 6.4 \cdot 10^{+97}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -1.24999999999999988e-22Initial program 45.6%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.im around -inf 67.2%
mul-1-neg67.2%
Simplified67.2%
if -1.24999999999999988e-22 < x.im < 6.40000000000000032e97Initial program 53.9%
Taylor expanded in y.im around 0 57.9%
Taylor expanded in y.re around 0 57.9%
if 6.40000000000000032e97 < x.im Initial program 16.3%
Taylor expanded in y.im around 0 42.9%
Taylor expanded in x.re around 0 65.5%
Final simplification61.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -1.05e-183)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.25e-251)
(* (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)) t_1)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.05e-183) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.25e-251) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * t_1;
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.05e-183) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.25e-251) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * t_1;
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -1.05e-183: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 2.25e-251: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * t_1 else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -1.05e-183) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.25e-251) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * t_1); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -1.05e-183) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 2.25e-251) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + t_0)) * t_1; else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.05e-183], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.25e-251], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1.05 \cdot 10^{-183}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 2.25 \cdot 10^{-251}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.0500000000000001e-183Initial program 44.7%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in x.re around -inf 63.7%
mul-1-neg63.7%
Simplified63.7%
if -1.0500000000000001e-183 < x.re < 2.24999999999999989e-251Initial program 45.5%
exp-diff39.0%
exp-to-pow39.0%
hypot-define39.0%
*-commutative39.0%
exp-prod39.0%
fma-define39.0%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 72.1%
Taylor expanded in y.im around 0 65.9%
if 2.24999999999999989e-251 < x.re Initial program 45.9%
Taylor expanded in y.im around 0 52.5%
Taylor expanded in x.re around inf 51.7%
Final simplification59.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -5e-310)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.999999999999985e-310Initial program 45.9%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in x.im around -inf 52.7%
mul-1-neg52.7%
Simplified52.7%
if -4.999999999999985e-310 < x.im Initial program 44.8%
Taylor expanded in y.im around 0 54.3%
Taylor expanded in x.re around 0 58.3%
Final simplification55.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -2e-310)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(* t_1 (exp (- (* y.re (log x.re)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-2d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -2e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -2e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -2e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.999999999999994e-310Initial program 44.1%
Taylor expanded in y.im around 0 56.6%
Taylor expanded in x.re around -inf 60.5%
mul-1-neg60.5%
Simplified60.5%
if -1.999999999999994e-310 < x.re Initial program 46.8%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in x.re around inf 51.2%
Final simplification56.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -3.4e-292)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -3.4e-292) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-3.4d-292)) then
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -3.4e-292) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -3.4e-292: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -3.4e-292) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -3.4e-292) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -3.4e-292], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{-292}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -3.40000000000000017e-292Initial program 46.9%
Taylor expanded in y.im around 0 56.5%
Taylor expanded in x.re around inf 22.3%
if -3.40000000000000017e-292 < x.im Initial program 43.7%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in x.re around 0 56.9%
Final simplification38.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
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 = sin((y_46re * atan2(x_46im, x_46re))) * exp(((y_46re * log(x_46im)) - (atan2(x_46im, x_46re) * y_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 45.3%
Taylor expanded in y.im around 0 55.2%
Taylor expanded in x.re around 0 27.1%
Final simplification27.1%
herbie shell --seed 2024059
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))