
(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 22 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 (cbrt (fma y.re (atan2 x.im x.re) (* y.im t_0))))
(t_2 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im 3.5e-35)
(* t_2 (sin (pow t_1 3.0)))
(* t_2 (sin (pow (fabs t_1) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_0)));
double t_2 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= 3.5e-35) {
tmp = t_2 * sin(pow(t_1, 3.0));
} else {
tmp = t_2 * sin(pow(fabs(t_1), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_0))) 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 (y_46_im <= 3.5e-35) tmp = Float64(t_2 * sin((t_1 ^ 3.0))); else tmp = Float64(t_2 * sin((abs(t_1) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $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[y$46$im, 3.5e-35], N[(t$95$2 * N[Sin[N[Power[t$95$1, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Abs[t$95$1], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_0\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}\;y.im \leq 3.5 \cdot 10^{-35}:\\
\;\;\;\;t\_2 \cdot \sin \left({t\_1}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\left|t\_1\right|\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < 3.49999999999999996e-35Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
add-cube-cbrt86.9%
pow388.4%
hypot-define46.7%
*-commutative46.7%
fma-define46.7%
+-commutative46.7%
*-commutative46.7%
fma-define46.7%
*-commutative46.7%
hypot-define88.4%
Applied egg-rr88.4%
if 3.49999999999999996e-35 < y.im Initial program 33.3%
fmm-def33.3%
hypot-define33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
add-cube-cbrt74.3%
pow374.2%
hypot-define33.3%
*-commutative33.3%
fma-define33.3%
+-commutative33.3%
*-commutative33.3%
fma-define33.3%
*-commutative33.3%
hypot-define74.2%
Applied egg-rr74.2%
pow1/346.8%
add-cube-cbrt46.9%
unpow-prod-down45.6%
pow245.6%
*-commutative45.6%
pow1/380.8%
*-commutative80.8%
Applied egg-rr80.8%
unpow1/377.4%
unpow277.4%
cbrt-prod73.9%
add-cube-cbrt74.2%
add-sqr-sqrt50.4%
sqrt-prod83.8%
rem-sqrt-square83.8%
Applied egg-rr83.8%
Final simplification87.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2e+67)
(* t_1 (sin (pow (cbrt (fma y.re (atan2 x.im x.re) (* y.im t_0))) 3.0)))
(* t_1 (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));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2e+67) {
tmp = t_1 * sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_0))), 3.0));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2e+67) tmp = Float64(t_1 * sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_0))) ^ 3.0))); else tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+67], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+67}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_0\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \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}
if y.im < -1.99999999999999997e67Initial program 38.0%
fmm-def38.0%
hypot-define38.0%
distribute-rgt-neg-out38.0%
fma-define38.0%
hypot-define74.9%
*-commutative74.9%
Simplified74.9%
add-cube-cbrt84.9%
pow386.6%
hypot-define43.1%
*-commutative43.1%
fma-define43.1%
+-commutative43.1%
*-commutative43.1%
fma-define43.1%
*-commutative43.1%
hypot-define86.6%
Applied egg-rr86.6%
if -1.99999999999999997e67 < y.im Initial program 44.8%
fmm-def44.8%
hypot-define44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define87.0%
*-commutative87.0%
Simplified87.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 (<= y.re 1.15e+139)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(fabs (sin (fma y.im (log (hypot x.im x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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_re <= 1.15e+139) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), 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_re <= 1.15e+139) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), 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[LessEqual[y$46$re, 1.15e+139], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $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.re \leq 1.15 \cdot 10^{+139}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\right|\\
\end{array}
\end{array}
if y.re < 1.15e139Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
if 1.15e139 < y.re Initial program 47.2%
fma-define47.2%
hypot-define66.7%
*-commutative66.7%
add-sqr-sqrt36.1%
sqrt-unprod80.6%
pow280.6%
Applied egg-rr80.6%
unpow280.6%
rem-sqrt-square80.6%
fma-define80.6%
hypot-undefine47.2%
unpow247.2%
unpow247.2%
+-commutative47.2%
+-commutative47.2%
fma-define47.2%
Simplified80.6%
Final simplification86.2%
(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 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
(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 (<= y.re -3.25e-28)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(if (<= y.re 8.1e-8)
(* (sin (fma t_1 y.im t_0)) (exp (* (atan2 x.im x.re) (- y.im))))
(*
(sin (pow (cbrt (fma y.re (atan2 x.im x.re) (* y.im t_1))) 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 = 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_re <= -3.25e-28) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else if (y_46_re <= 8.1e-8) {
tmp = sin(fma(t_1, y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin(pow(cbrt(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1))), 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 = 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_re <= -3.25e-28) 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(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); elseif (y_46_re <= 8.1e-8) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin((cbrt(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1))) ^ 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[(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[LessEqual[y$46$re, -3.25e-28], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.1e-8], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $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 := 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.re \leq -3.25 \cdot 10^{-28}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 8.1 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_1\right)}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.25000000000000021e-28Initial program 35.1%
Taylor expanded in y.im around 0 85.9%
if -3.25000000000000021e-28 < y.re < 8.0999999999999997e-8Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.4%
hypot-define86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in y.re around 0 86.6%
neg-mul-186.6%
*-commutative86.6%
distribute-rgt-neg-in86.6%
Simplified86.6%
if 8.0999999999999997e-8 < y.re Initial program 52.4%
fmm-def52.4%
hypot-define52.4%
distribute-rgt-neg-out52.4%
fma-define52.4%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 66.8%
unpow266.8%
unpow266.8%
hypot-undefine69.9%
Simplified69.9%
add-cube-cbrt77.7%
pow382.4%
hypot-define50.8%
*-commutative50.8%
fma-define50.8%
+-commutative50.8%
*-commutative50.8%
fma-define50.8%
*-commutative50.8%
hypot-define82.4%
Applied egg-rr76.2%
Final simplification83.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re)))) (exp (* y.im (- (* y.re (/ (log (hypot x.im x.re)) y.im)) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp((y_46_im * ((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(y_46_im * Float64(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$im * N[(N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{y.im \cdot \left(y.re \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right)}
\end{array}
Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around inf 66.1%
+-commutative66.1%
mul-1-neg66.1%
unsub-neg66.1%
associate-/l*66.1%
unpow266.1%
unpow266.1%
hypot-undefine84.2%
Simplified84.2%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -3.25e-28)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(if (<= y.re 2.1e-5)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (hypot x.im x.re) y.re) (sin (pow (cbrt t_0) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.25e-28) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else if (y_46_re <= 2.1e-5) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -3.25e-28) 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(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); elseif (y_46_re <= 2.1e-5) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.25e-28], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e-5], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $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$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3.25 \cdot 10^{-28}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-5}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -3.25000000000000021e-28Initial program 35.1%
Taylor expanded in y.im around 0 85.9%
if -3.25000000000000021e-28 < y.re < 2.09999999999999988e-5Initial program 43.0%
fmm-def43.0%
hypot-define43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y.re around 0 86.2%
neg-mul-186.2%
*-commutative86.2%
distribute-rgt-neg-in86.2%
Simplified86.2%
if 2.09999999999999988e-5 < y.re Initial program 53.2%
fmm-def53.2%
hypot-define53.2%
distribute-rgt-neg-out53.2%
fma-define53.2%
hypot-define74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y.im around 0 63.0%
unpow263.0%
unpow263.0%
hypot-undefine63.0%
Simplified63.0%
add-cube-cbrt71.0%
pow372.6%
Applied egg-rr72.6%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))) (t_1 (log (hypot x.im x.re))))
(if (<= y.im -1.55e+243)
(pow (pow (* t_0 (pow (hypot x.re x.im) y.re)) 3.0) 0.3333333333333333)
(if (<= y.im -24000000000000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_0)
(if (<= y.im 5.1e+40)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_1 y.re))))))
(* (pow (exp y.im) (- (atan2 x.im x.re))) (sin (* y.im t_1))))))))
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 t_1 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -1.55e+243) {
tmp = pow(pow((t_0 * pow(hypot(x_46_re, x_46_im), y_46_re)), 3.0), 0.3333333333333333);
} else if (y_46_im <= -24000000000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_0;
} else if (y_46_im <= 5.1e+40) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re)))));
} else {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * sin((y_46_im * t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -1.55e+243) {
tmp = Math.pow(Math.pow((t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re)), 3.0), 0.3333333333333333);
} else if (y_46_im <= -24000000000000.0) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * t_0;
} else if (y_46_im <= 5.1e+40) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re)))));
} else {
tmp = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * Math.sin((y_46_im * t_1));
}
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))) t_1 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -1.55e+243: tmp = math.pow(math.pow((t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)), 3.0), 0.3333333333333333) elif y_46_im <= -24000000000000.0: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * t_0 elif y_46_im <= 5.1e+40: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) else: tmp = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * math.sin((y_46_im * t_1)) 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))) t_1 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.55e+243) tmp = (Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= -24000000000000.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(y_46_im * atan(x_46_im, x_46_re)))) * t_0); elseif (y_46_im <= 5.1e+40) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_1 / y_46_re)))))); else tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * t_1))); 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))); t_1 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -1.55e+243) tmp = ((t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= -24000000000000.0) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_0; elseif (y_46_im <= 5.1e+40) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))); else tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * sin((y_46_im * t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.55e+243], N[Power[N[Power[N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, -24000000000000.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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 5.1e+40], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -1.55 \cdot 10^{+243}:\\
\;\;\;\;{\left({\left(t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq -24000000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{elif}\;y.im \leq 5.1 \cdot 10^{+40}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_1}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot t\_1\right)\\
\end{array}
\end{array}
if y.im < -1.55e243Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in y.im around 0 37.3%
unpow237.3%
unpow237.3%
hypot-undefine28.9%
Simplified28.9%
add-cbrt-cube54.8%
pow1/382.1%
pow382.1%
hypot-undefine73.2%
+-commutative73.2%
hypot-define82.1%
Applied egg-rr82.1%
if -1.55e243 < y.im < -2.4e13Initial program 43.4%
Taylor expanded in y.im around 0 68.7%
if -2.4e13 < y.im < 5.09999999999999959e40Initial program 48.3%
fmm-def48.3%
hypot-define48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around 0 68.7%
unpow268.7%
unpow268.7%
hypot-undefine89.5%
Simplified89.5%
Taylor expanded in y.re around inf 48.4%
+-commutative48.4%
associate-/l*48.4%
unpow248.4%
unpow248.4%
hypot-undefine89.5%
Simplified89.5%
if 5.09999999999999959e40 < y.im Initial program 34.0%
fmm-def34.0%
hypot-define34.0%
distribute-rgt-neg-out34.0%
fma-define34.0%
hypot-define77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y.re around 0 26.6%
neg-mul-126.6%
distribute-rgt-neg-in26.6%
mul-1-neg26.6%
exp-prod28.4%
mul-1-neg28.4%
*-commutative28.4%
unpow228.4%
unpow228.4%
hypot-undefine68.3%
Simplified68.3%
Final simplification79.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -0.085)
(pow
(pow
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.re x.im) y.re))
3.0)
0.3333333333333333)
(if (<= y.im 5.5e+40)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* (pow (exp y.im) (- (atan2 x.im x.re))) (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.085) {
tmp = pow(pow((sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_re, x_46_im), y_46_re)), 3.0), 0.3333333333333333);
} else if (y_46_im <= 5.5e+40) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * sin((y_46_im * t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.085) {
tmp = Math.pow(Math.pow((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)), 3.0), 0.3333333333333333);
} else if (y_46_im <= 5.5e+40) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * Math.sin((y_46_im * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -0.085: tmp = math.pow(math.pow((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)), 3.0), 0.3333333333333333) elif y_46_im <= 5.5e+40: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * math.sin((y_46_im * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.085) tmp = (Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_re, x_46_im) ^ y_46_re)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 5.5e+40) tmp = Float64((hypot(x_46_im, x_46_re) ^ 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)))))); else tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -0.085) tmp = ((sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_re, x_46_im) ^ y_46_re)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 5.5e+40) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * sin((y_46_im * t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.085], N[Power[N[Power[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], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, 5.5e+40], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(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], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -0.085:\\
\;\;\;\;{\left({\left(\sin \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}\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{+40}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\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)\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.im < -0.0850000000000000061Initial program 41.9%
fmm-def41.9%
hypot-define41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in y.im around 0 42.0%
unpow242.0%
unpow242.0%
hypot-undefine34.7%
Simplified34.7%
add-cbrt-cube60.1%
pow1/362.6%
pow362.6%
hypot-undefine58.6%
+-commutative58.6%
hypot-define62.6%
Applied egg-rr62.6%
if -0.0850000000000000061 < y.im < 5.49999999999999974e40Initial program 47.8%
fmm-def47.8%
hypot-define47.8%
distribute-rgt-neg-out47.8%
fma-define47.9%
hypot-define90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y.im around 0 68.8%
unpow268.8%
unpow268.8%
hypot-undefine90.0%
Simplified90.0%
Taylor expanded in y.re around inf 47.9%
+-commutative47.9%
associate-/l*47.9%
unpow247.9%
unpow247.9%
hypot-undefine90.0%
Simplified90.0%
if 5.49999999999999974e40 < y.im Initial program 34.0%
fmm-def34.0%
hypot-define34.0%
distribute-rgt-neg-out34.0%
fma-define34.0%
hypot-define77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y.re around 0 26.6%
neg-mul-126.6%
distribute-rgt-neg-in26.6%
mul-1-neg26.6%
exp-prod28.4%
mul-1-neg28.4%
*-commutative28.4%
unpow228.4%
unpow228.4%
hypot-undefine68.3%
Simplified68.3%
Final simplification77.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -7.2e+32)
(* (sin t_0) t_1)
(if (<= y.re 9.2e-94)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_1 (sin (pow (cbrt t_0) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7.2e+32) {
tmp = sin(t_0) * t_1;
} else if (y_46_re <= 9.2e-94) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7.2e+32) {
tmp = Math.sin(t_0) * t_1;
} else if (y_46_re <= 9.2e-94) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -7.2e+32) tmp = Float64(sin(t_0) * t_1); elseif (y_46_re <= 9.2e-94) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -7.2e+32], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 9.2e-94], 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{+32}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-94}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -7.1999999999999994e32Initial program 33.3%
fmm-def33.3%
hypot-define33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in y.im around 0 91.3%
unpow291.3%
unpow291.3%
hypot-undefine91.3%
Simplified91.3%
if -7.1999999999999994e32 < y.re < 9.1999999999999997e-94Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.7%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.re around 0 31.8%
neg-mul-131.8%
distribute-lft-neg-in31.8%
*-commutative31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.0%
Simplified69.0%
if 9.1999999999999997e-94 < y.re Initial program 51.2%
fmm-def51.2%
hypot-define51.2%
distribute-rgt-neg-out51.2%
fma-define51.2%
hypot-define74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y.im around 0 53.5%
unpow253.5%
unpow253.5%
hypot-undefine58.4%
Simplified58.4%
add-cube-cbrt64.4%
pow365.7%
Applied egg-rr65.7%
Final simplification72.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -9.2e+32)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 1.1e-93)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -9.2e+32) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.1e-93) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -9.2e+32) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.1e-93) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -9.2e+32) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.1e-93) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -9.2e+32], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-93], 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -9.2 \cdot 10^{+32}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -9.1999999999999998e32Initial program 33.3%
fmm-def33.3%
hypot-define33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in y.im around 0 91.3%
unpow291.3%
unpow291.3%
hypot-undefine91.3%
Simplified91.3%
if -9.1999999999999998e32 < y.re < 1.09999999999999998e-93Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.7%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.re around 0 31.8%
neg-mul-131.8%
distribute-lft-neg-in31.8%
*-commutative31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.0%
Simplified69.0%
if 1.09999999999999998e-93 < y.re Initial program 51.2%
fmm-def51.2%
hypot-define51.2%
distribute-rgt-neg-out51.2%
fma-define51.2%
hypot-define74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y.im around 0 53.5%
unpow253.5%
unpow253.5%
hypot-undefine58.4%
Simplified58.4%
add-cube-cbrt60.7%
pow360.7%
Applied egg-rr60.7%
Final simplification71.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -7.2e+32) (not (<= y.re 9e-94)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot 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_re <= -7.2e+32) || !(y_46_re <= 9e-94)) {
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 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(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_re <= -7.2e+32) || !(y_46_re <= 9e-94)) {
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.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(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_re <= -7.2e+32) or not (y_46_re <= 9e-94): 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.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * math.log(math.hypot(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_re <= -7.2e+32) || !(y_46_re <= 9e-94)) 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(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * log(hypot(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_re <= -7.2e+32) || ~((y_46_re <= 9e-94))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(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$re, -7.2e+32], N[Not[LessEqual[y$46$re, 9e-94]], $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], 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{+32} \lor \neg \left(y.re \leq 9 \cdot 10^{-94}\right):\\
\;\;\;\;\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}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -7.1999999999999994e32 or 9.0000000000000004e-94 < y.re Initial program 43.8%
fmm-def43.8%
hypot-define43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in y.im around 0 69.2%
unpow269.2%
unpow269.2%
hypot-undefine72.1%
Simplified72.1%
if -7.1999999999999994e32 < y.re < 9.0000000000000004e-94Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.7%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.re around 0 31.8%
neg-mul-131.8%
distribute-lft-neg-in31.8%
*-commutative31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.0%
Simplified69.0%
Final simplification70.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -4.5e-29)
t_2
(if (<= y.re 9.2e-135)
(sin (fma y.im (log (hypot x.im x.re)) t_0))
(if (<= y.re 3.2e-94) (log (exp t_1)) 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_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.5e-29) {
tmp = t_2;
} else if (y_46_re <= 9.2e-135) {
tmp = sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0));
} else if (y_46_re <= 3.2e-94) {
tmp = log(exp(t_1));
} 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_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -4.5e-29) tmp = t_2; elseif (y_46_re <= 9.2e-135) tmp = sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)); elseif (y_46_re <= 3.2e-94) tmp = log(exp(t_1)); 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e-29], t$95$2, If[LessEqual[y$46$re, 9.2e-135], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 3.2e-94], N[Log[N[Exp[t$95$1], $MachinePrecision]], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-135}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-94}:\\
\;\;\;\;\log \left(e^{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -4.4999999999999998e-29 or 3.19999999999999997e-94 < y.re Initial program 43.6%
fmm-def43.6%
hypot-define43.6%
distribute-rgt-neg-out43.6%
fma-define43.6%
hypot-define81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y.im around 0 66.2%
unpow266.2%
unpow266.2%
hypot-undefine69.4%
Simplified69.4%
if -4.4999999999999998e-29 < y.re < 9.1999999999999996e-135Initial program 40.1%
fmm-def40.1%
hypot-define40.1%
distribute-rgt-neg-out40.1%
fma-define40.1%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 40.5%
unpow240.5%
unpow240.5%
hypot-undefine51.6%
Simplified51.6%
add-sqr-sqrt24.3%
sqrt-unprod18.7%
pow218.7%
hypot-define11.2%
*-commutative11.2%
fma-define11.2%
+-commutative11.2%
*-commutative11.2%
fma-define11.2%
*-commutative11.2%
hypot-define18.7%
Applied egg-rr18.7%
unpow218.7%
rem-sqrt-square25.8%
fma-define25.8%
+-commutative25.8%
fma-define25.8%
hypot-undefine12.6%
unpow212.6%
unpow212.6%
+-commutative12.6%
unpow212.6%
unpow212.6%
hypot-undefine25.8%
Simplified25.8%
Taylor expanded in y.re around 0 12.6%
fma-define12.6%
unpow212.6%
unpow212.6%
hypot-undefine25.8%
rem-square-sqrt24.3%
fabs-sqr24.3%
rem-square-sqrt51.6%
*-commutative51.6%
Simplified51.6%
if 9.1999999999999996e-135 < y.re < 3.19999999999999997e-94Initial program 55.6%
fmm-def55.6%
hypot-define55.6%
distribute-rgt-neg-out55.6%
fma-define55.6%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in y.im around 0 8.7%
unpow28.7%
unpow28.7%
hypot-undefine9.5%
Simplified9.5%
Taylor expanded in y.re around 0 9.5%
*-rgt-identity9.5%
add-log-exp62.4%
Applied egg-rr62.4%
Final simplification62.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))) (t_1 (* t_0 (pow x.im y.re))))
(if (<= y.re -6.2e+240)
t_1
(if (<= y.re -2e-111)
(* t_0 (pow (- x.re) y.re))
(if (<= y.re 1.1e-93) (log (exp t_0)) t_1)))))
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 t_1 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6.2e+240) {
tmp = t_1;
} else if (y_46_re <= -2e-111) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else if (y_46_re <= 1.1e-93) {
tmp = log(exp(t_0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
t_1 = t_0 * (x_46im ** y_46re)
if (y_46re <= (-6.2d+240)) then
tmp = t_1
else if (y_46re <= (-2d-111)) then
tmp = t_0 * (-x_46re ** y_46re)
else if (y_46re <= 1.1d-93) then
tmp = log(exp(t_0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6.2e+240) {
tmp = t_1;
} else if (y_46_re <= -2e-111) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else if (y_46_re <= 1.1e-93) {
tmp = Math.log(Math.exp(t_0));
} else {
tmp = t_1;
}
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))) t_1 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -6.2e+240: tmp = t_1 elif y_46_re <= -2e-111: tmp = t_0 * math.pow(-x_46_re, y_46_re) elif y_46_re <= 1.1e-93: tmp = math.log(math.exp(t_0)) else: tmp = t_1 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))) t_1 = Float64(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -6.2e+240) tmp = t_1; elseif (y_46_re <= -2e-111) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); elseif (y_46_re <= 1.1e-93) tmp = log(exp(t_0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -6.2e+240) tmp = t_1; elseif (y_46_re <= -2e-111) tmp = t_0 * (-x_46_re ^ y_46_re); elseif (y_46_re <= 1.1e-93) tmp = log(exp(t_0)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.2e+240], t$95$1, If[LessEqual[y$46$re, -2e-111], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-93], N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{+240}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -2 \cdot 10^{-111}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;\log \left(e^{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -6.2e240 or 1.09999999999999998e-93 < y.re Initial program 44.9%
fmm-def44.9%
hypot-define44.9%
distribute-rgt-neg-out44.9%
fma-define44.9%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around 0 62.1%
unpow262.1%
unpow262.1%
hypot-undefine66.1%
Simplified66.1%
Taylor expanded in x.re around 0 54.3%
if -6.2e240 < y.re < -2.00000000000000018e-111Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y.im around 0 68.7%
unpow268.7%
unpow268.7%
hypot-undefine68.7%
Simplified68.7%
Taylor expanded in x.re around -inf 59.8%
mul-1-neg59.8%
Simplified59.8%
if -2.00000000000000018e-111 < y.re < 1.09999999999999998e-93Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define41.5%
hypot-define88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y.im around 0 18.1%
unpow218.1%
unpow218.1%
hypot-undefine16.5%
Simplified16.5%
Taylor expanded in y.re around 0 16.5%
*-rgt-identity16.5%
add-log-exp38.5%
Applied egg-rr38.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= y.re -1e-191) (not (<= y.re 8.5e-94)))
(* t_0 (pow (hypot x.im x.re) y.re))
(log (exp t_0)))))
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 ((y_46_re <= -1e-191) || !(y_46_re <= 8.5e-94)) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = log(exp(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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -1e-191) || !(y_46_re <= 8.5e-94)) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.log(Math.exp(t_0));
}
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 (y_46_re <= -1e-191) or not (y_46_re <= 8.5e-94): tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.log(math.exp(t_0)) 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 ((y_46_re <= -1e-191) || !(y_46_re <= 8.5e-94)) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = log(exp(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((y_46_re <= -1e-191) || ~((y_46_re <= 8.5e-94))) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = log(exp(t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1e-191], N[Not[LessEqual[y$46$re, 8.5e-94]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[Exp[t$95$0], $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}\;y.re \leq -1 \cdot 10^{-191} \lor \neg \left(y.re \leq 8.5 \cdot 10^{-94}\right):\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{t\_0}\right)\\
\end{array}
\end{array}
if y.re < -1e-191 or 8.50000000000000003e-94 < y.re Initial program 42.9%
fmm-def42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around 0 62.3%
unpow262.3%
unpow262.3%
hypot-undefine65.6%
Simplified65.6%
if -1e-191 < y.re < 8.50000000000000003e-94Initial program 44.0%
fmm-def44.0%
hypot-define44.0%
distribute-rgt-neg-out44.0%
fma-define44.1%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 16.7%
unpow216.7%
unpow216.7%
hypot-undefine12.2%
Simplified12.2%
Taylor expanded in y.re around 0 12.2%
*-rgt-identity12.2%
add-log-exp38.8%
Applied egg-rr38.8%
Final simplification57.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow x.im y.re))))
(if (<= y.re -3.35e+243)
t_2
(if (<= y.re -2.05e-10)
(* t_1 (pow x.re y.re))
(if (<= y.re 0.036) t_0 t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -3.35e+243) {
tmp = t_2;
} else if (y_46_re <= -2.05e-10) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 0.036) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = t_1 * (x_46im ** y_46re)
if (y_46re <= (-3.35d+243)) then
tmp = t_2
else if (y_46re <= (-2.05d-10)) then
tmp = t_1 * (x_46re ** y_46re)
else if (y_46re <= 0.036d0) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_1 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -3.35e+243) {
tmp = t_2;
} else if (y_46_re <= -2.05e-10) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 0.036) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = t_1 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -3.35e+243: tmp = t_2 elif y_46_re <= -2.05e-10: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 0.036: tmp = t_0 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.35e+243) tmp = t_2; elseif (y_46_re <= -2.05e-10) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 0.036) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = t_1 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -3.35e+243) tmp = t_2; elseif (y_46_re <= -2.05e-10) tmp = t_1 * (x_46_re ^ y_46_re); elseif (y_46_re <= 0.036) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.35e+243], t$95$2, If[LessEqual[y$46$re, -2.05e-10], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.036], t$95$0, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_1 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -3.35 \cdot 10^{+243}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.05 \cdot 10^{-10}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 0.036:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -3.3499999999999998e243 or 0.0359999999999999973 < y.re Initial program 44.9%
fmm-def44.9%
hypot-define44.9%
distribute-rgt-neg-out44.9%
fma-define44.9%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around 0 71.9%
unpow271.9%
unpow271.9%
hypot-undefine70.6%
Simplified70.6%
Taylor expanded in x.re around 0 60.7%
if -3.3499999999999998e243 < y.re < -2.0499999999999999e-10Initial program 42.1%
fmm-def42.1%
hypot-define42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in y.im around 0 75.3%
unpow275.3%
unpow275.3%
hypot-undefine77.1%
Simplified77.1%
Taylor expanded in x.im around 0 63.7%
if -2.0499999999999999e-10 < y.re < 0.0359999999999999973Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.8%
hypot-define86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in y.im around 0 23.2%
unpow223.2%
unpow223.2%
hypot-undefine25.1%
Simplified25.1%
Taylor expanded in y.re around 0 23.8%
add-cube-cbrt24.7%
pow324.8%
Applied egg-rr23.4%
Taylor expanded in y.re around 0 23.8%
*-commutative23.8%
Simplified23.8%
Final simplification43.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -1.7e-104)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 1.3e+83)
(* t_0 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.7e-104) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.3e+83) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-1.7d-104)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 1.3d+83) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.7e-104) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.3e+83) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.7e-104: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.3e+83: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.7e-104) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.3e+83) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.7e-104) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.3e+83) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.7e-104], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.3e+83], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.7 \cdot 10^{-104}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.3 \cdot 10^{+83}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.70000000000000008e-104Initial program 49.3%
fmm-def49.3%
hypot-define49.3%
distribute-rgt-neg-out49.3%
fma-define49.3%
hypot-define91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 54.3%
unpow254.3%
unpow254.3%
hypot-undefine57.5%
Simplified57.5%
Taylor expanded in x.im around -inf 58.8%
mul-1-neg58.8%
Simplified58.8%
if -1.70000000000000008e-104 < x.im < 1.3000000000000001e83Initial program 50.2%
fmm-def50.2%
hypot-define50.2%
distribute-rgt-neg-out50.2%
fma-define50.2%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine50.2%
Simplified50.2%
Taylor expanded in x.re around -inf 47.3%
mul-1-neg47.3%
Simplified47.3%
if 1.3000000000000001e83 < x.im Initial program 16.0%
fmm-def16.0%
hypot-define16.0%
distribute-rgt-neg-out16.0%
fma-define16.0%
hypot-define78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y.im around 0 35.2%
unpow235.2%
unpow235.2%
hypot-undefine35.9%
Simplified35.9%
Taylor expanded in x.re around 0 35.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= y.re -1.3e+31) (not (<= y.re 0.029)))
(* t_0 (pow x.im y.re))
t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -1.3e+31) || !(y_46_re <= 0.029)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if ((y_46re <= (-1.3d+31)) .or. (.not. (y_46re <= 0.029d0))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -1.3e+31) || !(y_46_re <= 0.029)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_re <= -1.3e+31) or not (y_46_re <= 0.029): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_re <= -1.3e+31) || !(y_46_re <= 0.029)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((y_46_re <= -1.3e+31) || ~((y_46_re <= 0.029))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.3e+31], N[Not[LessEqual[y$46$re, 0.029]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{+31} \lor \neg \left(y.re \leq 0.029\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.3e31 or 0.0290000000000000015 < y.re Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around 0 77.2%
unpow277.2%
unpow277.2%
hypot-undefine76.4%
Simplified76.4%
Taylor expanded in x.re around 0 59.8%
if -1.3e31 < y.re < 0.0290000000000000015Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in y.im around 0 24.1%
unpow224.1%
unpow224.1%
hypot-undefine26.6%
Simplified26.6%
Taylor expanded in y.re around 0 22.3%
add-cube-cbrt26.9%
pow327.0%
Applied egg-rr22.0%
Taylor expanded in y.re around inf 22.3%
*-commutative22.3%
Simplified22.3%
Final simplification39.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -2.8e-104)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 8.5e-24) (* t_0 (pow x.re y.re)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.8e-104) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 8.5e-24) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-2.8d-104)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 8.5d-24) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.8e-104) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 8.5e-24) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -2.8e-104: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 8.5e-24: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -2.8e-104) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 8.5e-24) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -2.8e-104) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 8.5e-24) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2.8e-104], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 8.5e-24], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2.8 \cdot 10^{-104}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 8.5 \cdot 10^{-24}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -2.8e-104Initial program 49.3%
fmm-def49.3%
hypot-define49.3%
distribute-rgt-neg-out49.3%
fma-define49.3%
hypot-define91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 54.3%
unpow254.3%
unpow254.3%
hypot-undefine57.5%
Simplified57.5%
Taylor expanded in x.im around -inf 58.8%
mul-1-neg58.8%
Simplified58.8%
if -2.8e-104 < x.im < 8.5000000000000002e-24Initial program 49.0%
fmm-def49.0%
hypot-define49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y.im around 0 49.2%
unpow249.2%
unpow249.2%
hypot-undefine49.7%
Simplified49.7%
Taylor expanded in x.im around 0 38.1%
if 8.5000000000000002e-24 < x.im Initial program 27.9%
fmm-def27.9%
hypot-define27.9%
distribute-rgt-neg-out27.9%
fma-define27.9%
hypot-define77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y.im around 0 41.6%
unpow241.6%
unpow241.6%
hypot-undefine40.9%
Simplified40.9%
Taylor expanded in x.re around 0 36.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.42e+45) (not (<= y.re 2.35e+21))) (+ -1.0 (- 1.0 (sin (* y.im (log (/ -1.0 x.im)))))) (sin (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.42e+45) || !(y_46_re <= 2.35e+21)) {
tmp = -1.0 + (1.0 - sin((y_46_im * log((-1.0 / x_46_im)))));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-1.42d+45)) .or. (.not. (y_46re <= 2.35d+21))) then
tmp = (-1.0d0) + (1.0d0 - sin((y_46im * log(((-1.0d0) / x_46im)))))
else
tmp = sin((y_46re * atan2(x_46im, x_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.42e+45) || !(y_46_re <= 2.35e+21)) {
tmp = -1.0 + (1.0 - Math.sin((y_46_im * Math.log((-1.0 / x_46_im)))));
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.42e+45) or not (y_46_re <= 2.35e+21): tmp = -1.0 + (1.0 - math.sin((y_46_im * math.log((-1.0 / x_46_im))))) else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1.42e+45) || !(y_46_re <= 2.35e+21)) tmp = Float64(-1.0 + Float64(1.0 - sin(Float64(y_46_im * log(Float64(-1.0 / x_46_im)))))); else tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -1.42e+45) || ~((y_46_re <= 2.35e+21))) tmp = -1.0 + (1.0 - sin((y_46_im * log((-1.0 / x_46_im))))); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1.42e+45], N[Not[LessEqual[y$46$re, 2.35e+21]], $MachinePrecision]], N[(-1.0 + N[(1.0 - N[Sin[N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.42 \cdot 10^{+45} \lor \neg \left(y.re \leq 2.35 \cdot 10^{+21}\right):\\
\;\;\;\;-1 + \left(1 - \sin \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.42e45 or 2.35e21 < y.re Initial program 42.5%
fmm-def42.5%
hypot-define42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around 0 79.7%
unpow279.7%
unpow279.7%
hypot-undefine79.7%
Simplified79.7%
Taylor expanded in x.im around -inf 39.9%
+-commutative39.9%
mul-1-neg39.9%
unsub-neg39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in y.re around 0 1.8%
distribute-lft-neg-in1.8%
Simplified1.8%
expm1-log1p-u1.8%
expm1-undefine16.7%
distribute-lft-neg-out16.7%
sin-neg16.7%
Applied egg-rr16.7%
sub-neg16.7%
log1p-undefine16.7%
rem-exp-log16.7%
unsub-neg16.7%
metadata-eval16.7%
Simplified16.7%
if -1.42e45 < y.re < 2.35e21Initial program 43.9%
fmm-def43.9%
hypot-define43.9%
distribute-rgt-neg-out43.9%
fma-define43.9%
hypot-define84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in y.im around 0 26.1%
unpow226.1%
unpow226.1%
hypot-undefine27.8%
Simplified27.8%
Taylor expanded in y.re around 0 21.6%
add-cube-cbrt28.1%
pow328.9%
Applied egg-rr21.3%
Taylor expanded in y.re around inf 21.6%
*-commutative21.6%
Simplified21.6%
Final simplification19.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((y_46re * atan2(x_46im, x_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_re * atan(x_46_im, x_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 48.6%
unpow248.6%
unpow248.6%
hypot-undefine49.5%
Simplified49.5%
Taylor expanded in y.re around 0 13.6%
add-cube-cbrt49.3%
pow349.4%
Applied egg-rr13.5%
Taylor expanded in y.re around inf 13.6%
*-commutative13.6%
Simplified13.6%
Final simplification13.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 48.6%
unpow248.6%
unpow248.6%
hypot-undefine49.5%
Simplified49.5%
Taylor expanded in y.re around 0 13.6%
add-cube-cbrt49.3%
pow349.4%
Applied egg-rr13.5%
Taylor expanded in y.re around 0 13.6%
*-commutative13.6%
Simplified13.6%
Final simplification13.6%
herbie shell --seed 2024185
(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)))))