
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.6e+77)
(* (sqrt (pow (sin t_1) 2.0)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 3.3e+84)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_1)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.6e+77) {
tmp = sqrt(pow(sin(t_1), 2.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3.3e+84) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, t_1));
} 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((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.6e+77) tmp = Float64(sqrt((sin(t_1) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 3.3e+84) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, t_1))); 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(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.6e+77], N[(N[Sqrt[N[Power[N[Sin[t$95$1], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+84], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.6 \cdot 10^{+77}:\\
\;\;\;\;\sqrt{{\sin t\_1}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.6000000000000002e77Initial program 47.9%
cancel-sign-sub-inv47.9%
fma-define47.9%
hypot-define47.9%
distribute-lft-neg-in47.9%
distribute-rgt-neg-out47.9%
fma-define47.9%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.im around 0 81.3%
unpow281.3%
unpow281.3%
hypot-undefine81.3%
Simplified81.3%
*-commutative81.3%
add-cube-cbrt87.6%
pow389.6%
*-commutative89.6%
Applied egg-rr89.6%
rem-square-sqrt50.1%
sqrt-unprod93.8%
pow293.8%
rem-cube-cbrt93.8%
Applied egg-rr93.8%
if -2.6000000000000002e77 < y.re < 3.30000000000000017e84Initial program 38.5%
cancel-sign-sub-inv38.5%
fma-define38.5%
hypot-define38.5%
distribute-lft-neg-in38.5%
distribute-rgt-neg-out38.5%
fma-define39.1%
hypot-define76.9%
*-commutative76.9%
Simplified76.9%
if 3.30000000000000017e84 < y.re Initial program 35.4%
Taylor expanded in y.re around 0 35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine70.8%
Simplified70.8%
Final simplification78.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -370000000.0)
(* (sqrt (pow (sin t_0) 2.0)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 320000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -370000000.0) {
tmp = sqrt(pow(sin(t_0), 2.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 320000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((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)) tmp = 0.0 if (y_46_re <= -370000000.0) tmp = Float64(sqrt((sin(t_0) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 320000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(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(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]}, If[LessEqual[y$46$re, -370000000.0], N[(N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 320000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -370000000:\\
\;\;\;\;\sqrt{{\sin t\_0}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 320000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.7e8Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 81.8%
unpow281.8%
unpow281.8%
hypot-undefine81.8%
Simplified81.8%
*-commutative81.8%
add-cube-cbrt86.8%
pow388.4%
*-commutative88.4%
Applied egg-rr88.4%
rem-square-sqrt53.4%
sqrt-unprod91.8%
pow291.8%
rem-cube-cbrt91.8%
Applied egg-rr91.8%
if -3.7e8 < y.re < 3.2e5Initial program 37.3%
exp-diff37.3%
exp-to-pow37.3%
hypot-define37.3%
*-commutative37.3%
exp-prod37.1%
fma-define37.1%
hypot-define73.4%
*-commutative73.4%
Simplified73.4%
if 3.2e5 < y.re Initial program 36.5%
Taylor expanded in y.re around 0 36.5%
*-commutative36.5%
unpow236.5%
unpow236.5%
hypot-undefine71.5%
Simplified71.5%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -8.5e+14)
(* (sqrt (pow (sin t_0) 2.0)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 195.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (cbrt (exp (* (atan2 x.im x.re) (- y.im)))) 3.0))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -8.5e+14) {
tmp = sqrt(pow(sin(t_0), 2.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 195.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(cbrt(exp((atan2(x_46_im, x_46_re) * -y_46_im))), 3.0);
} 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((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)) tmp = 0.0 if (y_46_re <= -8.5e+14) tmp = Float64(sqrt((sin(t_0) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 195.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (cbrt(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) ^ 3.0)); 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(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]}, If[LessEqual[y$46$re, -8.5e+14], N[(N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 195.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Power[N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{+14}:\\
\;\;\;\;\sqrt{{\sin t\_0}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 195:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\sqrt[3]{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -8.5e14Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y.im around 0 83.1%
unpow283.1%
unpow283.1%
hypot-undefine83.1%
Simplified83.1%
*-commutative83.1%
add-cube-cbrt88.2%
pow389.9%
*-commutative89.9%
Applied egg-rr89.9%
rem-square-sqrt54.3%
sqrt-unprod93.3%
pow293.3%
rem-cube-cbrt93.3%
Applied egg-rr93.3%
if -8.5e14 < y.re < 195Initial program 37.0%
exp-diff37.0%
exp-to-pow37.0%
hypot-define37.0%
*-commutative37.0%
exp-prod36.8%
fma-define36.8%
hypot-define72.8%
*-commutative72.8%
Simplified72.8%
add-sqr-sqrt72.9%
sqrt-unprod72.8%
pow-sqr72.9%
Applied egg-rr72.9%
*-commutative72.9%
pow-unpow72.8%
pow272.8%
sqrt-prod72.9%
add-sqr-sqrt72.8%
add-cube-cbrt72.8%
pow372.8%
Applied egg-rr72.8%
Taylor expanded in y.re around 0 72.8%
rec-exp72.8%
Simplified72.8%
if 195 < y.re Initial program 36.5%
Taylor expanded in y.re around 0 36.5%
*-commutative36.5%
unpow236.5%
unpow236.5%
hypot-undefine71.5%
Simplified71.5%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4 (* t_3 t_1)))
(if (<= y.re -9.5e-7)
(* (sqrt (pow t_3 2.0)) t_0)
(if (<= y.re -4.2e-226)
t_4
(if (<= y.re 2.1e-190)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 1.32e-52)
t_4
(* t_0 (sin (fma (log (hypot x.re x.im)) y.im t_2)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = t_3 * t_1;
double tmp;
if (y_46_re <= -9.5e-7) {
tmp = sqrt(pow(t_3, 2.0)) * t_0;
} else if (y_46_re <= -4.2e-226) {
tmp = t_4;
} else if (y_46_re <= 2.1e-190) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 1.32e-52) {
tmp = t_4;
} else {
tmp = t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = Float64(t_3 * t_1) tmp = 0.0 if (y_46_re <= -9.5e-7) tmp = Float64(sqrt((t_3 ^ 2.0)) * t_0); elseif (y_46_re <= -4.2e-226) tmp = t_4; elseif (y_46_re <= 2.1e-190) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 1.32e-52) tmp = t_4; else tmp = Float64(t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-7], N[(N[Sqrt[N[Power[t$95$3, 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -4.2e-226], t$95$4, If[LessEqual[y$46$re, 2.1e-190], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.32e-52], t$95$4, N[(t$95$0 * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
t_4 := t\_3 \cdot t\_1\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-7}:\\
\;\;\;\;\sqrt{{t\_3}^{2}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq -4.2 \cdot 10^{-226}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-190}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.32 \cdot 10^{-52}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if y.re < -9.5000000000000001e-7Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 81.8%
unpow281.8%
unpow281.8%
hypot-undefine81.8%
Simplified81.8%
*-commutative81.8%
add-cube-cbrt86.8%
pow388.4%
*-commutative88.4%
Applied egg-rr88.4%
rem-square-sqrt53.4%
sqrt-unprod91.8%
pow291.8%
rem-cube-cbrt91.8%
Applied egg-rr91.8%
if -9.5000000000000001e-7 < y.re < -4.2000000000000003e-226 or 2.09999999999999991e-190 < y.re < 1.32000000000000002e-52Initial program 36.2%
Taylor expanded in y.im around 0 47.7%
Taylor expanded in y.re around 0 75.8%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Simplified75.8%
if -4.2000000000000003e-226 < y.re < 2.09999999999999991e-190Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
if 1.32000000000000002e-52 < y.re Initial program 33.6%
cancel-sign-sub-inv33.6%
fma-define33.6%
hypot-define33.6%
distribute-lft-neg-in33.6%
distribute-rgt-neg-out33.6%
fma-define34.9%
hypot-define65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in y.im around 0 54.0%
unpow254.0%
unpow254.0%
hypot-undefine59.2%
Simplified59.2%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.im x.re))))
(if (<= y.re -8.5e+14)
(* (sqrt (pow (sin t_0) 2.0)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 195.0)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (+ t_0 (* y.im (fabs t_1)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -8.5e+14) {
tmp = sqrt(pow(sin(t_0), 2.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 195.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 + (y_46_im * fabs(t_1))));
} 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((y_46_im * t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -8.5e+14) {
tmp = Math.sqrt(Math.pow(Math.sin(t_0), 2.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 195.0) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_0 + (y_46_im * Math.abs(t_1))));
} 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((y_46_im * t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -8.5e+14: tmp = math.sqrt(math.pow(math.sin(t_0), 2.0)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 195.0: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_0 + (y_46_im * math.fabs(t_1)))) 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((y_46_im * t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8.5e+14) tmp = Float64(sqrt((sin(t_0) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 195.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_0 + Float64(y_46_im * abs(t_1))))); 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(Float64(y_46_im * t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -8.5e+14) tmp = sqrt((sin(t_0) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 195.0) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 + (y_46_im * abs(t_1)))); 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((y_46_im * t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e+14], N[(N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 195.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{+14}:\\
\;\;\;\;\sqrt{{\sin t\_0}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 195:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t\_0 + y.im \cdot \left|t\_1\right|\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_1\right)\\
\end{array}
\end{array}
if y.re < -8.5e14Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y.im around 0 83.1%
unpow283.1%
unpow283.1%
hypot-undefine83.1%
Simplified83.1%
*-commutative83.1%
add-cube-cbrt88.2%
pow389.9%
*-commutative89.9%
Applied egg-rr89.9%
rem-square-sqrt54.3%
sqrt-unprod93.3%
pow293.3%
rem-cube-cbrt93.3%
Applied egg-rr93.3%
if -8.5e14 < y.re < 195Initial program 37.0%
hypot-define46.2%
add-sqr-sqrt28.6%
sqrt-unprod40.1%
pow240.1%
Applied egg-rr40.1%
hypot-undefine30.9%
unpow230.9%
unpow230.9%
+-commutative30.9%
unpow230.9%
rem-sqrt-square30.9%
unpow230.9%
unpow230.9%
hypot-undefine40.1%
Simplified40.1%
Taylor expanded in y.re around 0 66.0%
neg-mul-166.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
if 195 < y.re Initial program 36.5%
Taylor expanded in y.re around 0 36.5%
*-commutative36.5%
unpow236.5%
unpow236.5%
hypot-undefine71.5%
Simplified71.5%
Final simplification73.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -8.5e+14)
(* (sqrt (pow (sin t_1) 2.0)) t_0)
(if (<= y.re 0.345)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (+ t_1 (* y.im (fabs (log (hypot x.im x.re)))))))
(* t_0 (sin (fma (log (hypot x.re x.im)) y.im t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -8.5e+14) {
tmp = sqrt(pow(sin(t_1), 2.0)) * t_0;
} else if (y_46_re <= 0.345) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_1 + (y_46_im * fabs(log(hypot(x_46_im, x_46_re))))));
} else {
tmp = t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8.5e+14) tmp = Float64(sqrt((sin(t_1) ^ 2.0)) * t_0); elseif (y_46_re <= 0.345) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_1 + Float64(y_46_im * abs(log(hypot(x_46_im, x_46_re))))))); else tmp = Float64(t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e+14], N[(N[Sqrt[N[Power[N[Sin[t$95$1], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.345], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Abs[N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{+14}:\\
\;\;\;\;\sqrt{{\sin t\_1}^{2}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 0.345:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t\_1 + y.im \cdot \left|\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\end{array}
\end{array}
if y.re < -8.5e14Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y.im around 0 83.1%
unpow283.1%
unpow283.1%
hypot-undefine83.1%
Simplified83.1%
*-commutative83.1%
add-cube-cbrt88.2%
pow389.9%
*-commutative89.9%
Applied egg-rr89.9%
rem-square-sqrt54.3%
sqrt-unprod93.3%
pow293.3%
rem-cube-cbrt93.3%
Applied egg-rr93.3%
if -8.5e14 < y.re < 0.34499999999999997Initial program 37.3%
hypot-define45.8%
add-sqr-sqrt28.0%
sqrt-unprod39.6%
pow239.6%
Applied egg-rr39.6%
hypot-undefine31.1%
unpow231.1%
unpow231.1%
+-commutative31.1%
unpow231.1%
rem-sqrt-square31.1%
unpow231.1%
unpow231.1%
hypot-undefine39.6%
Simplified39.6%
Taylor expanded in y.re around 0 66.5%
neg-mul-166.5%
distribute-rgt-neg-in66.5%
Simplified66.5%
if 0.34499999999999997 < y.re Initial program 35.9%
cancel-sign-sub-inv35.9%
fma-define35.9%
hypot-define35.9%
distribute-lft-neg-in35.9%
distribute-rgt-neg-out35.9%
fma-define37.5%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 59.4%
unpow259.4%
unpow259.4%
hypot-undefine59.4%
Simplified59.4%
Final simplification70.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3 (* t_2 t_1)))
(if (<= y.re -2.8)
(* (sqrt (pow t_2 2.0)) t_0)
(if (<= y.re -1.65e-221)
t_3
(if (<= y.re 1.1e-189)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 8.5e-28)
t_3
(if (<= y.re 1.2e+123)
(* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))
(* 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 t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = t_2 * t_1;
double tmp;
if (y_46_re <= -2.8) {
tmp = sqrt(pow(t_2, 2.0)) * t_0;
} else if (y_46_re <= -1.65e-221) {
tmp = t_3;
} else if (y_46_re <= 1.1e-189) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 8.5e-28) {
tmp = t_3;
} else if (y_46_re <= 1.2e+123) {
tmp = t_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
} 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 t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = t_2 * t_1;
double tmp;
if (y_46_re <= -2.8) {
tmp = Math.sqrt(Math.pow(t_2, 2.0)) * t_0;
} else if (y_46_re <= -1.65e-221) {
tmp = t_3;
} else if (y_46_re <= 1.1e-189) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 8.5e-28) {
tmp = t_3;
} else if (y_46_re <= 1.2e+123) {
tmp = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
} 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 t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = Float64(t_2 * t_1) tmp = 0.0 if (y_46_re <= -2.8) tmp = Float64(sqrt((t_2 ^ 2.0)) * t_0); elseif (y_46_re <= -1.65e-221) tmp = t_3; elseif (y_46_re <= 1.1e-189) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 8.5e-28) tmp = t_3; elseif (y_46_re <= 1.2e+123) tmp = Float64(t_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); 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]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -2.8], N[(N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -1.65e-221], t$95$3, If[LessEqual[y$46$re, 1.1e-189], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 8.5e-28], t$95$3, If[LessEqual[y$46$re, 1.2e+123], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $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}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := t\_2 \cdot t\_1\\
\mathbf{if}\;y.re \leq -2.8:\\
\;\;\;\;\sqrt{{t\_2}^{2}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-221}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-189}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{-28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+123}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\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 < -2.7999999999999998Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 81.8%
unpow281.8%
unpow281.8%
hypot-undefine81.8%
Simplified81.8%
*-commutative81.8%
add-cube-cbrt86.8%
pow388.4%
*-commutative88.4%
Applied egg-rr88.4%
rem-square-sqrt53.4%
sqrt-unprod91.8%
pow291.8%
rem-cube-cbrt91.8%
Applied egg-rr91.8%
if -2.7999999999999998 < y.re < -1.64999999999999995e-221 or 1.1000000000000001e-189 < y.re < 8.49999999999999925e-28Initial program 36.3%
Taylor expanded in y.im around 0 44.6%
Taylor expanded in y.re around 0 74.7%
neg-mul-172.9%
distribute-rgt-neg-in72.9%
Simplified74.7%
if -1.64999999999999995e-221 < y.re < 1.1000000000000001e-189Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
if 8.49999999999999925e-28 < y.re < 1.19999999999999994e123Initial program 23.7%
cancel-sign-sub-inv23.7%
fma-define23.7%
hypot-define23.7%
distribute-lft-neg-in23.7%
distribute-rgt-neg-out23.7%
fma-define26.8%
hypot-define61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y.im around 0 28.5%
unpow228.5%
unpow228.5%
hypot-undefine34.6%
Simplified34.6%
add-cube-cbrt50.1%
pow356.4%
Applied egg-rr56.4%
if 1.19999999999999994e123 < y.re Initial program 41.0%
cancel-sign-sub-inv41.0%
fma-define41.0%
hypot-define41.0%
distribute-lft-neg-in41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 59.0%
unpow259.0%
unpow259.0%
hypot-undefine59.0%
Simplified59.0%
log1p-expm1-u66.7%
Applied egg-rr66.7%
Final simplification74.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (* (sin t_0) t_1))
(t_3 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -7e-7)
(* t_3 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re -1.65e-221)
t_2
(if (<= y.re 4.9e-189)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 8.5e-28)
t_2
(if (<= y.re 2e+122)
(* t_3 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))
(* t_3 (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = sin(t_0) * t_1;
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7e-7) {
tmp = t_3 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= -1.65e-221) {
tmp = t_2;
} else if (y_46_re <= 4.9e-189) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 8.5e-28) {
tmp = t_2;
} else if (y_46_re <= 2e+122) {
tmp = t_3 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
} else {
tmp = t_3 * 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.sin(t_0) * t_1;
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7e-7) {
tmp = t_3 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= -1.65e-221) {
tmp = t_2;
} else if (y_46_re <= 4.9e-189) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 8.5e-28) {
tmp = t_2;
} else if (y_46_re <= 2e+122) {
tmp = t_3 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
} else {
tmp = t_3 * 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(sin(t_0) * t_1) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -7e-7) tmp = Float64(t_3 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= -1.65e-221) tmp = t_2; elseif (y_46_re <= 4.9e-189) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 8.5e-28) tmp = t_2; elseif (y_46_re <= 2e+122) tmp = Float64(t_3 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); else tmp = Float64(t_3 * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -7e-7], N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.65e-221], t$95$2, If[LessEqual[y$46$re, 4.9e-189], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 8.5e-28], t$95$2, If[LessEqual[y$46$re, 2e+122], N[(t$95$3 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * 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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \sin t\_0 \cdot t\_1\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-7}:\\
\;\;\;\;t\_3 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 4.9 \cdot 10^{-189}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{-28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+122}:\\
\;\;\;\;t\_3 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \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 < -6.99999999999999968e-7Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 81.8%
unpow281.8%
unpow281.8%
hypot-undefine81.8%
Simplified81.8%
*-commutative81.8%
add-cube-cbrt86.8%
pow388.4%
*-commutative88.4%
Applied egg-rr88.4%
if -6.99999999999999968e-7 < y.re < -1.64999999999999995e-221 or 4.8999999999999997e-189 < y.re < 8.49999999999999925e-28Initial program 36.3%
Taylor expanded in y.im around 0 44.6%
Taylor expanded in y.re around 0 74.7%
neg-mul-172.9%
distribute-rgt-neg-in72.9%
Simplified74.7%
if -1.64999999999999995e-221 < y.re < 4.8999999999999997e-189Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
if 8.49999999999999925e-28 < y.re < 2.00000000000000003e122Initial program 23.7%
cancel-sign-sub-inv23.7%
fma-define23.7%
hypot-define23.7%
distribute-lft-neg-in23.7%
distribute-rgt-neg-out23.7%
fma-define26.8%
hypot-define61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y.im around 0 28.5%
unpow228.5%
unpow228.5%
hypot-undefine34.6%
Simplified34.6%
add-cube-cbrt50.1%
pow356.4%
Applied egg-rr56.4%
if 2.00000000000000003e122 < y.re Initial program 41.0%
cancel-sign-sub-inv41.0%
fma-define41.0%
hypot-define41.0%
distribute-lft-neg-in41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 59.0%
unpow259.0%
unpow259.0%
hypot-undefine59.0%
Simplified59.0%
log1p-expm1-u66.7%
Applied egg-rr66.7%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0)))))
(t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(t_3 (* (sin (* y.re (atan2 x.im x.re))) t_2)))
(if (<= y.re -1.95e-10)
t_1
(if (<= y.re -1.65e-221)
t_3
(if (<= y.re 3.8e-189)
(* (sin (* y.im (log (hypot x.im x.re)))) t_2)
(if (<= y.re 8.5e-28)
t_3
(if (<= y.re 2e+132)
t_1
(* 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 t_1 = t_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_2;
double tmp;
if (y_46_re <= -1.95e-10) {
tmp = t_1;
} else if (y_46_re <= -1.65e-221) {
tmp = t_3;
} else if (y_46_re <= 3.8e-189) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2;
} else if (y_46_re <= 8.5e-28) {
tmp = t_3;
} else if (y_46_re <= 2e+132) {
tmp = t_1;
} 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 t_1 = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_2;
double tmp;
if (y_46_re <= -1.95e-10) {
tmp = t_1;
} else if (y_46_re <= -1.65e-221) {
tmp = t_3;
} else if (y_46_re <= 3.8e-189) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_2;
} else if (y_46_re <= 8.5e-28) {
tmp = t_3;
} else if (y_46_re <= 2e+132) {
tmp = t_1;
} 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 t_1 = Float64(t_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))) t_2 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_3 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_2) tmp = 0.0 if (y_46_re <= -1.95e-10) tmp = t_1; elseif (y_46_re <= -1.65e-221) tmp = t_3; elseif (y_46_re <= 3.8e-189) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2); elseif (y_46_re <= 8.5e-28) tmp = t_3; elseif (y_46_re <= 2e+132) tmp = t_1; 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]}, Block[{t$95$1 = N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -1.95e-10], t$95$1, If[LessEqual[y$46$re, -1.65e-221], t$95$3, If[LessEqual[y$46$re, 3.8e-189], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 8.5e-28], t$95$3, If[LessEqual[y$46$re, 2e+132], t$95$1, 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}\\
t_1 := t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_2\\
\mathbf{if}\;y.re \leq -1.95 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-221}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{-189}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_2\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{-28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\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.95e-10 or 8.49999999999999925e-28 < y.re < 1.99999999999999998e132Initial program 39.8%
cancel-sign-sub-inv39.8%
fma-define39.8%
hypot-define39.8%
distribute-lft-neg-in39.8%
distribute-rgt-neg-out39.8%
fma-define40.8%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around 0 63.3%
unpow263.3%
unpow263.3%
hypot-undefine65.4%
Simplified65.4%
add-cube-cbrt77.3%
pow376.2%
Applied egg-rr76.2%
if -1.95e-10 < y.re < -1.64999999999999995e-221 or 3.80000000000000022e-189 < y.re < 8.49999999999999925e-28Initial program 36.3%
Taylor expanded in y.im around 0 44.6%
Taylor expanded in y.re around 0 74.7%
neg-mul-172.9%
distribute-rgt-neg-in72.9%
Simplified74.7%
if -1.64999999999999995e-221 < y.re < 3.80000000000000022e-189Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
if 1.99999999999999998e132 < y.re Initial program 41.0%
cancel-sign-sub-inv41.0%
fma-define41.0%
hypot-define41.0%
distribute-lft-neg-in41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 59.0%
unpow259.0%
unpow259.0%
hypot-undefine59.0%
Simplified59.0%
log1p-expm1-u66.7%
Applied egg-rr66.7%
Final simplification73.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (* (sin (* y.re (atan2 x.im x.re))) t_1)))
(if (<= y.re -0.024)
(* t_0 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))
(if (<= y.re -1.65e-221)
t_2
(if (<= y.re 1.75e-189)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 3.2e-52)
t_2
(* 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 t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_re <= -0.024) {
tmp = t_0 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
} else if (y_46_re <= -1.65e-221) {
tmp = t_2;
} else if (y_46_re <= 1.75e-189) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} 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 t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_re <= -0.024) {
tmp = t_0 * Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
} else if (y_46_re <= -1.65e-221) {
tmp = t_2;
} else if (y_46_re <= 1.75e-189) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} 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 t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1) tmp = 0.0 if (y_46_re <= -0.024) tmp = Float64(t_0 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); elseif (y_46_re <= -1.65e-221) tmp = t_2; elseif (y_46_re <= 1.75e-189) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 3.2e-52) tmp = t_2; 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]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -0.024], N[(t$95$0 * 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]), $MachinePrecision], If[LessEqual[y$46$re, -1.65e-221], t$95$2, If[LessEqual[y$46$re, 1.75e-189], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.2e-52], t$95$2, 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}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{if}\;y.re \leq -0.024:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 1.75 \cdot 10^{-189}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\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.024Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-define48.3%
hypot-define48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 81.8%
unpow281.8%
unpow281.8%
hypot-undefine81.8%
Simplified81.8%
add-cbrt-cube83.4%
pow385.1%
Applied egg-rr85.1%
if -0.024 < y.re < -1.64999999999999995e-221 or 1.7500000000000001e-189 < y.re < 3.2000000000000001e-52Initial program 36.2%
Taylor expanded in y.im around 0 47.7%
Taylor expanded in y.re around 0 75.8%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Simplified75.8%
if -1.64999999999999995e-221 < y.re < 1.7500000000000001e-189Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
if 3.2000000000000001e-52 < y.re Initial program 33.6%
cancel-sign-sub-inv33.6%
fma-define33.6%
hypot-define33.6%
distribute-lft-neg-in33.6%
distribute-rgt-neg-out33.6%
fma-define34.9%
hypot-define65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in y.im around 0 42.5%
unpow242.5%
unpow242.5%
hypot-undefine48.8%
Simplified48.8%
log1p-expm1-u54.1%
Applied egg-rr54.1%
Final simplification70.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (log1p (expm1 (atan2 x.im x.re)))))))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (* (sin (* y.re (atan2 x.im x.re))) t_1)))
(if (<= y.re -0.029)
t_0
(if (<= y.re -1.6e-221)
t_2
(if (<= y.re 6.2e-190)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 3.2e-52) t_2 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * log1p(expm1(atan2(x_46_im, x_46_re)))));
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_re <= -0.029) {
tmp = t_0;
} else if (y_46_re <= -1.6e-221) {
tmp = t_2;
} else if (y_46_re <= 6.2e-190) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.log1p(Math.expm1(Math.atan2(x_46_im, x_46_re)))));
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_re <= -0.029) {
tmp = t_0;
} else if (y_46_re <= -1.6e-221) {
tmp = t_2;
} else if (y_46_re <= 6.2e-190) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.log1p(math.expm1(math.atan2(x_46_im, x_46_re))))) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_1 tmp = 0 if y_46_re <= -0.029: tmp = t_0 elif y_46_re <= -1.6e-221: tmp = t_2 elif y_46_re <= 6.2e-190: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_1 elif y_46_re <= 3.2e-52: tmp = t_2 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * log1p(expm1(atan(x_46_im, x_46_re)))))) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1) tmp = 0.0 if (y_46_re <= -0.029) tmp = t_0; elseif (y_46_re <= -1.6e-221) tmp = t_2; elseif (y_46_re <= 6.2e-190) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 3.2e-52) tmp = t_2; else tmp = 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * 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]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -0.029], t$95$0, If[LessEqual[y$46$re, -1.6e-221], t$95$2, If[LessEqual[y$46$re, 6.2e-190], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.2e-52], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{if}\;y.re \leq -0.029:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -1.6 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-190}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.0290000000000000015 or 3.2000000000000001e-52 < y.re Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.8%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine63.4%
Simplified63.4%
log1p-expm1-u67.0%
Applied egg-rr67.0%
if -0.0290000000000000015 < y.re < -1.60000000000000008e-221 or 6.19999999999999987e-190 < y.re < 3.2000000000000001e-52Initial program 36.2%
Taylor expanded in y.im around 0 47.7%
Taylor expanded in y.re around 0 75.8%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Simplified75.8%
if -1.60000000000000008e-221 < y.re < 6.19999999999999987e-190Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
Final simplification69.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 t_0))
(t_3 (* t_1 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -3.9e-7)
t_3
(if (<= y.re -3e-231)
t_2
(if (<= y.re 2.2e-189)
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)
(if (<= y.re 3.2e-52) t_2 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * t_0;
double t_3 = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.9e-7) {
tmp = t_3;
} else if (y_46_re <= -3e-231) {
tmp = t_2;
} else if (y_46_re <= 2.2e-189) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = t_1 * t_0;
double t_3 = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.9e-7) {
tmp = t_3;
} else if (y_46_re <= -3e-231) {
tmp = t_2;
} else if (y_46_re <= 2.2e-189) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
} else if (y_46_re <= 3.2e-52) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = t_1 * t_0 t_3 = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.9e-7: tmp = t_3 elif y_46_re <= -3e-231: tmp = t_2 elif y_46_re <= 2.2e-189: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 elif y_46_re <= 3.2e-52: tmp = t_2 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * t_0) t_3 = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.9e-7) tmp = t_3; elseif (y_46_re <= -3e-231) tmp = t_2; elseif (y_46_re <= 2.2e-189) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); elseif (y_46_re <= 3.2e-52) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = t_1 * t_0; t_3 = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -3.9e-7) tmp = t_3; elseif (y_46_re <= -3e-231) tmp = t_2; elseif (y_46_re <= 2.2e-189) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; elseif (y_46_re <= 3.2e-52) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.9e-7], t$95$3, If[LessEqual[y$46$re, -3e-231], t$95$2, If[LessEqual[y$46$re, 2.2e-189], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 3.2e-52], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot t\_0\\
t_3 := t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-7}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -3 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-189}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -3.90000000000000025e-7 or 3.2000000000000001e-52 < y.re Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.8%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine63.4%
Simplified63.4%
if -3.90000000000000025e-7 < y.re < -3.0000000000000003e-231 or 2.20000000000000019e-189 < y.re < 3.2000000000000001e-52Initial program 36.2%
Taylor expanded in y.im around 0 47.7%
Taylor expanded in y.re around 0 75.8%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Simplified75.8%
if -3.0000000000000003e-231 < y.re < 2.20000000000000019e-189Initial program 43.4%
cancel-sign-sub-inv43.4%
fma-define43.4%
hypot-define43.4%
distribute-lft-neg-in43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.re around 0 41.6%
neg-mul-141.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
unpow241.6%
unpow241.6%
hypot-undefine69.8%
Simplified69.8%
Final simplification68.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= y.re -4.1e-12) (not (<= y.re 3.2e-52)))
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -4.1e-12) || !(y_46_re <= 3.2e-52)) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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 t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -4.1e-12) || !(y_46_re <= 3.2e-52)) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_re <= -4.1e-12) or not (y_46_re <= 3.2e-52): tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * 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) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_re <= -4.1e-12) || !(y_46_re <= 3.2e-52)) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * 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) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((y_46_re <= -4.1e-12) || ~((y_46_re <= 3.2e-52))) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * 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_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -4.1e-12], N[Not[LessEqual[y$46$re, 3.2e-52]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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}\;y.re \leq -4.1 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-52}\right):\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -4.0999999999999999e-12 or 3.2000000000000001e-52 < y.re Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.8%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine63.4%
Simplified63.4%
if -4.0999999999999999e-12 < y.re < 3.2000000000000001e-52Initial program 39.2%
Taylor expanded in y.im around 0 38.3%
Taylor expanded in y.re around 0 59.5%
neg-mul-166.8%
distribute-rgt-neg-in66.8%
Simplified59.5%
Final simplification61.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.2e-201) (not (<= y.re 9e-193))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (sin (* (log (hypot x.re x.im)) 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 <= -4.2e-201) || !(y_46_re <= 9e-193)) {
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((log(hypot(x_46_re, x_46_im)) * 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 <= -4.2e-201) || !(y_46_re <= 9e-193)) {
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((Math.log(Math.hypot(x_46_re, x_46_im)) * 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 <= -4.2e-201) or not (y_46_re <= 9e-193): 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((math.log(math.hypot(x_46_re, x_46_im)) * 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 <= -4.2e-201) || !(y_46_re <= 9e-193)) 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 = sin(Float64(log(hypot(x_46_re, x_46_im)) * 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 <= -4.2e-201) || ~((y_46_re <= 9e-193))) 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((log(hypot(x_46_re, x_46_im)) * 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, -4.2e-201], N[Not[LessEqual[y$46$re, 9e-193]], $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[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-201} \lor \neg \left(y.re \leq 9 \cdot 10^{-193}\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(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -4.20000000000000024e-201 or 8.9999999999999997e-193 < y.re Initial program 39.1%
cancel-sign-sub-inv39.1%
fma-define39.1%
hypot-define39.1%
distribute-lft-neg-in39.1%
distribute-rgt-neg-out39.1%
fma-define39.6%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y.im around 0 49.6%
unpow249.6%
unpow249.6%
hypot-undefine55.8%
Simplified55.8%
if -4.20000000000000024e-201 < y.re < 8.9999999999999997e-193Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
Final simplification52.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -5.2e+18)
(* t_1 (pow x.im y.re))
(if (<= y.re -8e-201)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 1.55e-191)
(sin (* (log (hypot x.re x.im)) y.im))
(if (<= y.re 1.65e+14)
(log1p (expm1 t_0))
(* t_1 (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -5.2e+18) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_re <= -8e-201) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.55e-191) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} else if (y_46_re <= 1.65e+14) {
tmp = log1p(expm1(t_0));
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -5.2e+18) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= -8e-201) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.55e-191) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else if (y_46_re <= 1.65e+14) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = t_1 * 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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -5.2e+18: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_re <= -8e-201: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 1.55e-191: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) elif y_46_re <= 1.65e+14: tmp = math.log1p(math.expm1(t_0)) else: tmp = t_1 * 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -5.2e+18) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_re <= -8e-201) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1.55e-191) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); elseif (y_46_re <= 1.65e+14) tmp = log1p(expm1(t_0)); else tmp = Float64(t_1 * (x_46_re ^ 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]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -5.2e+18], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -8e-201], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.55e-191], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.65e+14], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{+18}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq -8 \cdot 10^{-201}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-191}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.2e18Initial program 49.1%
cancel-sign-sub-inv49.1%
fma-define49.1%
hypot-define49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-out49.1%
fma-define49.1%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.im around 0 82.5%
unpow282.5%
unpow282.5%
hypot-undefine82.5%
Simplified82.5%
Taylor expanded in x.re around 0 61.8%
if -5.2e18 < y.re < -7.99999999999999957e-201Initial program 37.4%
cancel-sign-sub-inv37.4%
fma-define37.4%
hypot-define37.4%
distribute-lft-neg-in37.4%
distribute-rgt-neg-out37.4%
fma-define37.4%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in y.im around 0 32.0%
unpow232.0%
unpow232.0%
hypot-undefine36.7%
Simplified36.7%
Taylor expanded in y.re around 0 31.9%
add-log-exp36.7%
Applied egg-rr36.7%
if -7.99999999999999957e-201 < y.re < 1.5500000000000001e-191Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
if 1.5500000000000001e-191 < y.re < 1.65e14Initial program 30.0%
cancel-sign-sub-inv30.0%
fma-define30.0%
hypot-define30.0%
distribute-lft-neg-in30.0%
distribute-rgt-neg-out30.0%
fma-define32.2%
hypot-define76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in y.im around 0 23.7%
unpow223.7%
unpow223.7%
hypot-undefine47.9%
Simplified47.9%
Taylor expanded in y.re around 0 42.6%
log1p-expm1-u46.9%
Applied egg-rr46.9%
if 1.65e14 < y.re Initial program 37.7%
cancel-sign-sub-inv37.7%
fma-define37.7%
hypot-define37.7%
distribute-lft-neg-in37.7%
distribute-rgt-neg-out37.7%
fma-define37.7%
hypot-define62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in y.im around 0 49.3%
unpow249.3%
unpow249.3%
hypot-undefine49.3%
Simplified49.3%
Taylor expanded in x.im around 0 43.0%
Final simplification46.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -5.2e+18)
t_1
(if (<= y.re -5.4e-201)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 3.6e-191)
(sin (* (log (hypot x.re x.im)) y.im))
(if (<= y.re 1.15e-14) (log1p (expm1 t_0)) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -5.2e+18) {
tmp = t_1;
} else if (y_46_re <= -5.4e-201) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3.6e-191) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} else if (y_46_re <= 1.15e-14) {
tmp = log1p(expm1(t_0));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -5.2e+18) {
tmp = t_1;
} else if (y_46_re <= -5.4e-201) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3.6e-191) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else if (y_46_re <= 1.15e-14) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -5.2e+18: tmp = t_1 elif y_46_re <= -5.4e-201: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 3.6e-191: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) elif y_46_re <= 1.15e-14: tmp = math.log1p(math.expm1(t_0)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -5.2e+18) tmp = t_1; elseif (y_46_re <= -5.4e-201) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 3.6e-191) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); elseif (y_46_re <= 1.15e-14) tmp = log1p(expm1(t_0)); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.2e+18], t$95$1, If[LessEqual[y$46$re, -5.4e-201], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.6e-191], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.15e-14], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -5.4 \cdot 10^{-201}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{-191}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -5.2e18 or 1.14999999999999999e-14 < y.re Initial program 40.6%
cancel-sign-sub-inv40.6%
fma-define40.6%
hypot-define40.6%
distribute-lft-neg-in40.6%
distribute-rgt-neg-out40.6%
fma-define41.4%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 62.4%
unpow262.4%
unpow262.4%
hypot-undefine63.9%
Simplified63.9%
Taylor expanded in x.re around 0 49.9%
if -5.2e18 < y.re < -5.40000000000000011e-201Initial program 37.4%
cancel-sign-sub-inv37.4%
fma-define37.4%
hypot-define37.4%
distribute-lft-neg-in37.4%
distribute-rgt-neg-out37.4%
fma-define37.4%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in y.im around 0 32.0%
unpow232.0%
unpow232.0%
hypot-undefine36.7%
Simplified36.7%
Taylor expanded in y.re around 0 31.9%
add-log-exp36.7%
Applied egg-rr36.7%
if -5.40000000000000011e-201 < y.re < 3.60000000000000019e-191Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
if 3.60000000000000019e-191 < y.re < 1.14999999999999999e-14Initial program 35.9%
cancel-sign-sub-inv35.9%
fma-define35.9%
hypot-define35.9%
distribute-lft-neg-in35.9%
distribute-rgt-neg-out35.9%
fma-define35.9%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 23.9%
unpow223.9%
unpow223.9%
hypot-undefine48.6%
Simplified48.6%
Taylor expanded in y.re around 0 48.6%
log1p-expm1-u48.6%
Applied egg-rr48.6%
Final simplification45.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (log (hypot x.re x.im)) y.im)))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -6.3e-13)
(exp (log1p (+ t_1 -1.0)))
(if (<= y.im -3e-96)
t_0
(if (<= y.im 4.6e-145)
(log1p (expm1 t_1))
(if (<= y.im 1360.0) t_0 (cbrt (pow t_1 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -6.3e-13) {
tmp = exp(log1p((t_1 + -1.0)));
} else if (y_46_im <= -3e-96) {
tmp = t_0;
} else if (y_46_im <= 4.6e-145) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 1360.0) {
tmp = t_0;
} else {
tmp = cbrt(pow(t_1, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -6.3e-13) {
tmp = Math.exp(Math.log1p((t_1 + -1.0)));
} else if (y_46_im <= -3e-96) {
tmp = t_0;
} else if (y_46_im <= 4.6e-145) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 1360.0) {
tmp = t_0;
} else {
tmp = Math.cbrt(Math.pow(t_1, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -6.3e-13) tmp = exp(log1p(Float64(t_1 + -1.0))); elseif (y_46_im <= -3e-96) tmp = t_0; elseif (y_46_im <= 4.6e-145) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 1360.0) tmp = t_0; else tmp = cbrt((t_1 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.3e-13], N[Exp[N[Log[1 + N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, -3e-96], t$95$0, If[LessEqual[y$46$im, 4.6e-145], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1360.0], t$95$0, N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -6.3 \cdot 10^{-13}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_1 + -1\right)}\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-145}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 1360:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_1}^{3}}\\
\end{array}
\end{array}
if y.im < -6.30000000000000042e-13Initial program 33.7%
cancel-sign-sub-inv33.7%
fma-define33.7%
hypot-define33.7%
distribute-lft-neg-in33.7%
distribute-rgt-neg-out33.7%
fma-define35.3%
hypot-define69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in y.im around 0 41.5%
unpow241.5%
unpow241.5%
hypot-undefine33.0%
Simplified33.0%
Taylor expanded in y.re around 0 4.6%
add-exp-log3.1%
Applied egg-rr3.1%
log1p-expm1-u16.5%
expm1-undefine16.5%
rem-exp-log27.8%
Applied egg-rr27.8%
if -6.30000000000000042e-13 < y.im < -3e-96 or 4.60000000000000014e-145 < y.im < 1360Initial program 55.0%
cancel-sign-sub-inv55.0%
fma-define55.0%
hypot-define55.0%
distribute-lft-neg-in55.0%
distribute-rgt-neg-out55.0%
fma-define55.0%
hypot-define83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in x.re around 0 42.3%
+-commutative42.3%
neg-mul-142.3%
unsub-neg42.3%
Simplified42.3%
Taylor expanded in y.re around inf 41.3%
Taylor expanded in y.re around 0 27.6%
+-commutative27.6%
unpow227.6%
unpow227.6%
hypot-undefine36.6%
Simplified36.6%
if -3e-96 < y.im < 4.60000000000000014e-145Initial program 44.9%
cancel-sign-sub-inv44.9%
fma-define44.9%
hypot-define44.9%
distribute-lft-neg-in44.9%
distribute-rgt-neg-out44.9%
fma-define44.9%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine70.5%
Simplified70.5%
Taylor expanded in y.re around 0 36.3%
log1p-expm1-u49.1%
Applied egg-rr49.1%
if 1360 < y.im Initial program 28.9%
cancel-sign-sub-inv28.9%
fma-define28.9%
hypot-define28.9%
distribute-lft-neg-in28.9%
distribute-rgt-neg-out28.9%
fma-define28.9%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 29.7%
unpow229.7%
unpow229.7%
hypot-undefine25.6%
Simplified25.6%
Taylor expanded in y.re around 0 5.9%
*-commutative5.9%
add-cbrt-cube23.9%
pow323.9%
*-commutative23.9%
Applied egg-rr23.9%
Final simplification35.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -8.5e+75)
(* (pow x.im y.re) (sin (* y.im (log x.re))))
(if (<= y.re -2.9e-202)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 1.55e-191)
(sin (* (log (hypot x.re x.im)) y.im))
(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) {
double tmp;
if (y_46_re <= -8.5e+75) {
tmp = pow(x_46_im, y_46_re) * sin((y_46_im * log(x_46_re)));
} else if (y_46_re <= -2.9e-202) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.55e-191) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = log1p(expm1((y_46_re * 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 (y_46_re <= -8.5e+75) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((y_46_im * Math.log(x_46_re)));
} else if (y_46_re <= -2.9e-202) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.55e-191) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = Math.log1p(Math.expm1((y_46_re * 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 y_46_re <= -8.5e+75: tmp = math.pow(x_46_im, y_46_re) * math.sin((y_46_im * math.log(x_46_re))) elif y_46_re <= -2.9e-202: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 1.55e-191: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) else: tmp = math.log1p(math.expm1((y_46_re * 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 (y_46_re <= -8.5e+75) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))); elseif (y_46_re <= -2.9e-202) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1.55e-191) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); else tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -8.5e+75], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.9e-202], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.55e-191], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{+75}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.re \leq -2.9 \cdot 10^{-202}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-191}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -8.4999999999999993e75Initial program 47.9%
cancel-sign-sub-inv47.9%
fma-define47.9%
hypot-define47.9%
distribute-lft-neg-in47.9%
distribute-rgt-neg-out47.9%
fma-define47.9%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in x.re around 0 33.5%
+-commutative33.5%
neg-mul-133.5%
unsub-neg33.5%
Simplified33.5%
Taylor expanded in y.re around inf 33.5%
Taylor expanded in x.im around 0 27.2%
Taylor expanded in y.re around 0 31.4%
if -8.4999999999999993e75 < y.re < -2.89999999999999988e-202Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 42.5%
unpow242.5%
unpow242.5%
hypot-undefine46.3%
Simplified46.3%
Taylor expanded in y.re around 0 28.6%
add-log-exp36.4%
Applied egg-rr36.4%
if -2.89999999999999988e-202 < y.re < 1.5500000000000001e-191Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
if 1.5500000000000001e-191 < y.re Initial program 34.4%
cancel-sign-sub-inv34.4%
fma-define34.4%
hypot-define34.4%
distribute-lft-neg-in34.4%
distribute-rgt-neg-out34.4%
fma-define35.4%
hypot-define68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in y.im around 0 38.4%
unpow238.4%
unpow238.4%
hypot-undefine48.7%
Simplified48.7%
Taylor expanded in y.re around 0 19.5%
log1p-expm1-u34.4%
Applied egg-rr34.4%
Final simplification35.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.6e-202) (not (<= y.re 9.2e-193))) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (sin (* (log (hypot x.re x.im)) 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 <= -5.6e-202) || !(y_46_re <= 9.2e-193)) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = sin((log(hypot(x_46_re, x_46_im)) * 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 <= -5.6e-202) || !(y_46_re <= 9.2e-193)) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * 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 <= -5.6e-202) or not (y_46_re <= 9.2e-193): tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * 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 <= -5.6e-202) || !(y_46_re <= 9.2e-193)) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -5.6e-202], N[Not[LessEqual[y$46$re, 9.2e-193]], $MachinePrecision]], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.6 \cdot 10^{-202} \lor \neg \left(y.re \leq 9.2 \cdot 10^{-193}\right):\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -5.6000000000000002e-202 or 9.20000000000000034e-193 < y.re Initial program 39.1%
cancel-sign-sub-inv39.1%
fma-define39.1%
hypot-define39.1%
distribute-lft-neg-in39.1%
distribute-rgt-neg-out39.1%
fma-define39.6%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y.im around 0 49.6%
unpow249.6%
unpow249.6%
hypot-undefine55.8%
Simplified55.8%
Taylor expanded in y.re around 0 18.2%
log1p-expm1-u28.6%
Applied egg-rr28.6%
if -5.6000000000000002e-202 < y.re < 9.20000000000000034e-193Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
Final simplification30.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -5.6e-202)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 4.1e-191)
(sin (* (log (hypot x.re x.im)) y.im))
(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) {
double tmp;
if (y_46_re <= -5.6e-202) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.1e-191) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = log1p(expm1((y_46_re * 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 (y_46_re <= -5.6e-202) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.1e-191) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = Math.log1p(Math.expm1((y_46_re * 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 y_46_re <= -5.6e-202: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 4.1e-191: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) else: tmp = math.log1p(math.expm1((y_46_re * 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 (y_46_re <= -5.6e-202) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 4.1e-191) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); else tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -5.6e-202], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.1e-191], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.6 \cdot 10^{-202}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{-191}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -5.6000000000000002e-202Initial program 44.3%
cancel-sign-sub-inv44.3%
fma-define44.3%
hypot-define44.3%
distribute-lft-neg-in44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 61.7%
unpow261.7%
unpow261.7%
hypot-undefine63.7%
Simplified63.7%
Taylor expanded in y.re around 0 16.8%
add-log-exp24.7%
Applied egg-rr24.7%
if -5.6000000000000002e-202 < y.re < 4.1000000000000002e-191Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-define41.8%
hypot-define41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x.re around 0 30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in y.re around inf 15.6%
Taylor expanded in y.re around 0 27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-undefine39.3%
Simplified39.3%
if 4.1000000000000002e-191 < y.re Initial program 34.4%
cancel-sign-sub-inv34.4%
fma-define34.4%
hypot-define34.4%
distribute-lft-neg-in34.4%
distribute-rgt-neg-out34.4%
fma-define35.4%
hypot-define68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in y.im around 0 38.4%
unpow238.4%
unpow238.4%
hypot-undefine48.7%
Simplified48.7%
Taylor expanded in y.re around 0 19.5%
log1p-expm1-u34.4%
Applied egg-rr34.4%
Final simplification31.7%
(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 39.7%
cancel-sign-sub-inv39.7%
fma-define39.7%
hypot-define39.7%
distribute-lft-neg-in39.7%
distribute-rgt-neg-out39.7%
fma-define40.1%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 41.1%
unpow241.1%
unpow241.1%
hypot-undefine45.1%
Simplified45.1%
Taylor expanded in y.re around 0 15.2%
log1p-expm1-u23.5%
Applied egg-rr23.5%
(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 39.7%
cancel-sign-sub-inv39.7%
fma-define39.7%
hypot-define39.7%
distribute-lft-neg-in39.7%
distribute-rgt-neg-out39.7%
fma-define40.1%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 41.1%
unpow241.1%
unpow241.1%
hypot-undefine45.1%
Simplified45.1%
Taylor expanded in y.re around 0 15.2%
herbie shell --seed 2024141
(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)))))