
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 2.75e+177)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(* (pow (hypot x.im x.re) y.re) (sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 2.75e+177) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 2.75e+177) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 2.75e+177], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 2.75 \cdot 10^{+177}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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.74999999999999996e177Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define83.4%
*-commutative83.4%
Simplified83.4%
if 2.74999999999999996e177 < y.re Initial program 28.1%
fmm-def28.1%
hypot-define28.1%
distribute-rgt-neg-out28.1%
fma-define31.3%
hypot-define62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in y.im around inf 25.0%
unpow225.0%
unpow225.0%
hypot-undefine43.8%
associate-/l*43.8%
Simplified43.8%
Taylor expanded in y.im around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine43.8%
Simplified43.8%
Taylor expanded in y.re around 0 40.7%
*-commutative40.7%
unpow240.7%
unpow240.7%
hypot-undefine75.0%
Simplified75.0%
Final simplification82.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.im t_0))
(t_2 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.6e+89)
(* t_2 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 2.4e+144)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (+ t_1 (* y.im (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_2 (sin t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_im * t_0;
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.6e+89) {
tmp = t_2 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 2.4e+144) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((t_1 + (y_46_im * (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_2 * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_im * t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.6e+89) tmp = Float64(t_2 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 2.4e+144) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(t_1 + Float64(y_46_im * Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_2 * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.6e+89], N[(t$95$2 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.4e+144], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.im \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.6 \cdot 10^{+89}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{+144}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(t\_1 + y.im \cdot \left(y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\end{array}
\end{array}
if y.re < -1.59999999999999994e89Initial program 36.6%
fmm-def36.6%
hypot-define36.6%
distribute-rgt-neg-out36.6%
fma-define36.6%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around inf 22.0%
unpow222.0%
unpow222.0%
hypot-undefine61.0%
associate-/l*61.0%
Simplified61.0%
Taylor expanded in y.im around 0 58.6%
unpow258.6%
unpow258.6%
hypot-undefine58.6%
Simplified58.6%
Taylor expanded in y.re around inf 36.6%
+-commutative36.6%
associate-/l*39.0%
unpow239.0%
unpow239.0%
hypot-undefine90.3%
Simplified90.3%
if -1.59999999999999994e89 < y.re < 2.4000000000000001e144Initial program 41.0%
fmm-def41.0%
hypot-define41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around inf 40.4%
unpow240.4%
unpow240.4%
hypot-undefine81.3%
associate-/l*81.2%
Simplified81.2%
distribute-rgt-in81.2%
Applied egg-rr81.2%
if 2.4000000000000001e144 < y.re Initial program 29.7%
fmm-def29.7%
hypot-define29.7%
distribute-rgt-neg-out29.7%
fma-define32.4%
hypot-define64.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in y.im around inf 27.0%
unpow227.0%
unpow227.0%
hypot-undefine45.9%
associate-/l*43.2%
Simplified43.2%
Taylor expanded in y.im around 0 43.3%
unpow243.3%
unpow243.3%
hypot-undefine43.3%
Simplified43.3%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine75.7%
Simplified75.7%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -7.7e+87)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 2.45e+144)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_1 (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7.7e+87) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 2.45e+144) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * sin((y_46_im * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -7.7e+87) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 2.45e+144) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -7.7e+87], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.45e+144], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7.7 \cdot 10^{+87}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -7.70000000000000031e87Initial program 36.6%
fmm-def36.6%
hypot-define36.6%
distribute-rgt-neg-out36.6%
fma-define36.6%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around inf 22.0%
unpow222.0%
unpow222.0%
hypot-undefine61.0%
associate-/l*61.0%
Simplified61.0%
Taylor expanded in y.im around 0 58.6%
unpow258.6%
unpow258.6%
hypot-undefine58.6%
Simplified58.6%
Taylor expanded in y.re around inf 36.6%
+-commutative36.6%
associate-/l*39.0%
unpow239.0%
unpow239.0%
hypot-undefine90.3%
Simplified90.3%
if -7.70000000000000031e87 < y.re < 2.45e144Initial program 41.0%
fmm-def41.0%
hypot-define41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around inf 40.4%
unpow240.4%
unpow240.4%
hypot-undefine81.3%
associate-/l*81.2%
Simplified81.2%
if 2.45e144 < y.re Initial program 29.7%
fmm-def29.7%
hypot-define29.7%
distribute-rgt-neg-out29.7%
fma-define32.4%
hypot-define64.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in y.im around inf 27.0%
unpow227.0%
unpow227.0%
hypot-undefine45.9%
associate-/l*43.2%
Simplified43.2%
Taylor expanded in y.im around 0 43.3%
unpow243.3%
unpow243.3%
hypot-undefine43.3%
Simplified43.3%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine75.7%
Simplified75.7%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.0)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 8200000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(* t_1 (exp (* (atan2 x.im x.re) (- y.im)))))
(*
(sin (* y.im t_0))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.0) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 8200000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin((y_46_im * t_0)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.0) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 8200000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.0], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8200000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 8200000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \left(t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot 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}\\
\end{array}
\end{array}
if y.re < -3Initial program 39.3%
fmm-def39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around inf 26.8%
unpow226.8%
unpow226.8%
hypot-undefine66.1%
associate-/l*66.1%
Simplified66.1%
Taylor expanded in y.im around 0 59.1%
unpow259.1%
unpow259.1%
hypot-undefine59.1%
Simplified59.1%
Taylor expanded in y.re around inf 35.8%
+-commutative35.8%
associate-/l*37.6%
unpow237.6%
unpow237.6%
hypot-undefine84.1%
Simplified84.1%
if -3 < y.re < 8.2e6Initial program 39.1%
fmm-def39.1%
hypot-define39.1%
distribute-rgt-neg-out39.1%
fma-define39.1%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 50.1%
exp-sum49.9%
neg-mul-149.9%
*-commutative49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-undefine81.0%
exp-to-pow81.0%
hypot-undefine49.9%
unpow249.9%
unpow249.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-undefine81.0%
Simplified81.0%
if 8.2e6 < y.re Initial program 37.3%
Taylor expanded in y.re around 0 41.8%
*-commutative41.8%
unpow241.8%
unpow241.8%
hypot-undefine73.2%
Simplified73.2%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -2.7)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 70000000.0)
(*
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(*
(sin (* y.im t_0))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.7) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 70000000.0) {
tmp = (t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = sin((y_46_im * t_0)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.7) {
tmp = t_1 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 70000000.0) {
tmp = (t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = Math.sin((y_46_im * t_0)) * 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)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.7: tmp = t_1 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) elif y_46_re <= 70000000.0: tmp = (t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) else: tmp = math.sin((y_46_im * t_0)) * 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))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.7) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 70000000.0) tmp = Float64(Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.7) tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); elseif (y_46_re <= 70000000.0) tmp = (t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); else tmp = sin((y_46_im * t_0)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.7], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 70000000.0], N[(N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.7:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 70000000:\\
\;\;\;\;\left(t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right) \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot 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}\\
\end{array}
\end{array}
if y.re < -2.7000000000000002Initial program 39.3%
fmm-def39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around inf 26.8%
unpow226.8%
unpow226.8%
hypot-undefine66.1%
associate-/l*66.1%
Simplified66.1%
Taylor expanded in y.im around 0 59.1%
unpow259.1%
unpow259.1%
hypot-undefine59.1%
Simplified59.1%
Taylor expanded in y.re around inf 35.8%
+-commutative35.8%
associate-/l*37.6%
unpow237.6%
unpow237.6%
hypot-undefine84.1%
Simplified84.1%
if -2.7000000000000002 < y.re < 7e7Initial program 39.1%
fmm-def39.1%
hypot-define39.1%
distribute-rgt-neg-out39.1%
fma-define39.1%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around inf 39.1%
unpow239.1%
unpow239.1%
hypot-undefine81.0%
associate-/l*80.8%
Simplified80.8%
Taylor expanded in y.re around inf 50.1%
exp-sum49.9%
neg-mul-149.9%
*-commutative49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-undefine81.0%
exp-to-pow81.0%
hypot-undefine49.9%
unpow249.9%
unpow249.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-undefine81.0%
Simplified80.8%
if 7e7 < y.re Initial program 37.3%
Taylor expanded in y.re around 0 41.8%
*-commutative41.8%
unpow241.8%
unpow241.8%
hypot-undefine73.2%
Simplified73.2%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -14.2)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 2.75e-8)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(+ (sin t_1) (* y.im (* t_0 (cos t_1)))))
(*
(sin (* y.im t_0))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -14.2) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 2.75e-8) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * (sin(t_1) + (y_46_im * (t_0 * cos(t_1))));
} else {
tmp = sin((y_46_im * t_0)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -14.2) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 2.75e-8) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * (Math.sin(t_1) + (y_46_im * (t_0 * Math.cos(t_1))));
} else {
tmp = Math.sin((y_46_im * t_0)) * 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)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -14.2: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) elif y_46_re <= 2.75e-8: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * (math.sin(t_1) + (y_46_im * (t_0 * math.cos(t_1)))) else: tmp = math.sin((y_46_im * t_0)) * 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))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -14.2) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 2.75e-8) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * Float64(sin(t_1) + Float64(y_46_im * Float64(t_0 * cos(t_1))))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -14.2) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); elseif (y_46_re <= 2.75e-8) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * (sin(t_1) + (y_46_im * (t_0 * cos(t_1)))); else tmp = sin((y_46_im * t_0)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -14.2], 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.75e-8], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(t$95$0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -14.2:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 2.75 \cdot 10^{-8}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \left(\sin t\_1 + y.im \cdot \left(t\_0 \cdot \cos t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot 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}\\
\end{array}
\end{array}
if y.re < -14.199999999999999Initial program 40.0%
fmm-def40.0%
hypot-define40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y.im around inf 27.3%
unpow227.3%
unpow227.3%
hypot-undefine67.3%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in y.im around 0 60.1%
unpow260.1%
unpow260.1%
hypot-undefine60.1%
Simplified60.1%
Taylor expanded in y.re around inf 36.4%
+-commutative36.4%
associate-/l*38.3%
unpow238.3%
unpow238.3%
hypot-undefine85.6%
Simplified85.6%
if -14.199999999999999 < y.re < 2.7500000000000001e-8Initial program 39.4%
fmm-def39.4%
hypot-define39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.im around inf 39.4%
unpow239.4%
unpow239.4%
hypot-undefine80.1%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in y.im around 0 45.0%
*-commutative45.0%
unpow245.0%
unpow245.0%
hypot-undefine78.0%
Simplified78.0%
Taylor expanded in y.re around 0 76.3%
neg-mul-176.3%
Simplified76.3%
if 2.7500000000000001e-8 < y.re Initial program 36.2%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine72.6%
Simplified72.6%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.im -3.3e+14)
(* t_2 (sin t_1))
(if (<= y.im 5200000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(* (sin (* y.im (log (hypot x.im x.re)))) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_im <= -3.3e+14) {
tmp = t_2 * sin(t_1);
} else if (y_46_im <= 5200000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_im <= -3.3e+14) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_im <= 5200000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3.3e+14], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5200000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+14}:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 5200000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_2\\
\end{array}
\end{array}
if y.im < -3.3e14Initial program 33.0%
Taylor expanded in y.im around 0 58.7%
if -3.3e14 < y.im < 5.2e9Initial program 42.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod41.7%
fma-define41.7%
hypot-define89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y.im around 0 87.8%
if 5.2e9 < y.im Initial program 37.9%
Taylor expanded in y.re around 0 37.9%
*-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine67.4%
Simplified67.4%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -1.35e+14)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 175.0)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* (sin (* y.im 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 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -1.35e+14) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 175.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = sin((y_46_im * t_0)) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -1.35e+14) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 175.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = Math.sin((y_46_im * t_0)) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_im <= -1.35e+14: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 175.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = math.sin((y_46_im * t_0)) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -1.35e+14) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 175.0) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_im <= -1.35e+14) tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 175.0) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = sin((y_46_im * t_0)) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.35e+14], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 175.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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+14}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 175:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot t\_1\\
\end{array}
\end{array}
if y.im < -1.35e14Initial program 33.0%
Taylor expanded in y.im around 0 58.7%
if -1.35e14 < y.im < 175Initial program 42.0%
fmm-def42.0%
hypot-define42.0%
distribute-rgt-neg-out42.0%
fma-define42.0%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.im around inf 34.6%
unpow234.6%
unpow234.6%
hypot-undefine74.1%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in y.im around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine70.4%
Simplified70.4%
Taylor expanded in y.re around inf 41.5%
+-commutative41.5%
associate-/l*41.5%
unpow241.5%
unpow241.5%
hypot-undefine87.0%
Simplified87.0%
if 175 < y.im Initial program 37.8%
Taylor expanded in y.re around 0 37.8%
*-commutative37.8%
unpow237.8%
unpow237.8%
hypot-undefine66.9%
Simplified66.9%
Final simplification74.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.im -0.00012) (not (<= y.im 96000000000000.0)))
(/ (sin (* y.im t_0)) (exp (* (atan2 x.im x.re) y.im)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -0.00012) || !(y_46_im <= 96000000000000.0)) {
tmp = sin((y_46_im * t_0)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / 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 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -0.00012) || !(y_46_im <= 96000000000000.0)) {
tmp = Math.sin((y_46_im * t_0)) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if (y_46_im <= -0.00012) or not (y_46_im <= 96000000000000.0): tmp = math.sin((y_46_im * t_0)) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -0.00012) || !(y_46_im <= 96000000000000.0)) tmp = Float64(sin(Float64(y_46_im * t_0)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if ((y_46_im <= -0.00012) || ~((y_46_im <= 96000000000000.0))) tmp = sin((y_46_im * t_0)) / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.00012], N[Not[LessEqual[y$46$im, 96000000000000.0]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -0.00012 \lor \neg \left(y.im \leq 96000000000000\right):\\
\;\;\;\;\frac{\sin \left(y.im \cdot t\_0\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -1.20000000000000003e-4 or 9.6e13 < y.im Initial program 35.4%
exp-diff23.7%
exp-to-pow23.7%
hypot-define23.7%
*-commutative23.7%
exp-prod23.6%
fma-define23.6%
hypot-define51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in y.re around 0 29.7%
*-commutative29.7%
unpow229.7%
unpow229.7%
hypot-undefine60.5%
Simplified60.5%
if -1.20000000000000003e-4 < y.im < 9.6e13Initial program 42.5%
fmm-def42.5%
hypot-define42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around inf 34.9%
unpow234.9%
unpow234.9%
hypot-undefine72.5%
associate-/l*71.5%
Simplified71.5%
Taylor expanded in y.im around 0 46.0%
unpow246.0%
unpow246.0%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in y.re around inf 42.4%
+-commutative42.4%
associate-/l*42.4%
unpow242.4%
unpow242.4%
hypot-undefine88.4%
Simplified88.4%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -2e+14)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 9.8e+15)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(/ (sin (* y.im t_0)) (exp t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -2e+14) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 9.8e+15) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = sin((y_46_im * t_0)) / exp(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 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -2e+14) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 9.8e+15) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = Math.sin((y_46_im * t_0)) / Math.exp(t_1);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if y_46_im <= -2e+14: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 9.8e+15: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = math.sin((y_46_im * t_0)) / math.exp(t_1) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -2e+14) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 9.8e+15) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(sin(Float64(y_46_im * t_0)) / exp(t_1)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (y_46_im <= -2e+14) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 9.8e+15) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = sin((y_46_im * t_0)) / exp(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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -2e+14], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.8e+15], 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+14}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 9.8 \cdot 10^{+15}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot t\_0\right)}{e^{t\_1}}\\
\end{array}
\end{array}
if y.im < -2e14Initial program 33.0%
Taylor expanded in y.im around 0 58.7%
if -2e14 < y.im < 9.8e15Initial program 42.3%
fmm-def42.3%
hypot-define42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y.im around inf 35.1%
unpow235.1%
unpow235.1%
hypot-undefine73.6%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in y.im around 0 46.0%
unpow246.0%
unpow246.0%
hypot-undefine70.0%
Simplified70.0%
Taylor expanded in y.re around inf 41.8%
+-commutative41.8%
associate-/l*41.8%
unpow241.8%
unpow241.8%
hypot-undefine86.2%
Simplified86.2%
if 9.8e15 < y.im Initial program 37.1%
exp-diff22.9%
exp-to-pow22.9%
hypot-define22.9%
*-commutative22.9%
exp-prod22.9%
fma-define22.9%
hypot-define53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in y.re around 0 30.2%
*-commutative30.2%
unpow230.2%
unpow230.2%
hypot-undefine65.3%
Simplified65.3%
Final simplification73.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -2.85e-123)
(* t_1 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))
(if (<= y.re 620000000.0)
(/ t_0 (exp (* (atan2 x.im x.re) y.im)))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.85e-123) {
tmp = t_1 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
} else if (y_46_re <= 620000000.0) {
tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.85e-123) {
tmp = t_1 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
} else if (y_46_re <= 620000000.0) {
tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.85e-123) tmp = Float64(t_1 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); elseif (y_46_re <= 620000000.0) tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(t_1 * t_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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.85e-123], N[(t$95$1 * 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], If[LessEqual[y$46$re, 620000000.0], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.85 \cdot 10^{-123}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 620000000:\\
\;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.85000000000000014e-123Initial program 42.1%
fmm-def42.1%
hypot-define42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y.im around 0 62.3%
unpow262.3%
unpow262.3%
hypot-undefine68.6%
Simplified68.6%
add-cube-cbrt70.6%
pow370.6%
Applied egg-rr70.6%
if -2.85000000000000014e-123 < y.re < 6.2e8Initial program 37.3%
exp-diff36.4%
exp-to-pow36.4%
hypot-define36.4%
*-commutative36.4%
exp-prod35.9%
fma-define35.9%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.re around 0 30.9%
*-commutative30.9%
unpow230.9%
unpow230.9%
hypot-undefine65.6%
Simplified65.6%
if 6.2e8 < y.re Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define37.9%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.im around inf 34.8%
unpow234.8%
unpow234.8%
hypot-undefine62.1%
associate-/l*60.6%
Simplified60.6%
Taylor expanded in y.im around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine45.7%
Simplified45.7%
Taylor expanded in y.re around 0 32.0%
*-commutative32.0%
unpow232.0%
unpow232.0%
hypot-undefine63.9%
Simplified63.9%
Final simplification66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (sin (* y.im t_0))))
(if (<= y.re -1e-15)
(fabs (* t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -2.7e-123)
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))
(if (<= y.re 560000000.0)
(/ t_2 (exp (* (atan2 x.im x.re) y.im)))
(* t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin((y_46_im * t_0));
double tmp;
if (y_46_re <= -1e-15) {
tmp = fabs((t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= -2.7e-123) {
tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 560000000.0) {
tmp = t_2 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin((y_46_im * t_0));
double tmp;
if (y_46_re <= -1e-15) {
tmp = Math.abs((t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= -2.7e-123) {
tmp = Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 560000000.0) {
tmp = t_2 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin((y_46_im * t_0)) tmp = 0 if y_46_re <= -1e-15: tmp = math.fabs((t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))))) elif y_46_re <= -2.7e-123: tmp = math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) elif y_46_re <= 560000000.0: tmp = t_2 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = t_1 * t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = sin(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_re <= -1e-15) tmp = abs(Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_re <= -2.7e-123) tmp = sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_re <= 560000000.0) tmp = Float64(t_2 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(t_1 * t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin((y_46_im * t_0)); tmp = 0.0; if (y_46_re <= -1e-15) tmp = abs((t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))))); elseif (y_46_re <= -2.7e-123) tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_re <= 560000000.0) tmp = t_2 / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = t_1 * t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1e-15], N[Abs[N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, -2.7e-123], N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 560000000.0], N[(t$95$2 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{-15}:\\
\;\;\;\;\left|t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right|\\
\mathbf{elif}\;y.re \leq -2.7 \cdot 10^{-123}:\\
\;\;\;\;\sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 560000000:\\
\;\;\;\;\frac{t\_2}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\end{array}
\end{array}
if y.re < -1.0000000000000001e-15Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y.im around 0 75.0%
unpow275.0%
unpow275.0%
hypot-undefine76.1%
Simplified76.1%
add-log-exp76.1%
Applied egg-rr76.1%
add-sqr-sqrt76.0%
sqrt-unprod79.4%
pow279.4%
rem-log-exp79.4%
Applied egg-rr79.4%
unpow279.4%
rem-sqrt-square79.4%
Simplified79.4%
if -1.0000000000000001e-15 < y.re < -2.7000000000000001e-123Initial program 43.0%
fmm-def43.0%
hypot-define43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in y.im around inf 43.0%
unpow243.0%
unpow243.0%
hypot-undefine78.1%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine62.9%
Simplified62.9%
Taylor expanded in y.re around 0 62.8%
if -2.7000000000000001e-123 < y.re < 5.6e8Initial program 37.3%
exp-diff36.4%
exp-to-pow36.4%
hypot-define36.4%
*-commutative36.4%
exp-prod35.9%
fma-define35.9%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.re around 0 30.9%
*-commutative30.9%
unpow230.9%
unpow230.9%
hypot-undefine65.6%
Simplified65.6%
if 5.6e8 < y.re Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define37.9%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.im around inf 34.8%
unpow234.8%
unpow234.8%
hypot-undefine62.1%
associate-/l*60.6%
Simplified60.6%
Taylor expanded in y.im around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine45.7%
Simplified45.7%
Taylor expanded in y.re around 0 32.0%
*-commutative32.0%
unpow232.0%
unpow232.0%
hypot-undefine63.9%
Simplified63.9%
Final simplification68.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1e-15)
(fabs (* t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re 520000000.0)
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))
(* t_1 (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1e-15) {
tmp = fabs((t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= 520000000.0) {
tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * sin((y_46_im * t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1e-15) {
tmp = Math.abs((t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= 520000000.0) {
tmp = Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * Math.sin((y_46_im * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1e-15: tmp = math.fabs((t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))))) elif y_46_re <= 520000000.0: tmp = math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) else: tmp = t_1 * math.sin((y_46_im * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1e-15) tmp = abs(Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 520000000.0) tmp = sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -1e-15) tmp = abs((t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))))); elseif (y_46_re <= 520000000.0) tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); else tmp = t_1 * sin((y_46_im * t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1e-15], N[Abs[N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 520000000.0], N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{-15}:\\
\;\;\;\;\left|t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right|\\
\mathbf{elif}\;y.re \leq 520000000:\\
\;\;\;\;\sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.0000000000000001e-15Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y.im around 0 75.0%
unpow275.0%
unpow275.0%
hypot-undefine76.1%
Simplified76.1%
add-log-exp76.1%
Applied egg-rr76.1%
add-sqr-sqrt76.0%
sqrt-unprod79.4%
pow279.4%
rem-log-exp79.4%
Applied egg-rr79.4%
unpow279.4%
rem-sqrt-square79.4%
Simplified79.4%
if -1.0000000000000001e-15 < y.re < 5.2e8Initial program 38.4%
fmm-def38.4%
hypot-define38.4%
distribute-rgt-neg-out38.4%
fma-define38.4%
hypot-define80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in y.im around inf 38.4%
unpow238.4%
unpow238.4%
hypot-undefine80.5%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in y.im around 0 31.3%
unpow231.3%
unpow231.3%
hypot-undefine45.9%
Simplified45.9%
Taylor expanded in y.re around 0 44.7%
if 5.2e8 < y.re Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define37.9%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.im around inf 34.8%
unpow234.8%
unpow234.8%
hypot-undefine62.1%
associate-/l*60.6%
Simplified60.6%
Taylor expanded in y.im around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine45.7%
Simplified45.7%
Taylor expanded in y.re around 0 32.0%
*-commutative32.0%
unpow232.0%
unpow232.0%
hypot-undefine63.9%
Simplified63.9%
Final simplification57.8%
(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 (atan2 x.im x.re))))))
(if (<= y.re -1e-15)
(fabs t_0)
(if (<= y.re 2.8e-33)
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1e-15) {
tmp = fabs(t_0);
} else if (y_46_re <= 2.8e-33) {
tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = 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.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1e-15) {
tmp = Math.abs(t_0);
} else if (y_46_re <= 2.8e-33) {
tmp = Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} 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.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -1e-15: tmp = math.fabs(t_0) elif y_46_re <= 2.8e-33: tmp = math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) 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 * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1e-15) tmp = abs(t_0); elseif (y_46_re <= 2.8e-33) tmp = sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -1e-15) tmp = abs(t_0); elseif (y_46_re <= 2.8e-33) tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1e-15], N[Abs[t$95$0], $MachinePrecision], If[LessEqual[y$46$re, 2.8e-33], N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 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 \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{-15}:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-33}:\\
\;\;\;\;\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.0000000000000001e-15Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y.im around 0 75.0%
unpow275.0%
unpow275.0%
hypot-undefine76.1%
Simplified76.1%
add-log-exp76.1%
Applied egg-rr76.1%
add-sqr-sqrt76.0%
sqrt-unprod79.4%
pow279.4%
rem-log-exp79.4%
Applied egg-rr79.4%
unpow279.4%
rem-sqrt-square79.4%
Simplified79.4%
if -1.0000000000000001e-15 < y.re < 2.8e-33Initial program 36.8%
fmm-def36.8%
hypot-define36.8%
distribute-rgt-neg-out36.8%
fma-define36.8%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around inf 36.8%
unpow236.8%
unpow236.8%
hypot-undefine79.3%
associate-/l*79.1%
Simplified79.1%
Taylor expanded in y.im around 0 30.4%
unpow230.4%
unpow230.4%
hypot-undefine45.8%
Simplified45.8%
Taylor expanded in y.re around 0 45.8%
if 2.8e-33 < y.re Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define40.4%
hypot-define75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y.im around 0 55.5%
unpow255.5%
unpow255.5%
hypot-undefine55.6%
Simplified55.6%
Final simplification56.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -2.2e-30) (not (<= y.re 4.2e-32)))
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
(sin
(* y.im (+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.2e-30) || !(y_46_re <= 4.2e-32)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
}
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 <= -2.2e-30) || !(y_46_re <= 4.2e-32)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.2e-30) or not (y_46_re <= 4.2e-32): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.2e-30) || !(y_46_re <= 4.2e-32)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); 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 <= -2.2e-30) || ~((y_46_re <= 4.2e-32))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.2e-30], N[Not[LessEqual[y$46$re, 4.2e-32]], $MachinePrecision]], 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[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{-30} \lor \neg \left(y.re \leq 4.2 \cdot 10^{-32}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.re < -2.19999999999999983e-30 or 4.1999999999999998e-32 < y.re Initial program 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define41.2%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 62.9%
unpow262.9%
unpow262.9%
hypot-undefine64.1%
Simplified64.1%
if -2.19999999999999983e-30 < y.re < 4.1999999999999998e-32Initial program 36.3%
fmm-def36.3%
hypot-define36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around inf 36.3%
unpow236.3%
unpow236.3%
hypot-undefine79.4%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in y.im around 0 30.5%
unpow230.5%
unpow230.5%
hypot-undefine45.6%
Simplified45.6%
Taylor expanded in y.re around 0 45.6%
Final simplification55.9%
(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 -2.7e-125) (not (<= y.re 1.05e-77)))
(* (pow (hypot x.im x.re) y.re) t_0)
(log (exp t_0)))))
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 <= -2.7e-125) || !(y_46_re <= 1.05e-77)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else {
tmp = log(exp(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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -2.7e-125) || !(y_46_re <= 1.05e-77)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else {
tmp = Math.log(Math.exp(t_0));
}
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 <= -2.7e-125) or not (y_46_re <= 1.05e-77): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 else: tmp = math.log(math.exp(t_0)) 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 <= -2.7e-125) || !(y_46_re <= 1.05e-77)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0); else tmp = log(exp(t_0)); 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 <= -2.7e-125) || ~((y_46_re <= 1.05e-77))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; else tmp = log(exp(t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.7e-125], N[Not[LessEqual[y$46$re, 1.05e-77]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[Log[N[Exp[t$95$0], $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 -2.7 \cdot 10^{-125} \lor \neg \left(y.re \leq 1.05 \cdot 10^{-77}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{t\_0}\right)\\
\end{array}
\end{array}
if y.re < -2.6999999999999998e-125 or 1.05000000000000008e-77 < y.re Initial program 39.7%
fmm-def39.7%
hypot-define39.7%
distribute-rgt-neg-out39.7%
fma-define40.3%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around 0 56.2%
unpow256.2%
unpow256.2%
hypot-undefine61.1%
Simplified61.1%
if -2.6999999999999998e-125 < y.re < 1.05000000000000008e-77Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in y.im around 0 17.5%
unpow217.5%
unpow217.5%
hypot-undefine16.9%
Simplified16.9%
Taylor expanded in y.re around 0 16.9%
*-rgt-identity16.9%
add-log-exp28.4%
Applied egg-rr28.4%
Final simplification50.6%
(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 -4.2e+70)
(fabs (* t_1 (pow x.re y.re)))
(if (or (<= y.re -3.35e-43) (not (<= y.re 2.4e-14)))
(* t_1 (pow x.im y.re))
(cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -4.2e+70) {
tmp = fabs((t_1 * pow(x_46_re, y_46_re)));
} else if ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -4.2e+70) {
tmp = Math.abs((t_1 * Math.pow(x_46_re, y_46_re)));
} else if ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -4.2e+70) tmp = abs(Float64(t_1 * (x_46_re ^ y_46_re))); elseif ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e+70], N[Abs[N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[y$46$re, -3.35e-43], N[Not[LessEqual[y$46$re, 2.4e-14]], $MachinePrecision]], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+70}:\\
\;\;\;\;\left|t\_1 \cdot {x.re}^{y.re}\right|\\
\mathbf{elif}\;y.re \leq -3.35 \cdot 10^{-43} \lor \neg \left(y.re \leq 2.4 \cdot 10^{-14}\right):\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -4.20000000000000015e70Initial program 38.3%
fmm-def38.3%
hypot-define38.3%
distribute-rgt-neg-out38.3%
fma-define38.3%
hypot-define91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in y.im around 0 81.0%
unpow281.0%
unpow281.0%
hypot-undefine81.0%
Simplified81.0%
Taylor expanded in x.im around 0 64.2%
add-sqr-sqrt64.1%
sqrt-unprod68.4%
pow268.4%
Applied egg-rr68.4%
unpow268.4%
rem-sqrt-square68.4%
Simplified68.4%
if -4.20000000000000015e70 < y.re < -3.3499999999999999e-43 or 2.4e-14 < y.re Initial program 41.1%
fmm-def41.1%
hypot-define41.1%
distribute-rgt-neg-out41.1%
fma-define42.2%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.im around 0 56.4%
unpow256.4%
unpow256.4%
hypot-undefine57.2%
Simplified57.2%
Taylor expanded in x.re around 0 50.0%
if -3.3499999999999999e-43 < y.re < 2.4e-14Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.im around 0 19.6%
unpow219.6%
unpow219.6%
hypot-undefine25.7%
Simplified25.7%
Taylor expanded in y.re around 0 25.7%
add-cbrt-cube30.3%
pow330.3%
Applied egg-rr30.3%
Final simplification44.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -3.35e-43) (not (<= y.re 2.4e-14)))
(* (sin t_0) (pow x.im y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -3.35e-43) || !(y_46_re <= 2.4e-14)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.35e-43], N[Not[LessEqual[y$46$re, 2.4e-14]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3.35 \cdot 10^{-43} \lor \neg \left(y.re \leq 2.4 \cdot 10^{-14}\right):\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -3.3499999999999999e-43 or 2.4e-14 < y.re Initial program 40.1%
fmm-def40.1%
hypot-define40.1%
distribute-rgt-neg-out40.1%
fma-define40.9%
hypot-define81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-undefine65.3%
Simplified65.3%
Taylor expanded in x.re around 0 52.0%
if -3.3499999999999999e-43 < y.re < 2.4e-14Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.im around 0 19.6%
unpow219.6%
unpow219.6%
hypot-undefine25.7%
Simplified25.7%
Taylor expanded in y.re around 0 25.7%
add-cbrt-cube30.3%
pow330.3%
Applied egg-rr30.3%
Final simplification41.9%
(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 -3.5e-19)
(* t_1 (pow x.re y.re))
(if (<= y.re 2.4e-14) (cbrt (pow t_0 3.0)) (* t_1 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -3.5e-19) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 2.4e-14) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -3.5e-19) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 2.4e-14) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -3.5e-19) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 2.4e-14) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(t_1 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -3.5e-19], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-14], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{-19}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.50000000000000015e-19Initial program 41.0%
fmm-def41.0%
hypot-define41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y.im around 0 73.8%
unpow273.8%
unpow273.8%
hypot-undefine76.5%
Simplified76.5%
Taylor expanded in x.im around 0 55.0%
if -3.50000000000000015e-19 < y.re < 2.4e-14Initial program 37.9%
fmm-def37.9%
hypot-define37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y.im around 0 20.5%
unpow220.5%
unpow220.5%
hypot-undefine26.4%
Simplified26.4%
Taylor expanded in y.re around 0 26.4%
add-cbrt-cube30.8%
pow330.7%
Applied egg-rr30.7%
if 2.4e-14 < y.re Initial program 38.0%
fmm-def38.0%
hypot-define38.0%
distribute-rgt-neg-out38.0%
fma-define39.4%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 58.8%
unpow258.8%
unpow258.8%
hypot-undefine57.4%
Simplified57.4%
Taylor expanded in x.re around 0 50.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -4000.0)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.im 1.7e+87)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4000.0) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_im <= 1.7e+87) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4000.0) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_im <= 1.7e+87) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
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) tmp = 0 if y_46_im <= -4000.0: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_im <= 1.7e+87: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -4000.0) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_im <= 1.7e+87) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4000.0], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 1.7e+87], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4000:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t\_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -4e3Initial program 32.0%
fmm-def32.0%
hypot-define32.0%
distribute-rgt-neg-out32.0%
fma-define32.0%
hypot-define65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in y.im around 0 32.9%
unpow232.9%
unpow232.9%
hypot-undefine22.5%
Simplified22.5%
Taylor expanded in y.re around 0 3.0%
expm1-log1p-u2.5%
expm1-undefine23.2%
Applied egg-rr23.2%
if -4e3 < y.im < 1.7000000000000001e87Initial program 43.0%
fmm-def43.0%
hypot-define43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 47.5%
unpow247.5%
unpow247.5%
hypot-undefine58.8%
Simplified58.8%
Taylor expanded in y.re around 0 24.7%
log1p-expm1-u41.2%
Applied egg-rr41.2%
if 1.7000000000000001e87 < y.im Initial program 35.7%
fmm-def35.7%
hypot-define35.7%
distribute-rgt-neg-out35.7%
fma-define37.5%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in y.im around 0 47.4%
unpow247.4%
unpow247.4%
hypot-undefine46.1%
Simplified46.1%
Taylor expanded in y.re around 0 11.4%
add-cbrt-cube29.8%
pow1/334.9%
pow334.9%
Applied egg-rr34.9%
Final simplification35.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -0.032) (not (<= y.im 6.8e+90)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -0.032) || !(y_46_im <= 6.8e+90)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -0.032) || !(y_46_im <= 6.8e+90)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -0.032) || !(y_46_im <= 6.8e+90)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.032], N[Not[LessEqual[y$46$im, 6.8e+90]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -0.032 \lor \neg \left(y.im \leq 6.8 \cdot 10^{+90}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -0.032000000000000001 or 6.80000000000000036e90 < y.im Initial program 34.6%
fmm-def34.6%
hypot-define34.6%
distribute-rgt-neg-out34.6%
fma-define35.4%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.im around 0 40.5%
unpow240.5%
unpow240.5%
hypot-undefine34.3%
Simplified34.3%
Taylor expanded in y.re around 0 6.9%
add-cbrt-cube24.0%
pow324.0%
Applied egg-rr24.0%
if -0.032000000000000001 < y.im < 6.80000000000000036e90Initial program 42.3%
fmm-def42.3%
hypot-define42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y.im around 0 46.7%
unpow246.7%
unpow246.7%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in y.re around 0 24.7%
log1p-expm1-u41.2%
Applied egg-rr41.2%
Final simplification33.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -190.0)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.im 1e+91) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -190.0) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_im <= 1e+91) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -190.0) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_im <= 1e+91) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -190.0) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_im <= 1e+91) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -190.0], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 1e+91], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -190:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.im \leq 10^{+91}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.im < -190Initial program 32.0%
fmm-def32.0%
hypot-define32.0%
distribute-rgt-neg-out32.0%
fma-define32.0%
hypot-define65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in y.im around 0 32.9%
unpow232.9%
unpow232.9%
hypot-undefine22.5%
Simplified22.5%
Taylor expanded in y.re around 0 3.0%
expm1-log1p-u2.5%
expm1-undefine23.2%
Applied egg-rr23.2%
if -190 < y.im < 1.00000000000000008e91Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.7%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y.im around 0 47.1%
unpow247.1%
unpow247.1%
hypot-undefine58.4%
Simplified58.4%
Taylor expanded in y.re around 0 24.5%
log1p-expm1-u40.9%
Applied egg-rr40.9%
if 1.00000000000000008e91 < y.im Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define38.2%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.im around 0 48.2%
unpow248.2%
unpow248.2%
hypot-undefine46.9%
Simplified46.9%
Taylor expanded in y.re around 0 11.6%
add-cbrt-cube30.3%
pow330.3%
Applied egg-rr30.3%
Final simplification34.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 3.8e+33) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 3.8e+33) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 3.8e+33) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 3.8e+33: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 3.8e+33) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 3.8e+33], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 3.8 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 3.80000000000000002e33Initial program 44.8%
fmm-def44.8%
hypot-define44.8%
distribute-rgt-neg-out44.8%
fma-define45.3%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-undefine48.2%
Simplified48.2%
Taylor expanded in y.re around 0 15.3%
log1p-expm1-u30.0%
Applied egg-rr30.0%
if 3.80000000000000002e33 < x.re Initial program 18.2%
fmm-def18.2%
hypot-define18.2%
distribute-rgt-neg-out18.2%
fma-define18.2%
hypot-define77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y.im around 0 38.7%
unpow238.7%
unpow238.7%
hypot-undefine42.7%
Simplified42.7%
Taylor expanded in y.re around 0 19.8%
add-log-exp32.1%
Applied egg-rr32.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define39.0%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.im around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine46.9%
Simplified46.9%
Taylor expanded in y.re around 0 16.3%
log1p-expm1-u28.7%
Applied egg-rr28.7%
(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 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define39.0%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.im around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine46.9%
Simplified46.9%
Taylor expanded in y.re around 0 16.3%
herbie shell --seed 2024170
(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)))))