
(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 20 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
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.re x.im))))
(if (<= y.re -1.7e+176)
(* t_1 (sin (* (atan2 x.im x.re) (fabs y.re))))
(if (<= y.re 0.002)
(*
(exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_2 y.im t_0)))
(* t_1 (+ (sin t_0) (* y.im (* (log (hypot x.im x.re)) (cos 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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1.7e+176) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * fabs(y_46_re)));
} else if (y_46_re <= 0.002) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_2, y_46_im, t_0));
} else {
tmp = t_1 * (sin(t_0) + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1.7e+176) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * abs(y_46_re)))); elseif (y_46_re <= 0.002) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_2, y_46_im, t_0))); else tmp = Float64(t_1 * Float64(sin(t_0) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * cos(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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.7e+176], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Abs[y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.002], 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[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1.7 \cdot 10^{+176}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left|y.re\right|\right)\\
\mathbf{elif}\;y.re \leq 0.002:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sin t\_0 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -1.70000000000000007e176Initial program 33.3%
add-sqr-sqrt20.0%
sqrt-unprod10.0%
pow210.0%
*-commutative10.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square40.0%
Simplified40.0%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
fabs-mul76.7%
rem-square-sqrt40.0%
fabs-sqr40.0%
rem-square-sqrt90.0%
Simplified90.0%
if -1.70000000000000007e176 < y.re < 2e-3Initial program 41.1%
cancel-sign-sub-inv41.1%
fma-define41.1%
hypot-define41.1%
distribute-lft-neg-in41.1%
distribute-rgt-neg-out41.1%
fma-define41.1%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
if 2e-3 < y.re Initial program 32.9%
Taylor expanded in y.im around 0 68.6%
*-commutative68.6%
unpow268.6%
unpow268.6%
hypot-undefine70.0%
Simplified70.0%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.re x.im))))
(if (<= y.re -1.9e+177)
(* t_1 (sin (* (atan2 x.im x.re) (fabs y.re))))
(if (<= y.re 5e-26)
(*
(exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_2 y.im t_0)))
(* t_1 (sin (+ t_0 (* y.im (pow (cbrt t_2) 3.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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1.9e+177) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * fabs(y_46_re)));
} else if (y_46_re <= 5e-26) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_2, y_46_im, t_0));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * pow(cbrt(t_2), 3.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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1.9e+177) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * abs(y_46_re)))); elseif (y_46_re <= 5e-26) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_2, y_46_im, t_0))); else tmp = Float64(t_1 * sin(Float64(t_0 + Float64(y_46_im * (cbrt(t_2) ^ 3.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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.9e+177], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Abs[y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e-26], 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[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1.9 \cdot 10^{+177}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left|y.re\right|\right)\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{-26}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + y.im \cdot {\left(\sqrt[3]{t\_2}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1.8999999999999999e177Initial program 33.3%
add-sqr-sqrt20.0%
sqrt-unprod10.0%
pow210.0%
*-commutative10.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square40.0%
Simplified40.0%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
fabs-mul76.7%
rem-square-sqrt40.0%
fabs-sqr40.0%
rem-square-sqrt90.0%
Simplified90.0%
if -1.8999999999999999e177 < y.re < 5.00000000000000019e-26Initial program 41.4%
cancel-sign-sub-inv41.4%
fma-define41.4%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define41.3%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
if 5.00000000000000019e-26 < y.re Initial program 32.4%
hypot-define62.0%
add-cube-cbrt69.0%
pow369.0%
Applied egg-rr69.0%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.re x.im))))
(if (<= y.re -5e+176)
(* t_1 (sin (* (atan2 x.im x.re) (fabs y.re))))
(if (<= y.re 1e+71)
(*
(exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_2 y.im t_0)))
(* t_1 (sin (+ t_0 (fabs (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -5e+176) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * fabs(y_46_re)));
} else if (y_46_re <= 1e+71) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_2, y_46_im, t_0));
} else {
tmp = t_1 * sin((t_0 + fabs((y_46_im * log(hypot(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -5e+176) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * abs(y_46_re)))); elseif (y_46_re <= 1e+71) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_2, y_46_im, t_0))); else tmp = Float64(t_1 * sin(Float64(t_0 + abs(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5e+176], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Abs[y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e+71], 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[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{+176}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left|y.re\right|\right)\\
\mathbf{elif}\;y.re \leq 10^{+71}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + \left|y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\end{array}
\end{array}
if y.re < -5e176Initial program 33.3%
add-sqr-sqrt20.0%
sqrt-unprod10.0%
pow210.0%
*-commutative10.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square40.0%
Simplified40.0%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
fabs-mul76.7%
rem-square-sqrt40.0%
fabs-sqr40.0%
rem-square-sqrt90.0%
Simplified90.0%
if -5e176 < y.re < 1e71Initial program 40.2%
cancel-sign-sub-inv40.2%
fma-define40.2%
hypot-define40.2%
distribute-lft-neg-in40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
if 1e71 < y.re Initial program 32.7%
add-sqr-sqrt22.4%
sqrt-unprod28.6%
pow228.6%
*-commutative28.6%
hypot-define51.0%
Applied egg-rr51.0%
unpow251.0%
rem-sqrt-square67.4%
*-commutative67.4%
hypot-undefine40.8%
unpow240.8%
unpow240.8%
+-commutative40.8%
unpow240.8%
unpow240.8%
hypot-undefine67.4%
Simplified67.4%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.35e+26)
(* t_1 (sin (* (atan2 x.im x.re) (fabs y.re))))
(if (<= y.re 9.6e+70)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_1 (sin (+ (* y.re (atan2 x.im x.re)) (fabs (* y.im t_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_im, x_46_re));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.35e+26) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * fabs(y_46_re)));
} else if (y_46_re <= 9.6e+70) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / 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 {
tmp = t_1 * sin(((y_46_re * atan2(x_46_im, x_46_re)) + fabs((y_46_im * 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.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.35e+26) {
tmp = t_1 * Math.sin((Math.atan2(x_46_im, x_46_re) * Math.abs(y_46_re)));
} else if (y_46_re <= 9.6e+70) {
tmp = (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))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * Math.sin(((y_46_re * Math.atan2(x_46_im, x_46_re)) + Math.abs((y_46_im * t_0))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_re <= -1.35e+26: tmp = t_1 * math.sin((math.atan2(x_46_im, x_46_re) * math.fabs(y_46_re))) elif y_46_re <= 9.6e+70: tmp = (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))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) else: tmp = t_1 * math.sin(((y_46_re * math.atan2(x_46_im, x_46_re)) + math.fabs((y_46_im * t_0)))) 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(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.35e+26) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * abs(y_46_re)))); elseif (y_46_re <= 9.6e+70) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (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)))))); else tmp = Float64(t_1 * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + abs(Float64(y_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 = log(hypot(x_46_im, x_46_re)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_re <= -1.35e+26) tmp = t_1 * sin((atan2(x_46_im, x_46_re) * abs(y_46_re))); elseif (y_46_re <= 9.6e+70) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (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 tmp = t_1 * sin(((y_46_re * atan2(x_46_im, x_46_re)) + abs((y_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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.35e+26], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Abs[y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.6e+70], N[(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] * 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], N[(t$95$1 * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[Abs[N[(y$46$im * t$95$0), $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^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.35 \cdot 10^{+26}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left|y.re\right|\right)\\
\mathbf{elif}\;y.re \leq 9.6 \cdot 10^{+70}:\\
\;\;\;\;\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}}} \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{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left|y.im \cdot t\_0\right|\right)\\
\end{array}
\end{array}
if y.re < -1.35e26Initial program 28.8%
add-sqr-sqrt16.9%
sqrt-unprod15.3%
pow215.3%
*-commutative15.3%
Applied egg-rr15.3%
unpow215.3%
rem-sqrt-square30.5%
Simplified30.5%
Taylor expanded in y.im around 0 73.0%
*-commutative73.0%
fabs-mul73.0%
rem-square-sqrt35.6%
fabs-sqr35.6%
rem-square-sqrt83.1%
Simplified83.1%
if -1.35e26 < y.re < 9.59999999999999947e70Initial program 43.3%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod41.9%
fma-define41.8%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around inf 41.8%
unpow241.8%
unpow241.8%
hypot-undefine84.0%
associate-/l*84.6%
Simplified84.6%
if 9.59999999999999947e70 < y.re Initial program 32.7%
add-sqr-sqrt22.4%
sqrt-unprod28.6%
pow228.6%
*-commutative28.6%
hypot-define51.0%
Applied egg-rr51.0%
unpow251.0%
rem-sqrt-square67.4%
*-commutative67.4%
hypot-undefine40.8%
unpow240.8%
unpow240.8%
+-commutative40.8%
unpow240.8%
unpow240.8%
hypot-undefine67.4%
Simplified67.4%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -7.5e+29)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* (atan2 x.im x.re) (fabs y.re))))
(if (<= y.re 5.6e+64)
(*
(/ t_1 (pow (exp y.im) (atan2 x.im x.re)))
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im))))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ t_1 (+ 1.0 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 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -7.5e+29) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((atan2(x_46_im, x_46_re) * fabs(y_46_re)));
} else if (y_46_re <= 5.6e+64) {
tmp = (t_1 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (t_1 / (1.0 + 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 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -7.5e+29) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(atan(x_46_im, x_46_re) * abs(y_46_re)))); elseif (y_46_re <= 5.6e+64) tmp = Float64(Float64(t_1 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else 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)))) * Float64(t_1 / Float64(1.0 + t_0))); 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -7.5e+29], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Abs[y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.6e+64], N[(N[(t$95$1 / 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[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[(t$95$1 / N[(1.0 + 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 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{+29}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left|y.re\right|\right)\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{+64}:\\
\;\;\;\;\frac{t\_1}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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 \frac{t\_1}{1 + t\_0}\\
\end{array}
\end{array}
if y.re < -7.49999999999999945e29Initial program 28.8%
add-sqr-sqrt16.9%
sqrt-unprod15.3%
pow215.3%
*-commutative15.3%
Applied egg-rr15.3%
unpow215.3%
rem-sqrt-square30.5%
Simplified30.5%
Taylor expanded in y.im around 0 73.0%
*-commutative73.0%
fabs-mul73.0%
rem-square-sqrt35.6%
fabs-sqr35.6%
rem-square-sqrt83.1%
Simplified83.1%
if -7.49999999999999945e29 < y.re < 5.60000000000000047e64Initial program 43.5%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod42.0%
fma-define42.0%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y.im around inf 42.0%
unpow242.0%
unpow242.0%
hypot-undefine85.1%
associate-/l*85.7%
Simplified85.7%
if 5.60000000000000047e64 < y.re Initial program 32.7%
exp-diff30.8%
exp-to-pow30.8%
hypot-define30.8%
*-commutative30.8%
exp-prod26.9%
fma-define26.9%
hypot-define46.2%
*-commutative46.2%
Simplified46.2%
Taylor expanded in y.im around 0 57.8%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -0.0012)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 9.5e+76)
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_1)))
(/ (sin (* y.im t_0)) (pow (pow E 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 = log(hypot(x_46_re, x_46_im));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -0.0012) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 9.5e+76) {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_1));
} else {
tmp = sin((y_46_im * t_0)) / pow(pow(((double) M_E), y_46_im), 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 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -0.0012) 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_1)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 9.5e+76) tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_1))); else tmp = Float64(sin(Float64(y_46_im * t_0)) / ((exp(1) ^ y_46_im) ^ 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -0.0012], 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$1), $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], If[LessEqual[y$46$im, 9.5e+76], N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] / N[Power[N[Power[E, y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -0.0012:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+76}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot t\_0\right)}{{\left({e}^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -0.00119999999999999989Initial program 31.0%
Taylor expanded in y.re around 0 35.8%
*-commutative35.8%
unpow235.8%
unpow235.8%
hypot-undefine55.4%
Simplified55.4%
if -0.00119999999999999989 < y.im < 9.5000000000000003e76Initial program 40.7%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.4%
fma-define39.4%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.im around 0 88.6%
if 9.5000000000000003e76 < y.im Initial program 38.1%
exp-diff33.4%
exp-to-pow33.4%
hypot-define33.4%
*-commutative33.4%
exp-prod33.4%
fma-define33.4%
hypot-define50.1%
*-commutative50.1%
Simplified50.1%
*-un-lft-identity50.1%
exp-prod50.1%
Applied egg-rr50.1%
exp-1-e50.1%
Simplified50.1%
Taylor expanded in y.re around 0 40.6%
+-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine66.9%
exp-to-pow66.9%
Simplified66.9%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.re -1.1e-19)
(*
(exp (- (* y.re (log (- x.re))) t_1))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 5.6e-201)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (+ t_0 (* y.im (log 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);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.1e-19) {
tmp = exp(((y_46_re * log(-x_46_re)) - t_1)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 5.6e-201) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_0 + (y_46_im * log(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);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.1e-19) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_1)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 5.6e-201) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_0 + (y_46_im * Math.log(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) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_re <= -1.1e-19: tmp = math.exp(((y_46_re * math.log(-x_46_re)) - t_1)) * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= 5.6e-201: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_1)) * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= -1.1e-19) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_1)) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 5.6e-201) 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_1)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_0 + Float64(y_46_im * log(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); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_re <= -1.1e-19) tmp = exp(((y_46_re * log(-x_46_re)) - t_1)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= 5.6e-201) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_0 + (y_46_im * log(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -1.1e-19], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.6e-201], 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$1), $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[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq -1.1 \cdot 10^{-19}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t\_1} \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 5.6 \cdot 10^{-201}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.0999999999999999e-19Initial program 29.2%
cancel-sign-sub-inv29.2%
fma-define29.2%
hypot-define29.2%
distribute-lft-neg-in29.2%
distribute-rgt-neg-out29.2%
fma-define29.2%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in x.re around -inf 80.2%
+-commutative80.2%
neg-mul-180.2%
unsub-neg80.2%
mul-1-neg80.2%
distribute-rgt-neg-in80.2%
+-commutative80.2%
mul-1-neg80.2%
unsub-neg80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in x.re around -inf 80.2%
neg-mul-180.2%
log-rec80.2%
associate-/r/80.2%
metadata-eval80.2%
neg-mul-180.2%
Simplified80.2%
if -1.0999999999999999e-19 < x.re < 5.5999999999999998e-201Initial program 44.6%
Taylor expanded in y.re around 0 44.0%
*-commutative44.0%
unpow244.0%
unpow244.0%
hypot-undefine64.4%
Simplified64.4%
if 5.5999999999999998e-201 < x.re Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x.im around 0 72.5%
Final simplification71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.re -1.95e-45)
(*
(exp (- (* y.re (log (- x.re))) t_1))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -3.7e-175)
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= x.re 3.1e-273)
(*
(sin t_0)
(/
(pow (hypot x.re x.im) y.re)
(pow (pow E y.im) (atan2 x.im x.re))))
(if (<= x.re 3.7e-60)
(*
(sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0))))
(pow (hypot x.im x.re) y.re))
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (+ t_0 (* y.im (log 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);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.95e-45) {
tmp = exp(((y_46_re * log(-x_46_re)) - t_1)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -3.7e-175) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (x_46_re <= 3.1e-273) {
tmp = sin(t_0) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(pow(((double) M_E), y_46_im), atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 3.7e-60) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_0 + (y_46_im * log(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);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.95e-45) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_1)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -3.7e-175) {
tmp = Math.sin((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 if (x_46_re <= 3.1e-273) {
tmp = Math.sin(t_0) * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.pow(Math.E, y_46_im), Math.atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 3.7e-60) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= -1.95e-45) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_1)) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -3.7e-175) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (x_46_re <= 3.1e-273) tmp = Float64(sin(t_0) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / ((exp(1) ^ y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (x_46_re <= 3.7e-60) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_0 + Float64(y_46_im * log(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -1.95e-45], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3.7e-175], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.1e-273], N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Power[E, y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.7e-60], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq -1.95 \cdot 10^{-45}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t\_1} \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-175}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq 3.1 \cdot 10^{-273}:\\
\;\;\;\;\sin t\_0 \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{elif}\;x.re \leq 3.7 \cdot 10^{-60}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.95e-45Initial program 31.0%
cancel-sign-sub-inv31.0%
fma-define31.0%
hypot-define31.0%
distribute-lft-neg-in31.0%
distribute-rgt-neg-out31.0%
fma-define31.0%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in x.re around -inf 75.9%
+-commutative75.9%
neg-mul-175.9%
unsub-neg75.9%
mul-1-neg75.9%
distribute-rgt-neg-in75.9%
+-commutative75.9%
mul-1-neg75.9%
unsub-neg75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in x.re around -inf 75.9%
neg-mul-175.9%
log-rec75.9%
associate-/r/75.9%
metadata-eval75.9%
neg-mul-175.9%
Simplified75.9%
if -1.95e-45 < x.re < -3.69999999999999998e-175Initial program 55.5%
cancel-sign-sub-inv55.5%
fma-define55.5%
hypot-define55.5%
distribute-lft-neg-in55.5%
distribute-rgt-neg-out55.5%
fma-define55.5%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y.re around 0 44.6%
neg-mul-144.6%
distribute-rgt-neg-in44.6%
mul-1-neg44.6%
exp-prod44.7%
mul-1-neg44.7%
*-commutative44.7%
unpow244.7%
unpow244.7%
hypot-undefine63.3%
Simplified63.3%
if -3.69999999999999998e-175 < x.re < 3.09999999999999988e-273Initial program 34.3%
exp-diff34.3%
exp-to-pow34.3%
hypot-define34.3%
*-commutative34.3%
exp-prod34.3%
fma-define34.3%
hypot-define80.4%
*-commutative80.4%
Simplified80.4%
*-un-lft-identity80.4%
exp-prod80.4%
Applied egg-rr80.4%
exp-1-e80.4%
Simplified80.4%
Taylor expanded in y.im around 0 69.3%
if 3.09999999999999988e-273 < x.re < 3.70000000000000025e-60Initial program 45.8%
cancel-sign-sub-inv45.8%
fma-define45.8%
hypot-define45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-out45.8%
fma-define45.8%
hypot-define75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in y.im around 0 55.3%
unpow255.3%
unpow255.3%
hypot-undefine60.2%
Simplified60.2%
add-cbrt-cube66.1%
pow366.1%
Applied egg-rr66.1%
if 3.70000000000000025e-60 < x.re Initial program 34.9%
cancel-sign-sub-inv34.9%
fma-define34.9%
hypot-define34.9%
distribute-lft-neg-in34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in x.im around 0 76.7%
Final simplification72.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.re -1.06e-45)
(*
(exp (- (* y.re (log (- x.re))) t_1))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 24500000000.0)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin t_0))
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (+ t_0 (* y.im (log 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);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.06e-45) {
tmp = exp(((y_46_re * log(-x_46_re)) - t_1)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 24500000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(t_0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_0 + (y_46_im * log(x_46_re))));
}
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 = y_46re * atan2(x_46im, x_46re)
t_1 = atan2(x_46im, x_46re) * y_46im
if (x_46re <= (-1.06d-45)) then
tmp = exp(((y_46re * log(-x_46re)) - t_1)) * sin((t_0 - (y_46im * log(((-1.0d0) / x_46re)))))
else if (x_46re <= 24500000000.0d0) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_1)) * sin(t_0)
else
tmp = exp(((y_46re * log(x_46re)) - t_1)) * sin((t_0 + (y_46im * log(x_46re))))
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -1.06e-45) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_1)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 24500000000.0) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * Math.sin(t_0);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_0 + (y_46_im * Math.log(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) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_re <= -1.06e-45: tmp = math.exp(((y_46_re * math.log(-x_46_re)) - t_1)) * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= 24500000000.0: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * math.sin(t_0) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_1)) * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= -1.06e-45) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_1)) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 24500000000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * sin(t_0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_0 + Float64(y_46_im * log(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); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_re <= -1.06e-45) tmp = exp(((y_46_re * log(-x_46_re)) - t_1)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= 24500000000.0) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(t_0); else tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_0 + (y_46_im * log(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -1.06e-45], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 24500000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq -1.06 \cdot 10^{-45}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t\_1} \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 24500000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.06000000000000004e-45Initial program 32.0%
cancel-sign-sub-inv32.0%
fma-define32.0%
hypot-define32.0%
distribute-lft-neg-in32.0%
distribute-rgt-neg-out32.0%
fma-define32.0%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in x.re around -inf 76.2%
+-commutative76.2%
neg-mul-176.2%
unsub-neg76.2%
mul-1-neg76.2%
distribute-rgt-neg-in76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in x.re around -inf 76.2%
neg-mul-176.2%
log-rec76.2%
associate-/r/76.2%
metadata-eval76.2%
neg-mul-176.2%
Simplified76.2%
if -1.06000000000000004e-45 < x.re < 2.45e10Initial program 46.9%
Taylor expanded in y.im around 0 59.7%
if 2.45e10 < x.re Initial program 28.5%
cancel-sign-sub-inv28.5%
fma-define28.5%
hypot-define28.5%
distribute-lft-neg-in28.5%
distribute-rgt-neg-out28.5%
fma-define28.5%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x.im around 0 75.9%
Final simplification68.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.4e-9)
(* (pow (hypot x.im x.re) y.re) (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 5e-26)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin 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_re <= -4.4e-9) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 5e-26) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} 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(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.4e-9) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 5e-26) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(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_re <= -4.4e-9) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 5e-26) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); 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(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$re, -4.4e-9], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e-26], 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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[t$95$0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.4 \cdot 10^{-9}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{-26}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\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 t\_0\\
\end{array}
\end{array}
if y.re < -4.3999999999999997e-9Initial program 29.4%
cancel-sign-sub-inv29.4%
fma-define29.4%
hypot-define29.4%
distribute-lft-neg-in29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around 0 72.2%
unpow272.2%
unpow272.2%
hypot-undefine73.3%
Simplified73.3%
*-commutative73.3%
add-cube-cbrt82.1%
pow382.1%
*-commutative82.1%
Applied egg-rr82.1%
if -4.3999999999999997e-9 < y.re < 5.00000000000000019e-26Initial program 46.2%
cancel-sign-sub-inv46.2%
fma-define46.2%
hypot-define46.2%
distribute-lft-neg-in46.2%
distribute-rgt-neg-out46.2%
fma-define46.2%
hypot-define87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in y.re around 0 34.4%
neg-mul-134.4%
distribute-lft-neg-in34.4%
*-commutative34.4%
unpow234.4%
unpow234.4%
hypot-undefine66.1%
Simplified66.1%
if 5.00000000000000019e-26 < y.re Initial program 32.4%
Taylor expanded in y.im around 0 55.0%
Final simplification67.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.95e-7)
(* t_0 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0)))
(if (<= y.re 3.8e-20)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (* y.re (log1p (expm1 (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.95e-7) {
tmp = t_0 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
} else if (y_46_re <= 3.8e-20) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin((y_46_re * log1p(expm1(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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.95e-7) {
tmp = t_0 * Math.sin(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0));
} else if (y_46_re <= 3.8e-20) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.log1p(Math.expm1(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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.95e-7) tmp = Float64(t_0 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))); elseif (y_46_re <= 3.8e-20) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * log1p(expm1(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.95e-7], N[(t$95$0 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8e-20], 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.95 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{-20}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.95000000000000012e-7Initial program 29.4%
cancel-sign-sub-inv29.4%
fma-define29.4%
hypot-define29.4%
distribute-lft-neg-in29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around 0 72.2%
unpow272.2%
unpow272.2%
hypot-undefine73.3%
Simplified73.3%
*-commutative73.3%
add-cube-cbrt82.1%
pow382.1%
*-commutative82.1%
Applied egg-rr82.1%
if -1.95000000000000012e-7 < y.re < 3.7999999999999998e-20Initial program 45.8%
cancel-sign-sub-inv45.8%
fma-define45.8%
hypot-define45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-out45.8%
fma-define45.8%
hypot-define87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y.re around 0 34.1%
neg-mul-134.1%
distribute-lft-neg-in34.1%
*-commutative34.1%
unpow234.1%
unpow234.1%
hypot-undefine66.4%
Simplified66.4%
if 3.7999999999999998e-20 < y.re Initial program 32.9%
cancel-sign-sub-inv32.9%
fma-define32.9%
hypot-define32.9%
distribute-lft-neg-in32.9%
distribute-rgt-neg-out32.9%
fma-define32.9%
hypot-define62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in y.im around 0 50.2%
unpow250.2%
unpow250.2%
hypot-undefine50.2%
Simplified50.2%
log1p-expm1-u51.6%
Applied egg-rr51.6%
Final simplification66.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -0.0036)
(* (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))) t_0)
(if (<= y.re 0.00195)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (* y.re (log1p (expm1 (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.0036) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 0.00195) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin((y_46_re * log1p(expm1(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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.0036) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 0.00195) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.log1p(Math.expm1(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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -0.0036) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * t_0); elseif (y_46_re <= 0.00195) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * log1p(expm1(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -0.0036], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.00195], 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.0036:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 0.00195:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -0.0035999999999999999Initial program 29.4%
cancel-sign-sub-inv29.4%
fma-define29.4%
hypot-define29.4%
distribute-lft-neg-in29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around 0 72.2%
unpow272.2%
unpow272.2%
hypot-undefine73.3%
Simplified73.3%
add-cbrt-cube79.1%
pow377.7%
Applied egg-rr77.7%
if -0.0035999999999999999 < y.re < 0.0019499999999999999Initial program 45.8%
cancel-sign-sub-inv45.8%
fma-define45.8%
hypot-define45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-out45.8%
fma-define45.8%
hypot-define87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y.re around 0 34.1%
neg-mul-134.1%
distribute-lft-neg-in34.1%
*-commutative34.1%
unpow234.1%
unpow234.1%
hypot-undefine66.4%
Simplified66.4%
if 0.0019499999999999999 < y.re Initial program 32.9%
cancel-sign-sub-inv32.9%
fma-define32.9%
hypot-define32.9%
distribute-lft-neg-in32.9%
distribute-rgt-neg-out32.9%
fma-define32.9%
hypot-define62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in y.im around 0 50.2%
unpow250.2%
unpow250.2%
hypot-undefine50.2%
Simplified50.2%
log1p-expm1-u51.6%
Applied egg-rr51.6%
Final simplification65.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.75e-9)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 4.2e-9)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (* y.re (log1p (expm1 (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.75e-9) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 4.2e-9) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin((y_46_re * log1p(expm1(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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.75e-9) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 4.2e-9) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.log1p(Math.expm1(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 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1.75e-9: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 4.2e-9: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = t_0 * math.sin((y_46_re * math.log1p(math.expm1(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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.75e-9) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 4.2e-9) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * log1p(expm1(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.75e-9], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 4.2e-9], 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.75 \cdot 10^{-9}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.75e-9Initial program 29.4%
cancel-sign-sub-inv29.4%
fma-define29.4%
hypot-define29.4%
distribute-lft-neg-in29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around 0 72.2%
unpow272.2%
unpow272.2%
hypot-undefine73.3%
Simplified73.3%
if -1.75e-9 < y.re < 4.20000000000000039e-9Initial program 45.8%
cancel-sign-sub-inv45.8%
fma-define45.8%
hypot-define45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-out45.8%
fma-define45.8%
hypot-define87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y.re around 0 34.1%
neg-mul-134.1%
distribute-lft-neg-in34.1%
*-commutative34.1%
unpow234.1%
unpow234.1%
hypot-undefine66.4%
Simplified66.4%
if 4.20000000000000039e-9 < y.re Initial program 32.9%
cancel-sign-sub-inv32.9%
fma-define32.9%
hypot-define32.9%
distribute-lft-neg-in32.9%
distribute-rgt-neg-out32.9%
fma-define32.9%
hypot-define62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in y.im around 0 50.2%
unpow250.2%
unpow250.2%
hypot-undefine50.2%
Simplified50.2%
log1p-expm1-u51.6%
Applied egg-rr51.6%
Final simplification64.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -0.00072) (not (<= y.re 52000.0)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(sin (* y.im (log (hypot 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 <= -0.00072) || !(y_46_re <= 52000.0)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.00072) || !(y_46_re <= 52000.0)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(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 <= -0.00072) or not (y_46_re <= 52000.0): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(math.hypot(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 <= -0.00072) || !(y_46_re <= 52000.0)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(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 <= -0.00072) || ~((y_46_re <= 52000.0))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(hypot(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, -0.00072], N[Not[LessEqual[y$46$re, 52000.0]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.00072 \lor \neg \left(y.re \leq 52000\right):\\
\;\;\;\;\sin \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}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -7.20000000000000045e-4 or 52000 < y.re Initial program 31.4%
cancel-sign-sub-inv31.4%
fma-define31.4%
hypot-define31.4%
distribute-lft-neg-in31.4%
distribute-rgt-neg-out31.4%
fma-define31.4%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 61.5%
unpow261.5%
unpow261.5%
hypot-undefine62.0%
Simplified62.0%
if -7.20000000000000045e-4 < y.re < 52000Initial program 45.5%
cancel-sign-sub-inv45.5%
fma-define45.5%
hypot-define45.5%
distribute-lft-neg-in45.5%
distribute-rgt-neg-out45.5%
fma-define45.4%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around 0 33.8%
neg-mul-133.8%
distribute-lft-neg-in33.8%
*-commutative33.8%
unpow233.8%
unpow233.8%
hypot-undefine65.8%
Simplified65.8%
Final simplification63.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im 1e+77)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 1e+77) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = cbrt(pow(t_0, 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 1e+77) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.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 <= 1e+77) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, 1e+77], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 10^{+77}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.im < 9.99999999999999983e76Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.im around 0 47.0%
unpow247.0%
unpow247.0%
hypot-undefine48.5%
Simplified48.5%
if 9.99999999999999983e76 < y.im Initial program 38.1%
cancel-sign-sub-inv38.1%
fma-define38.1%
hypot-define38.1%
distribute-lft-neg-in38.1%
distribute-rgt-neg-out38.1%
fma-define38.1%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around 0 30.1%
unpow230.1%
unpow230.1%
hypot-undefine23.3%
Simplified23.3%
Taylor expanded in y.re around 0 5.8%
*-commutative5.8%
add-cbrt-cube41.6%
pow341.6%
*-commutative41.6%
Applied egg-rr41.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1.2e-7) (not (<= y.im 3.2e+76)))
(cbrt (pow t_0 3.0))
(* (sin t_0) (pow 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.2e-7) || !(y_46_im <= 3.2e+76)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.2e-7) || !(y_46_im <= 3.2e+76)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.2e-7) || !(y_46_im <= 3.2e+76)) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(sin(t_0) * (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.2e-7], N[Not[LessEqual[y$46$im, 3.2e+76]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $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 -1.2 \cdot 10^{-7} \lor \neg \left(y.im \leq 3.2 \cdot 10^{+76}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.19999999999999989e-7 or 3.19999999999999976e76 < y.im Initial program 34.8%
cancel-sign-sub-inv34.8%
fma-define34.8%
hypot-define34.8%
distribute-lft-neg-in34.8%
distribute-rgt-neg-out34.8%
fma-define34.8%
hypot-define63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in y.im around 0 30.3%
unpow230.3%
unpow230.3%
hypot-undefine20.7%
Simplified20.7%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
add-cbrt-cube30.4%
pow330.4%
*-commutative30.4%
Applied egg-rr30.4%
if -1.19999999999999989e-7 < y.im < 3.19999999999999976e76Initial program 40.2%
cancel-sign-sub-inv40.2%
fma-define40.2%
hypot-define40.2%
distribute-lft-neg-in40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-undefine61.3%
Simplified61.3%
Taylor expanded in x.re around 0 46.0%
*-commutative46.0%
Simplified46.0%
Final simplification39.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -4.7e-20)
(* t_0 (pow (- x.re) y.re))
(if (<= x.re 1.95e-118)
(* t_0 (pow x.im y.re))
(* t_0 (pow 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -4.7e-20) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else if (x_46_re <= 1.95e-118) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
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) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-4.7d-20)) then
tmp = t_0 * (-x_46re ** y_46re)
else if (x_46re <= 1.95d-118) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * (x_46re ** y_46re)
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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -4.7e-20) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else if (x_46_re <= 1.95e-118) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -4.7e-20: tmp = t_0 * math.pow(-x_46_re, y_46_re) elif x_46_re <= 1.95e-118: tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -4.7e-20) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); elseif (x_46_re <= 1.95e-118) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -4.7e-20) tmp = t_0 * (-x_46_re ^ y_46_re); elseif (x_46_re <= 1.95e-118) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -4.7e-20], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.95e-118], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -4.7 \cdot 10^{-20}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 1.95 \cdot 10^{-118}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -4.70000000000000015e-20Initial program 31.3%
cancel-sign-sub-inv31.3%
fma-define31.3%
hypot-define31.3%
distribute-lft-neg-in31.3%
distribute-rgt-neg-out31.3%
fma-define31.3%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around 0 46.3%
unpow246.3%
unpow246.3%
hypot-undefine48.0%
Simplified48.0%
add-cbrt-cube49.4%
pow349.4%
Applied egg-rr49.4%
Taylor expanded in x.re around -inf 48.0%
neg-mul-148.0%
distribute-rgt-neg-in48.0%
*-commutative48.0%
log-rec48.0%
exp-to-pow48.0%
associate-/r/48.0%
metadata-eval48.0%
neg-mul-148.0%
Simplified48.0%
if -4.70000000000000015e-20 < x.re < 1.95e-118Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.1%
hypot-define74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in y.im around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine44.2%
Simplified44.2%
Taylor expanded in x.re around 0 41.2%
*-commutative41.2%
Simplified41.2%
if 1.95e-118 < x.re Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-define41.6%
hypot-define41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 44.6%
unpow244.6%
unpow244.6%
hypot-undefine41.6%
Simplified41.6%
Taylor expanded in x.im around 0 40.5%
*-commutative40.5%
Simplified40.5%
Final simplification42.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 1.9e-133) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.9e-133) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(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 tmp;
if (x_46_re <= 1.9e-133) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 1.9e-133: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 1.9e-133) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 1.9e-133], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.9 \cdot 10^{-133}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 1.9000000000000002e-133Initial program 36.3%
cancel-sign-sub-inv36.3%
fma-define36.3%
hypot-define36.3%
distribute-lft-neg-in36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine45.4%
Simplified45.4%
Taylor expanded in y.re around 0 13.4%
log1p-expm1-u28.6%
Applied egg-rr28.6%
if 1.9000000000000002e-133 < x.re Initial program 41.1%
cancel-sign-sub-inv41.1%
fma-define41.1%
hypot-define41.1%
distribute-lft-neg-in41.1%
distribute-rgt-neg-out41.1%
fma-define41.1%
hypot-define80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-undefine42.3%
Simplified42.3%
Taylor expanded in y.re around 0 12.9%
add-log-exp28.1%
Applied egg-rr28.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y.im around 0 44.3%
unpow244.3%
unpow244.3%
hypot-undefine44.3%
Simplified44.3%
Taylor expanded in y.re around 0 13.3%
log1p-expm1-u24.9%
Applied egg-rr24.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* 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) {
return y_46_re * atan2(x_46_im, x_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 = y_46re * atan2(x_46im, x_46re)
end function
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);
}
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)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_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); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y.im around 0 44.3%
unpow244.3%
unpow244.3%
hypot-undefine44.3%
Simplified44.3%
Taylor expanded in y.re around 0 13.3%
herbie shell --seed 2024146
(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)))))