
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re)))))
(t_3 (* t_2 (sin t_0))))
(if (<= y.im -4.5e+23)
(* t_2 (sin (fabs t_0)))
(if (<= y.im -1e-45)
t_3
(if (<= y.im 3.8e-130)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
(if (<= y.im 6.5e+183)
t_3
(* t_2 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 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_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_3 = t_2 * sin(t_0);
double tmp;
if (y_46_im <= -4.5e+23) {
tmp = t_2 * sin(fabs(t_0));
} else if (y_46_im <= -1e-45) {
tmp = t_3;
} else if (y_46_im <= 3.8e-130) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
} else if (y_46_im <= 6.5e+183) {
tmp = t_3;
} else {
tmp = t_2 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_3 = Float64(t_2 * sin(t_0)) tmp = 0.0 if (y_46_im <= -4.5e+23) tmp = Float64(t_2 * sin(abs(t_0))); elseif (y_46_im <= -1e-45) tmp = t_3; elseif (y_46_im <= 3.8e-130) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1)))); elseif (y_46_im <= 6.5e+183) tmp = t_3; else tmp = Float64(t_2 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.5e+23], N[(t$95$2 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1e-45], t$95$3, If[LessEqual[y$46$im, 3.8e-130], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.5e+183], t$95$3, N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := t_2 \cdot \sin t_0\\
\mathbf{if}\;y.im \leq -4.5 \cdot 10^{+23}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.im \leq -1 \cdot 10^{-45}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-130}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{+183}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -4.49999999999999979e23Initial program 31.3%
Simplified68.9%
hypot-udef31.3%
*-commutative31.3%
fma-def31.3%
add-cube-cbrt36.1%
pow336.1%
*-commutative36.1%
hypot-udef68.6%
fma-def68.6%
Applied egg-rr68.6%
Taylor expanded in y.re around 0 31.3%
pow-base-131.3%
*-lft-identity31.3%
*-commutative31.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
hypot-def31.3%
unpow231.3%
unpow231.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
Simplified63.5%
add-sqr-sqrt13.0%
sqrt-unprod40.0%
pow240.0%
*-commutative40.0%
hypot-udef14.6%
+-commutative14.6%
hypot-udef40.0%
Applied egg-rr40.0%
unpow240.0%
rem-sqrt-square72.6%
*-commutative72.6%
hypot-def30.7%
unpow230.7%
unpow230.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def72.6%
Simplified72.6%
if -4.49999999999999979e23 < y.im < -9.99999999999999984e-46 or 3.7999999999999998e-130 < y.im < 6.49999999999999983e183Initial program 35.4%
Simplified76.8%
hypot-udef36.5%
*-commutative36.5%
fma-def35.4%
add-cube-cbrt30.7%
pow332.8%
*-commutative32.8%
hypot-udef75.7%
fma-def74.6%
Applied egg-rr74.6%
Taylor expanded in y.re around 0 39.8%
pow-base-139.8%
*-lft-identity39.8%
*-commutative39.8%
+-commutative39.8%
unpow239.8%
unpow239.8%
hypot-def81.3%
hypot-def39.8%
unpow239.8%
unpow239.8%
+-commutative39.8%
unpow239.8%
unpow239.8%
hypot-def81.3%
Simplified81.3%
if -9.99999999999999984e-46 < y.im < 3.7999999999999998e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
if 6.49999999999999983e183 < y.im Initial program 30.4%
Simplified48.1%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
add-cube-cbrt82.5%
pow388.4%
Applied egg-rr88.4%
Final simplification84.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im 5e+188)
(* t_2 (sin (fma t_1 y.im t_0)))
(* t_2 (sin (pow (cbrt 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 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= 5e+188) {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = t_2 * sin(pow(cbrt(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 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= 5e+188) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(t_2 * sin((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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 5e+188], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq 5 \cdot 10^{+188}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < 5.0000000000000001e188Initial program 40.3%
Simplified81.8%
if 5.0000000000000001e188 < y.im Initial program 30.4%
Simplified48.1%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
add-cube-cbrt82.5%
pow388.4%
Applied egg-rr88.4%
Final simplification82.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -4.7e-46)
(* t_2 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im 3.7e-130)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
(if (<= y.im 3.6e+189)
(* t_2 (sin t_0))
(* t_2 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 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_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -4.7e-46) {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= 3.7e-130) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
} else if (y_46_im <= 3.6e+189) {
tmp = t_2 * sin(t_0);
} else {
tmp = t_2 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -4.7e-46) tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= 3.7e-130) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1)))); elseif (y_46_im <= 3.6e+189) tmp = Float64(t_2 * sin(t_0)); else tmp = Float64(t_2 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -4.7e-46], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.7e-130], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.6e+189], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -4.7 \cdot 10^{-46}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{-130}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{+189}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -4.69999999999999966e-46Initial program 34.1%
Simplified70.7%
hypot-udef34.1%
*-commutative34.1%
fma-def34.1%
add-cube-cbrt37.8%
pow337.7%
*-commutative37.7%
hypot-udef70.4%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 11.3%
unpow1/340.6%
*-commutative40.6%
+-commutative40.6%
unpow240.6%
unpow240.6%
hypot-def73.2%
hypot-def40.6%
unpow240.6%
unpow240.6%
+-commutative40.6%
unpow240.6%
unpow240.6%
hypot-def73.2%
Simplified73.2%
if -4.69999999999999966e-46 < y.im < 3.7000000000000004e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
if 3.7000000000000004e-130 < y.im < 3.60000000000000008e189Initial program 33.6%
Simplified76.6%
hypot-udef34.9%
*-commutative34.9%
fma-def33.6%
add-cube-cbrt28.1%
pow330.6%
*-commutative30.6%
hypot-udef75.5%
fma-def74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 34.9%
pow-base-134.9%
*-lft-identity34.9%
*-commutative34.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def78.1%
hypot-def34.9%
unpow234.9%
unpow234.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def78.1%
Simplified78.1%
if 3.60000000000000008e189 < y.im Initial program 30.4%
Simplified48.1%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
add-cube-cbrt82.5%
pow388.4%
Applied egg-rr88.4%
Final simplification83.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (log (hypot x.re x.im)))
(t_3 (exp (- (* t_2 y.re) t_0))))
(if (<= y.im -2.5e+23)
(* t_3 (sin (fabs t_1)))
(if (<= y.im 7.5e-131)
(*
(sin (fma y.re (atan2 x.im x.re) (* y.im t_2)))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(if (<= y.im 7.6e+186)
(* t_3 (sin t_1))
(* t_3 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(((t_2 * y_46_re) - t_0));
double tmp;
if (y_46_im <= -2.5e+23) {
tmp = t_3 * sin(fabs(t_1));
} else if (y_46_im <= 7.5e-131) {
tmp = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_2))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else if (y_46_im <= 7.6e+186) {
tmp = t_3 * sin(t_1);
} else {
tmp = t_3 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) tmp = 0.0 if (y_46_im <= -2.5e+23) tmp = Float64(t_3 * sin(abs(t_1))); elseif (y_46_im <= 7.5e-131) tmp = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_2))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); elseif (y_46_im <= 7.6e+186) tmp = Float64(t_3 * sin(t_1)); else tmp = Float64(t_3 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.5e+23], N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e-131], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$2), $MachinePrecision]), $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], If[LessEqual[y$46$im, 7.6e+186], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{t_2 \cdot y.re - t_0}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+23}:\\
\;\;\;\;t_3 \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-131}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_2\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1}\\
\mathbf{elif}\;y.im \leq 7.6 \cdot 10^{+186}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -2.5e23Initial program 31.3%
Simplified68.9%
hypot-udef31.3%
*-commutative31.3%
fma-def31.3%
add-cube-cbrt36.1%
pow336.1%
*-commutative36.1%
hypot-udef68.6%
fma-def68.6%
Applied egg-rr68.6%
Taylor expanded in y.re around 0 31.3%
pow-base-131.3%
*-lft-identity31.3%
*-commutative31.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
hypot-def31.3%
unpow231.3%
unpow231.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
Simplified63.5%
add-sqr-sqrt13.0%
sqrt-unprod40.0%
pow240.0%
*-commutative40.0%
hypot-udef14.6%
+-commutative14.6%
hypot-udef40.0%
Applied egg-rr40.0%
unpow240.0%
rem-sqrt-square72.6%
*-commutative72.6%
hypot-def30.7%
unpow230.7%
unpow230.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def72.6%
Simplified72.6%
if -2.5e23 < y.im < 7.49999999999999964e-131Initial program 49.6%
exp-diff48.7%
+-rgt-identity48.7%
+-rgt-identity48.7%
exp-to-pow48.7%
hypot-def48.7%
*-commutative48.7%
exp-prod48.1%
+-commutative48.1%
*-commutative48.1%
Simplified89.5%
Taylor expanded in y.im around 0 91.3%
if 7.49999999999999964e-131 < y.im < 7.5999999999999996e186Initial program 33.6%
Simplified76.6%
hypot-udef34.9%
*-commutative34.9%
fma-def33.6%
add-cube-cbrt28.1%
pow330.6%
*-commutative30.6%
hypot-udef75.5%
fma-def74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 34.9%
pow-base-134.9%
*-lft-identity34.9%
*-commutative34.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def78.1%
hypot-def34.9%
unpow234.9%
unpow234.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def78.1%
Simplified78.1%
if 7.5999999999999996e186 < y.im Initial program 30.4%
Simplified48.1%
Taylor expanded in y.im around 0 76.7%
*-commutative76.7%
add-cube-cbrt82.5%
pow388.4%
Applied egg-rr88.4%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -1.46e+26)
(* t_2 (sin (fabs t_0)))
(if (<= y.im -2e-50)
(* t_2 (sin t_0))
(if (<= y.im 3.8e-130)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
(* t_2 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.46e+26) {
tmp = t_2 * sin(fabs(t_0));
} else if (y_46_im <= -2e-50) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 3.8e-130) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
} else {
tmp = t_2 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.46e+26) tmp = Float64(t_2 * sin(abs(t_0))); elseif (y_46_im <= -2e-50) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 3.8e-130) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1)))); else tmp = Float64(t_2 * 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.46e+26], N[(t$95$2 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2e-50], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e-130], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -1.46 \cdot 10^{+26}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-50}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-130}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_0\\
\end{array}
\end{array}
if y.im < -1.45999999999999992e26Initial program 31.3%
Simplified68.9%
hypot-udef31.3%
*-commutative31.3%
fma-def31.3%
add-cube-cbrt36.1%
pow336.1%
*-commutative36.1%
hypot-udef68.6%
fma-def68.6%
Applied egg-rr68.6%
Taylor expanded in y.re around 0 31.3%
pow-base-131.3%
*-lft-identity31.3%
*-commutative31.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
hypot-def31.3%
unpow231.3%
unpow231.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-def63.5%
Simplified63.5%
add-sqr-sqrt13.0%
sqrt-unprod40.0%
pow240.0%
*-commutative40.0%
hypot-udef14.6%
+-commutative14.6%
hypot-udef40.0%
Applied egg-rr40.0%
unpow240.0%
rem-sqrt-square72.6%
*-commutative72.6%
hypot-def30.7%
unpow230.7%
unpow230.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def72.6%
Simplified72.6%
if -1.45999999999999992e26 < y.im < -2.00000000000000002e-50Initial program 44.6%
Simplified77.7%
hypot-udef44.6%
*-commutative44.6%
fma-def44.6%
add-cube-cbrt44.1%
pow344.0%
*-commutative44.0%
hypot-udef76.9%
fma-def76.9%
Applied egg-rr76.9%
Taylor expanded in y.re around 0 64.6%
pow-base-164.6%
*-lft-identity64.6%
*-commutative64.6%
+-commutative64.6%
unpow264.6%
unpow264.6%
hypot-def97.7%
hypot-def64.6%
unpow264.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
unpow264.6%
hypot-def97.7%
Simplified97.7%
if -2.00000000000000002e-50 < y.im < 3.7999999999999998e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
if 3.7999999999999998e-130 < y.im Initial program 33.0%
Simplified71.4%
hypot-udef34.1%
*-commutative34.1%
fma-def33.0%
add-cube-cbrt28.5%
pow331.6%
*-commutative31.6%
hypot-udef71.5%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 34.1%
pow-base-134.1%
*-lft-identity34.1%
*-commutative34.1%
+-commutative34.1%
unpow234.1%
unpow234.1%
hypot-def72.5%
hypot-def34.1%
unpow234.1%
unpow234.1%
+-commutative34.1%
unpow234.1%
unpow234.1%
hypot-def72.5%
Simplified72.5%
Taylor expanded in y.im around 0 44.2%
*-commutative44.2%
unpow244.2%
unpow244.2%
hypot-def73.6%
Simplified73.6%
Final simplification82.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -2.9e-49)
(* t_2 (sin t_0))
(if (<= y.im 3.6e-130)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
(* t_2 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -2.9e-49) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 3.6e-130) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
} else {
tmp = t_2 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -2.9e-49) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 3.6e-130) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1)))); else tmp = Float64(t_2 * 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.9e-49], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.6e-130], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -2.9 \cdot 10^{-49}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{-130}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_0\\
\end{array}
\end{array}
if y.im < -2.9e-49Initial program 34.1%
Simplified70.7%
hypot-udef34.1%
*-commutative34.1%
fma-def34.1%
add-cube-cbrt37.8%
pow337.7%
*-commutative37.7%
hypot-udef70.4%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 38.3%
pow-base-138.3%
*-lft-identity38.3%
*-commutative38.3%
+-commutative38.3%
unpow238.3%
unpow238.3%
hypot-def70.7%
hypot-def38.3%
unpow238.3%
unpow238.3%
+-commutative38.3%
unpow238.3%
unpow238.3%
hypot-def70.7%
Simplified70.7%
if -2.9e-49 < y.im < 3.6000000000000001e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
if 3.6000000000000001e-130 < y.im Initial program 33.0%
Simplified71.4%
hypot-udef34.1%
*-commutative34.1%
fma-def33.0%
add-cube-cbrt28.5%
pow331.6%
*-commutative31.6%
hypot-udef71.5%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 34.1%
pow-base-134.1%
*-lft-identity34.1%
*-commutative34.1%
+-commutative34.1%
unpow234.1%
unpow234.1%
hypot-def72.5%
hypot-def34.1%
unpow234.1%
unpow234.1%
+-commutative34.1%
unpow234.1%
unpow234.1%
hypot-def72.5%
Simplified72.5%
Taylor expanded in y.im around 0 44.2%
*-commutative44.2%
unpow244.2%
unpow244.2%
hypot-def73.6%
Simplified73.6%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -4.5e-50) (not (<= y.im 3.5e-130)))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(* y.im (log (hypot x.im x.re))))
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -4.5e-50) || !(y_46_im <= 3.5e-130)) {
tmp = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -4.5e-50) || !(y_46_im <= 3.5e-130)) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.5e-50], N[Not[LessEqual[y$46$im, 3.5e-130]], $MachinePrecision]], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4.5 \cdot 10^{-50} \lor \neg \left(y.im \leq 3.5 \cdot 10^{-130}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -4.49999999999999962e-50 or 3.4999999999999999e-130 < y.im Initial program 33.5%
Simplified71.1%
hypot-udef34.1%
*-commutative34.1%
fma-def33.5%
add-cube-cbrt32.5%
pow334.3%
*-commutative34.3%
hypot-udef71.0%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 35.9%
pow-base-135.9%
*-lft-identity35.9%
*-commutative35.9%
+-commutative35.9%
unpow235.9%
unpow235.9%
hypot-def71.7%
hypot-def35.9%
unpow235.9%
unpow235.9%
+-commutative35.9%
unpow235.9%
unpow235.9%
hypot-def71.7%
Simplified71.7%
Taylor expanded in y.im around 0 44.3%
*-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def72.2%
Simplified72.2%
if -4.49999999999999962e-50 < y.im < 3.4999999999999999e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
expm1-log1p-u86.8%
expm1-udef37.4%
/-rgt-identity37.4%
fma-udef37.4%
+-commutative37.4%
*-commutative37.4%
*-commutative37.4%
fma-udef37.4%
Applied egg-rr37.4%
expm1-def86.8%
expm1-log1p94.3%
*-commutative94.3%
Simplified94.3%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1e-45) (not (<= y.im 3.8e-130)))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(* y.im (log (hypot x.im x.re))))
(*
(pow (hypot x.re x.im) y.re)
(sin (fma 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 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1e-45) || !(y_46_im <= 3.8e-130)) {
tmp = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (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_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1e-45) || !(y_46_im <= 3.8e-130)) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), 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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1e-45], N[Not[LessEqual[y$46$im, 3.8e-130]], $MachinePrecision]], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{-45} \lor \neg \left(y.im \leq 3.8 \cdot 10^{-130}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -9.99999999999999984e-46 or 3.7999999999999998e-130 < y.im Initial program 33.5%
Simplified71.1%
hypot-udef34.1%
*-commutative34.1%
fma-def33.5%
add-cube-cbrt32.5%
pow334.3%
*-commutative34.3%
hypot-udef71.0%
fma-def70.4%
Applied egg-rr70.4%
Taylor expanded in y.re around 0 35.9%
pow-base-135.9%
*-lft-identity35.9%
*-commutative35.9%
+-commutative35.9%
unpow235.9%
unpow235.9%
hypot-def71.7%
hypot-def35.9%
unpow235.9%
unpow235.9%
+-commutative35.9%
unpow235.9%
unpow235.9%
hypot-def71.7%
Simplified71.7%
Taylor expanded in y.im around 0 44.3%
*-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def72.2%
Simplified72.2%
if -9.99999999999999984e-46 < y.im < 3.7999999999999998e-130Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified94.3%
Taylor expanded in y.im around 0 94.3%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* y.im (atan2 x.im x.re))))))
(if (or (<= y.im -3.5e-233) (not (<= y.im 7.5e-146)))
(* t_0 (* y.im (log (hypot x.im x.re))))
(* t_0 (sin (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if ((y_46_im <= -3.5e-233) || !(y_46_im <= 7.5e-146)) {
tmp = t_0 * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if ((y_46_im <= -3.5e-233) || !(y_46_im <= 7.5e-146)) {
tmp = t_0 * (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if (y_46_im <= -3.5e-233) or not (y_46_im <= 7.5e-146): tmp = t_0 * (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) else: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_im <= -3.5e-233) || !(y_46_im <= 7.5e-146)) tmp = Float64(t_0 * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if ((y_46_im <= -3.5e-233) || ~((y_46_im <= 7.5e-146))) tmp = t_0 * (y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.5e-233], N[Not[LessEqual[y$46$im, 7.5e-146]], $MachinePrecision]], N[(t$95$0 * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -3.5 \cdot 10^{-233} \lor \neg \left(y.im \leq 7.5 \cdot 10^{-146}\right):\\
\;\;\;\;t_0 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -3.49999999999999991e-233 or 7.49999999999999981e-146 < y.im Initial program 37.4%
Simplified76.5%
hypot-udef37.9%
*-commutative37.9%
fma-def37.4%
add-cube-cbrt36.5%
pow337.9%
*-commutative37.9%
hypot-udef75.3%
fma-def74.8%
Applied egg-rr74.8%
Taylor expanded in y.re around 0 38.1%
pow-base-138.1%
*-lft-identity38.1%
*-commutative38.1%
+-commutative38.1%
unpow238.1%
unpow238.1%
hypot-def74.0%
hypot-def38.1%
unpow238.1%
unpow238.1%
+-commutative38.1%
unpow238.1%
unpow238.1%
hypot-def74.0%
Simplified74.0%
Taylor expanded in y.im around 0 46.6%
*-commutative46.6%
unpow246.6%
unpow246.6%
hypot-def74.4%
Simplified74.4%
if -3.49999999999999991e-233 < y.im < 7.49999999999999981e-146Initial program 49.9%
Simplified93.2%
Taylor expanded in y.im around 0 77.0%
Final simplification74.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -1.65e-254)
(* t_1 (exp (- (* (log (/ -1.0 x.im)) (- y.re)) t_0)))
(if (<= x.im 4.8e-239)
(* t_1 (pow (hypot x.im x.re) y.re))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.im)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.65e-254) {
tmp = t_1 * exp(((log((-1.0 / x_46_im)) * -y_46_re) - t_0));
} else if (x_46_im <= 4.8e-239) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_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 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.65e-254) {
tmp = t_1 * Math.exp(((Math.log((-1.0 / x_46_im)) * -y_46_re) - t_0));
} else if (x_46_im <= 4.8e-239) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.65e-254: tmp = t_1 * math.exp(((math.log((-1.0 / x_46_im)) * -y_46_re) - t_0)) elif x_46_im <= 4.8e-239: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.65e-254) tmp = Float64(t_1 * exp(Float64(Float64(log(Float64(-1.0 / x_46_im)) * Float64(-y_46_re)) - t_0))); elseif (x_46_im <= 4.8e-239) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.65e-254) tmp = t_1 * exp(((log((-1.0 / x_46_im)) * -y_46_re) - t_0)); elseif (x_46_im <= 4.8e-239) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.65e-254], N[(t$95$1 * N[Exp[N[(N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.8e-239], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.65 \cdot 10^{-254}:\\
\;\;\;\;t_1 \cdot e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - t_0}\\
\mathbf{elif}\;x.im \leq 4.8 \cdot 10^{-239}:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -1.65000000000000008e-254Initial program 39.8%
Simplified81.1%
Taylor expanded in y.im around 0 65.4%
Taylor expanded in x.im around -inf 62.4%
mul-1-neg62.4%
*-commutative62.4%
Simplified62.4%
if -1.65000000000000008e-254 < x.im < 4.79999999999999985e-239Initial program 43.5%
Simplified65.6%
Taylor expanded in y.im around 0 65.1%
Taylor expanded in y.im around 0 54.4%
*-commutative54.4%
unpow254.4%
unpow254.4%
hypot-def54.6%
Simplified54.6%
if 4.79999999999999985e-239 < x.im Initial program 38.5%
Simplified81.4%
hypot-udef38.5%
*-commutative38.5%
fma-def38.5%
add-cube-cbrt39.7%
pow339.7%
*-commutative39.7%
hypot-udef81.2%
fma-def81.2%
Applied egg-rr81.2%
Taylor expanded in y.re around 0 36.0%
pow-base-136.0%
*-lft-identity36.0%
*-commutative36.0%
+-commutative36.0%
unpow236.0%
unpow236.0%
hypot-def73.8%
hypot-def36.0%
unpow236.0%
unpow236.0%
+-commutative36.0%
unpow236.0%
unpow236.0%
hypot-def73.8%
Simplified73.8%
Taylor expanded in x.re around 0 69.5%
Final simplification64.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* y.im (atan2 x.im x.re))))))
(if (<= x.re 1.65e+32)
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(* t_0 (sin (* y.im (log x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= 1.65e+32) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= 1.65e+32) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if x_46_re <= 1.65e+32: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = t_0 * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= 1.65e+32) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if (x_46_re <= 1.65e+32) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = t_0 * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, 1.65e+32], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.re \leq 1.65 \cdot 10^{+32}:\\
\;\;\;\;t_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 1.6500000000000001e32Initial program 45.7%
Simplified80.9%
Taylor expanded in y.im around 0 66.7%
if 1.6500000000000001e32 < x.re Initial program 16.8%
Simplified74.4%
hypot-udef16.8%
*-commutative16.8%
fma-def16.8%
add-cube-cbrt18.5%
pow318.2%
*-commutative18.2%
hypot-udef71.6%
fma-def71.6%
Applied egg-rr71.6%
Taylor expanded in x.im around 0 16.0%
unpow1/338.2%
*-commutative38.2%
unpow238.2%
cube-unmult38.2%
*-commutative38.2%
fma-def38.2%
Simplified38.2%
Taylor expanded in y.im around inf 71.3%
Final simplification67.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8.5e+75) (not (<= y.im 2.2e+19))) (* (atan2 x.im x.re) (* y.re (exp (* y.im (- (atan2 x.im x.re)))))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -8.5e+75) || !(y_46_im <= 2.2e+19)) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((y_46_im * -atan2(x_46_im, x_46_re))));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -8.5e+75) || !(y_46_im <= 2.2e+19)) {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -8.5e+75) or not (y_46_im <= 2.2e+19): tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -8.5e+75) || !(y_46_im <= 2.2e+19)) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -8.5e+75) || ~((y_46_im <= 2.2e+19))) tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((y_46_im * -atan2(x_46_im, x_46_re)))); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -8.5e+75], N[Not[LessEqual[y$46$im, 2.2e+19]], $MachinePrecision]], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{+75} \lor \neg \left(y.im \leq 2.2 \cdot 10^{+19}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -8.4999999999999993e75 or 2.2e19 < y.im Initial program 35.3%
Simplified68.1%
Taylor expanded in y.im around 0 71.8%
Taylor expanded in y.re around 0 59.4%
*-commutative59.4%
distribute-lft-neg-in59.4%
Simplified59.4%
Taylor expanded in y.re around 0 60.5%
associate-*r*60.5%
neg-mul-160.5%
distribute-rgt-neg-in60.5%
Simplified60.5%
if -8.4999999999999993e75 < y.im < 2.2e19Initial program 42.2%
Simplified86.3%
Taylor expanded in y.im around 0 56.8%
Taylor expanded in y.im around 0 47.9%
*-commutative47.9%
unpow247.9%
unpow247.9%
hypot-def55.1%
Simplified55.1%
Final simplification57.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -5.5e+52)
(* t_1 (pow (exp y.im) t_0))
(if (<= y.im 1.15e+17)
(* (sin t_1) (pow (hypot x.im x.re) y.re))
(* (atan2 x.im x.re) (* y.re (exp (* 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 = -atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -5.5e+52) {
tmp = t_1 * pow(exp(y_46_im), t_0);
} else if (y_46_im <= 1.15e+17) {
tmp = sin(t_1) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((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.atan2(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_im <= -5.5e+52) {
tmp = t_1 * Math.pow(Math.exp(y_46_im), t_0);
} else if (y_46_im <= 1.15e+17) {
tmp = Math.sin(t_1) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((y_46_im * t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = -math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -5.5e+52: tmp = t_1 * math.pow(math.exp(y_46_im), t_0) elif y_46_im <= 1.15e+17: tmp = math.sin(t_1) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((y_46_im * t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(-atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -5.5e+52) tmp = Float64(t_1 * (exp(y_46_im) ^ t_0)); elseif (y_46_im <= 1.15e+17) tmp = Float64(sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(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 = -atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_im <= -5.5e+52) tmp = t_1 * (exp(y_46_im) ^ t_0); elseif (y_46_im <= 1.15e+17) tmp = sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((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[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.5e+52], N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+17], N[(N[Sin[t$95$1], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+52}:\\
\;\;\;\;t_1 \cdot {\left(e^{y.im}\right)}^{t_0}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+17}:\\
\;\;\;\;\sin t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{y.im \cdot t_0}\right)\\
\end{array}
\end{array}
if y.im < -5.49999999999999996e52Initial program 37.9%
Simplified75.4%
Taylor expanded in y.im around 0 75.2%
Taylor expanded in y.re around 0 63.0%
*-commutative63.0%
distribute-rgt-neg-in63.0%
exp-prod65.4%
Simplified65.4%
if -5.49999999999999996e52 < y.im < 1.15e17Initial program 43.0%
Simplified86.6%
Taylor expanded in y.im around 0 56.7%
Taylor expanded in y.im around 0 48.2%
*-commutative48.2%
unpow248.2%
unpow248.2%
hypot-def55.5%
Simplified55.5%
if 1.15e17 < y.im Initial program 31.7%
Simplified63.0%
Taylor expanded in y.im around 0 69.2%
Taylor expanded in y.re around 0 55.7%
*-commutative55.7%
distribute-lft-neg-in55.7%
Simplified55.7%
Taylor expanded in y.re around 0 57.4%
associate-*r*57.4%
neg-mul-157.4%
distribute-rgt-neg-in57.4%
Simplified57.4%
Final simplification57.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re))))
(t_1
(* (atan2 x.im x.re) (* y.re (exp (* y.im (- (atan2 x.im x.re))))))))
(if (<= y.im -1.85e+69)
t_1
(if (<= y.im -8.4e-94)
(log (+ 1.0 t_0))
(if (<= y.im 1.55e-108) (log1p 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 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = atan2(x_46_im, x_46_re) * (y_46_re * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.85e+69) {
tmp = t_1;
} else if (y_46_im <= -8.4e-94) {
tmp = log((1.0 + t_0));
} else if (y_46_im <= 1.55e-108) {
tmp = log1p(t_0);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.85e+69) {
tmp = t_1;
} else if (y_46_im <= -8.4e-94) {
tmp = Math.log((1.0 + t_0));
} else if (y_46_im <= 1.55e-108) {
tmp = Math.log1p(t_0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -1.85e+69: tmp = t_1 elif y_46_im <= -8.4e-94: tmp = math.log((1.0 + t_0)) elif y_46_im <= 1.55e-108: tmp = math.log1p(t_0) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_im <= -1.85e+69) tmp = t_1; elseif (y_46_im <= -8.4e-94) tmp = log(Float64(1.0 + t_0)); elseif (y_46_im <= 1.55e-108) tmp = log1p(t_0); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.85e+69], t$95$1, If[LessEqual[y$46$im, -8.4e-94], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1.55e-108], N[Log[1 + t$95$0], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;y.im \leq -1.85 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -8.4 \cdot 10^{-94}:\\
\;\;\;\;\log \left(1 + t_0\right)\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{-108}:\\
\;\;\;\;\mathsf{log1p}\left(t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -1.8499999999999999e69 or 1.55000000000000007e-108 < y.im Initial program 35.8%
Simplified72.3%
Taylor expanded in y.im around 0 64.4%
Taylor expanded in y.re around 0 46.7%
*-commutative46.7%
distribute-lft-neg-in46.7%
Simplified46.7%
Taylor expanded in y.re around 0 47.5%
associate-*r*47.5%
neg-mul-147.5%
distribute-rgt-neg-in47.5%
Simplified47.5%
if -1.8499999999999999e69 < y.im < -8.4000000000000004e-94Initial program 32.7%
Simplified73.9%
Taylor expanded in y.im around 0 51.2%
Taylor expanded in y.re around 0 15.8%
*-commutative15.8%
distribute-lft-neg-in15.8%
Simplified15.8%
Taylor expanded in y.im around 0 5.8%
*-commutative5.8%
log1p-expm1-u15.8%
log1p-udef32.1%
Applied egg-rr32.1%
if -8.4000000000000004e-94 < y.im < 1.55000000000000007e-108Initial program 49.3%
Simplified93.7%
Taylor expanded in y.im around 0 65.4%
Taylor expanded in y.re around 0 30.0%
*-commutative30.0%
distribute-lft-neg-in30.0%
Simplified30.0%
Taylor expanded in y.im around 0 30.0%
*-commutative30.0%
log1p-expm1-u36.5%
Applied egg-rr36.5%
Final simplification41.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re))) (t_1 (exp (* y.im t_0))))
(if (<= y.im -360.0)
(* (* y.re t_0) t_1)
(if (<= y.im 1.45e-110)
(log1p (expm1 (* y.re (atan2 x.im x.re))))
(* (atan2 x.im x.re) (* y.re t_1))))))
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);
double t_1 = exp((y_46_im * t_0));
double tmp;
if (y_46_im <= -360.0) {
tmp = (y_46_re * t_0) * t_1;
} else if (y_46_im <= 1.45e-110) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * 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.atan2(x_46_im, x_46_re);
double t_1 = Math.exp((y_46_im * t_0));
double tmp;
if (y_46_im <= -360.0) {
tmp = (y_46_re * t_0) * t_1;
} else if (y_46_im <= 1.45e-110) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_1);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = -math.atan2(x_46_im, x_46_re) t_1 = math.exp((y_46_im * t_0)) tmp = 0 if y_46_im <= -360.0: tmp = (y_46_re * t_0) * t_1 elif y_46_im <= 1.45e-110: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * t_1) 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)) t_1 = exp(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -360.0) tmp = Float64(Float64(y_46_re * t_0) * t_1); elseif (y_46_im <= 1.45e-110) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[Exp[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -360.0], N[(N[(y$46$re * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 1.45e-110], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.im \cdot t_0}\\
\mathbf{if}\;y.im \leq -360:\\
\;\;\;\;\left(y.re \cdot t_0\right) \cdot t_1\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-110}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_1\right)\\
\end{array}
\end{array}
if y.im < -360Initial program 34.8%
Simplified71.0%
Taylor expanded in y.im around 0 70.8%
Taylor expanded in y.re around 0 46.8%
*-commutative46.8%
distribute-lft-neg-in46.8%
Simplified46.8%
*-commutative46.8%
add-sqr-sqrt25.0%
sqrt-unprod35.2%
pow235.2%
Applied egg-rr35.2%
Taylor expanded in y.re around -inf 51.7%
associate-*r*51.7%
mul-1-neg51.7%
Simplified51.7%
if -360 < y.im < 1.4500000000000001e-110Initial program 47.1%
Simplified91.2%
Taylor expanded in y.im around 0 59.2%
Taylor expanded in y.re around 0 26.2%
*-commutative26.2%
distribute-lft-neg-in26.2%
Simplified26.2%
Taylor expanded in y.im around 0 25.4%
*-commutative25.4%
log1p-expm1-u33.1%
Applied egg-rr33.1%
if 1.4500000000000001e-110 < y.im Initial program 34.1%
Simplified71.5%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in y.re around 0 39.5%
*-commutative39.5%
distribute-lft-neg-in39.5%
Simplified39.5%
Taylor expanded in y.re around 0 40.6%
associate-*r*40.6%
neg-mul-140.6%
distribute-rgt-neg-in40.6%
Simplified40.6%
Final simplification40.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -6e-96) (not (<= y.im 0.75)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -6e-96) || !(y_46_im <= 0.75)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(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.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -6e-96) || !(y_46_im <= 0.75)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -6e-96) or not (y_46_im <= 0.75): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -6e-96) || !(y_46_im <= 0.75)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -6e-96], N[Not[LessEqual[y$46$im, 0.75]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -6 \cdot 10^{-96} \lor \neg \left(y.im \leq 0.75\right):\\
\;\;\;\;\log \left(1 + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t_0\right)\\
\end{array}
\end{array}
if y.im < -6e-96 or 0.75 < y.im Initial program 32.4%
Simplified69.2%
Taylor expanded in y.im around 0 61.9%
Taylor expanded in y.re around 0 42.6%
*-commutative42.6%
distribute-lft-neg-in42.6%
Simplified42.6%
Taylor expanded in y.im around 0 4.3%
*-commutative4.3%
log1p-expm1-u12.9%
log1p-udef31.3%
Applied egg-rr31.3%
if -6e-96 < y.im < 0.75Initial program 49.9%
Simplified94.1%
Taylor expanded in y.im around 0 63.0%
Taylor expanded in y.re around 0 26.0%
*-commutative26.0%
distribute-lft-neg-in26.0%
Simplified26.0%
Taylor expanded in y.im around 0 26.0%
*-commutative26.0%
log1p-expm1-u31.0%
Applied egg-rr31.0%
Final simplification31.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re)))) (if (<= y.im -3.1e-94) (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 <= -3.1e-94) {
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 <= -3.1e-94) {
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 <= -3.1e-94) 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[LessEqual[y$46$im, -3.1e-94], 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 -3.1 \cdot 10^{-94}:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -3.0999999999999998e-94Initial program 36.0%
Simplified74.0%
Taylor expanded in y.im around 0 61.5%
Taylor expanded in y.re around 0 37.4%
*-commutative37.4%
distribute-lft-neg-in37.4%
Simplified37.4%
Taylor expanded in y.im around 0 4.5%
*-commutative4.5%
add-cbrt-cube25.7%
pow325.7%
Applied egg-rr25.7%
if -3.0999999999999998e-94 < y.im Initial program 41.4%
Simplified82.2%
Taylor expanded in y.im around 0 62.8%
Taylor expanded in y.re around 0 34.9%
*-commutative34.9%
distribute-lft-neg-in34.9%
Simplified34.9%
Taylor expanded in y.im around 0 17.6%
*-commutative17.6%
log1p-expm1-u23.9%
Applied egg-rr23.9%
Final simplification24.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 39.6%
Simplified79.5%
Taylor expanded in y.im around 0 62.4%
Taylor expanded in y.re around 0 35.7%
*-commutative35.7%
distribute-lft-neg-in35.7%
Simplified35.7%
Taylor expanded in y.im around 0 13.3%
*-commutative13.3%
log1p-expm1-u20.4%
Applied egg-rr20.4%
Final simplification20.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (- 1.0 (* y.im (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * atan2(x_46_im, x_46_re)) * (1.0 - (y_46_im * 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)) * (1.0d0 - (y_46im * 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)) * (1.0 - (y_46_im * 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)) * (1.0 - (y_46_im * math.atan2(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * Float64(1.0 - Float64(y_46_im * 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)) * (1.0 - (y_46_im * atan2(x_46_im, x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 39.6%
Simplified79.5%
Taylor expanded in y.im around 0 62.4%
Taylor expanded in y.re around 0 35.7%
*-commutative35.7%
distribute-lft-neg-in35.7%
Simplified35.7%
Taylor expanded in y.im around 0 16.2%
+-commutative16.2%
neg-mul-116.2%
unsub-neg16.2%
*-commutative16.2%
Simplified16.2%
Final simplification16.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 39.6%
Simplified79.5%
Taylor expanded in y.im around 0 62.4%
Taylor expanded in y.re around 0 35.7%
*-commutative35.7%
distribute-lft-neg-in35.7%
Simplified35.7%
Taylor expanded in y.im around 0 13.3%
Final simplification13.3%
herbie shell --seed 2023228
(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)))))