
(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 15 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 (* (atan2 x.im x.re) y.im))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (log (hypot x.re x.im)))
(t_3 (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_4 (* t_3 (sin (fabs t_1))))
(t_5
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_6 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.6e-20)
t_4
(if (<= y.im 0.005)
(*
(sin (fma t_2 y.im t_6))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(if (<= y.im 9.5e+56)
(* t_3 (sin t_1))
(if (<= y.im 5e+73)
(* t_5 (sin t_6))
(if (<= y.im 1.8e+176) (* t_5 (sin (fabs t_6))) t_4)))))))
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_im * log(hypot(x_46_im, x_46_re));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_4 = t_3 * sin(fabs(t_1));
double t_5 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_6 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.6e-20) {
tmp = t_4;
} else if (y_46_im <= 0.005) {
tmp = sin(fma(t_2, y_46_im, t_6)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else if (y_46_im <= 9.5e+56) {
tmp = t_3 * sin(t_1);
} else if (y_46_im <= 5e+73) {
tmp = t_5 * sin(t_6);
} else if (y_46_im <= 1.8e+176) {
tmp = t_5 * sin(fabs(t_6));
} else {
tmp = t_4;
}
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_im * log(hypot(x_46_im, x_46_re))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_4 = Float64(t_3 * sin(abs(t_1))) t_5 = 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_6 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.6e-20) tmp = t_4; elseif (y_46_im <= 0.005) tmp = Float64(sin(fma(t_2, y_46_im, t_6)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); elseif (y_46_im <= 9.5e+56) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_im <= 5e+73) tmp = Float64(t_5 * sin(t_6)); elseif (y_46_im <= 1.8e+176) tmp = Float64(t_5 * sin(abs(t_6))); else tmp = t_4; 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = 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$6 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.6e-20], t$95$4, If[LessEqual[y$46$im, 0.005], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$6), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], If[LessEqual[y$46$im, 9.5e+56], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e+73], N[(t$95$5 * N[Sin[t$95$6], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.8e+176], N[(t$95$5 * N[Sin[N[Abs[t$95$6], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_4 := t\_3 \cdot \sin \left(\left|t\_1\right|\right)\\
t_5 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_6 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{-20}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq 0.005:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_6\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+56}:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+73}:\\
\;\;\;\;t\_5 \cdot \sin t\_6\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{+176}:\\
\;\;\;\;t\_5 \cdot \sin \left(\left|t\_6\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.im < -2.59999999999999995e-20 or 1.79999999999999996e176 < y.im Initial program 44.6%
cancel-sign-sub-inv44.6%
fma-define44.6%
hypot-define44.6%
distribute-lft-neg-in44.6%
distribute-rgt-neg-out44.6%
fma-define44.6%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around inf 43.4%
unpow243.4%
unpow243.4%
hypot-undefine80.3%
Simplified80.3%
add-sqr-sqrt31.4%
sqrt-unprod30.3%
pow230.3%
Applied egg-rr30.3%
unpow230.3%
rem-sqrt-square86.3%
Simplified86.3%
if -2.59999999999999995e-20 < y.im < 0.0050000000000000001Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod49.0%
fma-define49.0%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around 0 90.1%
if 0.0050000000000000001 < y.im < 9.4999999999999997e56Initial program 68.8%
cancel-sign-sub-inv68.8%
fma-define68.8%
hypot-define68.8%
distribute-lft-neg-in68.8%
distribute-rgt-neg-out68.8%
fma-define68.8%
hypot-define93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y.im around inf 68.8%
unpow268.8%
unpow268.8%
hypot-undefine93.8%
Simplified93.8%
if 9.4999999999999997e56 < y.im < 4.99999999999999976e73Initial program 50.0%
Taylor expanded in y.im around 0 100.0%
if 4.99999999999999976e73 < y.im < 1.79999999999999996e176Initial program 37.5%
Taylor expanded in y.im around 0 62.7%
add-sqr-sqrt31.4%
sqrt-unprod68.8%
pow268.8%
Applied egg-rr68.8%
unpow268.8%
rem-sqrt-square81.4%
Simplified81.4%
Final simplification88.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re -1.55e+88)
(* t_1 (sin (fabs (* y.im (log (hypot x.im x.re))))))
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 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 t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -1.55e+88) {
tmp = t_1 * sin(fabs((y_46_im * log(hypot(x_46_im, x_46_re)))));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(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)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= -1.55e+88) tmp = Float64(t_1 * sin(abs(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))); else tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(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]}, Block[{t$95$1 = 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]}, If[LessEqual[y$46$re, -1.55e+88], N[(t$95$1 * N[Sin[N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{+88}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -1.5500000000000001e88Initial program 41.7%
cancel-sign-sub-inv41.7%
fma-define41.7%
hypot-define41.7%
distribute-lft-neg-in41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.im around inf 43.3%
unpow243.3%
unpow243.3%
hypot-undefine85.0%
Simplified85.0%
add-sqr-sqrt45.0%
sqrt-unprod60.0%
pow260.0%
Applied egg-rr60.0%
unpow260.0%
rem-sqrt-square91.7%
Simplified91.7%
if -1.5500000000000001e88 < y.re Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define49.5%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Final simplification88.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2.6e-20)
(* t_1 (sin (fabs (* y.im t_0))))
(if (<= y.im 4.1e+73)
(*
t_1
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (* t_0 (/ 1.0 y.re)))))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (fabs (* y.re (atan2 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_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2.6e-20) {
tmp = t_1 * sin(fabs((y_46_im * t_0)));
} else if (y_46_im <= 4.1e+73) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 * (1.0 / y_46_re))))));
} else {
tmp = 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))) * sin(fabs((y_46_re * atan2(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_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2.6e-20) tmp = Float64(t_1 * sin(abs(Float64(y_46_im * t_0)))); elseif (y_46_im <= 4.1e+73) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 * Float64(1.0 / y_46_re))))))); else 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(abs(Float64(y_46_re * atan(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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.6e-20], N[(t$95$1 * N[Sin[N[Abs[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.1e+73], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 * N[(1.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{-20}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|y.im \cdot t\_0\right|\right)\\
\mathbf{elif}\;y.im \leq 4.1 \cdot 10^{+73}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \left(t\_0 \cdot \frac{1}{y.re}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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} \cdot \sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right)\\
\end{array}
\end{array}
if y.im < -2.59999999999999995e-20Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around inf 39.5%
unpow239.5%
unpow239.5%
hypot-undefine82.8%
Simplified82.8%
add-sqr-sqrt26.0%
sqrt-unprod38.0%
pow238.0%
Applied egg-rr38.0%
unpow238.0%
rem-sqrt-square85.8%
Simplified85.8%
if -2.59999999999999995e-20 < y.im < 4.0999999999999998e73Initial program 51.0%
cancel-sign-sub-inv51.0%
fma-define51.0%
hypot-define51.0%
distribute-lft-neg-in51.0%
distribute-rgt-neg-out51.0%
fma-define51.0%
hypot-define90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y.re around inf 51.0%
+-commutative51.0%
associate-/l*50.3%
unpow250.3%
unpow250.3%
hypot-undefine90.1%
Simplified90.1%
clear-num89.4%
associate-/r/90.1%
Applied egg-rr90.1%
if 4.0999999999999998e73 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
add-sqr-sqrt33.4%
sqrt-unprod60.7%
pow260.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square78.9%
Simplified78.9%
Final simplification87.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2.6e-20)
(* t_1 (sin (fabs (* y.im t_0))))
(if (<= y.im 5e+74)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (fabs (* y.re (atan2 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_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2.6e-20) {
tmp = t_1 * sin(fabs((y_46_im * t_0)));
} else if (y_46_im <= 5e+74) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = 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))) * sin(fabs((y_46_re * atan2(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_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2.6e-20) tmp = Float64(t_1 * sin(abs(Float64(y_46_im * t_0)))); elseif (y_46_im <= 5e+74) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(abs(Float64(y_46_re * atan(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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.6e-20], N[(t$95$1 * N[Sin[N[Abs[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e+74], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{-20}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|y.im \cdot t\_0\right|\right)\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+74}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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} \cdot \sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right)\\
\end{array}
\end{array}
if y.im < -2.59999999999999995e-20Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around inf 39.5%
unpow239.5%
unpow239.5%
hypot-undefine82.8%
Simplified82.8%
add-sqr-sqrt26.0%
sqrt-unprod38.0%
pow238.0%
Applied egg-rr38.0%
unpow238.0%
rem-sqrt-square85.8%
Simplified85.8%
if -2.59999999999999995e-20 < y.im < 4.99999999999999963e74Initial program 51.0%
cancel-sign-sub-inv51.0%
fma-define51.0%
hypot-define51.0%
distribute-lft-neg-in51.0%
distribute-rgt-neg-out51.0%
fma-define51.0%
hypot-define90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y.re around inf 51.0%
+-commutative51.0%
associate-/l*50.3%
unpow250.3%
unpow250.3%
hypot-undefine90.1%
Simplified90.1%
if 4.99999999999999963e74 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
add-sqr-sqrt33.4%
sqrt-unprod60.7%
pow260.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square78.9%
Simplified78.9%
Final simplification87.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.im t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -4.2e+16)
(* (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im)))) (sin (fabs t_1)))
(if (<= y.re 0.000222)
(*
(/ t_3 (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.re 8e+159)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_1))
(* (sin (fma t_2 y.im (* y.re (atan2 x.im x.re)))) t_3))))))
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_im, x_46_re));
double t_1 = y_46_im * t_0;
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -4.2e+16) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fabs(t_1));
} else if (y_46_re <= 0.000222) {
tmp = (t_3 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 8e+159) {
tmp = 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))) * sin(t_1);
} else {
tmp = sin(fma(t_2, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_im * t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -4.2e+16) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(abs(t_1))); elseif (y_46_re <= 0.000222) tmp = Float64(Float64(t_3 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_re <= 8e+159) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_1)); else tmp = Float64(sin(fma(t_2, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * t_3); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e+16], N[(N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.000222], N[(N[(t$95$3 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8e+159], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$2 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.im \cdot t\_0\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+16}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 0.000222:\\
\;\;\;\;\frac{t\_3}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+159}:\\
\;\;\;\;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} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot t\_3\\
\end{array}
\end{array}
if y.re < -4.2e16Initial program 45.1%
cancel-sign-sub-inv45.1%
fma-define45.1%
hypot-define45.1%
distribute-lft-neg-in45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.im around inf 46.3%
unpow246.3%
unpow246.3%
hypot-undefine85.4%
Simplified85.4%
add-sqr-sqrt43.9%
sqrt-unprod61.0%
pow261.0%
Applied egg-rr61.0%
unpow261.0%
rem-sqrt-square89.0%
Simplified89.0%
if -4.2e16 < y.re < 2.22000000000000002e-4Initial program 49.6%
exp-diff49.6%
exp-to-pow49.6%
hypot-define49.6%
*-commutative49.6%
exp-prod49.2%
fma-define49.2%
hypot-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around inf 49.2%
unpow249.2%
unpow249.2%
hypot-undefine91.8%
associate-/l*91.8%
Simplified91.8%
if 2.22000000000000002e-4 < y.re < 7.9999999999999994e159Initial program 53.5%
Taylor expanded in y.re around 0 57.1%
unpow257.1%
unpow257.1%
hypot-undefine85.7%
Simplified85.7%
if 7.9999999999999994e159 < y.re Initial program 45.5%
exp-diff42.4%
exp-to-pow42.4%
hypot-define42.4%
*-commutative42.4%
exp-prod42.4%
fma-define42.4%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 78.8%
Final simplification88.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 (log (hypot x.re x.im)))
(t_2
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re))))))
(t_3 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.3e-223)
t_2
(if (<= y.im 0.005)
(* (sin (fma t_1 y.im t_3)) (pow (hypot x.re x.im) y.re))
(if (<= y.im 3.85e+56)
t_2
(if (<= y.im 1.1e+74) (* t_0 (sin t_3)) (* t_0 (sin (fabs t_3)))))))))
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 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.3e-223) {
tmp = t_2;
} else if (y_46_im <= 0.005) {
tmp = sin(fma(t_1, y_46_im, t_3)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 3.85e+56) {
tmp = t_2;
} else if (y_46_im <= 1.1e+74) {
tmp = t_0 * sin(t_3);
} else {
tmp = t_0 * sin(fabs(t_3));
}
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 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.3e-223) tmp = t_2; elseif (y_46_im <= 0.005) tmp = Float64(sin(fma(t_1, y_46_im, t_3)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 3.85e+56) tmp = t_2; elseif (y_46_im <= 1.1e+74) tmp = Float64(t_0 * sin(t_3)); else tmp = Float64(t_0 * sin(abs(t_3))); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(t$95$1 * y$46$re + 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]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e-223], t$95$2, If[LessEqual[y$46$im, 0.005], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.85e+56], t$95$2, If[LessEqual[y$46$im, 1.1e+74], N[(t$95$0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[Abs[t$95$3], $MachinePrecision]], $MachinePrecision]), $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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{-223}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 0.005:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_3\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 3.85 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{+74}:\\
\;\;\;\;t\_0 \cdot \sin t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_3\right|\right)\\
\end{array}
\end{array}
if y.im < -2.3e-223 or 0.0050000000000000001 < y.im < 3.85e56Initial program 46.5%
cancel-sign-sub-inv46.5%
fma-define46.5%
hypot-define46.5%
distribute-lft-neg-in46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around inf 46.5%
unpow246.5%
unpow246.5%
hypot-undefine86.0%
Simplified86.0%
if -2.3e-223 < y.im < 0.0050000000000000001Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod49.0%
fma-define49.0%
hypot-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 91.2%
if 3.85e56 < y.im < 1.1000000000000001e74Initial program 50.0%
Taylor expanded in y.im around 0 100.0%
if 1.1000000000000001e74 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
add-sqr-sqrt33.4%
sqrt-unprod60.7%
pow260.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square78.9%
Simplified78.9%
Final simplification87.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_2 (log (hypot x.re x.im)))
(t_3
(*
(exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re))))))
(t_4 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.3e-223)
t_3
(if (<= y.im 0.62)
(*
(sin (fma t_2 y.im t_4))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(if (<= y.im 1.28e+56)
t_3
(if (<= y.im 5e+73) (* t_1 (sin t_4)) (* t_1 (sin (fabs t_4)))))))))
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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.3e-223) {
tmp = t_3;
} else if (y_46_im <= 0.62) {
tmp = sin(fma(t_2, y_46_im, t_4)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else if (y_46_im <= 1.28e+56) {
tmp = t_3;
} else if (y_46_im <= 5e+73) {
tmp = t_1 * sin(t_4);
} else {
tmp = t_1 * sin(fabs(t_4));
}
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 = 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_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.3e-223) tmp = t_3; elseif (y_46_im <= 0.62) tmp = Float64(sin(fma(t_2, y_46_im, t_4)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); elseif (y_46_im <= 1.28e+56) tmp = t_3; elseif (y_46_im <= 5e+73) tmp = Float64(t_1 * sin(t_4)); else tmp = Float64(t_1 * sin(abs(t_4))); 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[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$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(t$95$2 * y$46$re + 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]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e-223], t$95$3, If[LessEqual[y$46$im, 0.62], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$4), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], If[LessEqual[y$46$im, 1.28e+56], t$95$3, If[LessEqual[y$46$im, 5e+73], N[(t$95$1 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Abs[t$95$4], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{-223}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 0.62:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_4\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\mathbf{elif}\;y.im \leq 1.28 \cdot 10^{+56}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+73}:\\
\;\;\;\;t\_1 \cdot \sin t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|t\_4\right|\right)\\
\end{array}
\end{array}
if y.im < -2.3e-223 or 0.619999999999999996 < y.im < 1.2800000000000001e56Initial program 46.5%
cancel-sign-sub-inv46.5%
fma-define46.5%
hypot-define46.5%
distribute-lft-neg-in46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around inf 46.5%
unpow246.5%
unpow246.5%
hypot-undefine86.0%
Simplified86.0%
if -2.3e-223 < y.im < 0.619999999999999996Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod49.0%
fma-define49.0%
hypot-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 91.6%
if 1.2800000000000001e56 < y.im < 4.99999999999999976e73Initial program 50.0%
Taylor expanded in y.im around 0 100.0%
if 4.99999999999999976e73 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
add-sqr-sqrt33.4%
sqrt-unprod60.7%
pow260.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square78.9%
Simplified78.9%
Final simplification87.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -3.3e+87)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im 3.5e+73)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (fabs t_0)))))))
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_im <= -3.3e+87) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3.5e+73) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = 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))) * sin(fabs(t_0));
}
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_im <= -3.3e+87) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= 3.5e+73) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(abs(t_0))); 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]}, If[LessEqual[y$46$im, -3.3e+87], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.5e+73], 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+87}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{+73}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;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} \cdot \sin \left(\left|t\_0\right|\right)\\
\end{array}
\end{array}
if y.im < -3.3000000000000001e87Initial program 37.0%
Taylor expanded in y.im around 0 69.8%
Taylor expanded in x.re around inf 43.5%
Taylor expanded in y.re around 0 78.5%
*-commutative78.5%
distribute-rgt-neg-in78.5%
mul-1-neg78.5%
exp-prod80.6%
mul-1-neg80.6%
Simplified80.6%
if -3.3000000000000001e87 < y.im < 3.50000000000000002e73Initial program 50.3%
exp-diff48.0%
exp-to-pow48.0%
hypot-define48.0%
*-commutative48.0%
exp-prod47.3%
fma-define47.3%
hypot-define82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in y.im around 0 85.8%
if 3.50000000000000002e73 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
add-sqr-sqrt33.4%
sqrt-unprod60.7%
pow260.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square78.9%
Simplified78.9%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -8e+87)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im 1e+76)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(* y.re (* (atan2 x.im x.re) (exp (* (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) {
double tmp;
if (y_46_im <= -8e+87) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 1e+76) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -8e+87) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= 1e+76) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -8e+87], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1e+76], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \cdot 10^{+87}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.im \leq 10^{+76}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.im < -7.9999999999999997e87Initial program 37.0%
Taylor expanded in y.im around 0 69.8%
Taylor expanded in x.re around inf 43.5%
Taylor expanded in y.re around 0 78.5%
*-commutative78.5%
distribute-rgt-neg-in78.5%
mul-1-neg78.5%
exp-prod80.6%
mul-1-neg80.6%
Simplified80.6%
if -7.9999999999999997e87 < y.im < 1e76Initial program 50.3%
exp-diff48.0%
exp-to-pow48.0%
hypot-define48.0%
*-commutative48.0%
exp-prod47.3%
fma-define47.3%
hypot-define82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in y.im around 0 85.8%
if 1e76 < y.im Initial program 51.5%
Taylor expanded in y.im around 0 69.8%
Taylor expanded in x.re around inf 42.5%
Taylor expanded in y.re around 0 75.9%
*-commutative75.9%
distribute-rgt-neg-in75.9%
Simplified75.9%
Final simplification83.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (- (* y.re (log x.im)) t_0)))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3 (* t_2 t_1)))
(if (<= x.im -3.3e-305)
(* t_2 (exp (- (* (log (/ -1.0 x.im)) (- y.re)) t_0)))
(if (<= x.im 2.15e-225)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= x.im 2.2e-76)
t_3
(if (<= x.im 2.05e-15)
(* t_2 (exp (- (* y.re (log x.re)) t_0)))
(if (<= x.im 1.78e+208)
(* (sin (* y.re (atan2 x.im x.re))) 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 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double tmp;
if (x_46_im <= -3.3e-305) {
tmp = t_2 * exp(((log((-1.0 / x_46_im)) * -y_46_re) - t_0));
} else if (x_46_im <= 2.15e-225) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (x_46_im <= 2.2e-76) {
tmp = t_3;
} else if (x_46_im <= 2.05e-15) {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
} else if (x_46_im <= 1.78e+208) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
} else {
tmp = 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 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double tmp;
if (x_46_im <= -3.3e-305) {
tmp = t_2 * Math.exp(((Math.log((-1.0 / x_46_im)) * -y_46_re) - t_0));
} else if (x_46_im <= 2.15e-225) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (x_46_im <= 2.2e-76) {
tmp = t_3;
} else if (x_46_im <= 2.05e-15) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else if (x_46_im <= 1.78e+208) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
} else {
tmp = 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 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = t_2 * t_1 tmp = 0 if x_46_im <= -3.3e-305: tmp = t_2 * math.exp(((math.log((-1.0 / x_46_im)) * -y_46_re) - t_0)) elif x_46_im <= 2.15e-225: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif x_46_im <= 2.2e-76: tmp = t_3 elif x_46_im <= 2.05e-15: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) elif x_46_im <= 1.78e+208: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_1 else: tmp = 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 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = Float64(t_2 * t_1) tmp = 0.0 if (x_46_im <= -3.3e-305) tmp = Float64(t_2 * exp(Float64(Float64(log(Float64(-1.0 / x_46_im)) * Float64(-y_46_re)) - t_0))); elseif (x_46_im <= 2.15e-225) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (x_46_im <= 2.2e-76) tmp = t_3; elseif (x_46_im <= 2.05e-15) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); elseif (x_46_im <= 1.78e+208) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1); else tmp = 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 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = t_2 * t_1; tmp = 0.0; if (x_46_im <= -3.3e-305) tmp = t_2 * exp(((log((-1.0 / x_46_im)) * -y_46_re) - t_0)); elseif (x_46_im <= 2.15e-225) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (x_46_im <= 2.2e-76) tmp = t_3; elseif (x_46_im <= 2.05e-15) tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0)); elseif (x_46_im <= 1.78e+208) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1; else tmp = 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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, If[LessEqual[x$46$im, -3.3e-305], N[(t$95$2 * N[Exp[N[(N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.15e-225], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e-76], t$95$3, If[LessEqual[x$46$im, 2.05e-15], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.78e+208], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log x.im - t\_0}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := t\_2 \cdot t\_1\\
\mathbf{if}\;x.im \leq -3.3 \cdot 10^{-305}:\\
\;\;\;\;t\_2 \cdot e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 2.15 \cdot 10^{-225}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-76}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.im \leq 2.05 \cdot 10^{-15}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{elif}\;x.im \leq 1.78 \cdot 10^{+208}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x.im < -3.29999999999999982e-305Initial program 43.1%
cancel-sign-sub-inv43.1%
fma-define43.1%
hypot-define43.1%
distribute-lft-neg-in43.1%
distribute-rgt-neg-out43.1%
fma-define42.3%
hypot-define84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y.im around inf 42.5%
unpow242.5%
unpow242.5%
hypot-undefine77.1%
Simplified77.1%
Taylor expanded in x.im around -inf 73.4%
+-commutative73.4%
neg-mul-173.4%
unsub-neg73.4%
mul-1-neg73.4%
*-commutative73.4%
distribute-rgt-neg-in73.4%
Simplified73.4%
if -3.29999999999999982e-305 < x.im < 2.1499999999999999e-225Initial program 62.2%
Taylor expanded in y.im around 0 75.9%
Taylor expanded in x.re around inf 50.3%
Taylor expanded in y.re around 0 71.0%
*-commutative71.0%
distribute-rgt-neg-in71.0%
Simplified71.0%
if 2.1499999999999999e-225 < x.im < 2.19999999999999999e-76 or 1.78000000000000004e208 < x.im Initial program 41.9%
cancel-sign-sub-inv41.9%
fma-define41.9%
hypot-define41.9%
distribute-lft-neg-in41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y.im around inf 35.4%
unpow235.4%
unpow235.4%
hypot-undefine77.1%
Simplified77.1%
Taylor expanded in x.re around 0 63.7%
+-commutative63.7%
neg-mul-163.7%
unsub-neg63.7%
*-commutative63.7%
Simplified63.7%
if 2.19999999999999999e-76 < x.im < 2.05000000000000018e-15Initial program 66.5%
cancel-sign-sub-inv66.5%
fma-define66.5%
hypot-define66.5%
distribute-lft-neg-in66.5%
distribute-rgt-neg-out66.5%
fma-define66.5%
hypot-define99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y.im around inf 51.1%
unpow251.1%
unpow251.1%
hypot-undefine84.4%
Simplified84.4%
Taylor expanded in x.im around 0 75.3%
+-commutative75.3%
neg-mul-175.3%
unsub-neg75.3%
Simplified75.3%
if 2.05000000000000018e-15 < x.im < 1.78000000000000004e208Initial program 60.0%
Taylor expanded in y.im around 0 70.7%
Taylor expanded in x.re around 0 78.0%
Final simplification71.8%
(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.1e-29)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 1.16)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_1)
(*
(sin (* y.im (log (hypot x.im x.re))))
(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.1e-29) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 1.16) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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.1e-29) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 1.16) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * 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.1e-29: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 1.16: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1 else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * 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.1e-29) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 1.16) 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)) * t_1); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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.1e-29) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 1.16) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1; else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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.1e-29], 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, 1.16], 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] * t$95$1), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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.1 \cdot 10^{-29}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 1.16:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.09999999999999995e-29Initial program 36.6%
Taylor expanded in y.im around 0 53.1%
Taylor expanded in x.re around -inf 66.9%
mul-1-neg66.9%
Simplified66.9%
if -1.09999999999999995e-29 < x.re < 1.15999999999999992Initial program 58.1%
Taylor expanded in y.im around 0 68.8%
if 1.15999999999999992 < x.re Initial program 42.3%
cancel-sign-sub-inv42.3%
fma-define42.3%
hypot-define42.3%
distribute-lft-neg-in42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y.im around inf 41.3%
unpow241.3%
unpow241.3%
hypot-undefine85.0%
Simplified85.0%
Taylor expanded in x.im around 0 85.0%
+-commutative85.0%
neg-mul-185.0%
unsub-neg85.0%
Simplified85.0%
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
(*
(sin (* y.re (atan2 x.im x.re)))
(exp (- (* y.re (log (- x.re))) t_0)))))
(if (<= x.re -8.5e-63)
t_1
(if (<= x.re -1.28e-213)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= x.re -1e-310)
t_1
(*
(sin (* y.im (log (hypot x.im x.re))))
(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))) * exp(((y_46_re * log(-x_46_re)) - t_0));
double tmp;
if (x_46_re <= -8.5e-63) {
tmp = t_1;
} else if (x_46_re <= -1.28e-213) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (x_46_re <= -1e-310) {
tmp = t_1;
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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))) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
double tmp;
if (x_46_re <= -8.5e-63) {
tmp = t_1;
} else if (x_46_re <= -1.28e-213) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (x_46_re <= -1e-310) {
tmp = t_1;
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * 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))) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) tmp = 0 if x_46_re <= -8.5e-63: tmp = t_1 elif x_46_re <= -1.28e-213: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif x_46_re <= -1e-310: tmp = t_1 else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * 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 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))) tmp = 0.0 if (x_46_re <= -8.5e-63) tmp = t_1; elseif (x_46_re <= -1.28e-213) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (x_46_re <= -1e-310) tmp = t_1; else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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))) * exp(((y_46_re * log(-x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -8.5e-63) tmp = t_1; elseif (x_46_re <= -1.28e-213) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (x_46_re <= -1e-310) tmp = t_1; else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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[(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$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -8.5e-63], t$95$1, If[LessEqual[x$46$re, -1.28e-213], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1e-310], t$95$1, N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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) \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{if}\;x.re \leq -8.5 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x.re \leq -1.28 \cdot 10^{-213}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -8.49999999999999969e-63 or -1.28000000000000005e-213 < x.re < -9.999999999999969e-311Initial program 38.1%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in x.re around -inf 64.7%
mul-1-neg64.7%
Simplified64.7%
if -8.49999999999999969e-63 < x.re < -1.28000000000000005e-213Initial program 55.0%
Taylor expanded in y.im around 0 56.6%
Taylor expanded in x.re around inf 0.0%
Taylor expanded in y.re around 0 47.9%
*-commutative47.9%
distribute-rgt-neg-in47.9%
Simplified47.9%
if -9.999999999999969e-311 < x.re Initial program 54.0%
cancel-sign-sub-inv54.0%
fma-define54.0%
hypot-define54.0%
distribute-lft-neg-in54.0%
distribute-rgt-neg-out54.0%
fma-define53.2%
hypot-define90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in y.im around inf 48.4%
unpow248.4%
unpow248.4%
hypot-undefine82.6%
Simplified82.6%
Taylor expanded in x.im around 0 73.1%
+-commutative73.1%
neg-mul-173.1%
unsub-neg73.1%
Simplified73.1%
Final simplification67.4%
(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 -4.1e-305)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3.8e-171)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(* 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 <= -4.1e-305) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.8e-171) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} 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 <= (-4.1d-305)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 3.8d-171) then
tmp = y_46re * (atan2(x_46im, x_46re) * (exp(y_46im) ** -atan2(x_46im, x_46re)))
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 <= -4.1e-305) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.8e-171) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
} 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 <= -4.1e-305: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3.8e-171: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) 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 <= -4.1e-305) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3.8e-171) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); 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 <= -4.1e-305) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3.8e-171) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); 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, -4.1e-305], N[(t$95$1 * 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, 3.8e-171], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $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 -4.1 \cdot 10^{-305}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 3.8 \cdot 10^{-171}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.1000000000000002e-305Initial program 43.1%
Taylor expanded in y.im around 0 58.4%
Taylor expanded in x.im around -inf 64.6%
mul-1-neg64.6%
Simplified64.6%
if -4.1000000000000002e-305 < x.im < 3.80000000000000021e-171Initial program 60.6%
Taylor expanded in y.im around 0 64.0%
Taylor expanded in x.re around inf 43.5%
Taylor expanded in y.re around 0 50.7%
*-commutative50.7%
distribute-rgt-neg-in50.7%
mul-1-neg50.7%
exp-prod56.2%
mul-1-neg56.2%
Simplified56.2%
if 3.80000000000000021e-171 < x.im Initial program 50.0%
Taylor expanded in y.im around 0 58.5%
Taylor expanded in x.re around 0 60.6%
Final simplification61.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -5e+188)
(not
(or (<= y.re -4.4e+72)
(and (not (<= y.re -6200000.0)) (<= y.re 7.5e+18)))))
(* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re))
(* y.re (* (atan2 x.im x.re) (exp (* (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) {
double tmp;
if ((y_46_re <= -5e+188) || !((y_46_re <= -4.4e+72) || (!(y_46_re <= -6200000.0) && (y_46_re <= 7.5e+18)))) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
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) :: tmp
if ((y_46re <= (-5d+188)) .or. (.not. (y_46re <= (-4.4d+72)) .or. (.not. (y_46re <= (-6200000.0d0))) .and. (y_46re <= 7.5d+18))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
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 tmp;
if ((y_46_re <= -5e+188) || !((y_46_re <= -4.4e+72) || (!(y_46_re <= -6200000.0) && (y_46_re <= 7.5e+18)))) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -5e+188) or not ((y_46_re <= -4.4e+72) or (not (y_46_re <= -6200000.0) and (y_46_re <= 7.5e+18))): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -5e+188) || !((y_46_re <= -4.4e+72) || (!(y_46_re <= -6200000.0) && (y_46_re <= 7.5e+18)))) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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 <= -5e+188) || ~(((y_46_re <= -4.4e+72) || (~((y_46_re <= -6200000.0)) && (y_46_re <= 7.5e+18))))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -5e+188], N[Not[Or[LessEqual[y$46$re, -4.4e+72], And[N[Not[LessEqual[y$46$re, -6200000.0]], $MachinePrecision], LessEqual[y$46$re, 7.5e+18]]]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5 \cdot 10^{+188} \lor \neg \left(y.re \leq -4.4 \cdot 10^{+72} \lor \neg \left(y.re \leq -6200000\right) \land y.re \leq 7.5 \cdot 10^{+18}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -5.0000000000000001e188 or -4.4e72 < y.re < -6.2e6 or 7.5e18 < y.re Initial program 46.8%
Taylor expanded in y.im around 0 74.8%
Taylor expanded in x.re around inf 35.2%
Taylor expanded in y.im around 0 61.5%
if -5.0000000000000001e188 < y.re < -4.4e72 or -6.2e6 < y.re < 7.5e18Initial program 49.0%
Taylor expanded in y.im around 0 47.3%
Taylor expanded in x.re around inf 27.9%
Taylor expanded in y.re around 0 53.9%
*-commutative53.9%
distribute-rgt-neg-in53.9%
Simplified53.9%
Final simplification57.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)))
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))) * pow(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
code = sin((y_46re * atan2(x_46im, x_46re))) * (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) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
}
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.pow(x_46_re, y_46_re)
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))) * (x_46_re ^ y_46_re)) 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))) * (x_46_re ^ y_46_re); 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[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}
\end{array}
Initial program 48.1%
Taylor expanded in y.im around 0 59.2%
Taylor expanded in x.re around inf 31.1%
Taylor expanded in y.im around 0 36.2%
Final simplification36.2%
herbie shell --seed 2024080
(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)))))