
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_3 (cbrt (cbrt (fma y.im t_1 t_0))))
(t_4 (cbrt t_3)))
(if (<= y.re 1.8e-7)
(* t_2 (sin (fma t_1 y.im t_0)))
(* t_2 (sin (pow (* t_3 (* t_4 (* t_3 (pow t_4 2.0)))) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_3 = cbrt(cbrt(fma(y_46_im, t_1, t_0)));
double t_4 = cbrt(t_3);
double tmp;
if (y_46_re <= 1.8e-7) {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = t_2 * sin(pow((t_3 * (t_4 * (t_3 * pow(t_4, 2.0)))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_3 = cbrt(cbrt(fma(y_46_im, t_1, t_0))) t_4 = cbrt(t_3) tmp = 0.0 if (y_46_re <= 1.8e-7) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(t_2 * sin((Float64(t_3 * Float64(t_4 * Float64(t_3 * (t_4 ^ 2.0)))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[N[(y$46$im * t$95$1 + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, 1/3], $MachinePrecision]}, If[LessEqual[y$46$re, 1.8e-7], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[(t$95$3 * N[(t$95$4 * N[(t$95$3 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_3 := \sqrt[3]{\sqrt[3]{\mathsf{fma}\left(y.im, t\_1, t\_0\right)}}\\
t_4 := \sqrt[3]{t\_3}\\
\mathbf{if}\;y.re \leq 1.8 \cdot 10^{-7}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(t\_3 \cdot \left(t\_4 \cdot \left(t\_3 \cdot {t\_4}^{2}\right)\right)\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < 1.79999999999999997e-7Initial program 43.8%
fmm-def43.8%
hypot-define43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define86.5%
*-commutative86.5%
Simplified86.5%
if 1.79999999999999997e-7 < y.re Initial program 26.6%
fmm-def26.6%
hypot-define26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define54.7%
*-commutative54.7%
Simplified54.7%
fma-undefine54.7%
hypot-define26.6%
*-commutative26.6%
add-cube-cbrt34.4%
pow332.8%
fma-define32.8%
hypot-define64.1%
Applied egg-rr64.1%
Applied egg-rr60.9%
unpow260.9%
unpow-prod-down40.6%
pow1/340.6%
pow1/362.5%
add-cube-cbrt71.9%
Applied egg-rr76.6%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im 1.45e-134)
(* t_2 (sin (pow (cbrt (fma t_1 y.im t_0)) 3.0)))
(*
t_2
(sin
(pow
(*
(cbrt (cbrt (fma y.im t_1 t_0)))
(pow
(exp 0.1111111111111111)
(- (log (pow t_1 2.0)) (* -2.0 (log y.im)))))
3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= 1.45e-134) {
tmp = t_2 * sin(pow(cbrt(fma(t_1, y_46_im, t_0)), 3.0));
} else {
tmp = t_2 * sin(pow((cbrt(cbrt(fma(y_46_im, t_1, t_0))) * pow(exp(0.1111111111111111), (log(pow(t_1, 2.0)) - (-2.0 * log(y_46_im))))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= 1.45e-134) tmp = Float64(t_2 * sin((cbrt(fma(t_1, y_46_im, t_0)) ^ 3.0))); else tmp = Float64(t_2 * sin((Float64(cbrt(cbrt(fma(y_46_im, t_1, t_0))) * (exp(0.1111111111111111) ^ Float64(log((t_1 ^ 2.0)) - Float64(-2.0 * log(y_46_im))))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 1.45e-134], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[(N[Power[N[Power[N[(y$46$im * t$95$1 + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Exp[0.1111111111111111], $MachinePrecision], N[(N[Log[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision] - N[(-2.0 * N[Log[y$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq 1.45 \cdot 10^{-134}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(t\_1, y.im, t\_0\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{\sqrt[3]{\mathsf{fma}\left(y.im, t\_1, t\_0\right)}} \cdot {\left(e^{0.1111111111111111}\right)}^{\left(\log \left({t\_1}^{2}\right) - -2 \cdot \log y.im\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < 1.44999999999999997e-134Initial program 39.0%
fmm-def39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define78.2%
*-commutative78.2%
Simplified78.2%
fma-undefine78.2%
hypot-define39.0%
*-commutative39.0%
add-cube-cbrt40.7%
pow340.7%
fma-define40.7%
hypot-define80.3%
Applied egg-rr80.3%
if 1.44999999999999997e-134 < y.im Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
fma-undefine79.2%
hypot-define40.2%
*-commutative40.2%
add-cube-cbrt39.0%
pow339.0%
fma-define39.0%
hypot-define75.1%
Applied egg-rr75.1%
Applied egg-rr73.6%
Taylor expanded in y.im around inf 39.3%
exp-prod43.1%
+-commutative43.1%
unpow243.1%
unpow243.1%
hypot-undefine88.7%
log-rec88.7%
Simplified88.7%
Final simplification83.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re -8400000000.0)
(*
t_1
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(if (<= y.re 7.8e-7)
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (pow (cbrt (* t_0 y.im)) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -8400000000.0) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_re <= 7.8e-7) {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin(pow(cbrt((t_0 * y_46_im)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= -8400000000.0) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re)))))); elseif (y_46_re <= 7.8e-7) tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * sin((cbrt(Float64(t_0 * y_46_im)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8400000000.0], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-7], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(t$95$0 * y$46$im), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq -8400000000:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0 \cdot y.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -8.4e9Initial program 44.4%
fmm-def44.4%
hypot-define44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.re around inf 44.4%
+-commutative41.4%
associate-/l*41.4%
unpow241.4%
unpow241.4%
hypot-undefine76.4%
Simplified82.5%
if -8.4e9 < y.re < 7.80000000000000049e-7Initial program 43.4%
exp-diff43.4%
exp-to-pow43.5%
hypot-define43.5%
*-commutative43.5%
exp-prod43.4%
fma-define43.4%
hypot-define88.4%
*-commutative88.4%
Simplified88.4%
if 7.80000000000000049e-7 < y.re Initial program 26.6%
fmm-def26.6%
hypot-define26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define54.7%
*-commutative54.7%
Simplified54.7%
fma-undefine54.7%
hypot-define26.6%
*-commutative26.6%
add-cube-cbrt34.4%
pow332.8%
fma-define32.8%
hypot-define64.1%
Applied egg-rr64.1%
Taylor expanded in y.im around inf 39.1%
+-commutative39.1%
unpow239.1%
unpow239.1%
hypot-undefine71.9%
Simplified71.9%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re -9.2e-38)
(* t_2 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 7.8e-7)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_2 (sin (pow (cbrt (* t_1 y.im)) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -9.2e-38) {
tmp = t_2 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 7.8e-7) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_2 * sin(pow(cbrt((t_1 * y_46_im)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= -9.2e-38) tmp = Float64(t_2 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 7.8e-7) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_2 * sin((cbrt(Float64(t_1 * y_46_im)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9.2e-38], N[(t$95$2 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-7], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(t$95$1 * y$46$im), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq -9.2 \cdot 10^{-38}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_1 \cdot y.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -9.20000000000000007e-38Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in y.re around inf 46.5%
+-commutative42.4%
associate-/l*42.4%
unpow242.4%
unpow242.4%
hypot-undefine76.3%
Simplified84.5%
if -9.20000000000000007e-38 < y.re < 7.80000000000000049e-7Initial program 42.2%
exp-diff42.2%
exp-to-pow42.2%
hypot-define42.2%
*-commutative42.2%
exp-prod42.2%
fma-define42.2%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around inf 42.2%
unpow242.2%
unpow242.2%
hypot-undefine87.6%
associate-/l*87.6%
Simplified87.6%
if 7.80000000000000049e-7 < y.re Initial program 26.6%
fmm-def26.6%
hypot-define26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define54.7%
*-commutative54.7%
Simplified54.7%
fma-undefine54.7%
hypot-define26.6%
*-commutative26.6%
add-cube-cbrt34.4%
pow332.8%
fma-define32.8%
hypot-define64.1%
Applied egg-rr64.1%
Taylor expanded in y.im around inf 39.1%
+-commutative39.1%
unpow239.1%
unpow239.1%
hypot-undefine71.9%
Simplified71.9%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re 7.8e-7)
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(* t_1 (sin (pow (cbrt (* t_0 y.im)) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= 7.8e-7) {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin(pow(cbrt((t_0 * y_46_im)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= 7.8e-7) tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin((cbrt(Float64(t_0 * y_46_im)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 7.8e-7], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(t$95$0 * y$46$im), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0 \cdot y.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < 7.80000000000000049e-7Initial program 43.8%
fmm-def43.8%
hypot-define43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define86.5%
*-commutative86.5%
Simplified86.5%
if 7.80000000000000049e-7 < y.re Initial program 26.6%
fmm-def26.6%
hypot-define26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define54.7%
*-commutative54.7%
Simplified54.7%
fma-undefine54.7%
hypot-define26.6%
*-commutative26.6%
add-cube-cbrt34.4%
pow332.8%
fma-define32.8%
hypot-define64.1%
Applied egg-rr64.1%
Taylor expanded in y.im around inf 39.1%
+-commutative39.1%
unpow239.1%
unpow239.1%
hypot-undefine71.9%
Simplified71.9%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fabs (* t_1 y.im))))))
(if (<= y.im -6.1e+199)
t_2
(if (<= y.im -3.85e+40)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(if (or (<= y.im -11500000000000.0) (not (<= y.im 1.4e-94)))
t_2
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(pow (hypot x.re x.im) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fabs((t_1 * y_46_im)));
double tmp;
if (y_46_im <= -6.1e+199) {
tmp = t_2;
} else if (y_46_im <= -3.85e+40) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
} else if ((y_46_im <= -11500000000000.0) || !(y_46_im <= 1.4e-94)) {
tmp = t_2;
} else {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(abs(Float64(t_1 * y_46_im)))) tmp = 0.0 if (y_46_im <= -6.1e+199) tmp = t_2; elseif (y_46_im <= -3.85e+40) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); elseif ((y_46_im <= -11500000000000.0) || !(y_46_im <= 1.4e-94)) tmp = t_2; else tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[N[(t$95$1 * y$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.1e+199], t$95$2, If[LessEqual[y$46$im, -3.85e+40], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -11500000000000.0], N[Not[LessEqual[y$46$im, 1.4e-94]], $MachinePrecision]], t$95$2, N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\left|t\_1 \cdot y.im\right|\right)\\
\mathbf{if}\;y.im \leq -6.1 \cdot 10^{+199}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -3.85 \cdot 10^{+40}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.im \leq -11500000000000 \lor \neg \left(y.im \leq 1.4 \cdot 10^{-94}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -6.10000000000000036e199 or -3.84999999999999982e40 < y.im < -1.15e13 or 1.3999999999999999e-94 < y.im Initial program 39.5%
fmm-def39.5%
hypot-define39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define74.8%
*-commutative74.8%
Simplified74.8%
fma-undefine74.8%
hypot-define39.5%
*-commutative39.5%
add-sqr-sqrt22.3%
sqrt-unprod15.2%
pow215.2%
fma-define15.2%
hypot-define31.6%
Applied egg-rr31.6%
unpow231.6%
rem-sqrt-square73.8%
hypot-undefine36.6%
unpow236.6%
unpow236.6%
+-commutative36.6%
*-commutative36.6%
fma-define36.6%
*-commutative36.6%
fma-define36.6%
unpow236.6%
unpow236.6%
hypot-undefine73.8%
Simplified73.8%
Taylor expanded in y.im around inf 39.8%
+-commutative39.8%
unpow239.8%
unpow239.8%
hypot-undefine77.9%
Simplified77.9%
if -6.10000000000000036e199 < y.im < -3.84999999999999982e40Initial program 45.8%
Taylor expanded in y.re around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine75.3%
Simplified75.3%
if -1.15e13 < y.im < 1.3999999999999999e-94Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-define38.1%
*-commutative38.1%
exp-prod35.4%
fma-define35.4%
hypot-define78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in y.im around 0 81.6%
Taylor expanded in y.re around inf 37.2%
+-commutative37.2%
associate-/l*37.2%
unpow237.2%
unpow237.2%
hypot-undefine81.7%
Simplified81.7%
Final simplification79.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fabs (* t_0 y.im))))))
(if (<= y.im -2.25e+201)
t_1
(if (<= y.im -3e+46)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(if (or (<= y.im -14200000000.0) (not (<= y.im 9.6e-99)))
t_1
(*
(sin (pow (cbrt (fma t_0 y.im (* y.re (atan2 x.im x.re)))) 3.0))
(pow (hypot x.re x.im) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fabs((t_0 * y_46_im)));
double tmp;
if (y_46_im <= -2.25e+201) {
tmp = t_1;
} else if (y_46_im <= -3e+46) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if ((y_46_im <= -14200000000.0) || !(y_46_im <= 9.6e-99)) {
tmp = t_1;
} else {
tmp = sin(pow(cbrt(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(abs(Float64(t_0 * y_46_im)))) tmp = 0.0 if (y_46_im <= -2.25e+201) tmp = t_1; elseif (y_46_im <= -3e+46) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif ((y_46_im <= -14200000000.0) || !(y_46_im <= 9.6e-99)) tmp = t_1; else tmp = Float64(sin((cbrt(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.25e+201], t$95$1, If[LessEqual[y$46$im, -3e+46], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -14200000000.0], N[Not[LessEqual[y$46$im, 9.6e-99]], $MachinePrecision]], t$95$1, N[(N[Sin[N[Power[N[Power[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\left|t\_0 \cdot y.im\right|\right)\\
\mathbf{if}\;y.im \leq -2.25 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{+46}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq -14200000000 \lor \neg \left(y.im \leq 9.6 \cdot 10^{-99}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.25000000000000005e201 or -3.00000000000000023e46 < y.im < -1.42e10 or 9.6000000000000002e-99 < y.im Initial program 40.3%
fmm-def40.3%
hypot-define40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
fma-undefine75.7%
hypot-define40.3%
*-commutative40.3%
add-sqr-sqrt22.9%
sqrt-unprod17.0%
pow217.0%
fma-define17.0%
hypot-define33.5%
Applied egg-rr33.5%
unpow233.5%
rem-sqrt-square74.8%
hypot-undefine37.5%
unpow237.5%
unpow237.5%
+-commutative37.5%
*-commutative37.5%
fma-define37.5%
*-commutative37.5%
fma-define37.5%
unpow237.5%
unpow237.5%
hypot-undefine74.8%
Simplified74.8%
Taylor expanded in y.im around inf 39.8%
+-commutative39.8%
unpow239.8%
unpow239.8%
hypot-undefine78.0%
Simplified78.0%
if -2.25000000000000005e201 < y.im < -3.00000000000000023e46Initial program 45.8%
Taylor expanded in y.re around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine75.3%
Simplified75.3%
if -1.42e10 < y.im < 9.6000000000000002e-99Initial program 37.0%
exp-diff37.0%
exp-to-pow37.0%
hypot-define37.0%
*-commutative37.0%
exp-prod35.1%
fma-define35.1%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in y.im around 0 81.7%
fma-undefine81.7%
hypot-define37.0%
*-commutative37.0%
add-cube-cbrt40.5%
pow339.5%
fma-define39.5%
hypot-define86.5%
Applied egg-rr86.5%
Final simplification81.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -30000000000.0)
(* (* y.re (atan2 x.im x.re)) t_1)
(if (<= y.re 7.8e-7)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_1 (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -30000000000.0) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * t_1;
} else if (y_46_re <= 7.8e-7) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * sin((y_46_im * t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -30000000000.0) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * t_1;
} else if (y_46_re <= 7.8e-7) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * Math.sin((y_46_im * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_re <= -30000000000.0: tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * t_1 elif y_46_re <= 7.8e-7: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) else: tmp = t_1 * math.sin((y_46_im * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -30000000000.0) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * t_1); elseif (y_46_re <= 7.8e-7) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_re <= -30000000000.0) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * t_1; elseif (y_46_re <= 7.8e-7) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); else tmp = t_1 * sin((y_46_im * t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -30000000000.0], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-7], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -30000000000:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -3e10Initial program 44.4%
Taylor expanded in y.im around 0 79.5%
Taylor expanded in y.re around 0 81.1%
if -3e10 < y.re < 7.80000000000000049e-7Initial program 43.4%
exp-diff43.4%
exp-to-pow43.5%
hypot-define43.5%
*-commutative43.5%
exp-prod43.4%
fma-define43.4%
hypot-define88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y.im around inf 43.4%
unpow243.4%
unpow243.4%
hypot-undefine88.4%
associate-/l*88.3%
Simplified88.3%
if 7.80000000000000049e-7 < y.re Initial program 26.6%
Taylor expanded in y.re around 0 35.9%
unpow235.9%
unpow235.9%
hypot-undefine70.3%
Simplified70.3%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -8.8e-35)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 7.8e-7)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -8.8e-35) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 7.8e-7) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8.8e-35) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 7.8e-7) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.8e-35], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-7], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -8.8 \cdot 10^{-35}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -8.79999999999999975e-35Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in y.re around inf 46.5%
+-commutative42.4%
associate-/l*42.4%
unpow242.4%
unpow242.4%
hypot-undefine76.3%
Simplified84.5%
if -8.79999999999999975e-35 < y.re < 7.80000000000000049e-7Initial program 42.2%
exp-diff42.2%
exp-to-pow42.2%
hypot-define42.2%
*-commutative42.2%
exp-prod42.2%
fma-define42.2%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around inf 42.2%
unpow242.2%
unpow242.2%
hypot-undefine87.6%
associate-/l*87.6%
Simplified87.6%
if 7.80000000000000049e-7 < y.re Initial program 26.6%
Taylor expanded in y.re around 0 35.9%
unpow235.9%
unpow235.9%
hypot-undefine70.3%
Simplified70.3%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.im -4e-182)
(* t_2 (sin (- t_0 (* y.im (log (/ -1.0 x.im))))))
(if (<= x.im 3.9e-236)
(*
(sin (fma t_1 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (atan2 x.im x.re) y.im))))
(* t_2 (sin (+ t_0 (* y.im (log x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_im <= -4e-182) {
tmp = t_2 * sin((t_0 - (y_46_im * log((-1.0 / x_46_im)))));
} else if (x_46_im <= 3.9e-236) {
tmp = sin(fma(t_1, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_2 * sin((t_0 + (y_46_im * log(x_46_im))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_im <= -4e-182) tmp = Float64(t_2 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_im)))))); elseif (x_46_im <= 3.9e-236) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(t_2 * sin(Float64(t_0 + Float64(y_46_im * log(x_46_im))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -4e-182], N[(t$95$2 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.9e-236], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;x.im \leq -4 \cdot 10^{-182}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq 3.9 \cdot 10^{-236}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_0 + y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -4.0000000000000002e-182Initial program 30.0%
fmm-def30.0%
hypot-define30.0%
distribute-rgt-neg-out30.0%
fma-define30.0%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in x.im around -inf 70.7%
+-commutative70.7%
mul-1-neg70.7%
unsub-neg70.7%
Simplified70.7%
if -4.0000000000000002e-182 < x.im < 3.9e-236Initial program 40.3%
exp-diff35.3%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod30.3%
fma-define30.3%
hypot-define62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y.im around 0 73.2%
if 3.9e-236 < x.im Initial program 46.0%
fmm-def46.0%
hypot-define46.0%
distribute-rgt-neg-out46.0%
fma-define46.0%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x.re around 0 74.9%
Final simplification73.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))))
(if (<= y.im -4.9e-48)
t_1
(if (<= y.im 1.42e-92)
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(pow (hypot x.re x.im) y.re))
(if (or (<= y.im 5.8e+100) (not (<= y.im 1.05e+249)))
t_1
(*
(atan2 x.im x.re)
(* y.re (exp (* (atan2 x.im x.re) (- y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -4.9e-48) {
tmp = t_1;
} else if (y_46_im <= 1.42e-92) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if ((y_46_im <= 5.8e+100) || !(y_46_im <= 1.05e+249)) {
tmp = t_1;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -4.9e-48) {
tmp = t_1;
} else if (y_46_im <= 1.42e-92) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else if ((y_46_im <= 5.8e+100) || !(y_46_im <= 1.05e+249)) {
tmp = t_1;
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_im * t_0)) tmp = 0 if y_46_im <= -4.9e-48: tmp = t_1 elif y_46_im <= 1.42e-92: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) elif (y_46_im <= 5.8e+100) or not (y_46_im <= 1.05e+249): tmp = t_1 else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))) tmp = 0.0 if (y_46_im <= -4.9e-48) tmp = t_1; elseif (y_46_im <= 1.42e-92) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif ((y_46_im <= 5.8e+100) || !(y_46_im <= 1.05e+249)) tmp = t_1; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0)); tmp = 0.0; if (y_46_im <= -4.9e-48) tmp = t_1; elseif (y_46_im <= 1.42e-92) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (hypot(x_46_re, x_46_im) ^ y_46_re); elseif ((y_46_im <= 5.8e+100) || ~((y_46_im <= 1.05e+249))) tmp = t_1; else tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.9e-48], t$95$1, If[LessEqual[y$46$im, 1.42e-92], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, 5.8e+100], N[Not[LessEqual[y$46$im, 1.05e+249]], $MachinePrecision]], t$95$1, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -4.9 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.42 \cdot 10^{-92}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{+100} \lor \neg \left(y.im \leq 1.05 \cdot 10^{+249}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.im < -4.9000000000000002e-48 or 1.42e-92 < y.im < 5.8000000000000001e100 or 1.0499999999999999e249 < y.im Initial program 39.1%
Taylor expanded in y.re around 0 44.1%
unpow244.1%
unpow244.1%
hypot-undefine67.8%
Simplified67.8%
if -4.9000000000000002e-48 < y.im < 1.42e-92Initial program 37.4%
exp-diff37.4%
exp-to-pow37.4%
hypot-define37.4%
*-commutative37.4%
exp-prod37.4%
fma-define37.4%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 84.2%
Taylor expanded in y.re around inf 37.4%
+-commutative37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
hypot-undefine84.2%
Simplified84.2%
if 5.8000000000000001e100 < y.im < 1.0499999999999999e249Initial program 45.5%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in y.re around 0 80.3%
associate-*r*80.3%
distribute-lft-neg-in80.3%
Simplified80.3%
Final simplification75.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.im -600000000000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_2)
(if (<= y.im 1.12e-21)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) t_0)
(if (<= y.im 9.5e+109)
(* t_0 (log (exp t_2)))
(*
(atan2 x.im x.re)
(* y.re (exp (* (atan2 x.im x.re) (- y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_im <= -600000000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_2;
} else if (y_46_im <= 1.12e-21) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0;
} else if (y_46_im <= 9.5e+109) {
tmp = t_0 * log(exp(t_2));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_im <= -600000000000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_2); elseif (y_46_im <= 1.12e-21) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0); elseif (y_46_im <= 9.5e+109) tmp = Float64(t_0 * log(exp(t_2))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$im, -600000000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 1.12e-21], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 9.5e+109], N[(t$95$0 * N[Log[N[Exp[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.im \leq -600000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_2\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{-21}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+109}:\\
\;\;\;\;t\_0 \cdot \log \left(e^{t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.im < -6e11Initial program 40.3%
Taylor expanded in y.im around 0 63.2%
if -6e11 < y.im < 1.11999999999999998e-21Initial program 38.2%
exp-diff38.2%
exp-to-pow38.2%
hypot-define38.2%
*-commutative38.2%
exp-prod36.6%
fma-define36.6%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around 0 81.5%
if 1.11999999999999998e-21 < y.im < 9.49999999999999972e109Initial program 29.7%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in y.im around 0 45.5%
+-commutative45.5%
unpow245.5%
unpow245.5%
hypot-undefine35.5%
Simplified35.5%
add-sqr-sqrt19.4%
fabs-sqr19.4%
add-sqr-sqrt28.1%
add-log-exp59.7%
add-sqr-sqrt33.5%
fabs-sqr33.5%
add-sqr-sqrt67.1%
*-commutative67.1%
Applied egg-rr67.1%
if 9.49999999999999972e109 < y.im Initial program 47.1%
Taylor expanded in y.im around 0 62.0%
Taylor expanded in y.re around 0 76.9%
associate-*r*76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -4300000000000.0)
(*
t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(if (<= y.im 1.12e-21)
(*
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re)))))
t_0)
(if (<= y.im 5.3e+109)
(* t_0 (log (exp (sin t_1))))
(*
(atan2 x.im x.re)
(* y.re (exp (* (atan2 x.im x.re) (- y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4300000000000.0) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_im <= 1.12e-21) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0;
} else if (y_46_im <= 5.3e+109) {
tmp = t_0 * log(exp(sin(t_1)));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4300000000000.0) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_im <= 1.12e-21) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0;
} else if (y_46_im <= 5.3e+109) {
tmp = t_0 * Math.log(Math.exp(Math.sin(t_1)));
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -4300000000000.0: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif y_46_im <= 1.12e-21: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0 elif y_46_im <= 5.3e+109: tmp = t_0 * math.log(math.exp(math.sin(t_1))) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -4300000000000.0) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (y_46_im <= 1.12e-21) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0); elseif (y_46_im <= 5.3e+109) tmp = Float64(t_0 * log(exp(sin(t_1)))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_im <= -4300000000000.0) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); elseif (y_46_im <= 1.12e-21) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0; elseif (y_46_im <= 5.3e+109) tmp = t_0 * log(exp(sin(t_1))); else tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4300000000000.0], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.12e-21], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 5.3e+109], N[(t$95$0 * N[Log[N[Exp[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4300000000000:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{-21}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 5.3 \cdot 10^{+109}:\\
\;\;\;\;t\_0 \cdot \log \left(e^{\sin t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.im < -4.3e12Initial program 38.3%
Taylor expanded in y.im around 0 62.0%
Taylor expanded in y.re around 0 58.6%
if -4.3e12 < y.im < 1.11999999999999998e-21Initial program 39.2%
exp-diff39.2%
exp-to-pow39.2%
hypot-define39.2%
*-commutative39.2%
exp-prod36.8%
fma-define36.8%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 81.0%
Taylor expanded in y.re around inf 38.4%
+-commutative38.4%
associate-/l*38.4%
unpow238.4%
unpow238.4%
hypot-undefine81.0%
Simplified81.0%
if 1.11999999999999998e-21 < y.im < 5.30000000000000026e109Initial program 29.7%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in y.im around 0 45.5%
+-commutative45.5%
unpow245.5%
unpow245.5%
hypot-undefine35.5%
Simplified35.5%
add-sqr-sqrt19.4%
fabs-sqr19.4%
add-sqr-sqrt28.1%
add-log-exp59.7%
add-sqr-sqrt33.5%
fabs-sqr33.5%
add-sqr-sqrt67.1%
*-commutative67.1%
Applied egg-rr67.1%
if 5.30000000000000026e109 < y.im Initial program 47.1%
Taylor expanded in y.im around 0 62.0%
Taylor expanded in y.re around 0 76.9%
associate-*r*76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
Final simplification73.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.im -550000000000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_1)
(if (<= y.im 1.12e-21)
(*
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re)))))
t_0)
(if (<= y.im 5.4e+109)
(* t_0 (log (exp t_1)))
(*
(atan2 x.im x.re)
(* y.re (exp (* (atan2 x.im x.re) (- y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -550000000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
} else if (y_46_im <= 1.12e-21) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0;
} else if (y_46_im <= 5.4e+109) {
tmp = t_0 * log(exp(t_1));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -550000000000.0) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
} else if (y_46_im <= 1.12e-21) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0;
} else if (y_46_im <= 5.4e+109) {
tmp = t_0 * Math.log(Math.exp(t_1));
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -550000000000.0: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_1 elif y_46_im <= 1.12e-21: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0 elif y_46_im <= 5.4e+109: tmp = t_0 * math.log(math.exp(t_1)) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= -550000000000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_1); elseif (y_46_im <= 1.12e-21) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0); elseif (y_46_im <= 5.4e+109) tmp = Float64(t_0 * log(exp(t_1))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -550000000000.0) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_1; elseif (y_46_im <= 1.12e-21) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * t_0; elseif (y_46_im <= 5.4e+109) tmp = t_0 * log(exp(t_1)); else tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -550000000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 1.12e-21], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 5.4e+109], N[(t$95$0 * N[Log[N[Exp[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -550000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_1\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{-21}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 5.4 \cdot 10^{+109}:\\
\;\;\;\;t\_0 \cdot \log \left(e^{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.im < -5.5e11Initial program 40.3%
Taylor expanded in y.im around 0 63.2%
if -5.5e11 < y.im < 1.11999999999999998e-21Initial program 38.2%
exp-diff38.2%
exp-to-pow38.2%
hypot-define38.2%
*-commutative38.2%
exp-prod36.6%
fma-define36.6%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around 0 81.5%
Taylor expanded in y.re around inf 38.2%
+-commutative38.2%
associate-/l*38.2%
unpow238.2%
unpow238.2%
hypot-undefine81.4%
Simplified81.4%
if 1.11999999999999998e-21 < y.im < 5.40000000000000003e109Initial program 29.7%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in y.im around 0 45.5%
+-commutative45.5%
unpow245.5%
unpow245.5%
hypot-undefine35.5%
Simplified35.5%
add-sqr-sqrt19.4%
fabs-sqr19.4%
add-sqr-sqrt28.1%
add-log-exp59.7%
add-sqr-sqrt33.5%
fabs-sqr33.5%
add-sqr-sqrt67.1%
*-commutative67.1%
Applied egg-rr67.1%
if 5.40000000000000003e109 < y.im Initial program 47.1%
Taylor expanded in y.im around 0 62.0%
Taylor expanded in y.re around 0 76.9%
associate-*r*76.9%
distribute-lft-neg-in76.9%
Simplified76.9%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -1.5e+27)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 3e+51)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(* (sin (+ t_1 (* y.im (log x.re)))) (pow x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.5e+27) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 3e+51) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
if (x_46re <= (-1.5d+27)) then
tmp = sin(t_1) * exp(((y_46re * log(-x_46re)) - t_0))
else if (x_46re <= 3d+51) then
tmp = t_1 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = sin((t_1 + (y_46im * log(x_46re)))) * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.5e+27) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 3e+51) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -1.5e+27: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 3e+51: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = math.sin((t_1 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -1.5e+27) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 3e+51) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -1.5e+27) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 3e+51) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.5e+27], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3e+51], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -1.5 \cdot 10^{+27}:\\
\;\;\;\;\sin t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{+51}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_1 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -1.49999999999999988e27Initial program 32.6%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.re around -inf 77.6%
mul-1-neg77.6%
Simplified77.6%
if -1.49999999999999988e27 < x.re < 3e51Initial program 42.8%
Taylor expanded in y.im around 0 56.5%
Taylor expanded in y.re around 0 64.1%
if 3e51 < x.re Initial program 35.7%
exp-diff35.7%
exp-to-pow35.7%
hypot-define35.7%
*-commutative35.7%
exp-prod31.3%
fma-define31.3%
hypot-define69.3%
*-commutative69.3%
Simplified69.3%
Taylor expanded in y.im around 0 65.3%
Taylor expanded in x.im around 0 63.6%
Final simplification66.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.1e-16)
(* t_0 (sin t_1))
(if (<= y.re 4.1e-19)
(* (atan2 x.im x.re) (* y.re (exp (* (atan2 x.im x.re) (- y.im)))))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.1e-16) {
tmp = t_0 * sin(t_1);
} else if (y_46_re <= 4.1e-19) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.1e-16) {
tmp = t_0 * Math.sin(t_1);
} else if (y_46_re <= 4.1e-19) {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_1 * 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_re, x_46_im), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -4.1e-16: tmp = t_0 * math.sin(t_1) elif y_46_re <= 4.1e-19: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4.1e-16) tmp = Float64(t_0 * sin(t_1)); elseif (y_46_re <= 4.1e-19) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(t_1 * 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_re, x_46_im) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -4.1e-16) tmp = t_0 * sin(t_1); elseif (y_46_re <= 4.1e-19) tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = t_1 * 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.1e-16], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.1e-19], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-16}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{-19}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -4.10000000000000006e-16Initial program 45.6%
Taylor expanded in y.im around 0 78.1%
Taylor expanded in y.im around 0 75.2%
+-commutative75.2%
unpow275.2%
unpow275.2%
hypot-undefine76.7%
Simplified76.7%
if -4.10000000000000006e-16 < y.re < 4.09999999999999985e-19Initial program 41.9%
Taylor expanded in y.im around 0 43.3%
Taylor expanded in y.re around 0 59.8%
associate-*r*59.8%
distribute-lft-neg-in59.8%
Simplified59.8%
if 4.09999999999999985e-19 < y.re Initial program 28.8%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.im around 0 44.2%
+-commutative44.2%
unpow244.2%
unpow244.2%
hypot-undefine44.2%
Simplified44.2%
Taylor expanded in y.re around 0 57.9%
Final simplification63.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.1e-16) (not (<= y.re 7e-16))) (* (* y.re (atan2 x.im x.re)) (pow (hypot x.re x.im) y.re)) (* (atan2 x.im x.re) (* y.re (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.1e-16) || !(y_46_re <= 7e-16)) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.1e-16) || !(y_46_re <= 7e-16)) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.1e-16) or not (y_46_re <= 7e-16): tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.1e-16) || !(y_46_re <= 7e-16)) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -4.1e-16) || ~((y_46_re <= 7e-16))) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re); else tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.1e-16], N[Not[LessEqual[y$46$re, 7e-16]], $MachinePrecision]], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-16} \lor \neg \left(y.re \leq 7 \cdot 10^{-16}\right):\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -4.10000000000000006e-16 or 7.00000000000000035e-16 < y.re Initial program 36.8%
Taylor expanded in y.im around 0 65.5%
Taylor expanded in y.im around 0 60.3%
+-commutative60.3%
unpow260.3%
unpow260.3%
hypot-undefine61.1%
Simplified61.1%
Taylor expanded in y.re around 0 66.7%
if -4.10000000000000006e-16 < y.re < 7.00000000000000035e-16Initial program 42.3%
Taylor expanded in y.im around 0 43.0%
Taylor expanded in y.re around 0 59.4%
associate-*r*59.4%
distribute-lft-neg-in59.4%
Simplified59.4%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= x.re -1.12e+110) (not (<= x.re 1.0)))
(* t_0 (pow x.re y.re))
(* t_0 (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_re <= -1.12e+110) || !(x_46_re <= 1.0)) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if ((x_46re <= (-1.12d+110)) .or. (.not. (x_46re <= 1.0d0))) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_re <= -1.12e+110) || !(x_46_re <= 1.0)) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (x_46_re <= -1.12e+110) or not (x_46_re <= 1.0): tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((x_46_re <= -1.12e+110) || !(x_46_re <= 1.0)) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((x_46_re <= -1.12e+110) || ~((x_46_re <= 1.0))) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$re, -1.12e+110], N[Not[LessEqual[x$46$re, 1.0]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1.12 \cdot 10^{+110} \lor \neg \left(x.re \leq 1\right):\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.re < -1.1200000000000001e110 or 1 < x.re Initial program 30.4%
Taylor expanded in y.im around 0 48.4%
Taylor expanded in y.im around 0 41.9%
+-commutative41.9%
unpow241.9%
unpow241.9%
hypot-undefine40.4%
Simplified40.4%
Taylor expanded in x.im around 0 34.0%
if -1.1200000000000001e110 < x.re < 1Initial program 44.3%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in y.im around 0 42.5%
+-commutative42.5%
unpow242.5%
unpow242.5%
hypot-undefine40.1%
Simplified40.1%
Taylor expanded in x.re around 0 37.1%
Final simplification36.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.re x.im) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}
\end{array}
Initial program 39.5%
Taylor expanded in y.im around 0 54.7%
Taylor expanded in y.im around 0 42.3%
+-commutative42.3%
unpow242.3%
unpow242.3%
hypot-undefine40.2%
Simplified40.2%
Taylor expanded in y.re around 0 43.2%
Final simplification43.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, 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 = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Initial program 39.5%
Taylor expanded in y.im around 0 54.7%
Taylor expanded in y.im around 0 42.3%
+-commutative42.3%
unpow242.3%
unpow242.3%
hypot-undefine40.2%
Simplified40.2%
Taylor expanded in x.re around 0 30.4%
Final simplification30.4%
herbie shell --seed 2024089
(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)))))