
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, 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(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 37.5%
hypot-def37.5%
fma-def37.5%
hypot-def78.0%
*-commutative78.0%
Simplified78.0%
Final simplification78.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -550000.0) (not (<= y.re 3.15e+22)))
(*
(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)))))
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -550000.0) || !(y_46_re <= 3.15e+22)) {
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 {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -550000.0) || !(y_46_re <= 3.15e+22)) 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))))); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -550000.0], N[Not[LessEqual[y$46$re, 3.15e+22]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -550000 \lor \neg \left(y.re \leq 3.15 \cdot 10^{+22}\right):\\
\;\;\;\;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{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\end{array}
\end{array}
if y.re < -5.5e5 or 3.1500000000000001e22 < y.re Initial program 38.1%
Taylor expanded in y.re around 0 39.0%
unpow239.0%
unpow239.0%
hypot-def76.3%
Simplified76.3%
if -5.5e5 < y.re < 3.1500000000000001e22Initial program 37.0%
exp-diff36.3%
exp-to-pow36.3%
hypot-def36.3%
*-commutative36.3%
exp-prod36.2%
+-commutative36.2%
*-commutative36.2%
fma-def36.2%
+-commutative36.2%
Simplified78.3%
Taylor expanded in y.re around 0 77.7%
rec-exp77.7%
distribute-rgt-neg-in77.7%
Simplified77.7%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -5.5e+62)
(* y.re (* (atan2 x.im x.re) t_0))
(if (<= y.im 490.0)
(*
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
(pow (hypot x.im x.re) y.re))
(* t_0 (sin (fabs (* y.re (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -5.5e+62) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
} else if (y_46_im <= 490.0) {
tmp = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * sin(fabs((y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_im <= -5.5e+62) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)); elseif (y_46_im <= 490.0) tmp = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * sin(abs(Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -5.5e+62], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 490.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+62}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t_0\right)\\
\mathbf{elif}\;y.im \leq 490:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right)\\
\end{array}
\end{array}
if y.im < -5.4999999999999997e62Initial program 29.7%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in x.re around -inf 14.9%
fma-def14.9%
associate-/l*17.3%
unpow217.3%
unpow217.3%
Simplified17.3%
Taylor expanded in y.re around 0 59.1%
*-commutative59.1%
distribute-lft-neg-in59.1%
Simplified59.1%
if -5.4999999999999997e62 < y.im < 490Initial program 43.6%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
+-commutative42.9%
*-commutative42.9%
fma-def42.9%
+-commutative42.9%
Simplified84.4%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-def84.7%
Simplified84.7%
if 490 < y.im Initial program 29.6%
Taylor expanded in y.im around 0 51.1%
*-commutative21.4%
add-sqr-sqrt14.8%
sqrt-unprod19.1%
pow219.1%
Applied egg-rr37.0%
*-commutative19.1%
unpow219.1%
rem-sqrt-square27.0%
Simplified65.2%
Taylor expanded in y.re around 0 68.1%
*-commutative68.1%
distribute-rgt-neg-in68.1%
Simplified68.1%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1)))
(t_3
(*
(pow (hypot x.im x.re) y.re)
(+
t_1
(*
-0.16666666666666666
(* (pow y.re 3.0) (pow (atan2 x.im x.re) 3.0)))))))
(if (<= y.re -4.8e-10)
t_2
(if (<= y.re 7.5e-89)
(/ (sin (* y.im (log (hypot x.im x.re)))) (exp t_0))
(if (<= y.re 5.6e-5)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 1.4e+64)
t_3
(if (<= y.re 8.5e+105)
(* t_1 (pow x.im y.re))
(if (<= y.re 9.6e+112) t_3 t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re) * (t_1 + (-0.16666666666666666 * (pow(y_46_re, 3.0) * pow(atan2(x_46_im, x_46_re), 3.0))));
double tmp;
if (y_46_re <= -4.8e-10) {
tmp = t_2;
} else if (y_46_re <= 7.5e-89) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
} else if (y_46_re <= 5.6e-5) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 1.4e+64) {
tmp = t_3;
} else if (y_46_re <= 8.5e+105) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 9.6e+112) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.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 t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_1);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * (t_1 + (-0.16666666666666666 * (Math.pow(y_46_re, 3.0) * Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
double tmp;
if (y_46_re <= -4.8e-10) {
tmp = t_2;
} else if (y_46_re <= 7.5e-89) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
} else if (y_46_re <= 5.6e-5) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 1.4e+64) {
tmp = t_3;
} else if (y_46_re <= 8.5e+105) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 9.6e+112) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_1) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * (t_1 + (-0.16666666666666666 * (math.pow(y_46_re, 3.0) * math.pow(math.atan2(x_46_im, x_46_re), 3.0)))) tmp = 0 if y_46_re <= -4.8e-10: tmp = t_2 elif y_46_re <= 7.5e-89: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) elif y_46_re <= 5.6e-5: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_re <= 1.4e+64: tmp = t_3 elif y_46_re <= 8.5e+105: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_re <= 9.6e+112: tmp = t_3 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_1)) t_3 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(t_1 + Float64(-0.16666666666666666 * Float64((y_46_re ^ 3.0) * (atan(x_46_im, x_46_re) ^ 3.0))))) tmp = 0.0 if (y_46_re <= -4.8e-10) tmp = t_2; elseif (y_46_re <= 7.5e-89) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); elseif (y_46_re <= 5.6e-5) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 1.4e+64) tmp = t_3; elseif (y_46_re <= 8.5e+105) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 9.6e+112) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1); t_3 = (hypot(x_46_im, x_46_re) ^ y_46_re) * (t_1 + (-0.16666666666666666 * ((y_46_re ^ 3.0) * (atan2(x_46_im, x_46_re) ^ 3.0)))); tmp = 0.0; if (y_46_re <= -4.8e-10) tmp = t_2; elseif (y_46_re <= 7.5e-89) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); elseif (y_46_re <= 5.6e-5) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_re <= 1.4e+64) tmp = t_3; elseif (y_46_re <= 8.5e+105) tmp = t_1 * (x_46_im ^ y_46_re); elseif (y_46_re <= 9.6e+112) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(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] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(t$95$1 + N[(-0.16666666666666666 * N[(N[Power[y$46$re, 3.0], $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e-10], t$95$2, If[LessEqual[y$46$re, 7.5e-89], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.6e-5], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.4e+64], t$95$3, If[LessEqual[y$46$re, 8.5e+105], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.6e+112], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin t_1\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(t_1 + -0.16666666666666666 \cdot \left({y.re}^{3} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{-89}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t_0}}\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-5}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+64}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+105}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 9.6 \cdot 10^{+112}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.re < -4.8e-10 or 9.6e112 < y.re Initial program 43.0%
Taylor expanded in y.im around 0 77.0%
if -4.8e-10 < y.re < 7.4999999999999999e-89Initial program 35.6%
exp-diff35.6%
exp-to-pow35.6%
hypot-def35.6%
*-commutative35.6%
exp-prod35.6%
+-commutative35.6%
*-commutative35.6%
fma-def35.6%
+-commutative35.6%
Simplified79.5%
clear-num79.5%
inv-pow79.5%
Applied egg-rr79.5%
unpow-179.5%
Simplified79.5%
Taylor expanded in y.re around 0 29.2%
unpow229.2%
unpow229.2%
hypot-def65.6%
Simplified65.6%
if 7.4999999999999999e-89 < y.re < 5.59999999999999992e-5Initial program 42.6%
Taylor expanded in y.im around 0 39.5%
Taylor expanded in x.re around -inf 14.7%
fma-def14.7%
associate-/l*14.7%
unpow214.7%
unpow214.7%
Simplified14.7%
Taylor expanded in y.re around 0 74.7%
*-commutative74.7%
distribute-lft-neg-in74.7%
Simplified74.7%
if 5.59999999999999992e-5 < y.re < 1.40000000000000012e64 or 8.49999999999999986e105 < y.re < 9.6e112Initial program 27.3%
exp-diff27.3%
exp-to-pow27.3%
hypot-def27.3%
*-commutative27.3%
exp-prod27.3%
+-commutative27.3%
*-commutative27.3%
fma-def27.3%
+-commutative27.3%
Simplified31.8%
clear-num31.8%
inv-pow31.8%
Applied egg-rr31.8%
unpow-131.8%
Simplified31.8%
Taylor expanded in y.im around 0 32.1%
unpow232.1%
unpow232.1%
hypot-def32.1%
Simplified32.1%
Taylor expanded in y.re around 0 66.7%
if 1.40000000000000012e64 < y.re < 8.49999999999999986e105Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
+-commutative0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
Simplified33.3%
clear-num33.3%
inv-pow33.3%
Applied egg-rr33.3%
unpow-133.3%
Simplified33.3%
Taylor expanded in y.im around 0 16.9%
unpow216.9%
unpow216.9%
hypot-def16.9%
Simplified16.9%
Taylor expanded in x.re around 0 17.2%
Taylor expanded in y.re around 0 67.2%
Final simplification71.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2
(*
t_1
(+
t_0
(*
-0.16666666666666666
(* (pow y.re 3.0) (pow (atan2 x.im x.re) 3.0)))))))
(if (<= y.re -3.2e-31)
(* t_1 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 1e-88)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 8.2e-6)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 2.1e+61)
t_2
(if (<= y.re 1.1e+106)
(* t_0 (pow x.im y.re))
(if (<= y.re 9.6e+112) t_2 (* t_1 (sin t_0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * (t_0 + (-0.16666666666666666 * (pow(y_46_re, 3.0) * pow(atan2(x_46_im, x_46_re), 3.0))));
double tmp;
if (y_46_re <= -3.2e-31) {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 1e-88) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 8.2e-6) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.1e+61) {
tmp = t_2;
} else if (y_46_re <= 1.1e+106) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 9.6e+112) {
tmp = t_2;
} else {
tmp = t_1 * sin(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * (t_0 + (-0.16666666666666666 * (Math.pow(y_46_re, 3.0) * Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
double tmp;
if (y_46_re <= -3.2e-31) {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 1e-88) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 8.2e-6) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.1e+61) {
tmp = t_2;
} else if (y_46_re <= 1.1e+106) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 9.6e+112) {
tmp = t_2;
} else {
tmp = t_1 * Math.sin(t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_1 * Float64(t_0 + Float64(-0.16666666666666666 * Float64((y_46_re ^ 3.0) * (atan(x_46_im, x_46_re) ^ 3.0))))) tmp = 0.0 if (y_46_re <= -3.2e-31) tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 1e-88) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 8.2e-6) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 2.1e+61) tmp = t_2; elseif (y_46_re <= 1.1e+106) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 9.6e+112) tmp = t_2; else tmp = Float64(t_1 * sin(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t$95$0 + N[(-0.16666666666666666 * N[(N[Power[y$46$re, 3.0], $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.2e-31], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e-88], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.2e-6], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e+61], t$95$2, If[LessEqual[y$46$re, 1.1e+106], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.6e+112], t$95$2, N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t_1 \cdot \left(t_0 + -0.16666666666666666 \cdot \left({y.re}^{3} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\\
\mathbf{if}\;y.re \leq -3.2 \cdot 10^{-31}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 10^{-88}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+106}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 9.6 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\end{array}
if y.re < -3.20000000000000018e-31Initial program 42.6%
exp-diff29.4%
exp-to-pow29.4%
hypot-def29.4%
*-commutative29.4%
exp-prod27.9%
+-commutative27.9%
*-commutative27.9%
fma-def27.9%
+-commutative27.9%
Simplified67.6%
clear-num67.6%
inv-pow67.6%
Applied egg-rr67.6%
unpow-167.6%
Simplified67.6%
Taylor expanded in y.im around 0 72.4%
unpow272.4%
unpow272.4%
hypot-def74.7%
Simplified74.7%
*-commutative74.7%
add-cube-cbrt77.6%
pow377.6%
Applied egg-rr77.6%
if -3.20000000000000018e-31 < y.re < 9.99999999999999934e-89Initial program 35.7%
exp-diff35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod35.7%
+-commutative35.7%
*-commutative35.7%
fma-def35.7%
+-commutative35.7%
Simplified79.3%
clear-num79.3%
inv-pow79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in y.re around 0 29.8%
unpow229.8%
unpow229.8%
hypot-def67.3%
Simplified67.3%
if 9.99999999999999934e-89 < y.re < 8.1999999999999994e-6Initial program 42.6%
Taylor expanded in y.im around 0 39.5%
Taylor expanded in x.re around -inf 14.7%
fma-def14.7%
associate-/l*14.7%
unpow214.7%
unpow214.7%
Simplified14.7%
Taylor expanded in y.re around 0 74.7%
*-commutative74.7%
distribute-lft-neg-in74.7%
Simplified74.7%
if 8.1999999999999994e-6 < y.re < 2.1000000000000001e61 or 1.09999999999999996e106 < y.re < 9.6e112Initial program 27.3%
exp-diff27.3%
exp-to-pow27.3%
hypot-def27.3%
*-commutative27.3%
exp-prod27.3%
+-commutative27.3%
*-commutative27.3%
fma-def27.3%
+-commutative27.3%
Simplified31.8%
clear-num31.8%
inv-pow31.8%
Applied egg-rr31.8%
unpow-131.8%
Simplified31.8%
Taylor expanded in y.im around 0 32.1%
unpow232.1%
unpow232.1%
hypot-def32.1%
Simplified32.1%
Taylor expanded in y.re around 0 66.7%
if 2.1000000000000001e61 < y.re < 1.09999999999999996e106Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
+-commutative0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
Simplified33.3%
clear-num33.3%
inv-pow33.3%
Applied egg-rr33.3%
unpow-133.3%
Simplified33.3%
Taylor expanded in y.im around 0 16.9%
unpow216.9%
unpow216.9%
hypot-def16.9%
Simplified16.9%
Taylor expanded in x.re around 0 17.2%
Taylor expanded in y.re around 0 67.2%
if 9.6e112 < y.re Initial program 42.1%
exp-diff34.2%
exp-to-pow34.2%
hypot-def34.2%
*-commutative34.2%
exp-prod34.2%
+-commutative34.2%
*-commutative34.2%
fma-def34.2%
+-commutative34.2%
Simplified57.9%
clear-num57.9%
inv-pow57.9%
Applied egg-rr57.9%
unpow-157.9%
Simplified57.9%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-def60.7%
Simplified60.7%
Final simplification69.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(pow (hypot x.im x.re) y.re)
(sin (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0)))))
(if (<= y.re -1.55e-33)
t_0
(if (<= y.re 9e-87)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 1.4e+101)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
double tmp;
if (y_46_re <= -1.55e-33) {
tmp = t_0;
} else if (y_46_re <= 9e-87) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.4e+101) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0));
double tmp;
if (y_46_re <= -1.55e-33) {
tmp = t_0;
} else if (y_46_re <= 9e-87) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.4e+101) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))) tmp = 0.0 if (y_46_re <= -1.55e-33) tmp = t_0; elseif (y_46_re <= 9e-87) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 1.4e+101) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.55e-33], t$95$0, If[LessEqual[y$46$re, 9e-87], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.4e+101], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{-33}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 9 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+101}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -1.54999999999999998e-33 or 1.39999999999999991e101 < y.re Initial program 40.2%
exp-diff29.5%
exp-to-pow29.5%
hypot-def29.5%
*-commutative29.5%
exp-prod28.6%
+-commutative28.6%
*-commutative28.6%
fma-def28.6%
+-commutative28.6%
Simplified61.6%
clear-num61.6%
inv-pow61.6%
Applied egg-rr61.6%
unpow-161.6%
Simplified61.6%
Taylor expanded in y.im around 0 65.4%
unpow265.4%
unpow265.4%
hypot-def66.8%
Simplified66.8%
*-commutative66.8%
add-cube-cbrt69.5%
pow369.5%
Applied egg-rr69.5%
if -1.54999999999999998e-33 < y.re < 8.99999999999999915e-87Initial program 35.7%
exp-diff35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod35.7%
+-commutative35.7%
*-commutative35.7%
fma-def35.7%
+-commutative35.7%
Simplified79.3%
clear-num79.3%
inv-pow79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in y.re around 0 29.8%
unpow229.8%
unpow229.8%
hypot-def67.3%
Simplified67.3%
if 8.99999999999999915e-87 < y.re < 1.39999999999999991e101Initial program 34.8%
Taylor expanded in y.im around 0 35.8%
Taylor expanded in x.re around -inf 16.6%
fma-def16.6%
associate-/l*16.6%
unpow216.6%
unpow216.6%
Simplified16.6%
Taylor expanded in y.re around 0 54.0%
*-commutative54.0%
distribute-lft-neg-in54.0%
Simplified54.0%
Final simplification66.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -2.4e-33)
(* t_0 t_1)
(if (<= y.re 1.7e-88)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 6e+104)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* t_1 (sin t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.4e-33) {
tmp = t_0 * t_1;
} else if (y_46_re <= 1.7e-88) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 6e+104) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_1 * sin(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.4e-33) {
tmp = t_0 * t_1;
} else if (y_46_re <= 1.7e-88) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 6e+104) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_1 * Math.sin(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.4e-33: tmp = t_0 * t_1 elif y_46_re <= 1.7e-88: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) elif y_46_re <= 6e+104: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = t_1 * math.sin(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.4e-33) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 1.7e-88) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 6e+104) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(t_1 * sin(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.4e-33) tmp = t_0 * t_1; elseif (y_46_re <= 1.7e-88) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); elseif (y_46_re <= 6e+104) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = t_1 * sin(t_0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.4e-33], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.7e-88], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6e+104], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-33}:\\
\;\;\;\;t_0 \cdot t_1\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-88}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+104}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\end{array}
if y.re < -2.4e-33Initial program 42.6%
exp-diff29.4%
exp-to-pow29.4%
hypot-def29.4%
*-commutative29.4%
exp-prod27.9%
+-commutative27.9%
*-commutative27.9%
fma-def27.9%
+-commutative27.9%
Simplified67.6%
clear-num67.6%
inv-pow67.6%
Applied egg-rr67.6%
unpow-167.6%
Simplified67.6%
Taylor expanded in y.im around 0 72.4%
unpow272.4%
unpow272.4%
hypot-def74.7%
Simplified74.7%
Taylor expanded in y.re around 0 74.7%
if -2.4e-33 < y.re < 1.69999999999999987e-88Initial program 35.7%
exp-diff35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod35.7%
+-commutative35.7%
*-commutative35.7%
fma-def35.7%
+-commutative35.7%
Simplified79.3%
clear-num79.3%
inv-pow79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in y.re around 0 29.8%
unpow229.8%
unpow229.8%
hypot-def67.3%
Simplified67.3%
if 1.69999999999999987e-88 < y.re < 5.99999999999999937e104Initial program 34.0%
Taylor expanded in y.im around 0 34.9%
Taylor expanded in x.re around -inf 16.2%
fma-def16.2%
associate-/l*16.2%
unpow216.2%
unpow216.2%
Simplified16.2%
Taylor expanded in y.re around 0 52.8%
*-commutative52.8%
distribute-lft-neg-in52.8%
Simplified52.8%
if 5.99999999999999937e104 < y.re Initial program 37.2%
exp-diff30.2%
exp-to-pow30.2%
hypot-def30.2%
*-commutative30.2%
exp-prod30.2%
+-commutative30.2%
*-commutative30.2%
fma-def30.2%
+-commutative30.2%
Simplified53.5%
clear-num53.5%
inv-pow53.5%
Applied egg-rr53.5%
unpow-153.5%
Simplified53.5%
Taylor expanded in y.im around 0 55.9%
unpow255.9%
unpow255.9%
hypot-def55.9%
Simplified55.9%
Final simplification64.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.9e+65) (not (<= y.im 2.1e-5))) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.9e+65) || !(y_46_im <= 2.1e-5)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.9e+65) || !(y_46_im <= 2.1e-5)) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.9e+65) or not (y_46_im <= 2.1e-5): tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.9e+65) || !(y_46_im <= 2.1e-5)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.9e+65) || ~((y_46_im <= 2.1e-5))) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.9e+65], N[Not[LessEqual[y$46$im, 2.1e-5]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.9 \cdot 10^{+65} \lor \neg \left(y.im \leq 2.1 \cdot 10^{-5}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -1.90000000000000006e65 or 2.09999999999999988e-5 < y.im Initial program 30.0%
Taylor expanded in y.im around 0 49.6%
Taylor expanded in x.re around -inf 22.1%
fma-def22.1%
associate-/l*22.1%
unpow222.1%
unpow222.1%
Simplified22.1%
Taylor expanded in y.re around 0 58.5%
*-commutative58.5%
distribute-lft-neg-in58.5%
Simplified58.5%
if -1.90000000000000006e65 < y.im < 2.09999999999999988e-5Initial program 43.6%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
+-commutative42.9%
*-commutative42.9%
fma-def42.8%
+-commutative42.8%
Simplified84.3%
clear-num84.3%
inv-pow84.3%
Applied egg-rr84.3%
unpow-184.3%
Simplified84.3%
Taylor expanded in y.im around 0 48.2%
unpow248.2%
unpow248.2%
hypot-def55.9%
Simplified55.9%
Final simplification57.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.04)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 2.9e+99)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin (fabs 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.04) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.9e+99) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin(fabs(t_0)) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.04) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.9e+99) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.sin(Math.abs(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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.04: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 2.9e+99: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.sin(math.fabs(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.04) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 2.9e+99) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(abs(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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.04) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 2.9e+99) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin(abs(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.04], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.9e+99], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.04:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{+99}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -0.0400000000000000008Initial program 43.5%
exp-diff29.0%
exp-to-pow29.0%
hypot-def29.0%
*-commutative29.0%
exp-prod27.4%
+-commutative27.4%
*-commutative27.4%
fma-def27.4%
+-commutative27.4%
Simplified66.1%
clear-num66.1%
inv-pow66.1%
Applied egg-rr66.1%
unpow-166.1%
Simplified66.1%
Taylor expanded in y.im around 0 77.6%
unpow277.6%
unpow277.6%
hypot-def77.6%
Simplified77.6%
Taylor expanded in y.re around 0 77.6%
if -0.0400000000000000008 < y.re < 2.9000000000000002e99Initial program 35.4%
Taylor expanded in y.im around 0 32.6%
Taylor expanded in x.re around -inf 15.4%
fma-def15.4%
associate-/l*15.4%
unpow215.4%
unpow215.4%
Simplified15.4%
Taylor expanded in y.re around 0 47.0%
*-commutative47.0%
distribute-lft-neg-in47.0%
Simplified47.0%
if 2.9000000000000002e99 < y.re Initial program 36.4%
exp-diff29.5%
exp-to-pow29.5%
hypot-def29.5%
*-commutative29.5%
exp-prod29.5%
+-commutative29.5%
*-commutative29.5%
fma-def29.5%
+-commutative29.5%
Simplified52.3%
clear-num52.3%
inv-pow52.3%
Applied egg-rr52.3%
unpow-152.3%
Simplified52.3%
Taylor expanded in y.im around 0 54.7%
unpow254.7%
unpow254.7%
hypot-def54.7%
Simplified54.7%
Taylor expanded in x.re around 0 48.2%
*-commutative48.2%
add-sqr-sqrt27.6%
sqrt-unprod16.1%
pow216.1%
Applied egg-rr16.1%
*-commutative16.1%
unpow216.1%
rem-sqrt-square52.7%
Simplified52.7%
Final simplification55.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -3.55e-6)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 8.5e+104)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.55e-6) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 8.5e+104) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.55e-6) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 8.5e+104) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.sin(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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -3.55e-6: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 8.5e+104: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.sin(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -3.55e-6) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 8.5e+104) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -3.55e-6) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 8.5e+104) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.55e-6], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.5e+104], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3.55 \cdot 10^{-6}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+104}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.5499999999999999e-6Initial program 43.5%
exp-diff29.0%
exp-to-pow29.0%
hypot-def29.0%
*-commutative29.0%
exp-prod27.4%
+-commutative27.4%
*-commutative27.4%
fma-def27.4%
+-commutative27.4%
Simplified66.1%
clear-num66.1%
inv-pow66.1%
Applied egg-rr66.1%
unpow-166.1%
Simplified66.1%
Taylor expanded in y.im around 0 77.6%
unpow277.6%
unpow277.6%
hypot-def77.6%
Simplified77.6%
Taylor expanded in y.re around 0 77.6%
if -3.5499999999999999e-6 < y.re < 8.4999999999999999e104Initial program 35.1%
Taylor expanded in y.im around 0 32.4%
Taylor expanded in x.re around -inf 15.3%
fma-def15.3%
associate-/l*15.3%
unpow215.3%
unpow215.3%
Simplified15.3%
Taylor expanded in y.re around 0 46.7%
*-commutative46.7%
distribute-lft-neg-in46.7%
Simplified46.7%
if 8.4999999999999999e104 < y.re Initial program 37.2%
exp-diff30.2%
exp-to-pow30.2%
hypot-def30.2%
*-commutative30.2%
exp-prod30.2%
+-commutative30.2%
*-commutative30.2%
fma-def30.2%
+-commutative30.2%
Simplified53.5%
clear-num53.5%
inv-pow53.5%
Applied egg-rr53.5%
unpow-153.5%
Simplified53.5%
Taylor expanded in y.im around 0 55.9%
unpow255.9%
unpow255.9%
hypot-def55.9%
Simplified55.9%
Taylor expanded in x.re around 0 49.3%
Final simplification54.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= x.re -5e+48) (not (<= x.re 4e-250)))
(* (sin 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((x_46_re <= -5e+48) || !(x_46_re <= 4e-250)) {
tmp = sin(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 = y_46re * atan2(x_46im, x_46re)
if ((x_46re <= (-5d+48)) .or. (.not. (x_46re <= 4d-250))) then
tmp = sin(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((x_46_re <= -5e+48) || !(x_46_re <= 4e-250)) {
tmp = Math.sin(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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (x_46_re <= -5e+48) or not (x_46_re <= 4e-250): tmp = math.sin(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((x_46_re <= -5e+48) || !(x_46_re <= 4e-250)) tmp = Float64(sin(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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((x_46_re <= -5e+48) || ~((x_46_re <= 4e-250))) tmp = sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x$46$re, -5e+48], N[Not[LessEqual[x$46$re, 4e-250]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * 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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{+48} \lor \neg \left(x.re \leq 4 \cdot 10^{-250}\right):\\
\;\;\;\;\sin t_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.re < -4.99999999999999973e48 or 4.0000000000000002e-250 < x.re Initial program 33.8%
exp-diff29.2%
exp-to-pow29.2%
hypot-def29.2%
*-commutative29.2%
exp-prod28.6%
+-commutative28.6%
*-commutative28.6%
fma-def28.6%
+-commutative28.6%
Simplified68.1%
clear-num68.1%
inv-pow68.1%
Applied egg-rr68.1%
unpow-168.1%
Simplified68.1%
Taylor expanded in y.im around 0 41.3%
unpow241.3%
unpow241.3%
hypot-def41.1%
Simplified41.1%
Taylor expanded in x.im around 0 34.1%
if -4.99999999999999973e48 < x.re < 4.0000000000000002e-250Initial program 45.6%
exp-diff40.6%
exp-to-pow40.6%
hypot-def40.6%
*-commutative40.6%
exp-prod40.6%
+-commutative40.6%
*-commutative40.6%
fma-def40.6%
+-commutative40.6%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
Applied egg-rr70.3%
unpow-170.3%
Simplified70.3%
Taylor expanded in y.im around 0 42.5%
unpow242.5%
unpow242.5%
hypot-def43.1%
Simplified43.1%
Taylor expanded in x.re around 0 34.2%
Taylor expanded in y.re around 0 39.2%
Final simplification35.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.0017)
(* t_0 (pow x.im y.re))
(if (<= y.re 0.008) t_0 (* (sin 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0017) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 0.008) {
tmp = t_0;
} else {
tmp = sin(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 = y_46re * atan2(x_46im, x_46re)
if (y_46re <= (-0.0017d0)) then
tmp = t_0 * (x_46im ** y_46re)
else if (y_46re <= 0.008d0) then
tmp = t_0
else
tmp = sin(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0017) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 0.008) {
tmp = t_0;
} else {
tmp = Math.sin(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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.0017: tmp = t_0 * math.pow(x_46_im, y_46_re) elif y_46_re <= 0.008: tmp = t_0 else: tmp = math.sin(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.0017) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 0.008) tmp = t_0; else tmp = Float64(sin(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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.0017) tmp = t_0 * (x_46_im ^ y_46_re); elseif (y_46_re <= 0.008) tmp = t_0; else tmp = sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0017], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.008], t$95$0, N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.0017:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 0.008:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -0.00169999999999999991Initial program 43.5%
exp-diff29.0%
exp-to-pow29.0%
hypot-def29.0%
*-commutative29.0%
exp-prod27.4%
+-commutative27.4%
*-commutative27.4%
fma-def27.4%
+-commutative27.4%
Simplified66.1%
clear-num66.1%
inv-pow66.1%
Applied egg-rr66.1%
unpow-166.1%
Simplified66.1%
Taylor expanded in y.im around 0 77.6%
unpow277.6%
unpow277.6%
hypot-def77.6%
Simplified77.6%
Taylor expanded in x.re around 0 53.7%
Taylor expanded in y.re around 0 53.7%
if -0.00169999999999999991 < y.re < 0.0080000000000000002Initial program 37.7%
exp-diff37.7%
exp-to-pow37.7%
hypot-def37.7%
*-commutative37.7%
exp-prod37.7%
+-commutative37.7%
*-commutative37.7%
fma-def37.7%
+-commutative37.7%
Simplified81.5%
clear-num81.5%
inv-pow81.5%
Applied egg-rr81.5%
unpow-181.5%
Simplified81.5%
Taylor expanded in y.im around 0 22.8%
unpow222.8%
unpow222.8%
hypot-def22.8%
Simplified22.8%
Taylor expanded in x.re around 0 11.3%
Taylor expanded in y.re around 0 21.0%
if 0.0080000000000000002 < y.re Initial program 31.3%
exp-diff26.6%
exp-to-pow26.6%
hypot-def26.6%
*-commutative26.6%
exp-prod26.6%
+-commutative26.6%
*-commutative26.6%
fma-def26.6%
+-commutative26.6%
Simplified45.3%
clear-num45.3%
inv-pow45.3%
Applied egg-rr45.3%
unpow-145.3%
Simplified45.3%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-def45.5%
Simplified45.5%
Taylor expanded in x.re around 0 39.6%
Final simplification33.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), 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_im, x_46_re), 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_im, x_46_re), 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_im, x_46_re) ^ 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_im, x_46_re) ^ 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$im ^ 2 + x$46$re ^ 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.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 37.5%
exp-diff32.8%
exp-to-pow32.8%
hypot-def32.8%
*-commutative32.8%
exp-prod32.4%
+-commutative32.4%
*-commutative32.4%
fma-def32.4%
+-commutative32.4%
Simplified68.7%
clear-num68.7%
inv-pow68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-def41.7%
Simplified41.7%
Taylor expanded in y.re around 0 39.4%
Final simplification39.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re)))) (if (or (<= y.re -0.8) (not (<= y.re 0.085))) (* t_0 (pow x.im y.re)) t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -0.8) || !(y_46_re <= 0.085)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46re <= (-0.8d0)) .or. (.not. (y_46re <= 0.085d0))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -0.8) || !(y_46_re <= 0.085)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -0.8) or not (y_46_re <= 0.085): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -0.8) || !(y_46_re <= 0.085)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -0.8) || ~((y_46_re <= 0.085))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -0.8], N[Not[LessEqual[y$46$re, 0.085]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.8 \lor \neg \left(y.re \leq 0.085\right):\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -0.80000000000000004 or 0.0850000000000000061 < y.re Initial program 37.3%
exp-diff27.8%
exp-to-pow27.8%
hypot-def27.8%
*-commutative27.8%
exp-prod27.0%
+-commutative27.0%
*-commutative27.0%
fma-def27.0%
+-commutative27.0%
Simplified55.6%
clear-num55.6%
inv-pow55.6%
Applied egg-rr55.6%
unpow-155.6%
Simplified55.6%
Taylor expanded in y.im around 0 61.3%
unpow261.3%
unpow261.3%
hypot-def61.3%
Simplified61.3%
Taylor expanded in x.re around 0 46.5%
Taylor expanded in y.re around 0 44.9%
if -0.80000000000000004 < y.re < 0.0850000000000000061Initial program 37.7%
exp-diff37.7%
exp-to-pow37.7%
hypot-def37.7%
*-commutative37.7%
exp-prod37.7%
+-commutative37.7%
*-commutative37.7%
fma-def37.7%
+-commutative37.7%
Simplified81.5%
clear-num81.5%
inv-pow81.5%
Applied egg-rr81.5%
unpow-181.5%
Simplified81.5%
Taylor expanded in y.im around 0 22.8%
unpow222.8%
unpow222.8%
hypot-def22.8%
Simplified22.8%
Taylor expanded in x.re around 0 11.3%
Taylor expanded in y.re around 0 21.0%
Final simplification32.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 37.5%
exp-diff32.8%
exp-to-pow32.8%
hypot-def32.8%
*-commutative32.8%
exp-prod32.4%
+-commutative32.4%
*-commutative32.4%
fma-def32.4%
+-commutative32.4%
Simplified68.7%
clear-num68.7%
inv-pow68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-def41.7%
Simplified41.7%
Taylor expanded in x.re around 0 28.6%
Taylor expanded in y.re around 0 12.5%
Final simplification12.5%
herbie shell --seed 2023271
(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)))))