
(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 17 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)))
(t_1 (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(t_2 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.im 4.9e-234)
(* t_2 (sin (pow (cbrt t_1) 3.0)))
(* t_2 (sin t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_im <= 4.9e-234) {
tmp = t_2 * sin(pow(cbrt(t_1), 3.0));
} else {
tmp = t_2 * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_im <= 4.9e-234) tmp = Float64(t_2 * sin((cbrt(t_1) ^ 3.0))); else tmp = Float64(t_2 * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[x$46$im, 4.9e-234], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;x.im \leq 4.9 \cdot 10^{-234}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_1}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\end{array}
\end{array}
if x.im < 4.90000000000000007e-234Initial program 38.6%
cancel-sign-sub-inv38.6%
fma-define38.6%
hypot-define38.6%
distribute-lft-neg-in38.6%
distribute-rgt-neg-out38.6%
fma-define38.6%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
fma-undefine80.1%
hypot-define38.6%
*-commutative38.6%
add-cube-cbrt40.7%
pow341.4%
fma-define41.4%
hypot-define86.2%
Applied egg-rr86.2%
if 4.90000000000000007e-234 < x.im Initial program 42.5%
cancel-sign-sub-inv42.5%
fma-define42.5%
hypot-define42.5%
distribute-lft-neg-in42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
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(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
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(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) 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[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 40.3%
cancel-sign-sub-inv40.3%
fma-define40.3%
hypot-define40.3%
distribute-lft-neg-in40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_3 (* t_2 t_0))
(t_4 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.12e+160)
t_3
(if (<= y.im -1.9e+133)
(* t_2 (sin (+ t_4 (* y.im (log x.im)))))
(if (<= y.im -2.6e+25)
(* t_2 (sin t_0))
(if (<= y.im 4.2e-125)
(*
(sin (fma t_1 y.im t_4))
(/
(pow (hypot x.re x.im) y.re)
(+ 1.0 (* (atan2 x.im x.re) y.im))))
t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_3 = t_2 * t_0;
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_3;
} else if (y_46_im <= -1.9e+133) {
tmp = t_2 * sin((t_4 + (y_46_im * log(x_46_im))));
} else if (y_46_im <= -2.6e+25) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 4.2e-125) {
tmp = sin(fma(t_1, y_46_im, t_4)) * (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_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_3 = Float64(t_2 * t_0) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_3; elseif (y_46_im <= -1.9e+133) tmp = Float64(t_2 * sin(Float64(t_4 + Float64(y_46_im * log(x_46_im))))); elseif (y_46_im <= -2.6e+25) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 4.2e-125) tmp = Float64(sin(fma(t_1, y_46_im, t_4)) * 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 = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(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[(t$95$2 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$3, If[LessEqual[y$46$im, -1.9e+133], N[(t$95$2 * N[Sin[N[(t$95$4 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.6e+25], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-125], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$4), $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], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_3 := t\_2 \cdot t\_0\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_4 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -2.6 \cdot 10^{+25}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-125}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_4\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\_3\\
\end{array}
\end{array}
if y.im < -1.12e160 or 4.2e-125 < y.im Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around inf 40.6%
unpow240.6%
unpow240.6%
hypot-undefine74.7%
Simplified74.7%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine78.8%
Simplified78.8%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in x.re around 0 62.3%
if -1.9000000000000001e133 < y.im < -2.5999999999999998e25Initial program 28.6%
cancel-sign-sub-inv28.6%
fma-define28.6%
hypot-define28.6%
distribute-lft-neg-in28.6%
distribute-rgt-neg-out28.6%
fma-define28.6%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around inf 33.4%
unpow233.4%
unpow233.4%
hypot-undefine86.6%
Simplified86.6%
if -2.5999999999999998e25 < y.im < 4.2e-125Initial program 46.9%
exp-diff46.9%
exp-to-pow46.9%
hypot-define46.9%
*-commutative46.9%
exp-prod46.9%
fma-define46.9%
hypot-define92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y.im around 0 93.8%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_3 (* t_2 t_0)))
(if (<= y.im -1.12e+160)
t_3
(if (<= y.im -1.9e+133)
(* t_2 (sin (* y.im (log x.im))))
(if (<= y.im -2e-39)
(* t_2 (sin t_0))
(if (<= y.im 3.45e-124)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_3 = t_2 * t_0;
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_3;
} else if (y_46_im <= -1.9e+133) {
tmp = t_2 * sin((y_46_im * log(x_46_im)));
} else if (y_46_im <= -2e-39) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 3.45e-124) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_3 = Float64(t_2 * t_0) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_3; elseif (y_46_im <= -1.9e+133) tmp = Float64(t_2 * sin(Float64(y_46_im * log(x_46_im)))); elseif (y_46_im <= -2e-39) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 3.45e-124) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(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[(t$95$2 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$3, If[LessEqual[y$46$im, -1.9e+133], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2e-39], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.45e-124], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_3 := t\_2 \cdot t\_0\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-39}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 3.45 \cdot 10^{-124}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -1.12e160 or 3.45e-124 < y.im Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around inf 40.6%
unpow240.6%
unpow240.6%
hypot-undefine74.7%
Simplified74.7%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine78.8%
Simplified78.8%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in y.im around inf 20.0%
unpow220.0%
unpow220.0%
hypot-undefine60.2%
Simplified60.2%
Taylor expanded in x.re around 0 62.3%
if -1.9000000000000001e133 < y.im < -1.99999999999999986e-39Initial program 29.6%
cancel-sign-sub-inv29.6%
fma-define29.6%
hypot-define29.6%
distribute-lft-neg-in29.6%
distribute-rgt-neg-out29.6%
fma-define29.6%
hypot-define85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y.im around inf 33.3%
unpow233.3%
unpow233.3%
hypot-undefine89.5%
Simplified89.5%
if -1.99999999999999986e-39 < y.im < 3.45e-124Initial program 47.8%
exp-diff47.8%
exp-to-pow47.8%
hypot-define47.8%
*-commutative47.8%
exp-prod47.8%
fma-define47.8%
hypot-define93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 93.3%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_3 (* t_2 t_0))
(t_4 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.12e+160)
t_3
(if (<= y.im -1.9e+133)
(* t_2 (sin (+ t_4 (* y.im (log x.im)))))
(if (<= y.im -2e-27)
(* t_2 (sin t_0))
(if (<= y.im 3.45e-124)
(* (sin (fma t_1 y.im t_4)) (pow (hypot x.re x.im) y.re))
t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_3 = t_2 * t_0;
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_3;
} else if (y_46_im <= -1.9e+133) {
tmp = t_2 * sin((t_4 + (y_46_im * log(x_46_im))));
} else if (y_46_im <= -2e-27) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 3.45e-124) {
tmp = sin(fma(t_1, y_46_im, t_4)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_3 = Float64(t_2 * t_0) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_3; elseif (y_46_im <= -1.9e+133) tmp = Float64(t_2 * sin(Float64(t_4 + Float64(y_46_im * log(x_46_im))))); elseif (y_46_im <= -2e-27) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 3.45e-124) tmp = Float64(sin(fma(t_1, y_46_im, t_4)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(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[(t$95$2 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$3, If[LessEqual[y$46$im, -1.9e+133], N[(t$95$2 * N[Sin[N[(t$95$4 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2e-27], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.45e-124], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$4), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_3 := t\_2 \cdot t\_0\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_4 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-27}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 3.45 \cdot 10^{-124}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_4\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -1.12e160 or 3.45e-124 < y.im Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around inf 40.6%
unpow240.6%
unpow240.6%
hypot-undefine74.7%
Simplified74.7%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine78.8%
Simplified78.8%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in x.re around 0 62.3%
if -1.9000000000000001e133 < y.im < -2.0000000000000001e-27Initial program 29.6%
cancel-sign-sub-inv29.6%
fma-define29.6%
hypot-define29.6%
distribute-lft-neg-in29.6%
distribute-rgt-neg-out29.6%
fma-define29.6%
hypot-define85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y.im around inf 33.3%
unpow233.3%
unpow233.3%
hypot-undefine89.5%
Simplified89.5%
if -2.0000000000000001e-27 < y.im < 3.45e-124Initial program 47.8%
exp-diff47.8%
exp-to-pow47.8%
hypot-define47.8%
*-commutative47.8%
exp-prod47.8%
fma-define47.8%
hypot-define93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 93.3%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im)))))
(t_2 (* t_1 (* y.im t_0))))
(if (<= y.im -1.12e+160)
t_2
(if (<= y.im -1.9e+133)
(* t_1 (sin (* y.im (log x.im))))
(if (or (<= y.im -3.6e-217) (not (<= y.im 2.7e-124)))
t_2
(*
(pow (hypot x.re x.im) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_2 = t_1 * (y_46_im * t_0);
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_2;
} else if (y_46_im <= -1.9e+133) {
tmp = t_1 * sin((y_46_im * log(x_46_im)));
} else if ((y_46_im <= -3.6e-217) || !(y_46_im <= 2.7e-124)) {
tmp = t_2;
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = 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)))) t_2 = Float64(t_1 * Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_2; elseif (y_46_im <= -1.9e+133) tmp = Float64(t_1 * sin(Float64(y_46_im * log(x_46_im)))); elseif ((y_46_im <= -3.6e-217) || !(y_46_im <= 2.7e-124)) tmp = t_2; else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); end return tmp end
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[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]}, Block[{t$95$2 = N[(t$95$1 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$2, If[LessEqual[y$46$im, -1.9e+133], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -3.6e-217], N[Not[LessEqual[y$46$im, 2.7e-124]], $MachinePrecision]], t$95$2, N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := 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)}\\
t_2 := t\_1 \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-217} \lor \neg \left(y.im \leq 2.7 \cdot 10^{-124}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -1.12e160 or -1.9000000000000001e133 < y.im < -3.59999999999999981e-217 or 2.70000000000000018e-124 < y.im Initial program 39.7%
cancel-sign-sub-inv39.7%
fma-define39.7%
hypot-define39.7%
distribute-lft-neg-in39.7%
distribute-rgt-neg-out39.7%
fma-define39.7%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.im around inf 41.0%
unpow241.0%
unpow241.0%
hypot-undefine79.7%
Simplified79.7%
Taylor expanded in y.im around 0 53.7%
unpow253.7%
unpow253.7%
hypot-undefine79.8%
Simplified79.8%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in y.im around inf 20.0%
unpow220.0%
unpow220.0%
hypot-undefine60.2%
Simplified60.2%
Taylor expanded in x.re around 0 62.3%
if -3.59999999999999981e-217 < y.im < 2.70000000000000018e-124Initial program 47.4%
exp-diff47.4%
exp-to-pow47.4%
hypot-define47.4%
*-commutative47.4%
exp-prod47.4%
fma-define47.4%
hypot-define93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in y.im around 0 93.1%
Taylor expanded in y.re around inf 47.3%
+-commutative47.3%
associate-/l*47.3%
unpow247.3%
unpow247.3%
hypot-undefine92.9%
Simplified92.9%
Final simplification82.1%
(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)))))
(t_2 (* t_1 (* y.im (log (hypot x.im x.re))))))
(if (<= y.im -1.12e+160)
t_2
(if (<= y.im -1.9e+133)
(* t_1 (sin (* y.im (log x.im))))
(if (or (<= y.im -1.5e+103) (not (<= y.im 3.45e-124)))
t_2
(*
(sin (fma t_0 y.im (* 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) {
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 t_2 = t_1 * (y_46_im * log(hypot(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_2;
} else if (y_46_im <= -1.9e+133) {
tmp = t_1 * sin((y_46_im * log(x_46_im)));
} else if ((y_46_im <= -1.5e+103) || !(y_46_im <= 3.45e-124)) {
tmp = t_2;
} else {
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);
}
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)))) t_2 = Float64(t_1 * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_2; elseif (y_46_im <= -1.9e+133) tmp = Float64(t_1 * sin(Float64(y_46_im * log(x_46_im)))); elseif ((y_46_im <= -1.5e+103) || !(y_46_im <= 3.45e-124)) tmp = t_2; else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_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$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]}, Block[{t$95$2 = N[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$2, If[LessEqual[y$46$im, -1.9e+133], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -1.5e+103], N[Not[LessEqual[y$46$im, 3.45e-124]], $MachinePrecision]], t$95$2, 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[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)}\\
t_2 := t\_1 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -1.5 \cdot 10^{+103} \lor \neg \left(y.im \leq 3.45 \cdot 10^{-124}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.12e160 or -1.9000000000000001e133 < y.im < -1.5e103 or 3.45e-124 < y.im Initial program 40.8%
cancel-sign-sub-inv40.8%
fma-define40.8%
hypot-define40.8%
distribute-lft-neg-in40.8%
distribute-rgt-neg-out40.8%
fma-define40.8%
hypot-define74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y.im around inf 41.8%
unpow241.8%
unpow241.8%
hypot-undefine75.1%
Simplified75.1%
Taylor expanded in y.im around 0 57.4%
unpow257.4%
unpow257.4%
hypot-undefine78.3%
Simplified78.3%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in y.im around inf 20.0%
unpow220.0%
unpow220.0%
hypot-undefine60.2%
Simplified60.2%
Taylor expanded in x.re around 0 62.3%
if -1.5e103 < y.im < 3.45e-124Initial program 42.4%
exp-diff42.4%
exp-to-pow42.4%
hypot-define42.4%
*-commutative42.4%
exp-prod42.4%
fma-define42.4%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around 0 89.4%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (* (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))) t_0)))
(if (<= y.im -2e+159)
t_2
(if (<= y.im -2.6e-20)
(*
(sin t_0)
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(if (<= y.im 5e-126)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
double tmp;
if (y_46_im <= -2e+159) {
tmp = t_2;
} else if (y_46_im <= -2.6e-20) {
tmp = sin(t_0) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_im <= 5e-126) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0) tmp = 0.0 if (y_46_im <= -2e+159) tmp = t_2; elseif (y_46_im <= -2.6e-20) tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (y_46_im <= 5e-126) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(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] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -2e+159], t$95$2, If[LessEqual[y$46$im, -2.6e-20], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e-126], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t\_0\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+159}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -2.6 \cdot 10^{-20}:\\
\;\;\;\;\sin t\_0 \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 5 \cdot 10^{-126}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -1.9999999999999999e159 or 5.00000000000000006e-126 < y.im Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in y.im around inf 40.3%
unpow240.3%
unpow240.3%
hypot-undefine74.1%
Simplified74.1%
Taylor expanded in y.im around 0 57.2%
unpow257.2%
unpow257.2%
hypot-undefine78.2%
Simplified78.2%
if -1.9999999999999999e159 < y.im < -2.59999999999999995e-20Initial program 25.0%
Taylor expanded in y.re around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine75.3%
Simplified75.3%
if -2.59999999999999995e-20 < y.im < 5.00000000000000006e-126Initial program 47.8%
exp-diff47.8%
exp-to-pow47.8%
hypot-define47.8%
*-commutative47.8%
exp-prod47.8%
fma-define47.8%
hypot-define93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 93.3%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
y.im
(* (log (hypot x.re x.im)) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -1.12e+160)
t_0
(if (<= y.im -1.9e+133)
(*
(sin (* y.im (log x.im)))
(exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im))))
(if (or (<= y.im -3.9e+105) (not (<= y.im 9.6e+117)))
t_0
(*
(pow (hypot x.re x.im) y.re)
(sin
(*
y.re
(+
(atan2 x.im x.re)
(* y.im (/ (log (hypot x.im x.re)) y.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * (log(hypot(x_46_re, x_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_0;
} else if (y_46_im <= -1.9e+133) {
tmp = sin((y_46_im * log(x_46_im))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if ((y_46_im <= -3.9e+105) || !(y_46_im <= 9.6e+117)) {
tmp = t_0;
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * 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)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.12e+160) {
tmp = t_0;
} else if (y_46_im <= -1.9e+133) {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) * Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if ((y_46_im <= -3.9e+105) || !(y_46_im <= 9.6e+117)) {
tmp = t_0;
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * 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)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * (math.log(math.hypot(x_46_re, x_46_im)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) tmp = 0 if y_46_im <= -1.12e+160: tmp = t_0 elif y_46_im <= -1.9e+133: tmp = math.sin((y_46_im * math.log(x_46_im))) * math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif (y_46_im <= -3.9e+105) or not (y_46_im <= 9.6e+117): tmp = t_0 else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * 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))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * Float64(log(hypot(x_46_re, x_46_im)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -1.12e+160) tmp = t_0; elseif (y_46_im <= -1.9e+133) tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif ((y_46_im <= -3.9e+105) || !(y_46_im <= 9.6e+117)) tmp = t_0; else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * 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)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * (log(hypot(x_46_re, x_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); tmp = 0.0; if (y_46_im <= -1.12e+160) tmp = t_0; elseif (y_46_im <= -1.9e+133) tmp = sin((y_46_im * log(x_46_im))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im))); elseif ((y_46_im <= -3.9e+105) || ~((y_46_im <= 9.6e+117))) tmp = t_0; else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * 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))))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+160], t$95$0, If[LessEqual[y$46$im, -1.9e+133], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -3.9e+105], N[Not[LessEqual[y$46$im, 9.6e+117]], $MachinePrecision]], t$95$0, N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(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]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+160}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.im \leq -3.9 \cdot 10^{+105} \lor \neg \left(y.im \leq 9.6 \cdot 10^{+117}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \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)\\
\end{array}
\end{array}
if y.im < -1.12e160 or -1.9000000000000001e133 < y.im < -3.89999999999999978e105 or 9.5999999999999996e117 < y.im Initial program 42.3%
cancel-sign-sub-inv42.3%
fma-define42.3%
hypot-define42.3%
distribute-lft-neg-in42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in y.im around inf 41.0%
unpow241.0%
unpow241.0%
hypot-undefine69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.1%
unpow259.1%
unpow259.1%
hypot-undefine73.2%
Simplified73.2%
Taylor expanded in y.re around 0 54.0%
mul-1-neg54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-undefine65.7%
Simplified65.7%
if -1.12e160 < y.im < -1.9000000000000001e133Initial program 10.0%
cancel-sign-sub-inv10.0%
fma-define10.0%
hypot-define10.0%
distribute-lft-neg-in10.0%
distribute-rgt-neg-out10.0%
fma-define10.0%
hypot-define50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in y.im around inf 20.0%
unpow220.0%
unpow220.0%
hypot-undefine60.2%
Simplified60.2%
Taylor expanded in x.re around 0 30.5%
+-commutative30.5%
neg-mul-130.5%
unsub-neg30.5%
*-commutative30.5%
Simplified30.5%
Taylor expanded in x.re around 0 52.6%
if -3.89999999999999978e105 < y.im < 9.5999999999999996e117Initial program 41.1%
exp-diff39.4%
exp-to-pow39.4%
hypot-define39.4%
*-commutative39.4%
exp-prod38.7%
fma-define38.7%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 83.9%
Taylor expanded in y.re around inf 39.6%
+-commutative39.6%
associate-/l*38.9%
unpow238.9%
unpow238.9%
hypot-undefine82.4%
Simplified82.4%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.52e+41) (not (<= y.im 45000.0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(*
(pow (hypot x.re x.im) y.re)
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.52e+41) || !(y_46_im <= 45000.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))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * 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)))));
}
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.52e+41) || !(y_46_im <= 45000.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))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * 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)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.52e+41) or not (y_46_im <= 45000.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))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * 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))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.52e+41) || !(y_46_im <= 45000.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))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * 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)))))); 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.52e+41) || ~((y_46_im <= 45000.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))) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * 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))))); 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.52e+41], N[Not[LessEqual[y$46$im, 45000.0]], $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$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[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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.52 \cdot 10^{+41} \lor \neg \left(y.im \leq 45000\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \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)\\
\end{array}
\end{array}
if y.im < -1.52000000000000002e41 or 45000 < y.im Initial program 34.8%
Taylor expanded in y.im around 0 64.1%
if -1.52000000000000002e41 < y.im < 45000Initial program 45.7%
exp-diff45.7%
exp-to-pow45.7%
hypot-define45.7%
*-commutative45.7%
exp-prod45.7%
fma-define45.7%
hypot-define91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in y.im around 0 90.9%
Taylor expanded in y.re around inf 45.2%
+-commutative45.2%
associate-/l*45.2%
unpow245.2%
unpow245.2%
hypot-undefine90.1%
Simplified90.1%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -8.0)
(/ (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.re x.im) (- y.re)))
(if (<= y.re 46000000000000.0)
(* y.im (* (log (hypot x.re x.im)) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin (* y.im (log (hypot 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) {
double tmp;
if (y_46_re <= -8.0) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / pow(hypot(x_46_re, x_46_im), -y_46_re);
} else if (y_46_re <= 46000000000000.0) {
tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_re, 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 tmp;
if (y_46_re <= -8.0) {
tmp = Math.sin((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 if (y_46_re <= 46000000000000.0) {
tmp = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -8.0: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) / math.pow(math.hypot(x_46_re, x_46_im), -y_46_re) elif y_46_re <= 46000000000000.0: tmp = y_46_im * (math.log(math.hypot(x_46_re, x_46_im)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.pow(math.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) tmp = 0.0 if (y_46_re <= -8.0) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ Float64(-y_46_re))); elseif (y_46_re <= 46000000000000.0) tmp = Float64(y_46_im * Float64(log(hypot(x_46_re, x_46_im)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, 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) tmp = 0.0; if (y_46_re <= -8.0) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ -y_46_re); elseif (y_46_re <= 46000000000000.0) tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -8.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 46000000000000.0], N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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}
\mathbf{if}\;y.re \leq -8:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}\\
\mathbf{elif}\;y.re \leq 46000000000000:\\
\;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -8Initial program 42.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod34.6%
fma-define34.6%
hypot-define70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.im around 0 83.5%
Taylor expanded in y.im around 0 84.8%
clear-num84.8%
associate-*l/84.8%
*-un-lft-identity84.8%
pow-flip84.8%
Applied egg-rr84.8%
*-commutative84.8%
Simplified84.8%
if -8 < y.re < 4.6e13Initial program 39.6%
cancel-sign-sub-inv39.6%
fma-define39.6%
hypot-define39.6%
distribute-lft-neg-in39.6%
distribute-rgt-neg-out39.6%
fma-define39.6%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around inf 32.2%
unpow232.2%
unpow232.2%
hypot-undefine66.0%
Simplified66.0%
Taylor expanded in y.im around 0 36.0%
unpow236.0%
unpow236.0%
hypot-undefine62.5%
Simplified62.5%
Taylor expanded in y.re around 0 36.0%
mul-1-neg36.0%
+-commutative36.0%
unpow236.0%
unpow236.0%
hypot-undefine62.2%
Simplified62.2%
if 4.6e13 < y.re Initial program 39.1%
exp-diff34.8%
exp-to-pow34.8%
hypot-define34.8%
*-commutative34.8%
exp-prod33.3%
fma-define33.3%
hypot-define59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in y.im around 0 68.2%
Taylor expanded in y.im around inf 40.6%
unpow242.0%
unpow242.0%
hypot-undefine73.9%
Simplified72.5%
Final simplification71.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re -8.0)
(/ (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.re x.im) (- y.re)))
(if (<= y.re 2.7e+15)
(* y.im (* t_0 (exp (* (atan2 x.im x.re) (- y.im)))))
(* y.im (* t_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 tmp;
if (y_46_re <= -8.0) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / pow(hypot(x_46_re, x_46_im), -y_46_re);
} else if (y_46_re <= 2.7e+15) {
tmp = y_46_im * (t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = y_46_im * (t_0 * pow(hypot(x_46_re, 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 = Math.log(Math.hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -8.0) {
tmp = Math.sin((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 if (y_46_re <= 2.7e+15) {
tmp = y_46_im * (t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = y_46_im * (t_0 * Math.pow(Math.hypot(x_46_re, 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.log(math.hypot(x_46_re, x_46_im)) tmp = 0 if y_46_re <= -8.0: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) / math.pow(math.hypot(x_46_re, x_46_im), -y_46_re) elif y_46_re <= 2.7e+15: tmp = y_46_im * (t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = y_46_im * (t_0 * math.pow(math.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)) tmp = 0.0 if (y_46_re <= -8.0) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ Float64(-y_46_re))); elseif (y_46_re <= 2.7e+15) tmp = Float64(y_46_im * Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(y_46_im * Float64(t_0 * (hypot(x_46_re, 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 = log(hypot(x_46_re, x_46_im)); tmp = 0.0; if (y_46_re <= -8.0) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ -y_46_re); elseif (y_46_re <= 2.7e+15) tmp = y_46_im * (t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = y_46_im * (t_0 * (hypot(x_46_re, 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+15], N[(y$46$im * N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -8:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;y.im \cdot \left(t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -8Initial program 42.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod34.6%
fma-define34.6%
hypot-define70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.im around 0 83.5%
Taylor expanded in y.im around 0 84.8%
clear-num84.8%
associate-*l/84.8%
*-un-lft-identity84.8%
pow-flip84.8%
Applied egg-rr84.8%
*-commutative84.8%
Simplified84.8%
if -8 < y.re < 2.7e15Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.1%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.im around inf 32.8%
unpow232.8%
unpow232.8%
hypot-undefine66.3%
Simplified66.3%
Taylor expanded in y.im around 0 35.7%
unpow235.7%
unpow235.7%
hypot-undefine61.9%
Simplified61.9%
Taylor expanded in y.re around 0 35.7%
mul-1-neg35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-undefine61.7%
Simplified61.7%
if 2.7e15 < y.re Initial program 38.2%
cancel-sign-sub-inv38.2%
fma-define38.2%
hypot-define38.2%
distribute-lft-neg-in38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around inf 41.2%
unpow241.2%
unpow241.2%
hypot-undefine73.5%
Simplified73.5%
Taylor expanded in y.im around 0 63.2%
unpow263.2%
unpow263.2%
hypot-undefine67.6%
Simplified67.6%
Taylor expanded in y.im around 0 60.3%
+-commutative60.3%
unpow260.3%
unpow260.3%
hypot-undefine64.8%
+-commutative64.8%
unpow264.8%
unpow264.8%
hypot-undefine64.8%
Simplified64.8%
Final simplification69.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5.5e-220) (not (<= y.im 2.8e-195))) (* y.im (* (log (hypot x.re x.im)) (pow (hypot x.re x.im) y.re))) (/ (sin (* 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) {
double tmp;
if ((y_46_im <= -5.5e-220) || !(y_46_im <= 2.8e-195)) {
tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / pow(hypot(x_46_re, 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 tmp;
if ((y_46_im <= -5.5e-220) || !(y_46_im <= 2.8e-195)) {
tmp = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) / Math.pow(Math.hypot(x_46_re, x_46_im), -y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -5.5e-220) or not (y_46_im <= 2.8e-195): tmp = y_46_im * (math.log(math.hypot(x_46_re, x_46_im)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) / math.pow(math.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) tmp = 0.0 if ((y_46_im <= -5.5e-220) || !(y_46_im <= 2.8e-195)) tmp = Float64(y_46_im * Float64(log(hypot(x_46_re, x_46_im)) * (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ Float64(-y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -5.5e-220) || ~((y_46_im <= 2.8e-195))) tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ -y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -5.5e-220], N[Not[LessEqual[y$46$im, 2.8e-195]], $MachinePrecision]], N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{-220} \lor \neg \left(y.im \leq 2.8 \cdot 10^{-195}\right):\\
\;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}\\
\end{array}
\end{array}
if y.im < -5.4999999999999999e-220 or 2.80000000000000003e-195 < y.im Initial program 39.9%
cancel-sign-sub-inv39.9%
fma-define39.9%
hypot-define39.9%
distribute-lft-neg-in39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around inf 39.6%
unpow239.6%
unpow239.6%
hypot-undefine77.4%
Simplified77.4%
Taylor expanded in y.im around 0 49.6%
unpow249.6%
unpow249.6%
hypot-undefine75.7%
Simplified75.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-undefine53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-undefine56.2%
Simplified56.2%
if -5.4999999999999999e-220 < y.im < 2.80000000000000003e-195Initial program 42.8%
exp-diff42.8%
exp-to-pow42.8%
hypot-define42.8%
*-commutative42.8%
exp-prod42.8%
fma-define42.8%
hypot-define97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y.im around 0 97.0%
Taylor expanded in y.im around 0 84.4%
clear-num84.4%
associate-*l/84.4%
*-un-lft-identity84.4%
pow-flip84.4%
Applied egg-rr84.4%
*-commutative84.4%
Simplified84.4%
Final simplification60.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re)))
(if (<= x.re -6.5e-275)
(* (* y.re (atan2 x.im x.re)) t_0)
(* y.im (* (log (hypot x.re x.im)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (x_46_re <= -6.5e-275) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * t_0;
} else {
tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (x_46_re <= -6.5e-275) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * t_0;
} else {
tmp = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * 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) tmp = 0 if x_46_re <= -6.5e-275: tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * t_0 else: tmp = y_46_im * (math.log(math.hypot(x_46_re, x_46_im)) * 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 tmp = 0.0 if (x_46_re <= -6.5e-275) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * t_0); else tmp = Float64(y_46_im * Float64(log(hypot(x_46_re, x_46_im)) * t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (x_46_re <= -6.5e-275) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * t_0; else tmp = y_46_im * (log(hypot(x_46_re, x_46_im)) * t_0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -6.5e-275], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -6.5 \cdot 10^{-275}:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot t\_0\right)\\
\end{array}
\end{array}
if x.re < -6.500000000000001e-275Initial program 40.3%
exp-diff37.7%
exp-to-pow37.7%
hypot-define37.7%
*-commutative37.7%
exp-prod37.7%
fma-define37.7%
hypot-define73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in y.im around 0 57.7%
Taylor expanded in y.im around 0 47.5%
Taylor expanded in y.re around 0 50.1%
*-commutative50.1%
Simplified50.1%
if -6.500000000000001e-275 < x.re Initial program 40.3%
cancel-sign-sub-inv40.3%
fma-define40.3%
hypot-define40.3%
distribute-lft-neg-in40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around inf 38.1%
unpow238.1%
unpow238.1%
hypot-undefine78.0%
Simplified78.0%
Taylor expanded in y.im around 0 48.6%
unpow248.6%
unpow248.6%
hypot-undefine75.2%
Simplified75.2%
Taylor expanded in y.im around 0 39.4%
+-commutative39.4%
unpow239.4%
unpow239.4%
hypot-undefine55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
hypot-undefine64.1%
Simplified64.1%
Final simplification57.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= x.im -1020000000.0) (not (<= x.im 4.8e+17)))
(* t_0 (pow x.im y.re))
(* t_0 (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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -1020000000.0) || !(x_46_im <= 4.8e+17)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * 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) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if ((x_46im <= (-1020000000.0d0)) .or. (.not. (x_46im <= 4.8d+17))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * (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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -1020000000.0) || !(x_46_im <= 4.8e+17)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * 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.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (x_46_im <= -1020000000.0) or not (x_46_im <= 4.8e+17): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((x_46_im <= -1020000000.0) || !(x_46_im <= 4.8e+17)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * (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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((x_46_im <= -1020000000.0) || ~((x_46_im <= 4.8e+17))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$im, -1020000000.0], N[Not[LessEqual[x$46$im, 4.8e+17]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, 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.im \leq -1020000000 \lor \neg \left(x.im \leq 4.8 \cdot 10^{+17}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.02e9 or 4.8e17 < x.im Initial program 21.7%
exp-diff19.2%
exp-to-pow19.2%
hypot-define19.2%
*-commutative19.2%
exp-prod19.2%
fma-define19.2%
hypot-define69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in y.im around 0 63.4%
Taylor expanded in y.im around 0 56.7%
Taylor expanded in x.re around 0 50.1%
*-commutative50.1%
Simplified50.1%
if -1.02e9 < x.im < 4.8e17Initial program 56.7%
exp-diff51.6%
exp-to-pow51.6%
hypot-define51.6%
*-commutative51.6%
exp-prod50.0%
fma-define50.0%
hypot-define74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in y.im around 0 66.3%
Taylor expanded in y.im around 0 45.8%
Taylor expanded in x.im around 0 40.0%
*-commutative40.0%
Simplified40.0%
Final simplification44.7%
(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 40.3%
exp-diff36.4%
exp-to-pow36.4%
hypot-define36.4%
*-commutative36.4%
exp-prod35.5%
fma-define35.5%
hypot-define71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y.im around 0 65.0%
Taylor expanded in y.im around 0 50.9%
Taylor expanded in y.re around 0 49.7%
*-commutative49.7%
Simplified49.7%
Final simplification49.7%
(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 40.3%
exp-diff36.4%
exp-to-pow36.4%
hypot-define36.4%
*-commutative36.4%
exp-prod35.5%
fma-define35.5%
hypot-define71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y.im around 0 65.0%
Taylor expanded in y.im around 0 50.9%
Taylor expanded in x.re around 0 35.4%
*-commutative35.4%
Simplified35.4%
Final simplification35.4%
herbie shell --seed 2024066
(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)))))