
(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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (log (hypot x.im x.re)))
(t_2 (* t_1 y.im))
(t_3 (sin t_2))
(t_4 (fma (- (atan2 x.im x.re)) y.re t_2)))
(if (<= y.re -0.9)
(* (fma (* (cos t_2) (atan2 x.im x.re)) y.re t_3) t_0)
(if (<= y.re 800000.0)
(*
(sin
(fma
y.im
(/ (* (pow t_1 2.0) y.im) t_4)
(/ (- (pow (* (atan2 x.im x.re) y.re) 2.0)) t_4)))
(exp (* (- y.im) (atan2 x.im x.re))))
(* t_3 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = t_1 * y_46_im;
double t_3 = sin(t_2);
double t_4 = fma(-atan2(x_46_im, x_46_re), y_46_re, t_2);
double tmp;
if (y_46_re <= -0.9) {
tmp = fma((cos(t_2) * atan2(x_46_im, x_46_re)), y_46_re, t_3) * t_0;
} else if (y_46_re <= 800000.0) {
tmp = sin(fma(y_46_im, ((pow(t_1, 2.0) * y_46_im) / t_4), (-pow((atan2(x_46_im, x_46_re) * y_46_re), 2.0) / t_4))) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = t_3 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = Float64(t_1 * y_46_im) t_3 = sin(t_2) t_4 = fma(Float64(-atan(x_46_im, x_46_re)), y_46_re, t_2) tmp = 0.0 if (y_46_re <= -0.9) tmp = Float64(fma(Float64(cos(t_2) * atan(x_46_im, x_46_re)), y_46_re, t_3) * t_0); elseif (y_46_re <= 800000.0) tmp = Float64(sin(fma(y_46_im, Float64(Float64((t_1 ^ 2.0) * y_46_im) / t_4), Float64(Float64(-(Float64(atan(x_46_im, x_46_re) * y_46_re) ^ 2.0)) / t_4))) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(t_3 * 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[((-N[ArcTan[x$46$im / x$46$re], $MachinePrecision]) * y$46$re + t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -0.9], N[(N[(N[(N[Cos[t$95$2], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re + t$95$3), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 800000.0], N[(N[Sin[N[(y$46$im * N[(N[(N[Power[t$95$1, 2.0], $MachinePrecision] * y$46$im), $MachinePrecision] / t$95$4), $MachinePrecision] + N[((-N[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision], 2.0], $MachinePrecision]) / t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := t\_1 \cdot y.im\\
t_3 := \sin t\_2\\
t_4 := \mathsf{fma}\left(-\tan^{-1}_* \frac{x.im}{x.re}, y.re, t\_2\right)\\
\mathbf{if}\;y.re \leq -0.9:\\
\;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot \tan^{-1}_* \frac{x.im}{x.re}, y.re, t\_3\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 800000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{{t\_1}^{2} \cdot y.im}{t\_4}, \frac{-{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}^{2}}{t\_4}\right)\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -0.900000000000000022Initial program 43.0%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites88.7%
if -0.900000000000000022 < y.re < 8e5Initial program 41.1%
lift-+.f64N/A
flip-+N/A
div-subN/A
sub-negN/A
Applied rewrites47.8%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6477.3
Applied rewrites77.3%
if 8e5 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.0
Applied rewrites71.0%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (exp (* (- y.im) (atan2 x.im x.re))))
(t_2 (* (log (hypot x.im x.re)) y.im))
(t_3 (* (sin (* (+ (/ t_2 y.re) (atan2 x.im x.re)) y.re)) t_1))
(t_4 (sin t_2)))
(if (<= y.re -0.9)
(* (fma (* (cos t_2) (atan2 x.im x.re)) y.re t_4) t_0)
(if (<= y.re -3.1e-153)
t_3
(if (<= y.re 5.5e-94)
(* t_1 t_4)
(if (<= y.re 800000.0) t_3 (* t_4 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_2 = log(hypot(x_46_im, x_46_re)) * y_46_im;
double t_3 = sin((((t_2 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
double t_4 = sin(t_2);
double tmp;
if (y_46_re <= -0.9) {
tmp = fma((cos(t_2) * atan2(x_46_im, x_46_re)), y_46_re, t_4) * t_0;
} else if (y_46_re <= -3.1e-153) {
tmp = t_3;
} else if (y_46_re <= 5.5e-94) {
tmp = t_1 * t_4;
} else if (y_46_re <= 800000.0) {
tmp = t_3;
} else {
tmp = t_4 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_2 = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im) t_3 = Float64(sin(Float64(Float64(Float64(t_2 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * t_1) t_4 = sin(t_2) tmp = 0.0 if (y_46_re <= -0.9) tmp = Float64(fma(Float64(cos(t_2) * atan(x_46_im, x_46_re)), y_46_re, t_4) * t_0); elseif (y_46_re <= -3.1e-153) tmp = t_3; elseif (y_46_re <= 5.5e-94) tmp = Float64(t_1 * t_4); elseif (y_46_re <= 800000.0) tmp = t_3; else tmp = Float64(t_4 * 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(N[(N[(t$95$2 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, If[LessEqual[y$46$re, -0.9], N[(N[(N[(N[Cos[t$95$2], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re + t$95$4), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -3.1e-153], t$95$3, If[LessEqual[y$46$re, 5.5e-94], N[(t$95$1 * t$95$4), $MachinePrecision], If[LessEqual[y$46$re, 800000.0], t$95$3, N[(t$95$4 * t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
t_3 := \sin \left(\left(\frac{t\_2}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_1\\
t_4 := \sin t\_2\\
\mathbf{if}\;y.re \leq -0.9:\\
\;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot \tan^{-1}_* \frac{x.im}{x.re}, y.re, t\_4\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-153}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t\_1 \cdot t\_4\\
\mathbf{elif}\;y.re \leq 800000:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -0.900000000000000022Initial program 43.0%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites88.7%
if -0.900000000000000022 < y.re < -3.09999999999999995e-153 or 5.49999999999999989e-94 < y.re < 8e5Initial program 26.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6418.5
Applied rewrites18.5%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6434.8
Applied rewrites34.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6476.1
Applied rewrites76.1%
if -3.09999999999999995e-153 < y.re < 5.49999999999999989e-94Initial program 51.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.4
Applied rewrites75.4%
if 8e5 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.0
Applied rewrites71.0%
Final simplification78.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (exp (* (- y.im) (atan2 x.im x.re))))
(t_2 (* (atan2 x.im x.re) y.re))
(t_3 (log (hypot x.im x.re)))
(t_4 (* t_3 y.im))
(t_5 (sin t_4))
(t_6 (* (sin (* (+ (/ t_4 y.re) (atan2 x.im x.re)) y.re)) t_1)))
(if (<= y.re -7.5e-13)
(* (fma (* (cos t_2) t_3) y.im (sin t_2)) t_0)
(if (<= y.re -3.1e-153)
t_6
(if (<= y.re 5.5e-94)
(* t_1 t_5)
(if (<= y.re 800000.0) t_6 (* t_5 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_2 = atan2(x_46_im, x_46_re) * y_46_re;
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = t_3 * y_46_im;
double t_5 = sin(t_4);
double t_6 = sin((((t_4 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
double tmp;
if (y_46_re <= -7.5e-13) {
tmp = fma((cos(t_2) * t_3), y_46_im, sin(t_2)) * t_0;
} else if (y_46_re <= -3.1e-153) {
tmp = t_6;
} else if (y_46_re <= 5.5e-94) {
tmp = t_1 * t_5;
} else if (y_46_re <= 800000.0) {
tmp = t_6;
} else {
tmp = t_5 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_3 = log(hypot(x_46_im, x_46_re)) t_4 = Float64(t_3 * y_46_im) t_5 = sin(t_4) t_6 = Float64(sin(Float64(Float64(Float64(t_4 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * t_1) tmp = 0.0 if (y_46_re <= -7.5e-13) tmp = Float64(fma(Float64(cos(t_2) * t_3), y_46_im, sin(t_2)) * t_0); elseif (y_46_re <= -3.1e-153) tmp = t_6; elseif (y_46_re <= 5.5e-94) tmp = Float64(t_1 * t_5); elseif (y_46_re <= 800000.0) tmp = t_6; else tmp = Float64(t_5 * 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * y$46$im), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[(N[Sin[N[(N[(N[(t$95$4 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -7.5e-13], N[(N[(N[(N[Cos[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision] * y$46$im + N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -3.1e-153], t$95$6, If[LessEqual[y$46$re, 5.5e-94], N[(t$95$1 * t$95$5), $MachinePrecision], If[LessEqual[y$46$re, 800000.0], t$95$6, N[(t$95$5 * t$95$0), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := t\_3 \cdot y.im\\
t_5 := \sin t\_4\\
t_6 := \sin \left(\left(\frac{t\_4}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_1\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot t\_3, y.im, \sin t\_2\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-153}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t\_1 \cdot t\_5\\
\mathbf{elif}\;y.re \leq 800000:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -7.5000000000000004e-13Initial program 42.7%
Taylor expanded in y.im around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites86.7%
if -7.5000000000000004e-13 < y.re < -3.09999999999999995e-153 or 5.49999999999999989e-94 < y.re < 8e5Initial program 26.3%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6417.5
Applied rewrites17.5%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6433.6
Applied rewrites33.6%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6477.4
Applied rewrites77.4%
if -3.09999999999999995e-153 < y.re < 5.49999999999999989e-94Initial program 51.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.4
Applied rewrites75.4%
if 8e5 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.0
Applied rewrites71.0%
Final simplification78.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (exp (* (- y.im) (atan2 x.im x.re))))
(t_2 (log (hypot x.im x.re)))
(t_3 (* t_2 y.im))
(t_4 (sin t_3))
(t_5 (* (sin (* (+ (/ t_3 y.re) (atan2 x.im x.re)) y.re)) t_1)))
(if (<= y.re -3.8e-13)
(* (sin (* (fma y.im (/ t_2 y.re) (atan2 x.im x.re)) y.re)) t_0)
(if (<= y.re -3.1e-153)
t_5
(if (<= y.re 5.5e-94)
(* t_1 t_4)
(if (<= y.re 800000.0) t_5 (* t_4 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = t_2 * y_46_im;
double t_4 = sin(t_3);
double t_5 = sin((((t_3 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
double tmp;
if (y_46_re <= -3.8e-13) {
tmp = sin((fma(y_46_im, (t_2 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re)) * t_0;
} else if (y_46_re <= -3.1e-153) {
tmp = t_5;
} else if (y_46_re <= 5.5e-94) {
tmp = t_1 * t_4;
} else if (y_46_re <= 800000.0) {
tmp = t_5;
} else {
tmp = t_4 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(t_2 * y_46_im) t_4 = sin(t_3) t_5 = Float64(sin(Float64(Float64(Float64(t_3 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * t_1) tmp = 0.0 if (y_46_re <= -3.8e-13) tmp = Float64(sin(Float64(fma(y_46_im, Float64(t_2 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re)) * t_0); elseif (y_46_re <= -3.1e-153) tmp = t_5; elseif (y_46_re <= 5.5e-94) tmp = Float64(t_1 * t_4); elseif (y_46_re <= 800000.0) tmp = t_5; else tmp = Float64(t_4 * 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sin[N[(N[(N[(t$95$3 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -3.8e-13], N[(N[Sin[N[(N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -3.1e-153], t$95$5, If[LessEqual[y$46$re, 5.5e-94], N[(t$95$1 * t$95$4), $MachinePrecision], If[LessEqual[y$46$re, 800000.0], t$95$5, N[(t$95$4 * t$95$0), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := t\_2 \cdot y.im\\
t_4 := \sin t\_3\\
t_5 := \sin \left(\left(\frac{t\_3}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_1\\
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{t\_2}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-153}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t\_1 \cdot t\_4\\
\mathbf{elif}\;y.re \leq 800000:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -3.8e-13Initial program 42.7%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6485.5
Applied rewrites85.5%
if -3.8e-13 < y.re < -3.09999999999999995e-153 or 5.49999999999999989e-94 < y.re < 8e5Initial program 26.3%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6417.5
Applied rewrites17.5%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6433.6
Applied rewrites33.6%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6477.4
Applied rewrites77.4%
if -3.09999999999999995e-153 < y.re < 5.49999999999999989e-94Initial program 51.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.4
Applied rewrites75.4%
if 8e5 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.0
Applied rewrites71.0%
Final simplification78.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (- y.im) (atan2 x.im x.re))))
(t_1 (* (log (hypot x.im x.re)) y.im))
(t_2 (sin t_1))
(t_3
(*
t_2
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(t_4 (* (sin (* (+ (/ t_1 y.re) (atan2 x.im x.re)) y.re)) t_0)))
(if (<= y.re -1.1)
t_3
(if (<= y.re -3.1e-153)
t_4
(if (<= y.re 5.5e-94) (* t_0 t_2) (if (<= y.re 800000.0) t_4 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_1 = log(hypot(x_46_im, x_46_re)) * y_46_im;
double t_2 = sin(t_1);
double t_3 = t_2 * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_4 = sin((((t_1 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_0;
double tmp;
if (y_46_re <= -1.1) {
tmp = t_3;
} else if (y_46_re <= -3.1e-153) {
tmp = t_4;
} else if (y_46_re <= 5.5e-94) {
tmp = t_0 * t_2;
} else if (y_46_re <= 800000.0) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im;
double t_2 = Math.sin(t_1);
double t_3 = t_2 * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double t_4 = Math.sin((((t_1 / y_46_re) + Math.atan2(x_46_im, x_46_re)) * y_46_re)) * t_0;
double tmp;
if (y_46_re <= -1.1) {
tmp = t_3;
} else if (y_46_re <= -3.1e-153) {
tmp = t_4;
} else if (y_46_re <= 5.5e-94) {
tmp = t_0 * t_2;
} else if (y_46_re <= 800000.0) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) t_1 = math.log(math.hypot(x_46_im, x_46_re)) * y_46_im t_2 = math.sin(t_1) t_3 = t_2 * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) t_4 = math.sin((((t_1 / y_46_re) + math.atan2(x_46_im, x_46_re)) * y_46_re)) * t_0 tmp = 0 if y_46_re <= -1.1: tmp = t_3 elif y_46_re <= -3.1e-153: tmp = t_4 elif y_46_re <= 5.5e-94: tmp = t_0 * t_2 elif y_46_re <= 800000.0: tmp = t_4 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_1 = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im) t_2 = sin(t_1) t_3 = Float64(t_2 * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) t_4 = Float64(sin(Float64(Float64(Float64(t_1 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * t_0) tmp = 0.0 if (y_46_re <= -1.1) tmp = t_3; elseif (y_46_re <= -3.1e-153) tmp = t_4; elseif (y_46_re <= 5.5e-94) tmp = Float64(t_0 * t_2); elseif (y_46_re <= 800000.0) tmp = t_4; else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((-y_46_im * atan2(x_46_im, x_46_re))); t_1 = log(hypot(x_46_im, x_46_re)) * y_46_im; t_2 = sin(t_1); t_3 = t_2 * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); t_4 = sin((((t_1 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_0; tmp = 0.0; if (y_46_re <= -1.1) tmp = t_3; elseif (y_46_re <= -3.1e-153) tmp = t_4; elseif (y_46_re <= 5.5e-94) tmp = t_0 * t_2; elseif (y_46_re <= 800000.0) tmp = t_4; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(N[(N[(t$95$1 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -1.1], t$95$3, If[LessEqual[y$46$re, -3.1e-153], t$95$4, If[LessEqual[y$46$re, 5.5e-94], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 800000.0], t$95$4, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
t_2 := \sin t\_1\\
t_3 := t\_2 \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := \sin \left(\left(\frac{t\_1}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_0\\
\mathbf{if}\;y.re \leq -1.1:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t\_0 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 800000:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -1.1000000000000001 or 8e5 < y.re Initial program 37.8%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6480.4
Applied rewrites80.4%
if -1.1000000000000001 < y.re < -3.09999999999999995e-153 or 5.49999999999999989e-94 < y.re < 8e5Initial program 26.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6418.5
Applied rewrites18.5%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6434.8
Applied rewrites34.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6476.1
Applied rewrites76.1%
if -3.09999999999999995e-153 < y.re < 5.49999999999999989e-94Initial program 51.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.4
Applied rewrites75.4%
Final simplification78.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (log (hypot x.im x.re)) y.im))
(t_1 (exp (* (- y.im) (atan2 x.im x.re))))
(t_2
(*
(sin (* (atan2 x.im x.re) y.re))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(t_3 (* (sin (* (+ (/ t_0 y.re) (atan2 x.im x.re)) y.re)) t_1)))
(if (<= y.re -0.07)
t_2
(if (<= y.re -3.1e-153)
t_3
(if (<= y.re 5.5e-94)
(* t_1 (sin t_0))
(if (<= y.re 522000.0) t_3 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)) * y_46_im;
double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_2 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_3 = sin((((t_0 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
double tmp;
if (y_46_re <= -0.07) {
tmp = t_2;
} else if (y_46_re <= -3.1e-153) {
tmp = t_3;
} else if (y_46_re <= 5.5e-94) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 522000.0) {
tmp = t_3;
} else {
tmp = 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)) * y_46_im;
double t_1 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double t_3 = Math.sin((((t_0 / y_46_re) + Math.atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
double tmp;
if (y_46_re <= -0.07) {
tmp = t_2;
} else if (y_46_re <= -3.1e-153) {
tmp = t_3;
} else if (y_46_re <= 5.5e-94) {
tmp = t_1 * Math.sin(t_0);
} else if (y_46_re <= 522000.0) {
tmp = t_3;
} else {
tmp = 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)) * y_46_im t_1 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) t_2 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) t_3 = math.sin((((t_0 / y_46_re) + math.atan2(x_46_im, x_46_re)) * y_46_re)) * t_1 tmp = 0 if y_46_re <= -0.07: tmp = t_2 elif y_46_re <= -3.1e-153: tmp = t_3 elif y_46_re <= 5.5e-94: tmp = t_1 * math.sin(t_0) elif y_46_re <= 522000.0: tmp = t_3 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im) t_1 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_2 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) t_3 = Float64(sin(Float64(Float64(Float64(t_0 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * t_1) tmp = 0.0 if (y_46_re <= -0.07) tmp = t_2; elseif (y_46_re <= -3.1e-153) tmp = t_3; elseif (y_46_re <= 5.5e-94) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 522000.0) tmp = t_3; else tmp = 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)) * y_46_im; t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re))); t_2 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); t_3 = sin((((t_0 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * t_1; tmp = 0.0; if (y_46_re <= -0.07) tmp = t_2; elseif (y_46_re <= -3.1e-153) tmp = t_3; elseif (y_46_re <= 5.5e-94) tmp = t_1 * sin(t_0); elseif (y_46_re <= 522000.0) tmp = t_3; else tmp = 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[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(N[(N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -0.07], t$95$2, If[LessEqual[y$46$re, -3.1e-153], t$95$3, If[LessEqual[y$46$re, 5.5e-94], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 522000.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := \sin \left(\left(\frac{t\_0}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_1\\
\mathbf{if}\;y.re \leq -0.07:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-153}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 522000:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -0.070000000000000007 or 522000 < y.re Initial program 37.2%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6472.2
Applied rewrites72.2%
if -0.070000000000000007 < y.re < -3.09999999999999995e-153 or 5.49999999999999989e-94 < y.re < 522000Initial program 27.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6419.2
Applied rewrites19.2%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6436.2
Applied rewrites36.2%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6479.1
Applied rewrites79.1%
if -3.09999999999999995e-153 < y.re < 5.49999999999999989e-94Initial program 51.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.4
Applied rewrites75.4%
Final simplification74.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* (atan2 x.im x.re) y.re))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))))
(if (<= y.re -0.07)
t_0
(if (<= y.re 7e-81)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
(if (<= y.re 5.6e-8)
(*
(*
(fma
-0.16666666666666666
(* (pow (atan2 x.im x.re) 3.0) (* y.re y.re))
(atan2 x.im x.re))
y.re)
(pow (hypot x.im x.re) y.re))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -0.07) {
tmp = t_0;
} else if (y_46_re <= 7e-81) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else if (y_46_re <= 5.6e-8) {
tmp = (fma(-0.16666666666666666, (pow(atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re)), atan2(x_46_im, x_46_re)) * y_46_re) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -0.07) tmp = t_0; elseif (y_46_re <= 7e-81) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); elseif (y_46_re <= 5.6e-8) tmp = Float64(Float64(fma(-0.16666666666666666, Float64((atan(x_46_im, x_46_re) ^ 3.0) * Float64(y_46_re * y_46_re)), atan(x_46_im, x_46_re)) * y_46_re) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.07], t$95$0, If[LessEqual[y$46$re, 7e-81], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.6e-8], N[(N[(N[(-0.16666666666666666 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -0.07:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{-81}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-8}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, {\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right), \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.070000000000000007 or 5.5999999999999999e-8 < y.re Initial program 37.6%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6471.5
Applied rewrites71.5%
if -0.070000000000000007 < y.re < 6.99999999999999973e-81Initial program 44.3%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6466.7
Applied rewrites66.7%
if 6.99999999999999973e-81 < y.re < 5.5999999999999999e-8Initial program 26.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites58.6%
Final simplification68.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -1.18e-161)
t_0
(if (<= y.re 7e-81)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot 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((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.18e-161) {
tmp = t_0;
} else if (y_46_re <= 7e-81) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(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((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.18e-161) {
tmp = t_0;
} else if (y_46_re <= 7e-81) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((Math.log(Math.hypot(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((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.18e-161: tmp = t_0 elif y_46_re <= 7e-81: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((math.log(math.hypot(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(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -1.18e-161) tmp = t_0; elseif (y_46_re <= 7e-81) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(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((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.18e-161) tmp = t_0; elseif (y_46_re <= 7e-81) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.18e-161], t$95$0, If[LessEqual[y$46$re, 7e-81], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.18 \cdot 10^{-161}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{-81}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.17999999999999992e-161 or 6.99999999999999973e-81 < y.re Initial program 33.9%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6461.4
Applied rewrites61.4%
if -1.17999999999999992e-161 < y.re < 6.99999999999999973e-81Initial program 52.0%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6475.3
Applied rewrites75.3%
Final simplification65.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -1.85e-205)
t_0
(if (<= y.re 1.5e-169)
(*
(sin (* (log (/ -1.0 x.im)) (- y.im)))
(exp (* (- y.im) (atan2 x.im x.re))))
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((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.85e-205) {
tmp = t_0;
} else if (y_46_re <= 1.5e-169) {
tmp = sin((log((-1.0 / x_46_im)) * -y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} 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((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.85e-205) {
tmp = t_0;
} else if (y_46_re <= 1.5e-169) {
tmp = Math.sin((Math.log((-1.0 / x_46_im)) * -y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} 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((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.85e-205: tmp = t_0 elif y_46_re <= 1.5e-169: tmp = math.sin((math.log((-1.0 / x_46_im)) * -y_46_im)) * math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) 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(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -1.85e-205) tmp = t_0; elseif (y_46_re <= 1.5e-169) tmp = Float64(sin(Float64(log(Float64(-1.0 / x_46_im)) * Float64(-y_46_im))) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); 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((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.85e-205) tmp = t_0; elseif (y_46_re <= 1.5e-169) tmp = sin((log((-1.0 / x_46_im)) * -y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.85e-205], t$95$0, If[LessEqual[y$46$re, 1.5e-169], N[(N[Sin[N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.85 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-169}:\\
\;\;\;\;\sin \left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.im\right)\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.85e-205 or 1.5e-169 < y.re Initial program 35.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6455.1
Applied rewrites55.1%
if -1.85e-205 < y.re < 1.5e-169Initial program 55.2%
lift-+.f64N/A
flip-+N/A
div-subN/A
sub-negN/A
Applied rewrites64.3%
Taylor expanded in x.im around -inf
lower-*.f64N/A
Applied rewrites21.8%
Taylor expanded in y.re around 0
Applied rewrites39.7%
Final simplification52.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (* (pow (hypot x.im x.re) y.re) (sin t_0))))
(if (<= y.re -4e-192)
t_1
(if (<= y.re 2.15e-169) (pow (pow t_0 2.0) 0.5) 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) * y_46_re;
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_0);
double tmp;
if (y_46_re <= -4e-192) {
tmp = t_1;
} else if (y_46_re <= 2.15e-169) {
tmp = pow(pow(t_0, 2.0), 0.5);
} 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.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(t_0);
double tmp;
if (y_46_re <= -4e-192) {
tmp = t_1;
} else if (y_46_re <= 2.15e-169) {
tmp = Math.pow(Math.pow(t_0, 2.0), 0.5);
} else {
tmp = 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) * y_46_re t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(t_0) tmp = 0 if y_46_re <= -4e-192: tmp = t_1 elif y_46_re <= 2.15e-169: tmp = math.pow(math.pow(t_0, 2.0), 0.5) else: tmp = 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) * y_46_re) t_1 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_0)) tmp = 0.0 if (y_46_re <= -4e-192) tmp = t_1; elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; else tmp = t_1; 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) * y_46_re; t_1 = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_0); tmp = 0.0; if (y_46_re <= -4e-192) tmp = t_1; elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; else tmp = 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4e-192], t$95$1, If[LessEqual[y$46$re, 2.15e-169], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t\_0\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{-169}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -4.0000000000000004e-192 or 2.14999999999999992e-169 < y.re Initial program 35.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.1
Applied rewrites56.1%
if -4.0000000000000004e-192 < y.re < 2.14999999999999992e-169Initial program 54.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6411.8
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Applied rewrites36.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
(if (<= y.re -0.00065)
(* (pow (+ (* (/ (* x.im x.im) x.re) 0.5) x.re) y.re) t_1)
(if (<= y.re -4e-192)
t_0
(if (<= y.re 1.2e-68)
(pow (pow t_0 2.0) 0.5)
(* (pow (- 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) * y_46_re;
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -0.00065) {
tmp = pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_1;
} else if (y_46_re <= -4e-192) {
tmp = t_0;
} else if (y_46_re <= 1.2e-68) {
tmp = pow(pow(t_0, 2.0), 0.5);
} else {
tmp = pow(-x_46_re, y_46_re) * t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46re
t_1 = sin(t_0)
if (y_46re <= (-0.00065d0)) then
tmp = (((((x_46im * x_46im) / x_46re) * 0.5d0) + x_46re) ** y_46re) * t_1
else if (y_46re <= (-4d-192)) then
tmp = t_0
else if (y_46re <= 1.2d-68) then
tmp = (t_0 ** 2.0d0) ** 0.5d0
else
tmp = (-x_46re ** y_46re) * t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -0.00065) {
tmp = Math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_1;
} else if (y_46_re <= -4e-192) {
tmp = t_0;
} else if (y_46_re <= 1.2e-68) {
tmp = Math.pow(Math.pow(t_0, 2.0), 0.5);
} else {
tmp = Math.pow(-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) * y_46_re t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -0.00065: tmp = math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_1 elif y_46_re <= -4e-192: tmp = t_0 elif y_46_re <= 1.2e-68: tmp = math.pow(math.pow(t_0, 2.0), 0.5) else: tmp = math.pow(-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) * y_46_re) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -0.00065) tmp = Float64((Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * t_1); elseif (y_46_re <= -4e-192) tmp = t_0; elseif (y_46_re <= 1.2e-68) tmp = (t_0 ^ 2.0) ^ 0.5; else tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_1); 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) * y_46_re; t_1 = sin(t_0); tmp = 0.0; if (y_46_re <= -0.00065) tmp = (((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * t_1; elseif (y_46_re <= -4e-192) tmp = t_0; elseif (y_46_re <= 1.2e-68) tmp = (t_0 ^ 2.0) ^ 0.5; else tmp = (-x_46_re ^ y_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00065], N[(N[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, -4e-192], t$95$0, If[LessEqual[y$46$re, 1.2e-68], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -0.00065:\\
\;\;\;\;{\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-68}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -6.4999999999999997e-4Initial program 42.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6480.2
Applied rewrites80.2%
Taylor expanded in x.im around 0
Applied rewrites81.4%
if -6.4999999999999997e-4 < y.re < -4.0000000000000004e-192Initial program 28.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6440.1
Applied rewrites40.1%
Taylor expanded in y.re around 0
Applied rewrites40.1%
Taylor expanded in y.re around 0
Applied rewrites40.1%
if -4.0000000000000004e-192 < y.re < 1.19999999999999996e-68Initial program 50.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in y.re around 0
Applied rewrites17.9%
Taylor expanded in y.re around 0
Applied rewrites17.9%
Applied rewrites32.0%
if 1.19999999999999996e-68 < y.re Initial program 28.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6444.4
Applied rewrites44.4%
Taylor expanded in x.re around -inf
Applied rewrites43.7%
Final simplification51.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
(if (<= y.re -2.2e+18)
(* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) x.im) y.re) t_1)
(if (<= y.re -4e-192)
(*
1.0
(*
(fma
-0.16666666666666666
(* (pow (atan2 x.im x.re) 3.0) (* y.re y.re))
(atan2 x.im x.re))
y.re))
(if (<= y.re 1.2e-68)
(pow (pow t_0 2.0) 0.5)
(* (pow (- 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) * y_46_re;
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -2.2e+18) {
tmp = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * t_1;
} else if (y_46_re <= -4e-192) {
tmp = 1.0 * (fma(-0.16666666666666666, (pow(atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re)), atan2(x_46_im, x_46_re)) * y_46_re);
} else if (y_46_re <= 1.2e-68) {
tmp = pow(pow(t_0, 2.0), 0.5);
} else {
tmp = pow(-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) * y_46_re) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -2.2e+18) tmp = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * t_1); elseif (y_46_re <= -4e-192) tmp = Float64(1.0 * Float64(fma(-0.16666666666666666, Float64((atan(x_46_im, x_46_re) ^ 3.0) * Float64(y_46_re * y_46_re)), atan(x_46_im, x_46_re)) * y_46_re)); elseif (y_46_re <= 1.2e-68) tmp = (t_0 ^ 2.0) ^ 0.5; else tmp = Float64((Float64(-x_46_re) ^ 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e+18], N[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, -4e-192], N[(1.0 * N[(N[(-0.16666666666666666 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e-68], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{+18}:\\
\;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;1 \cdot \left(\mathsf{fma}\left(-0.16666666666666666, {\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right), \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-68}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -2.2e18Initial program 44.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.0
Applied rewrites82.0%
Taylor expanded in x.re around 0
Applied rewrites82.0%
if -2.2e18 < y.re < -4.0000000000000004e-192Initial program 25.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.6
Applied rewrites39.6%
Taylor expanded in y.re around 0
Applied rewrites36.8%
Taylor expanded in y.re around 0
Applied rewrites36.9%
if -4.0000000000000004e-192 < y.re < 1.19999999999999996e-68Initial program 50.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in y.re around 0
Applied rewrites17.9%
Taylor expanded in y.re around 0
Applied rewrites17.9%
Applied rewrites32.0%
if 1.19999999999999996e-68 < y.re Initial program 28.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6444.4
Applied rewrites44.4%
Taylor expanded in x.re around -inf
Applied rewrites43.7%
Final simplification50.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (sin t_0))
(t_2 (* 1.0 t_1))
(t_3 (* (pow x.re y.re) t_1)))
(if (<= y.re -1650.0)
t_3
(if (<= y.re -4e-192)
t_2
(if (<= y.re 2.15e-169)
(pow (pow t_0 2.0) 0.5)
(if (<= y.re 1450000.0) t_2 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = sin(t_0);
double t_2 = 1.0 * t_1;
double t_3 = pow(x_46_re, y_46_re) * t_1;
double tmp;
if (y_46_re <= -1650.0) {
tmp = t_3;
} else if (y_46_re <= -4e-192) {
tmp = t_2;
} else if (y_46_re <= 2.15e-169) {
tmp = pow(pow(t_0, 2.0), 0.5);
} else if (y_46_re <= 1450000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46re
t_1 = sin(t_0)
t_2 = 1.0d0 * t_1
t_3 = (x_46re ** y_46re) * t_1
if (y_46re <= (-1650.0d0)) then
tmp = t_3
else if (y_46re <= (-4d-192)) then
tmp = t_2
else if (y_46re <= 2.15d-169) then
tmp = (t_0 ** 2.0d0) ** 0.5d0
else if (y_46re <= 1450000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.sin(t_0);
double t_2 = 1.0 * t_1;
double t_3 = Math.pow(x_46_re, y_46_re) * t_1;
double tmp;
if (y_46_re <= -1650.0) {
tmp = t_3;
} else if (y_46_re <= -4e-192) {
tmp = t_2;
} else if (y_46_re <= 2.15e-169) {
tmp = Math.pow(Math.pow(t_0, 2.0), 0.5);
} else if (y_46_re <= 1450000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_re t_1 = math.sin(t_0) t_2 = 1.0 * t_1 t_3 = math.pow(x_46_re, y_46_re) * t_1 tmp = 0 if y_46_re <= -1650.0: tmp = t_3 elif y_46_re <= -4e-192: tmp = t_2 elif y_46_re <= 2.15e-169: tmp = math.pow(math.pow(t_0, 2.0), 0.5) elif y_46_re <= 1450000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = sin(t_0) t_2 = Float64(1.0 * t_1) t_3 = Float64((x_46_re ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -1650.0) tmp = t_3; elseif (y_46_re <= -4e-192) tmp = t_2; elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; elseif (y_46_re <= 1450000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_re; t_1 = sin(t_0); t_2 = 1.0 * t_1; t_3 = (x_46_re ^ y_46_re) * t_1; tmp = 0.0; if (y_46_re <= -1650.0) tmp = t_3; elseif (y_46_re <= -4e-192) tmp = t_2; elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; elseif (y_46_re <= 1450000.0) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -1650.0], t$95$3, If[LessEqual[y$46$re, -4e-192], t$95$2, If[LessEqual[y$46$re, 2.15e-169], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[y$46$re, 1450000.0], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \sin t\_0\\
t_2 := 1 \cdot t\_1\\
t_3 := {x.re}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -1650:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{-169}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\mathbf{elif}\;y.re \leq 1450000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -1650 or 1.45e6 < y.re Initial program 38.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6466.1
Applied rewrites66.1%
Taylor expanded in x.im around 0
Applied rewrites53.7%
if -1650 < y.re < -4.0000000000000004e-192 or 2.14999999999999992e-169 < y.re < 1.45e6Initial program 31.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.8
Applied rewrites39.8%
Taylor expanded in y.re around 0
Applied rewrites35.6%
if -4.0000000000000004e-192 < y.re < 2.14999999999999992e-169Initial program 54.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6411.8
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Applied rewrites36.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (sin t_0))
(t_2 (* (pow x.im y.re) t_1)))
(if (<= y.re -1.56e+19)
t_2
(if (<= y.re -4e-192)
(* 1.0 t_1)
(if (<= y.re 2.15e-169)
(pow (pow t_0 2.0) 0.5)
(if (<= y.re 1.65e-6) t_0 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_re;
double t_1 = sin(t_0);
double t_2 = pow(x_46_im, y_46_re) * t_1;
double tmp;
if (y_46_re <= -1.56e+19) {
tmp = t_2;
} else if (y_46_re <= -4e-192) {
tmp = 1.0 * t_1;
} else if (y_46_re <= 2.15e-169) {
tmp = pow(pow(t_0, 2.0), 0.5);
} else if (y_46_re <= 1.65e-6) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46re
t_1 = sin(t_0)
t_2 = (x_46im ** y_46re) * t_1
if (y_46re <= (-1.56d+19)) then
tmp = t_2
else if (y_46re <= (-4d-192)) then
tmp = 1.0d0 * t_1
else if (y_46re <= 2.15d-169) then
tmp = (t_0 ** 2.0d0) ** 0.5d0
else if (y_46re <= 1.65d-6) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(x_46_im, y_46_re) * t_1;
double tmp;
if (y_46_re <= -1.56e+19) {
tmp = t_2;
} else if (y_46_re <= -4e-192) {
tmp = 1.0 * t_1;
} else if (y_46_re <= 2.15e-169) {
tmp = Math.pow(Math.pow(t_0, 2.0), 0.5);
} else if (y_46_re <= 1.65e-6) {
tmp = t_0;
} else {
tmp = t_2;
}
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) * y_46_re t_1 = math.sin(t_0) t_2 = math.pow(x_46_im, y_46_re) * t_1 tmp = 0 if y_46_re <= -1.56e+19: tmp = t_2 elif y_46_re <= -4e-192: tmp = 1.0 * t_1 elif y_46_re <= 2.15e-169: tmp = math.pow(math.pow(t_0, 2.0), 0.5) elif y_46_re <= 1.65e-6: tmp = t_0 else: tmp = 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_re) t_1 = sin(t_0) t_2 = Float64((x_46_im ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -1.56e+19) tmp = t_2; elseif (y_46_re <= -4e-192) tmp = Float64(1.0 * t_1); elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; elseif (y_46_re <= 1.65e-6) tmp = t_0; else tmp = t_2; 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) * y_46_re; t_1 = sin(t_0); t_2 = (x_46_im ^ y_46_re) * t_1; tmp = 0.0; if (y_46_re <= -1.56e+19) tmp = t_2; elseif (y_46_re <= -4e-192) tmp = 1.0 * t_1; elseif (y_46_re <= 2.15e-169) tmp = (t_0 ^ 2.0) ^ 0.5; elseif (y_46_re <= 1.65e-6) tmp = t_0; else tmp = 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -1.56e+19], t$95$2, If[LessEqual[y$46$re, -4e-192], N[(1.0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2.15e-169], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[y$46$re, 1.65e-6], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \sin t\_0\\
t_2 := {x.im}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -1.56 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;1 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{-169}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.56e19 or 1.65000000000000008e-6 < y.re Initial program 38.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6465.1
Applied rewrites65.1%
Taylor expanded in x.re around 0
Applied rewrites46.7%
if -1.56e19 < y.re < -4.0000000000000004e-192Initial program 26.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6441.8
Applied rewrites41.8%
Taylor expanded in y.re around 0
Applied rewrites34.2%
if -4.0000000000000004e-192 < y.re < 2.14999999999999992e-169Initial program 54.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6411.8
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Taylor expanded in y.re around 0
Applied rewrites11.8%
Applied rewrites36.4%
if 2.14999999999999992e-169 < y.re < 1.65000000000000008e-6Initial program 35.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.8
Applied rewrites39.8%
Taylor expanded in y.re around 0
Applied rewrites38.8%
Taylor expanded in y.re around 0
Applied rewrites38.8%
Final simplification41.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.im -1.22e+22)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 2120000000.0)
(* (pow (- x.re) y.re) t_0)
(* (pow x.im y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.22e+22) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 2120000000.0) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if (x_46im <= (-1.22d+22)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 2120000000.0d0) then
tmp = (-x_46re ** y_46re) * t_0
else
tmp = (x_46im ** y_46re) * t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.22e+22) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 2120000000.0) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if x_46_im <= -1.22e+22: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 2120000000.0: tmp = math.pow(-x_46_re, y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_im <= -1.22e+22) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 2120000000.0) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_46_re) * 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((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (x_46_im <= -1.22e+22) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 2120000000.0) tmp = (-x_46_re ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.22e+22], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 2120000000.0], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -1.22 \cdot 10^{+22}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 2120000000:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.22e22Initial program 33.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6463.3
Applied rewrites63.3%
Taylor expanded in x.im around -inf
Applied rewrites63.3%
if -1.22e22 < x.im < 2.12e9Initial program 47.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6438.6
Applied rewrites38.6%
Taylor expanded in x.re around -inf
Applied rewrites35.0%
if 2.12e9 < x.im Initial program 27.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6451.6
Applied rewrites51.6%
Taylor expanded in x.re around 0
Applied rewrites51.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.im -1.22e+22)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 7.6e-148) (* (pow x.re y.re) t_0) (* (pow x.im y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.22e+22) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 7.6e-148) {
tmp = pow(x_46_re, y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if (x_46im <= (-1.22d+22)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 7.6d-148) then
tmp = (x_46re ** y_46re) * t_0
else
tmp = (x_46im ** y_46re) * t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.22e+22) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 7.6e-148) {
tmp = Math.pow(x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if x_46_im <= -1.22e+22: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 7.6e-148: tmp = math.pow(x_46_re, y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_im <= -1.22e+22) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 7.6e-148) tmp = Float64((x_46_re ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_46_re) * 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((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (x_46_im <= -1.22e+22) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 7.6e-148) tmp = (x_46_re ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.22e+22], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 7.6e-148], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -1.22 \cdot 10^{+22}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 7.6 \cdot 10^{-148}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.22e22Initial program 33.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6463.3
Applied rewrites63.3%
Taylor expanded in x.im around -inf
Applied rewrites63.3%
if -1.22e22 < x.im < 7.60000000000000028e-148Initial program 45.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6437.6
Applied rewrites37.6%
Taylor expanded in x.im around 0
Applied rewrites33.3%
if 7.60000000000000028e-148 < x.im Initial program 36.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6447.7
Applied rewrites47.7%
Taylor expanded in x.re around 0
Applied rewrites42.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)))
(if (<= y.re -2.2e+18)
(* (pow (pow (atan2 x.im x.re) 2.0) 0.5) y.re)
(if (<= y.re -4e-192) (* 1.0 (sin t_0)) (pow (pow t_0 2.0) 0.5)))))
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_re;
double tmp;
if (y_46_re <= -2.2e+18) {
tmp = pow(pow(atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re;
} else if (y_46_re <= -4e-192) {
tmp = 1.0 * sin(t_0);
} else {
tmp = pow(pow(t_0, 2.0), 0.5);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46re
if (y_46re <= (-2.2d+18)) then
tmp = ((atan2(x_46im, x_46re) ** 2.0d0) ** 0.5d0) * y_46re
else if (y_46re <= (-4d-192)) then
tmp = 1.0d0 * sin(t_0)
else
tmp = (t_0 ** 2.0d0) ** 0.5d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double tmp;
if (y_46_re <= -2.2e+18) {
tmp = Math.pow(Math.pow(Math.atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re;
} else if (y_46_re <= -4e-192) {
tmp = 1.0 * Math.sin(t_0);
} else {
tmp = Math.pow(Math.pow(t_0, 2.0), 0.5);
}
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) * y_46_re tmp = 0 if y_46_re <= -2.2e+18: tmp = math.pow(math.pow(math.atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re elif y_46_re <= -4e-192: tmp = 1.0 * math.sin(t_0) else: tmp = math.pow(math.pow(t_0, 2.0), 0.5) 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_re) tmp = 0.0 if (y_46_re <= -2.2e+18) tmp = Float64(((atan(x_46_im, x_46_re) ^ 2.0) ^ 0.5) * y_46_re); elseif (y_46_re <= -4e-192) tmp = Float64(1.0 * sin(t_0)); else tmp = (t_0 ^ 2.0) ^ 0.5; 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) * y_46_re; tmp = 0.0; if (y_46_re <= -2.2e+18) tmp = ((atan2(x_46_im, x_46_re) ^ 2.0) ^ 0.5) * y_46_re; elseif (y_46_re <= -4e-192) tmp = 1.0 * sin(t_0); else tmp = (t_0 ^ 2.0) ^ 0.5; end tmp_2 = 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$re), $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e+18], N[(N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision], 0.5], $MachinePrecision] * y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -4e-192], N[(1.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{+18}:\\
\;\;\;\;{\left({\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)}^{0.5} \cdot y.re\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-192}:\\
\;\;\;\;1 \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left({t\_0}^{2}\right)}^{0.5}\\
\end{array}
\end{array}
if y.re < -2.2e18Initial program 44.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.0
Applied rewrites82.0%
Taylor expanded in y.re around 0
Applied rewrites5.6%
Taylor expanded in y.re around 0
Applied rewrites5.6%
Applied rewrites20.0%
if -2.2e18 < y.re < -4.0000000000000004e-192Initial program 25.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.6
Applied rewrites39.6%
Taylor expanded in y.re around 0
Applied rewrites36.8%
if -4.0000000000000004e-192 < y.re Initial program 40.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6430.0
Applied rewrites30.0%
Taylor expanded in y.re around 0
Applied rewrites15.2%
Taylor expanded in y.re around 0
Applied rewrites15.1%
Applied rewrites24.4%
Final simplification24.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -2.2e+18) (* (pow (pow (atan2 x.im x.re) 2.0) 0.5) y.re) (* 1.0 (sin (* (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 tmp;
if (y_46_re <= -2.2e+18) {
tmp = pow(pow(atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re;
} else {
tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-2.2d+18)) then
tmp = ((atan2(x_46im, x_46re) ** 2.0d0) ** 0.5d0) * y_46re
else
tmp = 1.0d0 * sin((atan2(x_46im, x_46re) * y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -2.2e+18) {
tmp = Math.pow(Math.pow(Math.atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re;
} else {
tmp = 1.0 * Math.sin((Math.atan2(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_re <= -2.2e+18: tmp = math.pow(math.pow(math.atan2(x_46_im, x_46_re), 2.0), 0.5) * y_46_re else: tmp = 1.0 * math.sin((math.atan2(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_re <= -2.2e+18) tmp = Float64(((atan(x_46_im, x_46_re) ^ 2.0) ^ 0.5) * y_46_re); else tmp = Float64(1.0 * sin(Float64(atan(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_re <= -2.2e+18) tmp = ((atan2(x_46_im, x_46_re) ^ 2.0) ^ 0.5) * y_46_re; else tmp = 1.0 * sin((atan2(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[LessEqual[y$46$re, -2.2e+18], N[(N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision], 0.5], $MachinePrecision] * y$46$re), $MachinePrecision], N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{+18}:\\
\;\;\;\;{\left({\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)}^{0.5} \cdot y.re\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -2.2e18Initial program 44.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.0
Applied rewrites82.0%
Taylor expanded in y.re around 0
Applied rewrites5.6%
Taylor expanded in y.re around 0
Applied rewrites5.6%
Applied rewrites20.0%
if -2.2e18 < y.re Initial program 37.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6431.9
Applied rewrites31.9%
Taylor expanded in y.re around 0
Applied rewrites19.4%
Final simplification19.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* 1.0 (sin (* (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) {
return 1.0 * sin((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
code = 1.0d0 * sin((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) {
return 1.0 * Math.sin((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): return 1.0 * math.sin((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) return Float64(1.0 * sin(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) tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
Initial program 39.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6447.0
Applied rewrites47.0%
Taylor expanded in y.re around 0
Applied rewrites15.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (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) {
return 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
code = 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) {
return 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): return 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) return 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) tmp = atan2(x_46_im, x_46_re) * y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re
\end{array}
Initial program 39.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6447.0
Applied rewrites47.0%
Taylor expanded in y.re around 0
Applied rewrites15.3%
Taylor expanded in y.re around 0
Applied rewrites15.2%
Final simplification15.2%
herbie shell --seed 2024327
(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)))))