
(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 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* y.im (- (atan2 x.im x.re))))))
(t_2 (log (hypot x.im x.re))))
(if (<= y.im 8.9e-131)
(* t_1 (+ (sin t_0) (* y.im (* (cos t_0) t_2))))
(* t_1 (sin (* y.im t_2))))))
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(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= 8.9e-131) {
tmp = t_1 * (sin(t_0) + (y_46_im * (cos(t_0) * t_2)));
} else {
tmp = t_1 * sin((y_46_im * t_2));
}
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(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= 8.9e-131) tmp = Float64(t_1 * Float64(sin(t_0) + Float64(y_46_im * Float64(cos(t_0) * t_2)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * t_2))); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 8.9e-131], N[(t$95$1 * N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq 8.9 \cdot 10^{-131}:\\
\;\;\;\;t\_1 \cdot \left(\sin t\_0 + y.im \cdot \left(\cos t\_0 \cdot t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_2\right)\\
\end{array}
\end{array}
if y.im < 8.9000000000000001e-131Initial program 44.1%
cancel-sign-sub-inv44.1%
fma-define44.1%
hypot-define44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in y.im around 0 54.6%
unpow254.6%
unpow254.6%
hypot-undefine82.9%
Simplified82.9%
if 8.9000000000000001e-131 < y.im Initial program 44.4%
cancel-sign-sub-inv44.4%
fma-define44.4%
hypot-define44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in y.re around 0 49.2%
unpow249.2%
unpow249.2%
hypot-undefine87.1%
Simplified87.1%
Final simplification84.6%
(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 (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.re 3.2e+71)
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(* t_1 (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 t_1 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= 3.2e+71) {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * 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)) t_1 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= 3.2e+71) tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * 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]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 3.2e+71], 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], N[(t$95$1 * 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)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.re \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \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 < 3.20000000000000023e71Initial program 44.8%
cancel-sign-sub-inv44.8%
fma-define44.8%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
if 3.20000000000000023e71 < y.re Initial program 42.0%
cancel-sign-sub-inv42.0%
fma-define42.0%
hypot-define42.0%
distribute-lft-neg-in42.0%
distribute-rgt-neg-out42.0%
fma-define42.0%
hypot-define62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in y.re around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine72.0%
Simplified72.0%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (sin t_1))
(t_3
(*
t_2
(/
(pow (hypot x.re x.im) y.re)
(pow (exp y.im) (atan2 x.im x.re))))))
(if (<= y.im -1.9e+139)
(* t_1 (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im -1.46e+23)
t_0
(if (<= y.im -2.4e-179)
t_3
(if (<= y.im 1.6e-172)
t_0
(if (<= y.im 2.05e+68)
t_3
(* t_2 (exp (* y.im (- (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 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = sin(t_1);
double t_3 = t_2 * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.9e+139) {
tmp = t_1 * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.46e+23) {
tmp = t_0;
} else if (y_46_im <= -2.4e-179) {
tmp = t_3;
} else if (y_46_im <= 1.6e-172) {
tmp = t_0;
} else if (y_46_im <= 2.05e+68) {
tmp = t_3;
} else {
tmp = t_2 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.sin(t_1);
double t_3 = t_2 * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.9e+139) {
tmp = t_1 * Math.pow(Math.exp(-y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.46e+23) {
tmp = t_0;
} else if (y_46_im <= -2.4e-179) {
tmp = t_3;
} else if (y_46_im <= 1.6e-172) {
tmp = t_0;
} else if (y_46_im <= 2.05e+68) {
tmp = t_3;
} else {
tmp = t_2 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_2 = math.sin(t_1) t_3 = t_2 * (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -1.9e+139: tmp = t_1 * math.pow(math.exp(-y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_im <= -1.46e+23: tmp = t_0 elif y_46_im <= -2.4e-179: tmp = t_3 elif y_46_im <= 1.6e-172: tmp = t_0 elif y_46_im <= 2.05e+68: tmp = t_3 else: tmp = t_2 * math.exp((y_46_im * -math.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 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = sin(t_1) t_3 = Float64(t_2 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.9e+139) tmp = Float64(t_1 * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= -1.46e+23) tmp = t_0; elseif (y_46_im <= -2.4e-179) tmp = t_3; elseif (y_46_im <= 1.6e-172) tmp = t_0; elseif (y_46_im <= 2.05e+68) tmp = t_3; else tmp = Float64(t_2 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re); t_1 = y_46_im * log(hypot(x_46_im, x_46_re)); t_2 = sin(t_1); t_3 = t_2 * ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -1.9e+139) tmp = t_1 * (exp(-y_46_im) ^ atan2(x_46_im, x_46_re)); elseif (y_46_im <= -1.46e+23) tmp = t_0; elseif (y_46_im <= -2.4e-179) tmp = t_3; elseif (y_46_im <= 1.6e-172) tmp = t_0; elseif (y_46_im <= 2.05e+68) tmp = t_3; else tmp = t_2 * exp((y_46_im * -atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $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[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$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, -1.9e+139], N[(t$95$1 * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.46e+23], t$95$0, If[LessEqual[y$46$im, -2.4e-179], t$95$3, If[LessEqual[y$46$im, 1.6e-172], t$95$0, If[LessEqual[y$46$im, 2.05e+68], t$95$3, N[(t$95$2 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \sin t\_1\\
t_3 := t\_2 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{if}\;y.im \leq -1.9 \cdot 10^{+139}:\\
\;\;\;\;t\_1 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq -1.46 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -2.4 \cdot 10^{-179}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{-172}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 2.05 \cdot 10^{+68}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.im < -1.9e139Initial program 28.2%
cancel-sign-sub-inv28.2%
fma-define28.2%
hypot-define28.2%
distribute-lft-neg-in28.2%
distribute-rgt-neg-out28.2%
fma-define28.2%
hypot-define53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in y.re around 0 25.1%
*-commutative25.1%
unpow225.1%
unpow225.1%
hypot-undefine47.6%
neg-mul-147.6%
distribute-lft-neg-in47.6%
exp-prod47.7%
Simplified47.7%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine56.5%
Simplified56.5%
if -1.9e139 < y.im < -1.45999999999999996e23 or -2.4e-179 < y.im < 1.6000000000000001e-172Initial program 44.3%
cancel-sign-sub-inv44.3%
fma-define44.3%
hypot-define44.3%
distribute-lft-neg-in44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 55.6%
unpow255.6%
unpow255.6%
hypot-undefine71.5%
Simplified71.5%
Taylor expanded in y.re around 0 77.9%
if -1.45999999999999996e23 < y.im < -2.4e-179 or 1.6000000000000001e-172 < y.im < 2.05e68Initial program 51.2%
exp-diff51.2%
exp-to-pow51.2%
hypot-define51.6%
*-commutative51.6%
exp-prod51.6%
fma-define51.6%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.re around 0 49.5%
unpow251.8%
unpow251.8%
hypot-undefine90.0%
Simplified87.3%
if 2.05e68 < y.im Initial program 42.5%
cancel-sign-sub-inv42.5%
fma-define42.5%
hypot-define42.5%
distribute-lft-neg-in42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.re around 0 37.3%
*-commutative37.3%
unpow237.3%
unpow237.3%
hypot-undefine69.7%
neg-mul-169.7%
distribute-lft-neg-in69.7%
Simplified69.7%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -4.2e-93) (not (<= y.im 5.2e-132)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im t_0)))
(*
(+ (sin t_1) (* y.im (* (cos t_1) t_0)))
(pow (hypot x.re x.im) y.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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.2e-93) || !(y_46_im <= 5.2e-132)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_0));
} else {
tmp = (sin(t_1) + (y_46_im * (cos(t_1) * t_0))) * pow(hypot(x_46_re, x_46_im), y_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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -4.2e-93) || !(y_46_im <= 5.2e-132)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * t_0))); else tmp = Float64(Float64(sin(t_1) + Float64(y_46_im * Float64(cos(t_1) * t_0))) * (hypot(x_46_re, x_46_im) ^ y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.2e-93], N[Not[LessEqual[y$46$im, 5.2e-132]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$1], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{-93} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-132}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin t\_1 + y.im \cdot \left(\cos t\_1 \cdot t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -4.2000000000000002e-93 or 5.2000000000000002e-132 < y.im Initial program 42.8%
cancel-sign-sub-inv42.8%
fma-define42.8%
hypot-define42.8%
distribute-lft-neg-in42.8%
distribute-rgt-neg-out42.8%
fma-define42.8%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.re around 0 45.1%
unpow245.1%
unpow245.1%
hypot-undefine78.2%
Simplified78.2%
if -4.2000000000000002e-93 < y.im < 5.2000000000000002e-132Initial program 47.4%
exp-diff47.4%
exp-to-pow47.4%
hypot-define48.0%
*-commutative48.0%
exp-prod48.0%
fma-define48.0%
hypot-define92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in y.im around 0 52.3%
unpow252.2%
unpow252.2%
hypot-undefine92.2%
Simplified92.2%
Taylor expanded in y.im around 0 68.5%
+-commutative68.5%
unpow268.5%
unpow268.5%
hypot-undefine92.2%
Simplified92.2%
Final simplification82.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -5e-111) (not (<= y.im 1.56e-131)))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(pow (hypot x.re x.im) y.re)
(sin (+ (* y.re (atan2 x.im x.re)) (* y.im (cbrt (pow t_0 3.0)))))))))
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_im <= -5e-111) || !(y_46_im <= 1.56e-131)) {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * cbrt(pow(t_0, 3.0)))));
}
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_im <= -5e-111) || !(y_46_im <= 1.56e-131)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * cbrt((t_0 ^ 3.0)))))); 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[Or[LessEqual[y$46$im, -5e-111], N[Not[LessEqual[y$46$im, 1.56e-131]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $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.im \leq -5 \cdot 10^{-111} \lor \neg \left(y.im \leq 1.56 \cdot 10^{-131}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \sqrt[3]{{t\_0}^{3}}\right)\\
\end{array}
\end{array}
if y.im < -5.0000000000000003e-111 or 1.55999999999999993e-131 < y.im Initial program 43.5%
cancel-sign-sub-inv43.5%
fma-define43.5%
hypot-define43.5%
distribute-lft-neg-in43.5%
distribute-rgt-neg-out43.5%
fma-define43.5%
hypot-define74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in y.re around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine78.7%
Simplified78.7%
if -5.0000000000000003e-111 < y.im < 1.55999999999999993e-131Initial program 46.0%
add-cbrt-cube46.0%
pow346.0%
hypot-define66.8%
Applied egg-rr66.8%
Taylor expanded in y.im around 0 66.8%
+-commutative66.8%
unpow266.8%
unpow266.8%
hypot-undefine91.7%
Simplified91.7%
Final simplification82.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -4.1e-179) (not (<= y.im 2e-172)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im (log (hypot x.im x.re)))))
(* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.1e-179) || !(y_46_im <= 2e-172)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -4.1e-179) || !(y_46_im <= 2e-172)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -4.1e-179], N[Not[LessEqual[y$46$im, 2e-172]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.1 \cdot 10^{-179} \lor \neg \left(y.im \leq 2 \cdot 10^{-172}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -4.1e-179 or 2.0000000000000001e-172 < y.im Initial program 44.5%
cancel-sign-sub-inv44.5%
fma-define44.5%
hypot-define44.7%
distribute-lft-neg-in44.7%
distribute-rgt-neg-out44.7%
fma-define44.7%
hypot-define77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y.re around 0 44.7%
unpow244.7%
unpow244.7%
hypot-undefine78.0%
Simplified78.0%
if -4.1e-179 < y.im < 2.0000000000000001e-172Initial program 43.3%
cancel-sign-sub-inv43.3%
fma-define43.3%
hypot-define43.3%
distribute-lft-neg-in43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y.im around 0 56.1%
unpow256.1%
unpow256.1%
hypot-undefine79.7%
Simplified79.7%
Taylor expanded in y.re around 0 85.3%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -8e-5)
(* t_0 (sin (fabs t_1)))
(if (<= y.re 6.2e-87)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.re 12000000.0)
(*
(sin t_1)
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_0 (pow (cbrt t_1) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -8e-5) {
tmp = t_0 * sin(fabs(t_1));
} else if (y_46_re <= 6.2e-87) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 12000000.0) {
tmp = sin(t_1) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * pow(cbrt(t_1), 3.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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -8e-5) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if (y_46_re <= 6.2e-87) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 12000000.0) {
tmp = Math.sin(t_1) * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.pow(Math.cbrt(t_1), 3.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8e-5) tmp = Float64(t_0 * sin(abs(t_1))); elseif (y_46_re <= 6.2e-87) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_re <= 12000000.0) tmp = Float64(sin(t_1) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * (cbrt(t_1) ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8e-5], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e-87], 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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 12000000.0], N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$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$0 * N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -8 \cdot 10^{-5}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-87}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.re \leq 12000000:\\
\;\;\;\;\sin t\_1 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt[3]{t\_1}\right)}^{3}\\
\end{array}
\end{array}
if y.re < -8.00000000000000065e-5Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y.im around 0 84.3%
unpow284.3%
unpow284.3%
hypot-undefine84.9%
Simplified84.9%
*-commutative84.9%
add-sqr-sqrt50.0%
sqrt-unprod54.6%
pow254.6%
*-commutative54.6%
Applied egg-rr54.6%
unpow254.6%
rem-sqrt-square89.5%
Simplified89.5%
if -8.00000000000000065e-5 < y.re < 6.19999999999999995e-87Initial program 48.4%
cancel-sign-sub-inv48.4%
fma-define48.4%
hypot-define48.4%
distribute-lft-neg-in48.4%
distribute-rgt-neg-out48.4%
fma-define48.4%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 40.8%
*-commutative40.8%
unpow240.8%
unpow240.8%
hypot-undefine66.3%
neg-mul-166.3%
distribute-lft-neg-in66.3%
Simplified66.3%
if 6.19999999999999995e-87 < y.re < 1.2e7Initial program 21.4%
exp-diff21.4%
exp-to-pow21.4%
hypot-define21.4%
*-commutative21.4%
exp-prod21.4%
fma-define21.4%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 92.6%
if 1.2e7 < y.re Initial program 44.4%
cancel-sign-sub-inv44.4%
fma-define44.4%
hypot-define44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in y.im around 0 50.9%
unpow250.9%
unpow250.9%
hypot-undefine50.9%
Simplified50.9%
Taylor expanded in y.re around 0 63.6%
*-commutative63.6%
add-cube-cbrt63.6%
pow363.6%
*-commutative63.6%
Applied egg-rr63.6%
Final simplification73.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.00015)
(* t_0 (sin (fabs t_1)))
(if (<= y.re 1.7e-81)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (- (atan2 x.im x.re)))))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00015) {
tmp = t_0 * sin(fabs(t_1));
} else if (y_46_re <= 1.7e-81) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00015) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if (y_46_re <= 1.7e-81) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.00015: tmp = t_0 * math.sin(math.fabs(t_1)) elif y_46_re <= 1.7e-81: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.00015) tmp = Float64(t_0 * sin(abs(t_1))); elseif (y_46_re <= 1.7e-81) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.00015) tmp = t_0 * sin(abs(t_1)); elseif (y_46_re <= 1.7e-81) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((y_46_im * -atan2(x_46_im, x_46_re))); else tmp = t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00015], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.7e-81], 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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.00015:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-81}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.49999999999999987e-4Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y.im around 0 84.3%
unpow284.3%
unpow284.3%
hypot-undefine84.9%
Simplified84.9%
*-commutative84.9%
add-sqr-sqrt50.0%
sqrt-unprod54.6%
pow254.6%
*-commutative54.6%
Applied egg-rr54.6%
unpow254.6%
rem-sqrt-square89.5%
Simplified89.5%
if -1.49999999999999987e-4 < y.re < 1.6999999999999999e-81Initial program 48.4%
cancel-sign-sub-inv48.4%
fma-define48.4%
hypot-define48.4%
distribute-lft-neg-in48.4%
distribute-rgt-neg-out48.4%
fma-define48.4%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 40.8%
*-commutative40.8%
unpow240.8%
unpow240.8%
hypot-undefine66.3%
neg-mul-166.3%
distribute-lft-neg-in66.3%
Simplified66.3%
if 1.6999999999999999e-81 < y.re Initial program 40.3%
cancel-sign-sub-inv40.3%
fma-define40.3%
hypot-define40.3%
distribute-lft-neg-in40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y.im around 0 45.9%
unpow245.9%
unpow245.9%
hypot-undefine52.3%
Simplified52.3%
Taylor expanded in y.re around 0 62.6%
Final simplification71.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.018)
(* t_0 (sin (fabs t_1)))
(if (<= y.re 7.2e-43)
(*
(* y.im (log (hypot x.im x.re)))
(pow (exp (- y.im)) (atan2 x.im x.re)))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.018) {
tmp = t_0 * sin(fabs(t_1));
} else if (y_46_re <= 7.2e-43) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.018) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if (y_46_re <= 7.2e-43) {
tmp = (y_46_im * Math.log(Math.hypot(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 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.018: tmp = t_0 * math.sin(math.fabs(t_1)) elif y_46_re <= 7.2e-43: tmp = (y_46_im * math.log(math.hypot(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 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.018) tmp = Float64(t_0 * sin(abs(t_1))); elseif (y_46_re <= 7.2e-43) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.018) tmp = t_0 * sin(abs(t_1)); elseif (y_46_re <= 7.2e-43) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * (exp(-y_46_im) ^ atan2(x_46_im, x_46_re)); else tmp = t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.018], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.2e-43], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.018:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 7.2 \cdot 10^{-43}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -0.0179999999999999986Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine86.2%
Simplified86.2%
*-commutative86.2%
add-sqr-sqrt50.7%
sqrt-unprod55.4%
pow255.4%
*-commutative55.4%
Applied egg-rr55.4%
unpow255.4%
rem-sqrt-square90.8%
Simplified90.8%
if -0.0179999999999999986 < y.re < 7.1999999999999998e-43Initial program 45.3%
cancel-sign-sub-inv45.3%
fma-define45.3%
hypot-define45.3%
distribute-lft-neg-in45.3%
distribute-rgt-neg-out45.3%
fma-define45.3%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.re around 0 37.5%
*-commutative37.5%
unpow237.5%
unpow237.5%
hypot-undefine63.5%
neg-mul-163.5%
distribute-lft-neg-in63.5%
exp-prod62.8%
Simplified62.8%
Taylor expanded in y.im around 0 41.2%
unpow241.2%
unpow241.2%
hypot-undefine63.5%
Simplified63.5%
if 7.1999999999999998e-43 < y.re Initial program 44.1%
cancel-sign-sub-inv44.1%
fma-define44.1%
hypot-define44.1%
distribute-lft-neg-in44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 48.8%
unpow248.8%
unpow248.8%
hypot-undefine53.1%
Simplified53.1%
Taylor expanded in y.re around 0 64.9%
Final simplification70.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.00017)
(* t_0 (sin (fabs t_1)))
(if (<= y.re 2.1e-90)
(*
(* y.im (log (hypot x.im x.re)))
(pow (+ 1.0 (* y.im (+ (* y.im 0.5) -1.0))) (atan2 x.im x.re)))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00017) {
tmp = t_0 * sin(fabs(t_1));
} else if (y_46_re <= 2.1e-90) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00017) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if (y_46_re <= 2.1e-90) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), Math.atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.00017: tmp = t_0 * math.sin(math.fabs(t_1)) elif y_46_re <= 2.1e-90: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), math.atan2(x_46_im, x_46_re)) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.00017) tmp = Float64(t_0 * sin(abs(t_1))); elseif (y_46_re <= 2.1e-90) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (Float64(1.0 + Float64(y_46_im * Float64(Float64(y_46_im * 0.5) + -1.0))) ^ atan(x_46_im, x_46_re))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.00017) tmp = t_0 * sin(abs(t_1)); elseif (y_46_re <= 2.1e-90) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * ((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))) ^ atan2(x_46_im, x_46_re)); else tmp = t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00017], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e-90], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 + N[(y$46$im * N[(N[(y$46$im * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.00017:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-90}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(1 + y.im \cdot \left(y.im \cdot 0.5 + -1\right)\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.7e-4Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine86.2%
Simplified86.2%
*-commutative86.2%
add-sqr-sqrt50.7%
sqrt-unprod55.4%
pow255.4%
*-commutative55.4%
Applied egg-rr55.4%
unpow255.4%
rem-sqrt-square90.8%
Simplified90.8%
if -1.7e-4 < y.re < 2.0999999999999999e-90Initial program 47.4%
cancel-sign-sub-inv47.4%
fma-define47.4%
hypot-define47.4%
distribute-lft-neg-in47.4%
distribute-rgt-neg-out47.4%
fma-define47.4%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine65.7%
neg-mul-165.7%
distribute-lft-neg-in65.7%
exp-prod64.8%
Simplified64.8%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine64.8%
Simplified64.8%
Taylor expanded in y.im around 0 43.7%
if 2.0999999999999999e-90 < y.re Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 61.6%
Final simplification61.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.00019)
(* t_0 (fabs t_1))
(if (<= y.re 1.1e-89)
(*
(* y.im (log (hypot x.im x.re)))
(pow (+ 1.0 (* y.im (+ (* y.im 0.5) -1.0))) (atan2 x.im x.re)))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00019) {
tmp = t_0 * fabs(t_1);
} else if (y_46_re <= 1.1e-89) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.00019) {
tmp = t_0 * Math.abs(t_1);
} else if (y_46_re <= 1.1e-89) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), Math.atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.00019: tmp = t_0 * math.fabs(t_1) elif y_46_re <= 1.1e-89: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.pow((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))), math.atan2(x_46_im, x_46_re)) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.00019) tmp = Float64(t_0 * abs(t_1)); elseif (y_46_re <= 1.1e-89) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (Float64(1.0 + Float64(y_46_im * Float64(Float64(y_46_im * 0.5) + -1.0))) ^ atan(x_46_im, x_46_re))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.00019) tmp = t_0 * abs(t_1); elseif (y_46_re <= 1.1e-89) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * ((1.0 + (y_46_im * ((y_46_im * 0.5) + -1.0))) ^ atan2(x_46_im, x_46_re)); else tmp = t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00019], N[(t$95$0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-89], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 + N[(y$46$im * N[(N[(y$46$im * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.00019:\\
\;\;\;\;t\_0 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-89}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(1 + y.im \cdot \left(y.im \cdot 0.5 + -1\right)\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.9000000000000001e-4Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine86.2%
Simplified86.2%
Taylor expanded in y.re around 0 83.7%
*-commutative86.2%
add-sqr-sqrt50.7%
sqrt-unprod55.4%
pow255.4%
*-commutative55.4%
Applied egg-rr57.6%
unpow255.4%
rem-sqrt-square90.8%
Simplified88.3%
if -1.9000000000000001e-4 < y.re < 1.10000000000000006e-89Initial program 47.4%
cancel-sign-sub-inv47.4%
fma-define47.4%
hypot-define47.4%
distribute-lft-neg-in47.4%
distribute-rgt-neg-out47.4%
fma-define47.4%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine65.7%
neg-mul-165.7%
distribute-lft-neg-in65.7%
exp-prod64.8%
Simplified64.8%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine64.8%
Simplified64.8%
Taylor expanded in y.im around 0 43.7%
if 1.10000000000000006e-89 < y.re Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 61.6%
Final simplification60.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.0005)
(* t_0 (fabs t_1))
(if (<= y.re 1.82e-121)
(*
(* y.im (log (hypot x.im x.re)))
(pow (- 1.0 y.im) (atan2 x.im x.re)))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0005) {
tmp = t_0 * fabs(t_1);
} else if (y_46_re <= 1.82e-121) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow((1.0 - y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0005) {
tmp = t_0 * Math.abs(t_1);
} else if (y_46_re <= 1.82e-121) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.pow((1.0 - y_46_im), Math.atan2(x_46_im, x_46_re));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.0005: tmp = t_0 * math.fabs(t_1) elif y_46_re <= 1.82e-121: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.pow((1.0 - y_46_im), math.atan2(x_46_im, x_46_re)) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.0005) tmp = Float64(t_0 * abs(t_1)); elseif (y_46_re <= 1.82e-121) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (Float64(1.0 - y_46_im) ^ atan(x_46_im, x_46_re))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.0005) tmp = t_0 * abs(t_1); elseif (y_46_re <= 1.82e-121) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * ((1.0 - y_46_im) ^ atan2(x_46_im, x_46_re)); else tmp = t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0005], N[(t$95$0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.82e-121], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 - y$46$im), $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.0005:\\
\;\;\;\;t\_0 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 1.82 \cdot 10^{-121}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(1 - y.im\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -5.0000000000000001e-4Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine86.2%
Simplified86.2%
Taylor expanded in y.re around 0 83.7%
*-commutative86.2%
add-sqr-sqrt50.7%
sqrt-unprod55.4%
pow255.4%
*-commutative55.4%
Applied egg-rr57.6%
unpow255.4%
rem-sqrt-square90.8%
Simplified88.3%
if -5.0000000000000001e-4 < y.re < 1.81999999999999999e-121Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in y.re around 0 41.2%
*-commutative41.2%
unpow241.2%
unpow241.2%
hypot-undefine65.3%
neg-mul-165.3%
distribute-lft-neg-in65.3%
exp-prod64.4%
Simplified64.4%
Taylor expanded in y.im around 0 44.4%
unpow244.4%
unpow244.4%
hypot-undefine64.3%
Simplified64.3%
Taylor expanded in y.im around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
Simplified42.1%
if 1.81999999999999999e-121 < y.re Initial program 40.5%
cancel-sign-sub-inv40.5%
fma-define40.5%
hypot-define40.5%
distribute-lft-neg-in40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in y.im around 0 44.6%
unpow244.6%
unpow244.6%
hypot-undefine50.4%
Simplified50.4%
Taylor expanded in y.re around 0 60.0%
Final simplification59.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.6e-185)
(* (sin t_0) t_1)
(if (<= y.re 1.92e-121) (* y.im (log (hypot x.im x.re))) (* t_0 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.6e-185) {
tmp = sin(t_0) * t_1;
} else if (y_46_re <= 1.92e-121) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.6e-185) {
tmp = Math.sin(t_0) * t_1;
} else if (y_46_re <= 1.92e-121) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.6e-185: tmp = math.sin(t_0) * t_1 elif y_46_re <= 1.92e-121: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 * 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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.6e-185) tmp = Float64(sin(t_0) * t_1); elseif (y_46_re <= 1.92e-121) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -3.6e-185) tmp = sin(t_0) * t_1; elseif (y_46_re <= 1.92e-121) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.6e-185], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.92e-121], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.6 \cdot 10^{-185}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.92 \cdot 10^{-121}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -3.5999999999999998e-185Initial program 41.1%
cancel-sign-sub-inv41.1%
fma-define41.1%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y.im around 0 62.1%
unpow262.1%
unpow262.1%
hypot-undefine63.4%
Simplified63.4%
if -3.5999999999999998e-185 < y.re < 1.9199999999999999e-121Initial program 54.7%
cancel-sign-sub-inv54.7%
fma-define54.7%
hypot-define54.7%
distribute-lft-neg-in54.7%
distribute-rgt-neg-out54.7%
fma-define54.7%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.re around 0 50.2%
*-commutative50.2%
unpow250.2%
unpow250.2%
hypot-undefine73.1%
neg-mul-173.1%
distribute-lft-neg-in73.1%
exp-prod72.9%
Simplified72.9%
Taylor expanded in y.im around 0 52.4%
unpow252.4%
unpow252.4%
hypot-undefine73.1%
Simplified73.1%
Taylor expanded in y.im around 0 48.0%
if 1.9199999999999999e-121 < y.re Initial program 40.5%
cancel-sign-sub-inv40.5%
fma-define40.5%
hypot-define40.5%
distribute-lft-neg-in40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in y.im around 0 44.6%
unpow244.6%
unpow244.6%
hypot-undefine50.4%
Simplified50.4%
Taylor expanded in y.re around 0 60.0%
Final simplification58.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(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) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 44.2%
cancel-sign-sub-inv44.2%
fma-define44.2%
hypot-define44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in y.im around 0 43.9%
unpow243.9%
unpow243.9%
hypot-undefine46.4%
Simplified46.4%
Taylor expanded in y.re around 0 48.9%
herbie shell --seed 2024113
(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)))))