
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re -1.45e+43)
(* t_2 (sin (fabs (fma y.im (log (hypot x.im x.re)) t_0))))
(* t_2 (sin (fma 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 t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_2 * sin(fabs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else {
tmp = t_2 * sin(fma(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)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= -1.45e+43) tmp = Float64(t_2 * sin(abs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); else tmp = Float64(t_2 * sin(fma(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]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e+43], N[(t$95$2 * N[Sin[N[Abs[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], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + 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)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;t\_2 \cdot \sin \left(\left|\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43Initial program 47.3%
fmm-def47.3%
hypot-define47.3%
distribute-rgt-neg-out47.3%
fma-define47.3%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
add-sqr-sqrt40.0%
sqrt-unprod38.2%
pow238.2%
hypot-define21.8%
*-commutative21.8%
fma-define21.8%
+-commutative21.8%
*-commutative21.8%
fma-define21.8%
*-commutative21.8%
hypot-define38.2%
Applied egg-rr38.2%
unpow238.2%
rem-sqrt-square90.9%
fma-define90.9%
+-commutative90.9%
fma-define90.9%
hypot-undefine52.7%
unpow252.7%
unpow252.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-undefine90.9%
Simplified90.9%
if -1.4500000000000001e43 < y.re Initial program 41.0%
fmm-def41.0%
hypot-define41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
(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 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.im x.re))))
(if (<= y.re -7e-10)
(* t_1 (sin (+ t_0 (fabs (* y.im t_2)))))
(if (<= y.re 2.1e+14)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin
(pow
(cbrt (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
3.0)))
(* t_1 (sin (+ t_0 (* y.im (fabs 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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -7e-10) {
tmp = t_1 * sin((t_0 + fabs((y_46_im * t_2))));
} else if (y_46_re <= 2.1e+14) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 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));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * fabs(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 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -7e-10) tmp = Float64(t_1 * sin(Float64(t_0 + abs(Float64(y_46_im * t_2))))); elseif (y_46_re <= 2.1e+14) tmp = Float64(exp(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(log(hypot(x_46_re, x_46_im)) * y_46_im))) ^ 3.0))); else tmp = Float64(t_1 * sin(Float64(t_0 + Float64(y_46_im * abs(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[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]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7e-10], N[(t$95$1 * N[Sin[N[(t$95$0 + N[Abs[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e+14], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := 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}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-10}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + \left|y.im \cdot t\_2\right|\right)\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+14}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + y.im \cdot \left|t\_2\right|\right)\\
\end{array}
\end{array}
if y.re < -6.99999999999999961e-10Initial program 46.9%
add-sqr-sqrt21.9%
sqrt-unprod37.5%
pow237.5%
*-commutative37.5%
hypot-define64.1%
Applied egg-rr64.1%
unpow264.1%
rem-sqrt-square86.0%
*-commutative86.0%
hypot-undefine50.0%
unpow250.0%
unpow250.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-undefine86.0%
Simplified86.0%
if -6.99999999999999961e-10 < y.re < 2.1e14Initial program 38.1%
fmm-def38.1%
hypot-define38.1%
distribute-rgt-neg-out38.1%
fma-define38.1%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
add-cube-cbrt83.6%
pow382.5%
hypot-define36.7%
*-commutative36.7%
fma-define36.7%
+-commutative36.7%
*-commutative36.7%
fma-define36.7%
*-commutative36.7%
hypot-define82.5%
Applied egg-rr82.5%
Taylor expanded in y.re around 0 81.6%
neg-mul-181.6%
distribute-lft-neg-in81.6%
Simplified81.6%
if 2.1e14 < y.re Initial program 46.8%
hypot-define79.1%
add-sqr-sqrt45.2%
sqrt-unprod77.5%
pow277.5%
Applied egg-rr77.5%
hypot-undefine45.2%
unpow245.2%
unpow245.2%
+-commutative45.2%
unpow245.2%
rem-sqrt-square45.2%
unpow245.2%
unpow245.2%
hypot-undefine77.5%
Simplified77.5%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -2.5e+24)
(* (sin (fabs (* y.re (atan2 x.im x.re)))) (pow (hypot x.im x.re) y.re))
(if (<= y.re 3.15e-214)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.re 7.5e+23)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin
(pow
(cbrt
(fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
3.0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2.5e+24) {
tmp = sin(fabs((y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3.15e-214) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 7.5e+23) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 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));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.5e+24) tmp = Float64(sin(abs(Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 3.15e-214) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_re <= 7.5e+23) tmp = Float64(exp(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(log(hypot(x_46_re, x_46_im)) * y_46_im))) ^ 3.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(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.5e+24], N[(N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.15e-214], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+23], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;\sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.15 \cdot 10^{-214}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+23}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -2.50000000000000023e24Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.im around 0 79.7%
unpow279.7%
unpow279.7%
hypot-undefine79.7%
Simplified79.7%
add-exp-log45.8%
Applied egg-rr45.8%
rem-exp-log79.7%
*-commutative79.7%
add-sqr-sqrt49.2%
sqrt-unprod42.5%
pow242.5%
*-commutative42.5%
Applied egg-rr42.5%
unpow242.5%
rem-sqrt-square84.8%
*-commutative84.8%
Simplified84.8%
if -2.50000000000000023e24 < y.re < 3.1500000000000001e-214Initial program 35.4%
exp-diff35.4%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod35.2%
fma-define35.2%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around inf 35.2%
unpow235.2%
unpow235.2%
hypot-undefine83.5%
associate-/l*83.6%
Simplified83.6%
if 3.1500000000000001e-214 < y.re < 7.49999999999999987e23Initial program 41.9%
fmm-def41.9%
hypot-define41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
add-cube-cbrt87.4%
pow391.9%
hypot-define43.3%
*-commutative43.3%
fma-define43.3%
+-commutative43.3%
*-commutative43.3%
fma-define43.3%
*-commutative43.3%
hypot-define91.9%
Applied egg-rr91.9%
Taylor expanded in y.re around 0 86.7%
neg-mul-186.7%
distribute-lft-neg-in86.7%
Simplified86.7%
if 7.49999999999999987e23 < y.re Initial program 49.2%
Taylor expanded in y.re around 0 47.5%
*-commutative47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.3%
Simplified76.3%
Final simplification82.7%
(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))))
(t_1 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -7.6e-11)
(* t_0 (sin (+ (* y.re (atan2 x.im x.re)) (fabs t_1))))
(if (<= y.re 7.5e+23)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin
(pow
(cbrt (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
3.0)))
(* t_0 (sin t_1))))))
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)));
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -7.6e-11) {
tmp = t_0 * sin(((y_46_re * atan2(x_46_im, x_46_re)) + fabs(t_1)));
} else if (y_46_re <= 7.5e+23) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 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));
} else {
tmp = t_0 * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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))) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -7.6e-11) tmp = Float64(t_0 * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + abs(t_1)))); elseif (y_46_re <= 7.5e+23) tmp = Float64(exp(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(log(hypot(x_46_re, x_46_im)) * y_46_im))) ^ 3.0))); else tmp = Float64(t_0 * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7.6e-11], N[(t$95$0 * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+23], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(t$95$0 * N[Sin[t$95$1], $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}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -7.6 \cdot 10^{-11}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+23}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\end{array}
\end{array}
if y.re < -7.5999999999999996e-11Initial program 46.9%
add-sqr-sqrt21.9%
sqrt-unprod37.5%
pow237.5%
*-commutative37.5%
hypot-define64.1%
Applied egg-rr64.1%
unpow264.1%
rem-sqrt-square86.0%
*-commutative86.0%
hypot-undefine50.0%
unpow250.0%
unpow250.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-undefine86.0%
Simplified86.0%
if -7.5999999999999996e-11 < y.re < 7.49999999999999987e23Initial program 37.2%
fmm-def37.2%
hypot-define37.2%
distribute-rgt-neg-out37.2%
fma-define37.2%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt83.9%
pow382.9%
hypot-define35.9%
*-commutative35.9%
fma-define35.9%
+-commutative35.9%
*-commutative35.9%
fma-define35.8%
*-commutative35.8%
hypot-define82.9%
Applied egg-rr82.9%
Taylor expanded in y.re around 0 81.3%
neg-mul-181.3%
distribute-lft-neg-in81.3%
Simplified81.3%
if 7.49999999999999987e23 < y.re Initial program 49.2%
Taylor expanded in y.re around 0 47.5%
*-commutative47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.3%
Simplified76.3%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2.6)
(* (sin (fabs (* y.re (atan2 x.im x.re)))) (pow (hypot x.im x.re) y.re))
(if (<= y.re 7.5e+23)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin
(pow
(cbrt (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
3.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))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -2.6) {
tmp = sin(fabs((y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.5e+23) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 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));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(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 <= -2.6) tmp = Float64(sin(abs(Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 7.5e+23) tmp = Float64(exp(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(log(hypot(x_46_re, x_46_im)) * y_46_im))) ^ 3.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(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -2.6], N[(N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+23], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.6:\\
\;\;\;\;\sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+23}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.60000000000000009Initial program 46.9%
fmm-def46.9%
hypot-define46.9%
distribute-rgt-neg-out46.9%
fma-define46.9%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around 0 81.3%
unpow281.3%
unpow281.3%
hypot-undefine81.3%
Simplified81.3%
add-exp-log48.4%
Applied egg-rr48.4%
rem-exp-log81.3%
*-commutative81.3%
add-sqr-sqrt51.6%
sqrt-unprod45.4%
pow245.4%
*-commutative45.4%
Applied egg-rr45.4%
unpow245.4%
rem-sqrt-square84.4%
*-commutative84.4%
Simplified84.4%
if -2.60000000000000009 < y.re < 7.49999999999999987e23Initial program 37.2%
fmm-def37.2%
hypot-define37.2%
distribute-rgt-neg-out37.2%
fma-define37.2%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt83.9%
pow382.9%
hypot-define35.9%
*-commutative35.9%
fma-define35.9%
+-commutative35.9%
*-commutative35.9%
fma-define35.8%
*-commutative35.8%
hypot-define82.9%
Applied egg-rr82.9%
Taylor expanded in y.re around 0 81.3%
neg-mul-181.3%
distribute-lft-neg-in81.3%
Simplified81.3%
if 7.49999999999999987e23 < y.re Initial program 49.2%
Taylor expanded in y.re around 0 47.5%
*-commutative47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.3%
Simplified76.3%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (* (atan2 x.im x.re) (- y.im))))
(if (<= y.im -3.7e+152)
(* (* y.im (log (hypot x.im x.re))) (exp t_2))
(if (or (<= y.im -450.0) (not (<= y.im 2e+21)))
(* (exp (fma t_1 y.re t_2)) (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 t_2 = atan2(x_46_im, x_46_re) * -y_46_im;
double tmp;
if (y_46_im <= -3.7e+152) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * exp(t_2);
} else if ((y_46_im <= -450.0) || !(y_46_im <= 2e+21)) {
tmp = exp(fma(t_1, y_46_re, t_2)) * 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)) t_2 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) tmp = 0.0 if (y_46_im <= -3.7e+152) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * exp(t_2)); elseif ((y_46_im <= -450.0) || !(y_46_im <= 2e+21)) tmp = Float64(exp(fma(t_1, y_46_re, t_2)) * 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]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$im, -3.7e+152], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -450.0], N[Not[LessEqual[y$46$im, 2e+21]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$2), $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)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
\mathbf{if}\;y.im \leq -3.7 \cdot 10^{+152}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{t\_2}\\
\mathbf{elif}\;y.im \leq -450 \lor \neg \left(y.im \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_2\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 < -3.69999999999999996e152Initial program 37.2%
fmm-def37.2%
hypot-define37.2%
distribute-rgt-neg-out37.2%
fma-define37.2%
hypot-define74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in y.re around 0 35.0%
neg-mul-135.0%
distribute-lft-neg-in35.0%
*-commutative35.0%
unpow235.0%
unpow235.0%
hypot-undefine70.0%
Simplified70.0%
Taylor expanded in y.im around 0 48.9%
unpow248.9%
unpow248.9%
hypot-undefine74.5%
Simplified74.5%
if -3.69999999999999996e152 < y.im < -450 or 2e21 < y.im Initial program 36.1%
fmm-def36.1%
hypot-define36.1%
distribute-rgt-neg-out36.1%
fma-define36.1%
hypot-define74.2%
*-commutative74.2%
Simplified74.2%
add-cube-cbrt77.0%
pow372.9%
hypot-define33.4%
*-commutative33.4%
fma-define33.4%
+-commutative33.4%
*-commutative33.4%
fma-define33.4%
*-commutative33.4%
hypot-define72.9%
Applied egg-rr72.9%
Taylor expanded in y.im around 0 73.4%
if -450 < y.im < 2e21Initial program 48.0%
exp-diff48.0%
exp-to-pow48.0%
hypot-define48.0%
*-commutative48.0%
exp-prod48.0%
fma-define48.0%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.im around 0 90.6%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -3e+16)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.re 1.65e-14)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin t_1))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_1 (* y.im (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -3e+16) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 1.65e-14) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -3e+16) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_re <= 1.65e-14) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -3e+16], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.65e-14], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -3 \cdot 10^{+16}:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 1.65 \cdot 10^{-14}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -3e16Initial program 29.4%
fmm-def29.4%
hypot-define29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in x.re around -inf 80.4%
if -3e16 < x.re < 1.6499999999999999e-14Initial program 49.7%
fmm-def49.7%
hypot-define49.7%
distribute-rgt-neg-out49.7%
fma-define49.7%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
add-cube-cbrt84.4%
pow381.8%
hypot-define51.2%
*-commutative51.2%
fma-define51.2%
+-commutative51.2%
*-commutative51.2%
fma-define51.2%
*-commutative51.2%
hypot-define81.7%
Applied egg-rr81.7%
Taylor expanded in y.im around 0 71.7%
if 1.6499999999999999e-14 < x.re Initial program 42.7%
fma-define42.7%
hypot-define64.6%
*-commutative64.6%
log1p-expm1-u64.6%
hypot-define42.7%
*-commutative42.7%
fma-define42.7%
+-commutative42.7%
*-commutative42.7%
fma-define42.7%
*-commutative42.7%
hypot-define64.6%
Applied egg-rr64.6%
Taylor expanded in x.im around 0 82.1%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (log (hypot x.im x.re)))
(t_5
(*
(/ 1.0 (exp t_0))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_4 y.re))))))))
(if (<= y.re -1.86)
(* (sin (fabs t_1)) t_3)
(if (<= y.re -4.4e-72)
t_5
(if (<= y.re 4.8e-147)
(* (* y.im t_4) (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1400.0)
t_5
(if (<= y.re 3.8e+67)
(*
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_2)
(pow (pow (* t_3 t_2) 3.0) 0.3333333333333333))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = log(hypot(x_46_im, x_46_re));
double t_5 = (1.0 / exp(t_0)) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_4 / y_46_re)))));
double tmp;
if (y_46_re <= -1.86) {
tmp = sin(fabs(t_1)) * t_3;
} else if (y_46_re <= -4.4e-72) {
tmp = t_5;
} else if (y_46_re <= 4.8e-147) {
tmp = (y_46_im * t_4) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1400.0) {
tmp = t_5;
} else if (y_46_re <= 3.8e+67) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2;
} else {
tmp = pow(pow((t_3 * t_2), 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_5 = (1.0 / Math.exp(t_0)) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_4 / y_46_re)))));
double tmp;
if (y_46_re <= -1.86) {
tmp = Math.sin(Math.abs(t_1)) * t_3;
} else if (y_46_re <= -4.4e-72) {
tmp = t_5;
} else if (y_46_re <= 4.8e-147) {
tmp = (y_46_im * t_4) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1400.0) {
tmp = t_5;
} else if (y_46_re <= 3.8e+67) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2;
} else {
tmp = Math.pow(Math.pow((t_3 * t_2), 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = math.log(math.hypot(x_46_im, x_46_re)) t_5 = (1.0 / math.exp(t_0)) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_4 / y_46_re))))) tmp = 0 if y_46_re <= -1.86: tmp = math.sin(math.fabs(t_1)) * t_3 elif y_46_re <= -4.4e-72: tmp = t_5 elif y_46_re <= 4.8e-147: tmp = (y_46_im * t_4) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 1400.0: tmp = t_5 elif y_46_re <= 3.8e+67: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2 else: tmp = math.pow(math.pow((t_3 * t_2), 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = log(hypot(x_46_im, x_46_re)) t_5 = Float64(Float64(1.0 / exp(t_0)) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_4 / y_46_re)))))) tmp = 0.0 if (y_46_re <= -1.86) tmp = Float64(sin(abs(t_1)) * t_3); elseif (y_46_re <= -4.4e-72) tmp = t_5; elseif (y_46_re <= 4.8e-147) tmp = Float64(Float64(y_46_im * t_4) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1400.0) tmp = t_5; elseif (y_46_re <= 3.8e+67) 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))))) - t_0)) * t_2); else tmp = (Float64(t_3 * t_2) ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = hypot(x_46_im, x_46_re) ^ y_46_re; t_4 = log(hypot(x_46_im, x_46_re)); t_5 = (1.0 / exp(t_0)) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_4 / y_46_re))))); tmp = 0.0; if (y_46_re <= -1.86) tmp = sin(abs(t_1)) * t_3; elseif (y_46_re <= -4.4e-72) tmp = t_5; elseif (y_46_re <= 4.8e-147) tmp = (y_46_im * t_4) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 1400.0) tmp = t_5; elseif (y_46_re <= 3.8e+67) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2; else tmp = ((t_3 * t_2) ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$4 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.86], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, -4.4e-72], t$95$5, If[LessEqual[y$46$re, 4.8e-147], N[(N[(y$46$im * t$95$4), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1400.0], t$95$5, If[LessEqual[y$46$re, 3.8e+67], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[Power[N[Power[N[(t$95$3 * t$95$2), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_5 := \frac{1}{e^{t\_0}} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_4}{y.re}\right)\right)\\
\mathbf{if}\;y.re \leq -1.86:\\
\;\;\;\;\sin \left(\left|t\_1\right|\right) \cdot t\_3\\
\mathbf{elif}\;y.re \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-147}:\\
\;\;\;\;\left(y.im \cdot t\_4\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1400:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+67}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(t\_3 \cdot t\_2\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -1.8600000000000001Initial program 46.9%
fmm-def46.9%
hypot-define46.9%
distribute-rgt-neg-out46.9%
fma-define46.9%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around 0 81.3%
unpow281.3%
unpow281.3%
hypot-undefine81.3%
Simplified81.3%
add-exp-log48.4%
Applied egg-rr48.4%
rem-exp-log81.3%
*-commutative81.3%
add-sqr-sqrt51.6%
sqrt-unprod45.4%
pow245.4%
*-commutative45.4%
Applied egg-rr45.4%
unpow245.4%
rem-sqrt-square84.4%
*-commutative84.4%
Simplified84.4%
if -1.8600000000000001 < y.re < -4.40000000000000005e-72 or 4.79999999999999997e-147 < y.re < 1400Initial program 39.3%
exp-diff39.3%
exp-to-pow39.3%
hypot-define39.3%
*-commutative39.3%
exp-prod38.9%
fma-define38.9%
hypot-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y.re around inf 36.1%
+-commutative36.1%
associate-/l*36.1%
unpow236.1%
unpow236.1%
hypot-undefine86.5%
Simplified86.5%
Taylor expanded in y.re around 0 89.1%
if -4.40000000000000005e-72 < y.re < 4.79999999999999997e-147Initial program 36.7%
fmm-def36.7%
hypot-define36.7%
distribute-rgt-neg-out36.7%
fma-define36.7%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.re around 0 31.2%
neg-mul-131.2%
distribute-lft-neg-in31.2%
*-commutative31.2%
unpow231.2%
unpow231.2%
hypot-undefine68.9%
Simplified68.9%
Taylor expanded in y.im around 0 39.4%
unpow239.4%
unpow239.4%
hypot-undefine70.0%
Simplified70.0%
if 1400 < y.re < 3.8000000000000002e67Initial program 61.1%
Taylor expanded in y.im around 0 83.4%
if 3.8000000000000002e67 < y.re Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.im around 0 57.5%
unpow257.5%
unpow257.5%
hypot-undefine57.5%
Simplified57.5%
add-cbrt-cube57.5%
pow1/368.2%
pow368.2%
Applied egg-rr68.2%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (log (hypot x.im x.re)))
(t_3
(*
(/ 1.0 (exp (* (atan2 x.im x.re) y.im)))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 y.re))))))))
(if (<= y.re -1.9)
(* (sin (fabs t_0)) t_1)
(if (<= y.re -1.45e-70)
t_3
(if (<= y.re 2.2e-147)
(* (* y.im t_2) (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 7.5e+63)
t_3
(pow (pow (* t_1 (sin t_0)) 3.0) 0.3333333333333333)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
double tmp;
if (y_46_re <= -1.9) {
tmp = sin(fabs(t_0)) * t_1;
} else if (y_46_re <= -1.45e-70) {
tmp = t_3;
} else if (y_46_re <= 2.2e-147) {
tmp = (y_46_im * t_2) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 7.5e+63) {
tmp = t_3;
} else {
tmp = pow(pow((t_1 * sin(t_0)), 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = (1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
double tmp;
if (y_46_re <= -1.9) {
tmp = Math.sin(Math.abs(t_0)) * t_1;
} else if (y_46_re <= -1.45e-70) {
tmp = t_3;
} else if (y_46_re <= 2.2e-147) {
tmp = (y_46_im * t_2) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 7.5e+63) {
tmp = t_3;
} else {
tmp = Math.pow(Math.pow((t_1 * Math.sin(t_0)), 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = (1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))) tmp = 0 if y_46_re <= -1.9: tmp = math.sin(math.fabs(t_0)) * t_1 elif y_46_re <= -1.45e-70: tmp = t_3 elif y_46_re <= 2.2e-147: tmp = (y_46_im * t_2) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 7.5e+63: tmp = t_3 else: tmp = math.pow(math.pow((t_1 * math.sin(t_0)), 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / y_46_re)))))) tmp = 0.0 if (y_46_re <= -1.9) tmp = Float64(sin(abs(t_0)) * t_1); elseif (y_46_re <= -1.45e-70) tmp = t_3; elseif (y_46_re <= 2.2e-147) tmp = Float64(Float64(y_46_im * t_2) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 7.5e+63) tmp = t_3; else tmp = (Float64(t_1 * sin(t_0)) ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = log(hypot(x_46_im, x_46_re)); t_3 = (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))); tmp = 0.0; if (y_46_re <= -1.9) tmp = sin(abs(t_0)) * t_1; elseif (y_46_re <= -1.45e-70) tmp = t_3; elseif (y_46_re <= 2.2e-147) tmp = (y_46_im * t_2) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 7.5e+63) tmp = t_3; else tmp = ((t_1 * sin(t_0)) ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.9], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, -1.45e-70], t$95$3, If[LessEqual[y$46$re, 2.2e-147], N[(N[(y$46$im * t$95$2), $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.5e+63], t$95$3, N[Power[N[Power[N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := \frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\mathbf{if}\;y.re \leq -1.9:\\
\;\;\;\;\sin \left(\left|t\_0\right|\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq -1.45 \cdot 10^{-70}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-147}:\\
\;\;\;\;\left(y.im \cdot t\_2\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+63}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(t\_1 \cdot \sin t\_0\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -1.8999999999999999Initial program 46.9%
fmm-def46.9%
hypot-define46.9%
distribute-rgt-neg-out46.9%
fma-define46.9%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around 0 81.3%
unpow281.3%
unpow281.3%
hypot-undefine81.3%
Simplified81.3%
add-exp-log48.4%
Applied egg-rr48.4%
rem-exp-log81.3%
*-commutative81.3%
add-sqr-sqrt51.6%
sqrt-unprod45.4%
pow245.4%
*-commutative45.4%
Applied egg-rr45.4%
unpow245.4%
rem-sqrt-square84.4%
*-commutative84.4%
Simplified84.4%
if -1.8999999999999999 < y.re < -1.44999999999999986e-70 or 2.2000000000000001e-147 < y.re < 7.5000000000000005e63Initial program 46.5%
exp-diff35.4%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod35.2%
fma-define35.2%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.re around inf 33.3%
+-commutative33.3%
associate-/l*33.3%
unpow233.3%
unpow233.3%
hypot-undefine74.3%
Simplified74.3%
Taylor expanded in y.re around 0 78.2%
if -1.44999999999999986e-70 < y.re < 2.2000000000000001e-147Initial program 36.7%
fmm-def36.7%
hypot-define36.7%
distribute-rgt-neg-out36.7%
fma-define36.7%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.re around 0 31.2%
neg-mul-131.2%
distribute-lft-neg-in31.2%
*-commutative31.2%
unpow231.2%
unpow231.2%
hypot-undefine68.9%
Simplified68.9%
Taylor expanded in y.im around 0 39.4%
unpow239.4%
unpow239.4%
hypot-undefine70.0%
Simplified70.0%
if 7.5000000000000005e63 < y.re Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.im around 0 57.5%
unpow257.5%
unpow257.5%
hypot-undefine57.5%
Simplified57.5%
add-cbrt-cube57.5%
pow1/368.2%
pow368.2%
Applied egg-rr68.2%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -2.05e-106)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.re 1.15e-25)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_1 (* y.im (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -2.05e-106) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 1.15e-25) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = log(((-1.0d0) / x_46re))
if (x_46re <= (-2.05d-106)) then
tmp = exp(((t_2 * -y_46re) - t_0)) * sin((t_1 - (y_46im * t_2)))
else if (x_46re <= 1.15d-25) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0)) * sin(t_1)
else
tmp = exp(((y_46re * log(x_46re)) - t_0)) * sin((t_1 + (y_46im * log(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 t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -2.05e-106) {
tmp = Math.exp(((t_2 * -y_46_re) - t_0)) * Math.sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 1.15e-25) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_1);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log((-1.0 / x_46_re)) tmp = 0 if x_46_re <= -2.05e-106: tmp = math.exp(((t_2 * -y_46_re) - t_0)) * math.sin((t_1 - (y_46_im * t_2))) elif x_46_re <= 1.15e-25: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_1) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -2.05e-106) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_re <= 1.15e-25) 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))))) - t_0)) * sin(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log((-1.0 / x_46_re)); tmp = 0.0; if (x_46_re <= -2.05e-106) tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2))); elseif (x_46_re <= 1.15e-25) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1); else tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.05e-106], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.15e-25], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2.05 \cdot 10^{-106}:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 1.15 \cdot 10^{-25}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.05e-106Initial program 35.5%
fmm-def35.5%
hypot-define35.5%
distribute-rgt-neg-out35.5%
fma-define35.5%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in x.re around -inf 77.4%
if -2.05e-106 < x.re < 1.15e-25Initial program 49.2%
Taylor expanded in y.im around 0 64.9%
if 1.15e-25 < x.re Initial program 42.1%
fma-define42.1%
hypot-define63.7%
*-commutative63.7%
log1p-expm1-u63.7%
hypot-define42.1%
*-commutative42.1%
fma-define42.1%
+-commutative42.1%
*-commutative42.1%
fma-define42.1%
*-commutative42.1%
hypot-define63.7%
Applied egg-rr63.7%
Taylor expanded in x.im around 0 81.0%
Final simplification73.8%
(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 (pow (hypot x.im x.re) y.re))
(t_3 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re -1.3e-69)
(* t_2 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 5.2e-151)
(* (* y.im (log (hypot x.im x.re))) t_3)
(if (<= y.re 6e+63)
(* t_3 t_1)
(pow (pow (* t_2 t_1) 3.0) 0.3333333333333333))))))
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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -1.3e-69) {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 5.2e-151) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_3;
} else if (y_46_re <= 6e+63) {
tmp = t_3 * t_1;
} else {
tmp = pow(pow((t_2 * t_1), 3.0), 0.3333333333333333);
}
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.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -1.3e-69) {
tmp = t_2 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 5.2e-151) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * t_3;
} else if (y_46_re <= 6e+63) {
tmp = t_3 * t_1;
} else {
tmp = Math.pow(Math.pow((t_2 * t_1), 3.0), 0.3333333333333333);
}
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 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_re <= -1.3e-69) tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 5.2e-151) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * t_3); elseif (y_46_re <= 6e+63) tmp = Float64(t_3 * t_1); else tmp = (Float64(t_2 * t_1) ^ 3.0) ^ 0.3333333333333333; 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-69], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.2e-151], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 6e+63], N[(t$95$3 * t$95$1), $MachinePrecision], N[Power[N[Power[N[(t$95$2 * t$95$1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]
\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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-69}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-151}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_3\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+63}:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(t\_2 \cdot t\_1\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -1.3000000000000001e-69Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 72.7%
unpow272.7%
unpow272.7%
hypot-undefine78.9%
Simplified78.9%
add-cube-cbrt82.6%
pow381.3%
Applied egg-rr81.3%
if -1.3000000000000001e-69 < y.re < 5.2000000000000001e-151Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.re around 0 30.8%
neg-mul-130.8%
distribute-lft-neg-in30.8%
*-commutative30.8%
unpow230.8%
unpow230.8%
hypot-undefine68.2%
Simplified68.2%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine69.3%
Simplified69.3%
if 5.2000000000000001e-151 < y.re < 5.99999999999999998e63Initial program 51.6%
fmm-def51.6%
hypot-define51.6%
distribute-rgt-neg-out51.6%
fma-define51.6%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
add-cube-cbrt88.3%
pow387.9%
hypot-define46.1%
*-commutative46.1%
fma-define46.1%
+-commutative46.1%
*-commutative46.1%
fma-define46.1%
*-commutative46.1%
hypot-define87.9%
Applied egg-rr87.9%
Taylor expanded in y.im around 0 82.2%
Taylor expanded in y.re around 0 68.2%
neg-mul-176.2%
distribute-lft-neg-in76.2%
Simplified68.2%
if 5.99999999999999998e63 < y.re Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.im around 0 57.5%
unpow257.5%
unpow257.5%
hypot-undefine57.5%
Simplified57.5%
add-cbrt-cube57.5%
pow1/368.2%
pow368.2%
Applied egg-rr68.2%
Final simplification72.5%
(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 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re -8.5e-68)
(* (pow (hypot x.im x.re) y.re) (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 5.2e-151)
(* (* y.im (log (hypot x.im x.re))) t_2)
(if (<= y.re 1.8e+40) (* t_2 t_1) (* t_1 (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -8.5e-68) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 5.2e-151) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_2;
} else if (y_46_re <= 1.8e+40) {
tmp = t_2 * t_1;
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -8.5e-68) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 5.2e-151) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * t_2;
} else if (y_46_re <= 1.8e+40) {
tmp = t_2 * t_1;
} else {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_re <= -8.5e-68) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 5.2e-151) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * t_2); elseif (y_46_re <= 1.8e+40) tmp = Float64(t_2 * t_1); else tmp = Float64(t_1 * (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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-68], 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], If[LessEqual[y$46$re, 5.2e-151], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 1.8e+40], N[(t$95$2 * t$95$1), $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, 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 := \sin t\_0\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-68}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-151}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_2\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+40}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -8.50000000000000026e-68Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 72.7%
unpow272.7%
unpow272.7%
hypot-undefine78.9%
Simplified78.9%
add-cube-cbrt82.6%
pow381.3%
Applied egg-rr81.3%
if -8.50000000000000026e-68 < y.re < 5.2000000000000001e-151Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.re around 0 30.8%
neg-mul-130.8%
distribute-lft-neg-in30.8%
*-commutative30.8%
unpow230.8%
unpow230.8%
hypot-undefine68.2%
Simplified68.2%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine69.3%
Simplified69.3%
if 5.2000000000000001e-151 < y.re < 1.79999999999999998e40Initial program 42.9%
fmm-def42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
add-cube-cbrt90.9%
pow393.4%
hypot-define41.9%
*-commutative41.9%
fma-define41.9%
+-commutative41.9%
*-commutative41.9%
fma-define41.9%
*-commutative41.9%
hypot-define93.4%
Applied egg-rr93.4%
Taylor expanded in y.im around 0 79.9%
Taylor expanded in y.re around 0 73.3%
neg-mul-186.9%
distribute-lft-neg-in86.9%
Simplified73.3%
if 1.79999999999999998e40 < y.re Initial program 49.1%
fmm-def49.1%
hypot-define49.1%
distribute-rgt-neg-out49.1%
fma-define49.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine58.1%
Simplified58.1%
Taylor expanded in x.im around 0 61.6%
Final simplification71.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -9.6e-68)
(* (pow (hypot x.im x.re) y.re) t_1)
(if (<= y.re 4.8e-151)
(* (* y.im (log (hypot x.im x.re))) t_0)
(if (<= y.re 1.16e+35) (* t_0 t_1) (* t_1 (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -9.6e-68) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
} else if (y_46_re <= 4.8e-151) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.16e+35) {
tmp = t_0 * t_1;
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -9.6e-68) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_1;
} else if (y_46_re <= 4.8e-151) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.16e+35) {
tmp = t_0 * t_1;
} else {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -9.6e-68: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_1 elif y_46_re <= 4.8e-151: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * t_0 elif y_46_re <= 1.16e+35: tmp = t_0 * t_1 else: tmp = t_1 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -9.6e-68) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1); elseif (y_46_re <= 4.8e-151) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.16e+35) tmp = Float64(t_0 * t_1); else tmp = Float64(t_1 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -9.6e-68) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_1; elseif (y_46_re <= 4.8e-151) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 1.16e+35) tmp = t_0 * t_1; else tmp = t_1 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9.6e-68], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 4.8e-151], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.16e+35], N[(t$95$0 * t$95$1), $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -9.6 \cdot 10^{-68}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-151}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.16 \cdot 10^{+35}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -9.59999999999999965e-68Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 72.7%
unpow272.7%
unpow272.7%
hypot-undefine78.9%
Simplified78.9%
if -9.59999999999999965e-68 < y.re < 4.8e-151Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.re around 0 30.8%
neg-mul-130.8%
distribute-lft-neg-in30.8%
*-commutative30.8%
unpow230.8%
unpow230.8%
hypot-undefine68.2%
Simplified68.2%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine69.3%
Simplified69.3%
if 4.8e-151 < y.re < 1.1600000000000001e35Initial program 42.9%
fmm-def42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
add-cube-cbrt90.9%
pow393.4%
hypot-define41.9%
*-commutative41.9%
fma-define41.9%
+-commutative41.9%
*-commutative41.9%
fma-define41.9%
*-commutative41.9%
hypot-define93.4%
Applied egg-rr93.4%
Taylor expanded in y.im around 0 79.9%
Taylor expanded in y.re around 0 73.3%
neg-mul-186.9%
distribute-lft-neg-in86.9%
Simplified73.3%
if 1.1600000000000001e35 < y.re Initial program 49.1%
fmm-def49.1%
hypot-define49.1%
distribute-rgt-neg-out49.1%
fma-define49.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine58.1%
Simplified58.1%
Taylor expanded in x.im around 0 61.6%
Final simplification71.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -3.6e-23)
(* (pow (hypot x.im x.re) y.re) t_0)
(if (<= y.re 5e+34)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* t_0 (pow x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -3.6e-23) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else if (y_46_re <= 5e+34) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -3.6e-23) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else if (y_46_re <= 5e+34) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -3.6e-23: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 elif y_46_re <= 5e+34: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -3.6e-23) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0); elseif (y_46_re <= 5e+34) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -3.6e-23) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; elseif (y_46_re <= 5e+34) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.6e-23], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 5e+34], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -3.6 \cdot 10^{-23}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+34}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.5999999999999998e-23Initial program 46.9%
fmm-def46.9%
hypot-define46.9%
distribute-rgt-neg-out46.9%
fma-define46.9%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.im around 0 79.0%
unpow279.0%
unpow279.0%
hypot-undefine79.0%
Simplified79.0%
if -3.5999999999999998e-23 < y.re < 4.9999999999999998e34Initial program 37.2%
fmm-def37.2%
hypot-define37.2%
distribute-rgt-neg-out37.2%
fma-define37.2%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt84.0%
pow382.9%
hypot-define35.9%
*-commutative35.9%
fma-define35.9%
+-commutative35.9%
*-commutative35.9%
fma-define35.8%
*-commutative35.8%
hypot-define82.9%
Applied egg-rr82.9%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in y.re around 0 56.9%
*-commutative56.9%
mul-1-neg56.9%
Simplified56.9%
if 4.9999999999999998e34 < y.re Initial program 49.1%
fmm-def49.1%
hypot-define49.1%
distribute-rgt-neg-out49.1%
fma-define49.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine58.1%
Simplified58.1%
Taylor expanded in x.im around 0 61.6%
Final simplification63.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -5.2e+233)
(fabs (* t_0 (pow x.im y.re)))
(if (or (<= y.re -63000000000.0) (not (<= y.re 2e+33)))
(* t_0 (pow x.re y.re))
(* y.re (* (atan2 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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.2e+233) {
tmp = fabs((t_0 * pow(x_46_im, y_46_re)));
} else if ((y_46_re <= -63000000000.0) || !(y_46_re <= 2e+33)) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
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 <= (-5.2d+233)) then
tmp = abs((t_0 * (x_46im ** y_46re)))
else if ((y_46re <= (-63000000000.0d0)) .or. (.not. (y_46re <= 2d+33))) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
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 <= -5.2e+233) {
tmp = Math.abs((t_0 * Math.pow(x_46_im, y_46_re)));
} else if ((y_46_re <= -63000000000.0) || !(y_46_re <= 2e+33)) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
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 <= -5.2e+233: tmp = math.fabs((t_0 * math.pow(x_46_im, y_46_re))) elif (y_46_re <= -63000000000.0) or not (y_46_re <= 2e+33): tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) 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 <= -5.2e+233) tmp = abs(Float64(t_0 * (x_46_im ^ y_46_re))); elseif ((y_46_re <= -63000000000.0) || !(y_46_re <= 2e+33)) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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 <= -5.2e+233) tmp = abs((t_0 * (x_46_im ^ y_46_re))); elseif ((y_46_re <= -63000000000.0) || ~((y_46_re <= 2e+33))) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(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_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.2e+233], N[Abs[N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[y$46$re, -63000000000.0], N[Not[LessEqual[y$46$re, 2e+33]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 -5.2 \cdot 10^{+233}:\\
\;\;\;\;\left|t\_0 \cdot {x.im}^{y.re}\right|\\
\mathbf{elif}\;y.re \leq -63000000000 \lor \neg \left(y.re \leq 2 \cdot 10^{+33}\right):\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -5.20000000000000013e233Initial program 45.0%
fmm-def45.0%
hypot-define45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.im around 0 80.0%
unpow280.0%
unpow280.0%
hypot-undefine80.0%
Simplified80.0%
Taylor expanded in x.re around 0 60.2%
add-sqr-sqrt60.1%
sqrt-unprod70.2%
pow270.2%
Applied egg-rr70.2%
unpow270.2%
rem-sqrt-square70.2%
*-commutative70.2%
Simplified70.2%
if -5.20000000000000013e233 < y.re < -6.3e10 or 1.9999999999999999e33 < y.re Initial program 49.5%
fmm-def49.5%
hypot-define49.5%
distribute-rgt-neg-out49.5%
fma-define49.5%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around 0 67.8%
unpow267.8%
unpow267.8%
hypot-undefine67.8%
Simplified67.8%
Taylor expanded in x.im around 0 64.9%
if -6.3e10 < y.re < 1.9999999999999999e33Initial program 36.9%
fmm-def36.9%
hypot-define36.9%
distribute-rgt-neg-out36.9%
fma-define36.9%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
add-cube-cbrt84.4%
pow383.4%
hypot-define35.5%
*-commutative35.5%
fma-define35.5%
+-commutative35.5%
*-commutative35.5%
fma-define35.5%
*-commutative35.5%
hypot-define83.4%
Applied egg-rr83.4%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in y.re around 0 56.0%
*-commutative56.0%
mul-1-neg56.0%
Simplified56.0%
Final simplification60.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.re y.re))))
(if (<= y.re -1.6e+202)
(* t_1 (pow x.im y.re))
(if (<= y.re -29000000000.0)
t_2
(if (<= y.re -4.9e-68)
t_1
(if (<= y.re 1.1e-143)
(+ -1.0 (exp (log1p t_0)))
(if (<= y.re 0.03) 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_re, y_46_re);
double tmp;
if (y_46_re <= -1.6e+202) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_re <= -29000000000.0) {
tmp = t_2;
} else if (y_46_re <= -4.9e-68) {
tmp = t_1;
} else if (y_46_re <= 1.1e-143) {
tmp = -1.0 + exp(log1p(t_0));
} else if (y_46_re <= 0.03) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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_re, y_46_re);
double tmp;
if (y_46_re <= -1.6e+202) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= -29000000000.0) {
tmp = t_2;
} else if (y_46_re <= -4.9e-68) {
tmp = t_1;
} else if (y_46_re <= 1.1e-143) {
tmp = -1.0 + Math.exp(Math.log1p(t_0));
} else if (y_46_re <= 0.03) {
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_re, y_46_re) tmp = 0 if y_46_re <= -1.6e+202: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_re <= -29000000000.0: tmp = t_2 elif y_46_re <= -4.9e-68: tmp = t_1 elif y_46_re <= 1.1e-143: tmp = -1.0 + math.exp(math.log1p(t_0)) elif y_46_re <= 0.03: 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_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.6e+202) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_re <= -29000000000.0) tmp = t_2; elseif (y_46_re <= -4.9e-68) tmp = t_1; elseif (y_46_re <= 1.1e-143) tmp = Float64(-1.0 + exp(log1p(t_0))); elseif (y_46_re <= 0.03) tmp = t_0; 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[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.6e+202], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -29000000000.0], t$95$2, If[LessEqual[y$46$re, -4.9e-68], t$95$1, If[LessEqual[y$46$re, 1.1e-143], N[(-1.0 + N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.03], 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.re}^{y.re}\\
\mathbf{if}\;y.re \leq -1.6 \cdot 10^{+202}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq -29000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -4.9 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-143}:\\
\;\;\;\;-1 + e^{\mathsf{log1p}\left(t\_0\right)}\\
\mathbf{elif}\;y.re \leq 0.03:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.60000000000000006e202Initial program 48.1%
fmm-def48.1%
hypot-define48.1%
distribute-rgt-neg-out48.1%
fma-define48.1%
hypot-define81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.im around 0 85.2%
unpow285.2%
unpow285.2%
hypot-undefine85.2%
Simplified85.2%
Taylor expanded in x.re around 0 70.5%
if -1.60000000000000006e202 < y.re < -2.9e10 or 0.029999999999999999 < y.re Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in x.im around 0 60.7%
if -2.9e10 < y.re < -4.89999999999999977e-68Initial program 26.5%
fmm-def26.5%
hypot-define26.5%
distribute-rgt-neg-out26.5%
fma-define26.5%
hypot-define99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y.im around 0 39.4%
Taylor expanded in y.re around 0 64.9%
if -4.89999999999999977e-68 < y.re < 1.09999999999999995e-143Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.im around 0 20.4%
unpow220.4%
unpow220.4%
hypot-undefine13.4%
Simplified13.4%
Taylor expanded in x.re around 0 6.2%
Taylor expanded in y.re around 0 13.4%
*-commutative13.4%
Simplified13.4%
expm1-log1p-u13.4%
expm1-undefine24.5%
*-commutative24.5%
Applied egg-rr24.5%
if 1.09999999999999995e-143 < y.re < 0.029999999999999999Initial program 43.7%
fmm-def43.7%
hypot-define43.7%
distribute-rgt-neg-out43.7%
fma-define43.7%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-undefine50.1%
Simplified50.1%
Taylor expanded in x.re around 0 15.0%
Taylor expanded in y.re around 0 49.1%
*-commutative49.1%
Simplified49.1%
Final simplification48.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1.15e+202)
(* t_0 (pow x.im y.re))
(if (or (<= y.re -36000000000.0) (not (<= y.re 1e+32)))
(* t_0 (pow x.re y.re))
(* y.re (* (atan2 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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.15e+202) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if ((y_46_re <= -36000000000.0) || !(y_46_re <= 1e+32)) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
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.15d+202)) then
tmp = t_0 * (x_46im ** y_46re)
else if ((y_46re <= (-36000000000.0d0)) .or. (.not. (y_46re <= 1d+32))) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
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.15e+202) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if ((y_46_re <= -36000000000.0) || !(y_46_re <= 1e+32)) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
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.15e+202: tmp = t_0 * math.pow(x_46_im, y_46_re) elif (y_46_re <= -36000000000.0) or not (y_46_re <= 1e+32): tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) 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.15e+202) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif ((y_46_re <= -36000000000.0) || !(y_46_re <= 1e+32)) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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.15e+202) tmp = t_0 * (x_46_im ^ y_46_re); elseif ((y_46_re <= -36000000000.0) || ~((y_46_re <= 1e+32))) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(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_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e+202], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -36000000000.0], N[Not[LessEqual[y$46$re, 1e+32]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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.15 \cdot 10^{+202}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq -36000000000 \lor \neg \left(y.re \leq 10^{+32}\right):\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -1.15e202Initial program 48.1%
fmm-def48.1%
hypot-define48.1%
distribute-rgt-neg-out48.1%
fma-define48.1%
hypot-define81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.im around 0 85.2%
unpow285.2%
unpow285.2%
hypot-undefine85.2%
Simplified85.2%
Taylor expanded in x.re around 0 70.5%
if -1.15e202 < y.re < -3.6e10 or 1.00000000000000005e32 < y.re Initial program 48.9%
fmm-def48.9%
hypot-define48.9%
distribute-rgt-neg-out48.9%
fma-define48.9%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.im around 0 65.4%
unpow265.4%
unpow265.4%
hypot-undefine65.4%
Simplified65.4%
Taylor expanded in x.im around 0 63.3%
if -3.6e10 < y.re < 1.00000000000000005e32Initial program 36.9%
fmm-def36.9%
hypot-define36.9%
distribute-rgt-neg-out36.9%
fma-define36.9%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
add-cube-cbrt84.4%
pow383.4%
hypot-define35.5%
*-commutative35.5%
fma-define35.5%
+-commutative35.5%
*-commutative35.5%
fma-define35.5%
*-commutative35.5%
hypot-define83.4%
Applied egg-rr83.4%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in y.re around 0 56.0%
*-commutative56.0%
mul-1-neg56.0%
Simplified56.0%
Final simplification60.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -1.6e+33) (not (<= y.re 660000000.0)))
(* (sin t_0) (pow x.im y.re))
(cbrt (pow 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 <= -1.6e+33) || !(y_46_re <= 660000000.0)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(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 tmp;
if ((y_46_re <= -1.6e+33) || !(y_46_re <= 660000000.0)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(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 <= -1.6e+33) || !(y_46_re <= 660000000.0)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = 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[Or[LessEqual[y$46$re, -1.6e+33], N[Not[LessEqual[y$46$re, 660000000.0]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.6 \cdot 10^{+33} \lor \neg \left(y.re \leq 660000000\right):\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -1.60000000000000009e33 or 6.6e8 < y.re Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.im around 0 67.7%
unpow267.7%
unpow267.7%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in x.re around 0 54.7%
if -1.60000000000000009e33 < y.re < 6.6e8Initial program 37.9%
fmm-def37.9%
hypot-define37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 27.3%
unpow227.3%
unpow227.3%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in x.re around 0 10.2%
Taylor expanded in y.re around 0 24.0%
*-commutative24.0%
Simplified24.0%
add-cbrt-cube27.5%
pow327.5%
*-commutative27.5%
Applied egg-rr27.5%
Final simplification40.2%
(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 -3.4e+28)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 2e-52) (* 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 <= -3.4e+28) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2e-52) {
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 <= (-3.4d+28)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 2d-52) 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 <= -3.4e+28) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2e-52) {
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 <= -3.4e+28: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2e-52: 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 <= -3.4e+28) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2e-52) 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 <= -3.4e+28) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2e-52) 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, -3.4e+28], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2e-52], 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 -3.4 \cdot 10^{+28}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{-52}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -3.4e28Initial program 27.4%
fmm-def27.4%
hypot-define27.4%
distribute-rgt-neg-out27.4%
fma-define27.4%
hypot-define90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around 0 51.4%
Taylor expanded in x.im around -inf 54.7%
mul-1-neg54.7%
Simplified54.7%
if -3.4e28 < x.im < 2e-52Initial program 48.2%
fmm-def48.2%
hypot-define48.2%
distribute-rgt-neg-out48.2%
fma-define48.2%
hypot-define78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y.im around 0 47.3%
unpow247.3%
unpow247.3%
hypot-undefine43.2%
Simplified43.2%
Taylor expanded in x.im around 0 40.3%
if 2e-52 < x.im Initial program 44.6%
fmm-def44.6%
hypot-define44.6%
distribute-rgt-neg-out44.6%
fma-define44.6%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.im around 0 37.9%
unpow237.9%
unpow237.9%
hypot-undefine46.9%
Simplified46.9%
Taylor expanded in x.re around 0 48.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1.12e-43) (not (<= y.im 2.15e+67)))
(+ -1.0 (exp (log1p t_0)))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.12e-43) || !(y_46_im <= 2.15e+67)) {
tmp = -1.0 + exp(log1p(t_0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.12e-43) || !(y_46_im <= 2.15e+67)) {
tmp = -1.0 + Math.exp(Math.log1p(t_0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -1.12e-43) or not (y_46_im <= 2.15e+67): tmp = -1.0 + math.exp(math.log1p(t_0)) else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.12e-43) || !(y_46_im <= 2.15e+67)) tmp = Float64(-1.0 + exp(log1p(t_0))); else tmp = log1p(expm1(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]}, If[Or[LessEqual[y$46$im, -1.12e-43], N[Not[LessEqual[y$46$im, 2.15e+67]], $MachinePrecision]], N[(-1.0 + N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $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 -1.12 \cdot 10^{-43} \lor \neg \left(y.im \leq 2.15 \cdot 10^{+67}\right):\\
\;\;\;\;-1 + e^{\mathsf{log1p}\left(t\_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -1.12e-43 or 2.1500000000000001e67 < y.im Initial program 37.8%
fmm-def37.8%
hypot-define37.8%
distribute-rgt-neg-out37.8%
fma-define37.8%
hypot-define75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in y.im around 0 41.6%
unpow241.6%
unpow241.6%
hypot-undefine31.0%
Simplified31.0%
Taylor expanded in x.re around 0 23.0%
Taylor expanded in y.re around 0 3.5%
*-commutative3.5%
Simplified3.5%
expm1-log1p-u3.0%
expm1-undefine24.9%
*-commutative24.9%
Applied egg-rr24.9%
if -1.12e-43 < y.im < 2.1500000000000001e67Initial program 46.8%
fmm-def46.8%
hypot-define46.8%
distribute-rgt-neg-out46.8%
fma-define46.8%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.im around 0 50.8%
unpow250.8%
unpow250.8%
hypot-undefine62.1%
Simplified62.1%
Taylor expanded in x.re around 0 38.8%
Taylor expanded in y.re around 0 25.3%
*-commutative25.3%
Simplified25.3%
*-commutative25.3%
log1p-expm1-u32.5%
Applied egg-rr32.5%
Final simplification28.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.25e-45)
(+ -1.0 (exp (log1p t_0)))
(if (<= y.im 1.15e-162)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333)))))
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 <= -1.25e-45) {
tmp = -1.0 + exp(log1p(t_0));
} else if (y_46_im <= 1.15e-162) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
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 <= -1.25e-45) {
tmp = -1.0 + Math.exp(Math.log1p(t_0));
} else if (y_46_im <= 1.15e-162) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
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 <= -1.25e-45: tmp = -1.0 + math.exp(math.log1p(t_0)) elif y_46_im <= 1.15e-162: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) 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 <= -1.25e-45) tmp = Float64(-1.0 + exp(log1p(t_0))); elseif (y_46_im <= 1.15e-162) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; 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$im, -1.25e-45], N[(-1.0 + N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e-162], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.25 \cdot 10^{-45}:\\
\;\;\;\;-1 + e^{\mathsf{log1p}\left(t\_0\right)}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-162}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t\_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -1.24999999999999994e-45Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.im around 0 42.3%
unpow242.3%
unpow242.3%
hypot-undefine29.8%
Simplified29.8%
Taylor expanded in x.re around 0 16.9%
Taylor expanded in y.re around 0 3.0%
*-commutative3.0%
Simplified3.0%
expm1-log1p-u2.4%
expm1-undefine27.5%
*-commutative27.5%
Applied egg-rr27.5%
if -1.24999999999999994e-45 < y.im < 1.1499999999999999e-162Initial program 52.9%
fmm-def52.9%
hypot-define52.9%
distribute-rgt-neg-out52.9%
fma-define52.9%
hypot-define91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine59.2%
Simplified59.2%
Taylor expanded in x.re around 0 32.6%
Taylor expanded in y.re around 0 32.2%
*-commutative32.2%
Simplified32.2%
*-commutative32.2%
log1p-expm1-u37.7%
Applied egg-rr37.7%
if 1.1499999999999999e-162 < y.im Initial program 37.4%
fmm-def37.4%
hypot-define37.4%
distribute-rgt-neg-out37.4%
fma-define37.4%
hypot-define81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y.im around 0 50.5%
unpow250.5%
unpow250.5%
hypot-undefine48.0%
Simplified48.0%
Taylor expanded in x.re around 0 39.0%
Taylor expanded in y.re around 0 8.1%
*-commutative8.1%
Simplified8.1%
add-cbrt-cube18.8%
pow1/324.7%
pow324.7%
*-commutative24.7%
Applied egg-rr24.7%
Final simplification29.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -4.8e-52) (not (<= y.im 1.9e-14)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.8e-52) || !(y_46_im <= 1.9e-14)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.8e-52) || !(y_46_im <= 1.9e-14)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -4.8e-52) || !(y_46_im <= 1.9e-14)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(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]}, If[Or[LessEqual[y$46$im, -4.8e-52], N[Not[LessEqual[y$46$im, 1.9e-14]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $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 -4.8 \cdot 10^{-52} \lor \neg \left(y.im \leq 1.9 \cdot 10^{-14}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.8000000000000003e-52 or 1.9000000000000001e-14 < y.im Initial program 37.7%
fmm-def37.7%
hypot-define37.7%
distribute-rgt-neg-out37.7%
fma-define37.7%
hypot-define77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine37.4%
Simplified37.4%
Taylor expanded in x.re around 0 27.7%
Taylor expanded in y.re around 0 4.7%
*-commutative4.7%
Simplified4.7%
add-cbrt-cube20.3%
pow320.3%
*-commutative20.3%
Applied egg-rr20.3%
if -4.8000000000000003e-52 < y.im < 1.9000000000000001e-14Initial program 48.6%
fmm-def48.6%
hypot-define48.6%
distribute-rgt-neg-out48.6%
fma-define48.6%
hypot-define90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y.im around 0 45.0%
unpow245.0%
unpow245.0%
hypot-undefine59.1%
Simplified59.1%
Taylor expanded in x.re around 0 35.5%
Taylor expanded in y.re around 0 27.4%
*-commutative27.4%
Simplified27.4%
*-commutative27.4%
log1p-expm1-u34.2%
Applied egg-rr34.2%
Final simplification26.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -1.05e-294) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (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 (x_46_re <= -1.05e-294) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(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 (x_46_re <= -1.05e-294) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(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 x_46_re <= -1.05e-294: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(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 (x_46_re <= -1.05e-294) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -1.05e-294], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.05 \cdot 10^{-294}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < -1.04999999999999992e-294Initial program 42.0%
fmm-def42.0%
hypot-define42.0%
distribute-rgt-neg-out42.0%
fma-define42.0%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 49.6%
unpow249.6%
unpow249.6%
hypot-undefine49.8%
Simplified49.8%
Taylor expanded in x.re around 0 34.0%
Taylor expanded in y.re around 0 13.6%
*-commutative13.6%
Simplified13.6%
*-commutative13.6%
log1p-expm1-u24.7%
Applied egg-rr24.7%
if -1.04999999999999992e-294 < x.re Initial program 42.7%
fmm-def42.7%
hypot-define42.7%
distribute-rgt-neg-out42.7%
fma-define42.7%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.im around 0 42.9%
unpow242.9%
unpow242.9%
hypot-undefine43.9%
Simplified43.9%
Taylor expanded in x.re around 0 28.2%
Taylor expanded in y.re around 0 15.5%
*-commutative15.5%
Simplified15.5%
add-log-exp23.2%
Applied egg-rr23.2%
Final simplification24.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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 log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((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.log1p(math.expm1((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 log1p(expm1(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_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.8%
Simplified46.8%
Taylor expanded in x.re around 0 31.0%
Taylor expanded in y.re around 0 14.6%
*-commutative14.6%
Simplified14.6%
*-commutative14.6%
log1p-expm1-u21.4%
Applied egg-rr21.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 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 14.8%
Final simplification14.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.8%
Simplified46.8%
Taylor expanded in x.re around 0 31.0%
Taylor expanded in y.re around 0 14.6%
*-commutative14.6%
Simplified14.6%
Final simplification14.6%
herbie shell --seed 2024180
(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)))))