
(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 (* t_0 y.im))
(t_2 (* (atan2 x.im x.re) (- y.im)))
(t_3 (log (hypot x.im x.re))))
(if (<= y.re -8.4e+21)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_3)))
(if (<= y.re 1.12e-62)
(* (sin (pow (cbrt (fma y.re (atan2 x.im x.re) t_1)) 3.0)) (exp t_2))
(if (<= y.re 3.5e+81)
(*
(exp (fma t_0 y.re t_2))
(sin (* y.im (+ t_3 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_1 (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 = t_0 * y_46_im;
double t_2 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_3 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -8.4e+21) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_3));
} else if (y_46_re <= 1.12e-62) {
tmp = sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), t_1)), 3.0)) * exp(t_2);
} else if (y_46_re <= 3.5e+81) {
tmp = exp(fma(t_0, y_46_re, t_2)) * sin((y_46_im * (t_3 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(t_0 * y_46_im) t_2 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_3 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8.4e+21) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_3))); elseif (y_46_re <= 1.12e-62) tmp = Float64(sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), t_1)) ^ 3.0)) * exp(t_2)); elseif (y_46_re <= 3.5e+81) tmp = Float64(exp(fma(t_0, y_46_re, t_2)) * sin(Float64(y_46_im * Float64(t_3 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_1 * (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[(t$95$0 * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.4e+21], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.12e-62], N[(N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.5e+81], N[(N[Exp[N[(t$95$0 * y$46$re + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$3 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[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 := t\_0 \cdot y.im\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -8.4 \cdot 10^{+21}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_3\right)\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-62}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_1\right)}\right)}^{3}\right) \cdot e^{t\_2}\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, t\_2\right)} \cdot \sin \left(y.im \cdot \left(t\_3 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -8.4e21Initial program 41.1%
Taylor expanded in y.re around 0 46.4%
*-commutative46.4%
unpow246.4%
unpow246.4%
hypot-undefine91.1%
Simplified91.1%
if -8.4e21 < y.re < 1.1200000000000001e-62Initial program 42.5%
fmm-def42.5%
hypot-define42.5%
distribute-rgt-neg-out42.5%
fma-define42.4%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
add-cube-cbrt84.2%
pow385.0%
hypot-define45.8%
*-commutative45.8%
fma-define45.8%
+-commutative45.8%
*-commutative45.8%
fma-define45.8%
*-commutative45.8%
hypot-define85.0%
Applied egg-rr85.0%
Taylor expanded in y.re around 0 84.0%
neg-mul-184.0%
*-commutative84.0%
distribute-rgt-neg-in84.0%
Simplified84.0%
if 1.1200000000000001e-62 < y.re < 3.5e81Initial program 46.3%
fmm-def46.3%
hypot-define46.3%
distribute-rgt-neg-out46.3%
fma-define46.3%
hypot-define81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y.im around inf 46.3%
unpow246.3%
unpow246.3%
hypot-undefine81.2%
associate-/l*81.3%
Simplified81.3%
if 3.5e81 < y.re Initial program 34.0%
Taylor expanded in y.re around 0 35.8%
*-commutative35.8%
unpow235.8%
unpow235.8%
hypot-undefine64.2%
Simplified64.2%
Taylor expanded in y.im around 0 56.6%
associate-*r*56.6%
+-commutative56.6%
unpow256.6%
unpow256.6%
hypot-undefine68.0%
+-commutative68.0%
unpow268.0%
unpow268.0%
hypot-undefine68.0%
Simplified68.0%
Final simplification81.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 9.6e+240)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (pow (cbrt (fma y.re (atan2 x.im x.re) (* t_0 y.im))) 3.0)))
(*
(sqrt (pow (sin (* y.re (atan2 x.im x.re))) 2.0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 9.6e+240) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (t_0 * y_46_im))), 3.0));
} else {
tmp = sqrt(pow(sin((y_46_re * atan2(x_46_im, x_46_re))), 2.0)) * pow(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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 9.6e+240) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_0 * y_46_im))) ^ 3.0))); else tmp = Float64(sqrt((sin(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ 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]}, If[LessEqual[y$46$re, 9.6e+240], 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[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$0 * y$46$im), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[Power[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 9.6 \cdot 10^{+240}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_0 \cdot y.im\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < 9.5999999999999995e240Initial program 40.4%
fmm-def40.4%
hypot-define40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
add-cube-cbrt79.7%
pow380.8%
hypot-define41.4%
*-commutative41.4%
fma-define41.4%
+-commutative41.4%
*-commutative41.4%
fma-define41.4%
*-commutative41.4%
hypot-define80.8%
Applied egg-rr80.8%
if 9.5999999999999995e240 < y.re Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-undefine56.3%
Simplified56.3%
add-sqr-sqrt43.8%
sqrt-unprod93.8%
pow293.8%
Applied egg-rr93.8%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -5.8e+140)
(* (* t_0 y.im) (pow (hypot x.re x.im) y.re))
(if (<= y.re 3.7e+275)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_1)))
(* (sqrt (pow (sin t_1) 2.0)) (pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -5.8e+140) {
tmp = (t_0 * y_46_im) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_re <= 3.7e+275) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, t_1));
} else {
tmp = sqrt(pow(sin(t_1), 2.0)) * pow(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 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -5.8e+140) tmp = Float64(Float64(t_0 * y_46_im) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_re <= 3.7e+275) tmp = 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, t_1))); else tmp = Float64(sqrt((sin(t_1) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e+140], N[(N[(t$95$0 * y$46$im), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.7e+275], 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 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[Power[N[Sin[t$95$1], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+140}:\\
\;\;\;\;\left(t\_0 \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{+275}:\\
\;\;\;\;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, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\sin t\_1}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.7999999999999998e140Initial program 33.3%
Taylor expanded in y.re around 0 41.7%
*-commutative41.7%
unpow241.7%
unpow241.7%
hypot-undefine88.9%
Simplified88.9%
Taylor expanded in y.im around 0 47.2%
associate-*r*47.2%
+-commutative47.2%
unpow247.2%
unpow247.2%
hypot-undefine88.9%
+-commutative88.9%
unpow288.9%
unpow288.9%
hypot-undefine88.9%
Simplified88.9%
if -5.7999999999999998e140 < y.re < 3.7000000000000003e275Initial program 43.1%
fmm-def43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
if 3.7000000000000003e275 < y.re Initial program 22.2%
fmm-def22.2%
hypot-define22.2%
distribute-rgt-neg-out22.2%
fma-define22.2%
hypot-define33.3%
*-commutative33.3%
Simplified33.3%
Taylor expanded in y.im around 0 33.3%
unpow233.3%
unpow233.3%
hypot-undefine33.3%
Simplified33.3%
add-sqr-sqrt33.3%
sqrt-unprod100.0%
pow2100.0%
Applied egg-rr100.0%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.re -8.4e+21)
t_0
(if (<= y.re 0.99)
(*
(sin
(pow
(cbrt (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
3.0))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 7.7e+192)
t_0
(*
(sqrt (pow (sin (* y.re (atan2 x.im x.re))) 2.0))
(pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.4e+21) {
tmp = t_0;
} else if (y_46_re <= 0.99) {
tmp = sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im))), 3.0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 7.7e+192) {
tmp = t_0;
} else {
tmp = sqrt(pow(sin((y_46_re * atan2(x_46_im, x_46_re))), 2.0)) * pow(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(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))))) tmp = 0.0 if (y_46_re <= -8.4e+21) tmp = t_0; elseif (y_46_re <= 0.99) tmp = Float64(sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) ^ 3.0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 7.7e+192) tmp = t_0; else tmp = Float64(sqrt((sin(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ 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[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.4e+21], t$95$0, If[LessEqual[y$46$re, 0.99], N[(N[Sin[N[Power[N[Power[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], 1/3], $MachinePrecision], 3.0], $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, 7.7e+192], t$95$0, N[(N[Sqrt[N[Power[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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{if}\;y.re \leq -8.4 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 0.99:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\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)}^{3}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 7.7 \cdot 10^{+192}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -8.4e21 or 0.98999999999999999 < y.re < 7.6999999999999997e192Initial program 38.4%
Taylor expanded in y.re around 0 41.4%
*-commutative41.4%
unpow241.4%
unpow241.4%
hypot-undefine81.9%
Simplified81.9%
if -8.4e21 < y.re < 0.98999999999999999Initial program 43.6%
fmm-def43.6%
hypot-define43.6%
distribute-rgt-neg-out43.6%
fma-define43.6%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
add-cube-cbrt82.7%
pow384.1%
hypot-define45.6%
*-commutative45.6%
fma-define45.6%
+-commutative45.6%
*-commutative45.6%
fma-define45.6%
*-commutative45.6%
hypot-define84.1%
Applied egg-rr84.1%
Taylor expanded in y.re around 0 82.2%
neg-mul-182.2%
*-commutative82.2%
distribute-rgt-neg-in82.2%
Simplified82.2%
if 7.6999999999999997e192 < y.re Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine58.1%
Simplified58.1%
add-sqr-sqrt29.0%
sqrt-unprod77.4%
pow277.4%
Applied egg-rr77.4%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -600.0) (not (<= y.im 8000000.0)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.re (atan2 x.im x.re))))
(*
(sin (pow (cbrt (fma y.re (atan2 x.im x.re) (* t_0 y.im))) 3.0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -600.0) || !(y_46_im <= 8000000.0)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (t_0 * y_46_im))), 3.0)) * pow(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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -600.0) || !(y_46_im <= 8000000.0)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_0 * y_46_im))) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ 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]}, If[Or[LessEqual[y$46$im, -600.0], N[Not[LessEqual[y$46$im, 8000000.0]], $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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$0 * y$46$im), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -600 \lor \neg \left(y.im \leq 8000000\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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_0 \cdot y.im\right)}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -600 or 8e6 < y.im Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define67.2%
*-commutative67.2%
Simplified67.2%
add-cube-cbrt67.9%
pow369.4%
hypot-define40.7%
*-commutative40.7%
fma-define40.7%
+-commutative40.7%
*-commutative40.7%
fma-define40.7%
*-commutative40.7%
hypot-define69.4%
Applied egg-rr69.4%
Taylor expanded in y.im around 0 63.6%
if -600 < y.im < 8e6Initial program 41.4%
fmm-def41.4%
hypot-define41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define86.2%
*-commutative86.2%
Simplified86.2%
add-cube-cbrt87.3%
pow388.7%
hypot-define42.3%
*-commutative42.3%
fma-define42.3%
+-commutative42.3%
*-commutative42.3%
fma-define42.3%
*-commutative42.3%
hypot-define88.7%
Applied egg-rr88.7%
Taylor expanded in y.im around 0 63.1%
unpow263.1%
unpow263.1%
hypot-undefine87.0%
Simplified87.0%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (or (<= y.im -470.0) (not (<= y.im 470.0)))
(* (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))) (sin t_0))
(*
(sin (fma t_1 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (atan2 x.im x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -470.0) || !(y_46_im <= 470.0)) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_0);
} else {
tmp = sin(fma(t_1, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -470.0) || !(y_46_im <= 470.0)) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_0)); else tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -470.0], N[Not[LessEqual[y$46$im, 470.0]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -470 \lor \neg \left(y.im \leq 470\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -470 or 470 < y.im Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
add-cube-cbrt67.8%
pow369.3%
hypot-define40.4%
*-commutative40.4%
fma-define40.4%
+-commutative40.4%
*-commutative40.4%
fma-define40.4%
*-commutative40.4%
hypot-define69.3%
Applied egg-rr69.3%
Taylor expanded in y.im around 0 63.1%
if -470 < y.im < 470Initial program 41.7%
exp-diff41.7%
exp-to-pow41.7%
hypot-define41.7%
*-commutative41.7%
exp-prod41.7%
fma-define41.7%
hypot-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y.im around 0 85.6%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (or (<= y.im -320.0) (not (<= y.im 7600000.0)))
(* (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))) (sin t_0))
(* (pow (hypot x.re x.im) y.re) (sin (+ (* t_1 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -320.0) || !(y_46_im <= 7600000.0)) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_0);
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(((t_1 * y_46_im) + t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -320.0) || !(y_46_im <= 7600000.0)) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_0)); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(Float64(t_1 * y_46_im) + t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -320.0], N[Not[LessEqual[y$46$im, 7600000.0]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -320 \lor \neg \left(y.im \leq 7600000\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t\_1 \cdot y.im + t\_0\right)\\
\end{array}
\end{array}
if y.im < -320 or 7.6e6 < y.im Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define67.2%
*-commutative67.2%
Simplified67.2%
add-cube-cbrt67.9%
pow369.4%
hypot-define40.7%
*-commutative40.7%
fma-define40.7%
+-commutative40.7%
*-commutative40.7%
fma-define40.7%
*-commutative40.7%
hypot-define69.4%
Applied egg-rr69.4%
Taylor expanded in y.im around 0 63.6%
if -320 < y.im < 7.6e6Initial program 41.4%
add-sqr-sqrt15.7%
sqrt-unprod31.8%
pow231.8%
*-commutative31.8%
hypot-define49.5%
Applied egg-rr49.5%
unpow249.5%
rem-sqrt-square50.2%
*-commutative50.2%
hypot-undefine32.1%
unpow232.1%
unpow232.1%
+-commutative32.1%
unpow232.1%
unpow232.1%
hypot-undefine50.2%
Simplified50.2%
Taylor expanded in y.im around 0 49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-undefine65.9%
Simplified65.9%
hypot-undefine31.7%
+-commutative31.7%
hypot-define65.9%
add-sqr-sqrt38.1%
fabs-sqr38.1%
add-sqr-sqrt84.4%
Applied egg-rr84.4%
Final simplification74.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -3.3e-6)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.im 7600000.0)
(*
(pow (hypot x.re x.im) y.re)
(sin (+ (* (log (hypot x.re x.im)) y.im) t_0)))
(*
(sin t_0)
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -3.3e-6) {
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_im <= 7600000.0) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(((log(hypot(x_46_re, x_46_im)) * y_46_im) + t_0));
} else {
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)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -3.3e-6) {
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_im <= 7600000.0) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im) + t_0));
} else {
tmp = Math.sin(t_0) * 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)));
}
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_im <= -3.3e-6: 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_im <= 7600000.0: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im) + t_0)) else: tmp = math.sin(t_0) * 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))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -3.3e-6) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_im <= 7600000.0) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im) + t_0))); else 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)))); 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_im <= -3.3e-6) 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_im <= 7600000.0) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin(((log(hypot(x_46_re, x_46_im)) * y_46_im) + t_0)); else 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))); 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$im, -3.3e-6], 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$im, 7600000.0], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{-6}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.im \leq 7600000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if y.im < -3.30000000000000017e-6Initial program 46.6%
fmm-def46.6%
hypot-define46.6%
distribute-rgt-neg-out46.6%
fma-define46.6%
hypot-define71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in y.re around 0 37.9%
neg-mul-137.9%
distribute-lft-neg-in37.9%
*-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine58.3%
Simplified58.3%
if -3.30000000000000017e-6 < y.im < 7.6e6Initial program 40.1%
add-sqr-sqrt15.3%
sqrt-unprod31.0%
pow231.0%
*-commutative31.0%
hypot-define49.1%
Applied egg-rr49.1%
unpow249.1%
rem-sqrt-square49.8%
*-commutative49.8%
hypot-undefine31.3%
unpow231.3%
unpow231.3%
+-commutative31.3%
unpow231.3%
unpow231.3%
hypot-undefine49.8%
Simplified49.8%
Taylor expanded in y.im around 0 49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-undefine66.3%
Simplified66.3%
hypot-undefine31.3%
+-commutative31.3%
hypot-define66.3%
add-sqr-sqrt38.6%
fabs-sqr38.6%
add-sqr-sqrt85.0%
Applied egg-rr85.0%
if 7.6e6 < y.im Initial program 36.5%
Taylor expanded in y.im around 0 55.8%
Final simplification71.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -3.3e-6) (not (<= y.im 1.95e+179)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(pow (hypot x.re x.im) y.re)
(sin (+ (* (log (hypot x.re x.im)) 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 tmp;
if ((y_46_im <= -3.3e-6) || !(y_46_im <= 1.95e+179)) {
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 {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(((log(hypot(x_46_re, x_46_im)) * y_46_im) + (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 <= -3.3e-6) || !(y_46_im <= 1.95e+179)) {
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 {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im) + (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 <= -3.3e-6) or not (y_46_im <= 1.95e+179): 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: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im) + (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 <= -3.3e-6) || !(y_46_im <= 1.95e+179)) tmp = Float64(sin(Float64(y_46_im * log(hypot(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_re, x_46_im) ^ y_46_re) * sin(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im) + 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 <= -3.3e-6) || ~((y_46_im <= 1.95e+179))) 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 tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin(((log(hypot(x_46_re, x_46_im)) * y_46_im) + (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, -3.3e-6], N[Not[LessEqual[y$46$im, 1.95e+179]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{-6} \lor \neg \left(y.im \leq 1.95 \cdot 10^{+179}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -3.30000000000000017e-6 or 1.94999999999999987e179 < y.im Initial program 48.0%
fmm-def48.0%
hypot-define48.0%
distribute-rgt-neg-out48.0%
fma-define48.0%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.re around 0 41.3%
neg-mul-141.3%
distribute-lft-neg-in41.3%
*-commutative41.3%
unpow241.3%
unpow241.3%
hypot-undefine59.2%
Simplified59.2%
if -3.30000000000000017e-6 < y.im < 1.94999999999999987e179Initial program 37.4%
add-sqr-sqrt15.8%
sqrt-unprod29.5%
pow229.5%
*-commutative29.5%
hypot-define48.6%
Applied egg-rr48.6%
unpow248.6%
rem-sqrt-square52.8%
*-commutative52.8%
hypot-undefine31.5%
unpow231.5%
unpow231.5%
+-commutative31.5%
unpow231.5%
unpow231.5%
hypot-undefine52.8%
Simplified52.8%
Taylor expanded in y.im around 0 49.3%
+-commutative49.3%
unpow249.3%
unpow249.3%
hypot-undefine62.0%
Simplified62.0%
hypot-undefine28.0%
+-commutative28.0%
hypot-define62.0%
add-sqr-sqrt38.7%
fabs-sqr38.7%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
Final simplification70.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -8.4e+21) (not (<= y.re 1.9e+32)))
(* (* (log (hypot x.re x.im)) y.im) (pow (hypot x.re x.im) y.re))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8.4e+21) || !(y_46_re <= 1.9e+32)) {
tmp = (log(hypot(x_46_re, x_46_im)) * y_46_im) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8.4e+21) || !(y_46_re <= 1.9e+32)) {
tmp = (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else {
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));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -8.4e+21) or not (y_46_re <= 1.9e+32): tmp = (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) else: 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)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -8.4e+21) || !(y_46_re <= 1.9e+32)) tmp = Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -8.4e+21) || ~((y_46_re <= 1.9e+32))) tmp = (log(hypot(x_46_re, x_46_im)) * y_46_im) * (hypot(x_46_re, x_46_im) ^ y_46_re); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -8.4e+21], N[Not[LessEqual[y$46$re, 1.9e+32]], $MachinePrecision]], N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8.4 \cdot 10^{+21} \lor \neg \left(y.re \leq 1.9 \cdot 10^{+32}\right):\\
\;\;\;\;\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -8.4e21 or 1.9000000000000002e32 < y.re Initial program 36.8%
Taylor expanded in y.re around 0 40.8%
*-commutative40.8%
unpow240.8%
unpow240.8%
hypot-undefine76.9%
Simplified76.9%
Taylor expanded in y.im around 0 52.9%
associate-*r*52.9%
+-commutative52.9%
unpow252.9%
unpow252.9%
hypot-undefine76.9%
+-commutative76.9%
unpow276.9%
unpow276.9%
hypot-undefine76.9%
Simplified76.9%
if -8.4e21 < y.re < 1.9000000000000002e32Initial program 45.0%
fmm-def45.0%
hypot-define45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y.re around 0 31.4%
neg-mul-131.4%
distribute-lft-neg-in31.4%
*-commutative31.4%
unpow231.4%
unpow231.4%
hypot-undefine57.5%
Simplified57.5%
Final simplification67.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re)))
(if (<= y.im -7e+151)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (- (log (/ -1.0 x.im))))))
(if (<= y.im -2.3e-173)
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 7.6e-188)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(* (* (log (hypot x.re x.im)) 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_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -7e+151) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * -log((-1.0 / x_46_im))));
} else if (y_46_im <= -2.3e-173) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 7.6e-188) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = (log(hypot(x_46_re, x_46_im)) * y_46_im) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -7e+151) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * -Math.log((-1.0 / x_46_im))));
} else if (y_46_im <= -2.3e-173) {
tmp = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 7.6e-188) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = (Math.log(Math.hypot(x_46_re, x_46_im)) * y_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 y_46_im <= -7e+151: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * -math.log((-1.0 / x_46_im)))) elif y_46_im <= -2.3e-173: tmp = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_im <= 7.6e-188: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = (math.log(math.hypot(x_46_re, x_46_im)) * y_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 (y_46_im <= -7e+151) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * Float64(-log(Float64(-1.0 / x_46_im)))))); elseif (y_46_im <= -2.3e-173) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 7.6e-188) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_im <= -7e+151) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * -log((-1.0 / x_46_im)))); elseif (y_46_im <= -2.3e-173) tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_im <= 7.6e-188) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = (log(hypot(x_46_re, x_46_im)) * y_46_im) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -7e+151], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * (-N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.3e-173], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.6e-188], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{+151}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.im}\right)\right)\right)\\
\mathbf{elif}\;y.im \leq -2.3 \cdot 10^{-173}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 7.6 \cdot 10^{-188}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot t\_0\\
\end{array}
\end{array}
if y.im < -7.0000000000000006e151Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
add-cube-cbrt74.8%
pow374.3%
hypot-define44.2%
*-commutative44.2%
fma-define44.2%
+-commutative44.2%
*-commutative44.2%
fma-define44.2%
*-commutative44.2%
hypot-define74.3%
Applied egg-rr74.3%
Taylor expanded in x.im around -inf 62.4%
Taylor expanded in y.re around 0 53.8%
associate-*r*53.8%
neg-mul-153.8%
mul-1-neg53.8%
distribute-lft-neg-out53.8%
Simplified53.8%
if -7.0000000000000006e151 < y.im < -2.29999999999999988e-173Initial program 43.2%
Taylor expanded in y.re around 0 39.6%
*-commutative39.6%
unpow239.6%
unpow239.6%
hypot-undefine54.8%
Simplified54.8%
Taylor expanded in y.im around 0 47.8%
+-commutative44.3%
unpow244.3%
unpow244.3%
hypot-undefine45.9%
Simplified58.8%
if -2.29999999999999988e-173 < y.im < 7.599999999999999e-188Initial program 45.1%
fmm-def45.1%
hypot-define45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine71.4%
Simplified71.4%
if 7.599999999999999e-188 < y.im Initial program 34.1%
Taylor expanded in y.re around 0 36.3%
*-commutative36.3%
unpow236.3%
unpow236.3%
hypot-undefine60.3%
Simplified60.3%
Taylor expanded in y.im around 0 37.4%
associate-*r*37.4%
+-commutative37.4%
unpow237.4%
unpow237.4%
hypot-undefine52.9%
+-commutative52.9%
unpow252.9%
unpow252.9%
hypot-undefine59.5%
Simplified59.5%
Final simplification60.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.1e+152)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (- (log (/ -1.0 x.im))))))
(if (or (<= y.im -2.1e-173) (not (<= y.im 3.8e-188)))
(* (* (log (hypot x.re x.im)) y.im) (pow (hypot x.re x.im) y.re))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.1e+152) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * -log((-1.0 / x_46_im))));
} else if ((y_46_im <= -2.1e-173) || !(y_46_im <= 3.8e-188)) {
tmp = (log(hypot(x_46_re, x_46_im)) * y_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_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.1e+152) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * -Math.log((-1.0 / x_46_im))));
} else if ((y_46_im <= -2.1e-173) || !(y_46_im <= 3.8e-188)) {
tmp = (Math.log(Math.hypot(x_46_re, x_46_im)) * y_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_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.1e+152: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * -math.log((-1.0 / x_46_im)))) elif (y_46_im <= -2.1e-173) or not (y_46_im <= 3.8e-188): tmp = (math.log(math.hypot(x_46_re, x_46_im)) * y_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_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.1e+152) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * Float64(-log(Float64(-1.0 / x_46_im)))))); elseif ((y_46_im <= -2.1e-173) || !(y_46_im <= 3.8e-188)) tmp = Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_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_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.1e+152) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * -log((-1.0 / x_46_im)))); elseif ((y_46_im <= -2.1e-173) || ~((y_46_im <= 3.8e-188))) tmp = (log(hypot(x_46_re, x_46_im)) * y_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_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.1e+152], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * (-N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -2.1e-173], N[Not[LessEqual[y$46$im, 3.8e-188]], $MachinePrecision]], N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.1 \cdot 10^{+152}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.im}\right)\right)\right)\\
\mathbf{elif}\;y.im \leq -2.1 \cdot 10^{-173} \lor \neg \left(y.im \leq 3.8 \cdot 10^{-188}\right):\\
\;\;\;\;\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.0999999999999999e152Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
add-cube-cbrt74.8%
pow374.3%
hypot-define44.2%
*-commutative44.2%
fma-define44.2%
+-commutative44.2%
*-commutative44.2%
fma-define44.2%
*-commutative44.2%
hypot-define74.3%
Applied egg-rr74.3%
Taylor expanded in x.im around -inf 62.4%
Taylor expanded in y.re around 0 53.8%
associate-*r*53.8%
neg-mul-153.8%
mul-1-neg53.8%
distribute-lft-neg-out53.8%
Simplified53.8%
if -1.0999999999999999e152 < y.im < -2.10000000000000001e-173 or 3.8e-188 < y.im Initial program 38.0%
Taylor expanded in y.re around 0 37.7%
*-commutative37.7%
unpow237.7%
unpow237.7%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in y.im around 0 38.1%
associate-*r*38.1%
+-commutative38.1%
unpow238.1%
unpow238.1%
hypot-undefine51.1%
+-commutative51.1%
unpow251.1%
unpow251.1%
hypot-undefine59.0%
Simplified59.0%
if -2.10000000000000001e-173 < y.im < 3.8e-188Initial program 45.1%
fmm-def45.1%
hypot-define45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine71.4%
Simplified71.4%
Final simplification60.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.9e-173) (not (<= y.im 7.8e-188))) (* (* (log (hypot x.re x.im)) y.im) (pow (hypot x.re x.im) y.re)) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.9e-173) || !(y_46_im <= 7.8e-188)) {
tmp = (log(hypot(x_46_re, x_46_im)) * y_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_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.9e-173) || !(y_46_im <= 7.8e-188)) {
tmp = (Math.log(Math.hypot(x_46_re, x_46_im)) * y_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_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.9e-173) or not (y_46_im <= 7.8e-188): tmp = (math.log(math.hypot(x_46_re, x_46_im)) * y_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_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.9e-173) || !(y_46_im <= 7.8e-188)) tmp = Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_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_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.9e-173) || ~((y_46_im <= 7.8e-188))) tmp = (log(hypot(x_46_re, x_46_im)) * y_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_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.9e-173], N[Not[LessEqual[y$46$im, 7.8e-188]], $MachinePrecision]], N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.9 \cdot 10^{-173} \lor \neg \left(y.im \leq 7.8 \cdot 10^{-188}\right):\\
\;\;\;\;\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.90000000000000015e-173 or 7.79999999999999954e-188 < y.im Initial program 40.0%
Taylor expanded in y.re around 0 39.3%
*-commutative39.3%
unpow239.3%
unpow239.3%
hypot-undefine59.2%
Simplified59.2%
Taylor expanded in y.im around 0 35.9%
associate-*r*35.9%
+-commutative35.9%
unpow235.9%
unpow235.9%
hypot-undefine48.2%
+-commutative48.2%
unpow248.2%
unpow248.2%
hypot-undefine54.7%
Simplified54.7%
if -1.90000000000000015e-173 < y.im < 7.79999999999999954e-188Initial program 45.1%
fmm-def45.1%
hypot-define45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around 0 57.7%
unpow257.7%
unpow257.7%
hypot-undefine71.4%
Simplified71.4%
Final simplification58.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 5.5e+42) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.im (* (log x.im) (pow 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 (x_46_im <= 5.5e+42) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_im * (log(x_46_im) * 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 tmp;
if (x_46_im <= 5.5e+42) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_im * (Math.log(x_46_im) * Math.pow(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 x_46_im <= 5.5e+42: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = y_46_im * (math.log(x_46_im) * math.pow(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 (x_46_im <= 5.5e+42) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_im * Float64(log(x_46_im) * (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 (x_46_im <= 5.5e+42) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_im * (log(x_46_im) * (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[x$46$im, 5.5e+42], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 5.5 \cdot 10^{+42}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if x.im < 5.50000000000000001e42Initial program 48.3%
fmm-def48.3%
hypot-define48.3%
distribute-rgt-neg-out48.3%
fma-define48.2%
hypot-define77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in y.im around 0 40.7%
unpow240.7%
unpow240.7%
hypot-undefine43.5%
Simplified43.5%
if 5.50000000000000001e42 < x.im Initial program 14.5%
Taylor expanded in y.re around 0 16.4%
*-commutative16.4%
unpow216.4%
unpow216.4%
hypot-undefine41.3%
Simplified41.3%
Taylor expanded in x.re around 0 64.5%
Taylor expanded in y.im around 0 58.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 1.18e-235) (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)) (* y.im (* (log x.im) (pow 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 (x_46_im <= 1.18e-235) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_im * (log(x_46_im) * 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) :: tmp
if (x_46im <= 1.18d-235) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)
else
tmp = y_46im * (log(x_46im) * (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 tmp;
if (x_46_im <= 1.18e-235) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_im * (Math.log(x_46_im) * Math.pow(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 x_46_im <= 1.18e-235: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = y_46_im * (math.log(x_46_im) * math.pow(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 (x_46_im <= 1.18e-235) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_im * Float64(log(x_46_im) * (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 (x_46_im <= 1.18e-235) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = y_46_im * (log(x_46_im) * (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[x$46$im, 1.18e-235], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 1.18 \cdot 10^{-235}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if x.im < 1.18000000000000003e-235Initial program 44.3%
fmm-def44.3%
hypot-define44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y.im around 0 41.8%
unpow241.8%
unpow241.8%
hypot-undefine44.8%
Simplified44.8%
Taylor expanded in x.im around 0 33.9%
if 1.18000000000000003e-235 < x.im Initial program 36.8%
Taylor expanded in y.re around 0 30.8%
*-commutative30.8%
unpow230.8%
unpow230.8%
hypot-undefine48.5%
Simplified48.5%
Taylor expanded in x.re around 0 56.0%
Taylor expanded in y.im around 0 47.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 4e+34) (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (* y.im (* (log x.im) (pow 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 (x_46_im <= 4e+34) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
} else {
tmp = y_46_im * (log(x_46_im) * 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) :: tmp
if (x_46im <= 4d+34) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
else
tmp = y_46im * (log(x_46im) * (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 tmp;
if (x_46_im <= 4e+34) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = y_46_im * (Math.log(x_46_im) * Math.pow(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 x_46_im <= 4e+34: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) else: tmp = y_46_im * (math.log(x_46_im) * math.pow(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 (x_46_im <= 4e+34) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)); else tmp = Float64(y_46_im * Float64(log(x_46_im) * (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 (x_46_im <= 4e+34) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); else tmp = y_46_im * (log(x_46_im) * (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[x$46$im, 4e+34], 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], N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 4 \cdot 10^{+34}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if x.im < 3.99999999999999978e34Initial program 48.3%
fmm-def48.3%
hypot-define48.3%
distribute-rgt-neg-out48.3%
fma-define48.2%
hypot-define77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in y.im around 0 40.7%
unpow240.7%
unpow240.7%
hypot-undefine43.5%
Simplified43.5%
Taylor expanded in x.re around 0 30.1%
if 3.99999999999999978e34 < x.im Initial program 14.5%
Taylor expanded in y.re around 0 16.4%
*-commutative16.4%
unpow216.4%
unpow216.4%
hypot-undefine41.3%
Simplified41.3%
Taylor expanded in x.re around 0 64.5%
Taylor expanded in y.im around 0 58.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (* (log x.im) (pow 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_im * (log(x_46_im) * 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 = y_46im * (log(x_46im) * (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 y_46_im * (Math.log(x_46_im) * Math.pow(x_46_im, y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * (math.log(x_46_im) * math.pow(x_46_im, y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * Float64(log(x_46_im) * (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_im * (log(x_46_im) * (x_46_im ^ y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)
\end{array}
Initial program 41.0%
Taylor expanded in y.re around 0 36.0%
*-commutative36.0%
unpow236.0%
unpow236.0%
hypot-undefine55.5%
Simplified55.5%
Taylor expanded in x.re around 0 27.4%
Taylor expanded in y.im around 0 23.1%
herbie shell --seed 2024172
(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)))))