
(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 19 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
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -80000000.0)
(* t_1 (sin (fabs t_0)))
(if (<= y.re 1.7e+77)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (pow (cbrt (fma y.im (log (hypot x.re x.im)) t_0)) 3.0)))
(* t_1 (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = 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 tmp;
if (y_46_re <= -80000000.0) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_re <= 1.7e+77) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(pow(cbrt(fma(y_46_im, log(hypot(x_46_re, x_46_im)), t_0)), 3.0));
} else {
tmp = t_1 * sin(t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = 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))) tmp = 0.0 if (y_46_re <= -80000000.0) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_re <= 1.7e+77) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin((cbrt(fma(y_46_im, log(hypot(x_46_re, x_46_im)), t_0)) ^ 3.0))); else tmp = Float64(t_1 * sin(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[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]}, If[LessEqual[y$46$re, -80000000.0], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.7e+77], 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$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -80000000:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{+77}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), t_0\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\end{array}
if y.re < -8e7Initial program 47.7%
Taylor expanded in y.im around 0 75.5%
*-commutative75.5%
add-sqr-sqrt33.9%
fabs-sqr33.9%
add-sqr-sqrt81.6%
Applied egg-rr81.6%
if -8e7 < y.re < 1.69999999999999998e77Initial program 36.4%
exp-diff35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod34.9%
fma-def34.9%
hypot-def75.0%
*-commutative75.0%
Simplified75.0%
add-cube-cbrt76.5%
pow376.4%
fma-udef76.4%
*-commutative76.4%
*-commutative76.4%
fma-def76.4%
Applied egg-rr76.4%
Taylor expanded in y.re around 0 79.9%
rec-exp79.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
if 1.69999999999999998e77 < y.re Initial program 43.1%
Taylor expanded in y.im around 0 70.6%
Final simplification78.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 40.6%
cancel-sign-sub-inv40.6%
fma-def40.6%
hypot-def40.6%
distribute-lft-neg-in40.6%
distribute-rgt-neg-out40.6%
fma-def40.6%
hypot-def78.0%
*-commutative78.0%
Simplified78.0%
Final simplification78.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -85000000.0)
(* t_2 (sin (fabs t_1)))
(if (<= y.re 4.4e+73)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(* t_2 (sin t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -85000000.0) {
tmp = t_2 * sin(fabs(t_1));
} else if (y_46_re <= 4.4e+73) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else {
tmp = t_2 * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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 = 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)) tmp = 0.0 if (y_46_re <= -85000000.0) tmp = Float64(t_2 * sin(abs(t_1))); elseif (y_46_re <= 4.4e+73) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); else tmp = Float64(t_2 * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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[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]}, If[LessEqual[y$46$re, -85000000.0], N[(t$95$2 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.4e+73], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[t$95$1], $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 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{if}\;y.re \leq -85000000:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{+73}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot \frac{1}{e^{t_0}}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\end{array}
\end{array}
if y.re < -8.5e7Initial program 47.7%
Taylor expanded in y.im around 0 75.5%
*-commutative75.5%
add-sqr-sqrt33.9%
fabs-sqr33.9%
add-sqr-sqrt81.6%
Applied egg-rr81.6%
if -8.5e7 < y.re < 4.4e73Initial program 36.4%
exp-diff35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod34.9%
fma-def34.9%
hypot-def75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in y.re around 0 78.6%
if 4.4e73 < y.re Initial program 43.1%
Taylor expanded in y.im around 0 70.6%
Final simplification77.8%
(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))))
(if (or (<= y.re -0.96) (not (<= y.re 5.4e+73)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0))))))
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 tmp;
if ((y_46_re <= -0.96) || !(y_46_re <= 5.4e+73)) {
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 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
}
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)) tmp = 0.0 if ((y_46_re <= -0.96) || !(y_46_re <= 5.4e+73)) 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(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[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]}, If[Or[LessEqual[y$46$re, -0.96], N[Not[LessEqual[y$46$re, 5.4e+73]], $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] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $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}\\
\mathbf{if}\;y.re \leq -0.96 \lor \neg \left(y.re \leq 5.4 \cdot 10^{+73}\right):\\
\;\;\;\;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}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot \frac{1}{e^{t_0}}\\
\end{array}
\end{array}
if y.re < -0.95999999999999996 or 5.3999999999999998e73 < y.re Initial program 45.3%
Taylor expanded in y.im around 0 73.6%
if -0.95999999999999996 < y.re < 5.3999999999999998e73Initial program 36.7%
exp-diff36.0%
exp-to-pow36.0%
hypot-def36.0%
*-commutative36.0%
exp-prod35.2%
fma-def35.2%
hypot-def75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around 0 79.1%
Final simplification76.6%
(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.0) (not (<= y.re 4.4e+73)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.0) || !(y_46_re <= 4.4e+73)) {
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(t_0);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
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.0) || !(y_46_re <= 4.4e+73)) 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(t_0)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); 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.0], N[Not[LessEqual[y$46$re, 4.4e+73]], $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[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1 \lor \neg \left(y.re \leq 4.4 \cdot 10^{+73}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -1 or 4.4e73 < y.re Initial program 45.3%
Taylor expanded in y.im around 0 73.6%
if -1 < y.re < 4.4e73Initial program 36.7%
exp-diff36.0%
exp-to-pow36.0%
hypot-def36.0%
*-commutative36.0%
exp-prod35.2%
fma-def35.2%
hypot-def75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around 0 79.1%
rec-exp79.8%
distribute-rgt-neg-in79.8%
Simplified79.1%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (- x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))))
(if (<= x.re -8.2e-113)
(* (sin t_1) t_3)
(if (<= x.re -2.85e-232)
(* (sin (fabs t_1)) t_2)
(if (<= x.re -2.65e-303)
(* t_3 (sin (+ t_1 (* y.im t_0))))
(* t_2 (sin (+ t_1 (* (log (hypot x.re x.im)) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(-x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -8.2e-113) {
tmp = sin(t_1) * t_3;
} else if (x_46_re <= -2.85e-232) {
tmp = sin(fabs(t_1)) * t_2;
} else if (x_46_re <= -2.65e-303) {
tmp = t_3 * sin((t_1 + (y_46_im * t_0)));
} else {
tmp = t_2 * sin((t_1 + (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(-x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.exp(((y_46_re * t_0) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -8.2e-113) {
tmp = Math.sin(t_1) * t_3;
} else if (x_46_re <= -2.85e-232) {
tmp = Math.sin(Math.abs(t_1)) * t_2;
} else if (x_46_re <= -2.65e-303) {
tmp = t_3 * Math.sin((t_1 + (y_46_im * t_0)));
} else {
tmp = t_2 * Math.sin((t_1 + (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(-x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = math.exp(((y_46_re * t_0) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if x_46_re <= -8.2e-113: tmp = math.sin(t_1) * t_3 elif x_46_re <= -2.85e-232: tmp = math.sin(math.fabs(t_1)) * t_2 elif x_46_re <= -2.65e-303: tmp = t_3 * math.sin((t_1 + (y_46_im * t_0))) else: tmp = t_2 * math.sin((t_1 + (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(-x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (x_46_re <= -8.2e-113) tmp = Float64(sin(t_1) * t_3); elseif (x_46_re <= -2.85e-232) tmp = Float64(sin(abs(t_1)) * t_2); elseif (x_46_re <= -2.65e-303) tmp = Float64(t_3 * sin(Float64(t_1 + Float64(y_46_im * t_0)))); else tmp = Float64(t_2 * sin(Float64(t_1 + Float64(log(hypot(x_46_re, x_46_im)) * 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 = log(-x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (x_46_re <= -8.2e-113) tmp = sin(t_1) * t_3; elseif (x_46_re <= -2.85e-232) tmp = sin(abs(t_1)) * t_2; elseif (x_46_re <= -2.65e-303) tmp = t_3 * sin((t_1 + (y_46_im * t_0))); else tmp = t_2 * sin((t_1 + (log(hypot(x_46_re, x_46_im)) * 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[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $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[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -8.2e-113], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, -2.85e-232], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -2.65e-303], N[(t$95$3 * N[Sin[N[(t$95$1 + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(-x.re\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;x.re \leq -8.2 \cdot 10^{-113}:\\
\;\;\;\;\sin t_1 \cdot t_3\\
\mathbf{elif}\;x.re \leq -2.85 \cdot 10^{-232}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot t_2\\
\mathbf{elif}\;x.re \leq -2.65 \cdot 10^{-303}:\\
\;\;\;\;t_3 \cdot \sin \left(t_1 + y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(t_1 + \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if x.re < -8.1999999999999999e-113Initial program 37.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 73.4%
mul-1-neg73.4%
Simplified73.4%
if -8.1999999999999999e-113 < x.re < -2.8500000000000001e-232Initial program 27.6%
exp-diff22.0%
exp-to-pow22.0%
hypot-def22.0%
*-commutative22.0%
exp-prod22.0%
fma-def22.0%
hypot-def55.4%
*-commutative55.4%
Simplified55.4%
add-cube-cbrt60.7%
pow360.7%
fma-udef60.7%
*-commutative60.7%
*-commutative60.7%
fma-def60.7%
Applied egg-rr60.7%
Taylor expanded in y.im around 0 54.9%
unpow254.9%
unpow254.9%
hypot-def54.8%
Simplified54.8%
Taylor expanded in y.im around 0 45.5%
pow-base-145.5%
*-lft-identity45.5%
Simplified45.5%
*-commutative50.6%
add-sqr-sqrt28.1%
fabs-sqr28.1%
add-sqr-sqrt67.3%
Applied egg-rr62.3%
if -2.8500000000000001e-232 < x.re < -2.65e-303Initial program 35.7%
Taylor expanded in x.re around -inf 57.5%
mul-1-neg64.3%
Simplified57.5%
Taylor expanded in x.re around -inf 78.6%
mul-1-neg64.3%
Simplified78.6%
if -2.65e-303 < x.re Initial program 44.8%
exp-diff41.8%
exp-to-pow41.8%
hypot-def41.8%
*-commutative41.8%
exp-prod41.0%
fma-def41.0%
hypot-def76.2%
*-commutative76.2%
Simplified76.2%
add-cube-cbrt73.5%
pow373.4%
fma-udef73.4%
*-commutative73.4%
*-commutative73.4%
fma-def73.4%
Applied egg-rr73.4%
Taylor expanded in y.im around 0 53.0%
unpow253.0%
unpow253.0%
hypot-def64.1%
Simplified64.1%
rem-cube-cbrt66.3%
fma-udef66.3%
hypot-udef37.6%
*-commutative37.6%
+-commutative37.6%
*-commutative37.6%
hypot-udef66.3%
Applied egg-rr66.3%
Final simplification69.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.im -300.0) (not (<= y.im 4.5e-5)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(*
(pow (hypot x.im x.re) y.re)
(sin (+ t_0 (* (log (hypot x.re x.im)) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -300.0) || !(y_46_im <= 4.5e-5)) {
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(t_0);
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -300.0) || !(y_46_im <= 4.5e-5)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(t_0);
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((t_0 + (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -300.0) or not (y_46_im <= 4.5e-5): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(t_0) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((t_0 + (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -300.0) || !(y_46_im <= 4.5e-5)) 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(t_0)); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(t_0 + Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_im <= -300.0) || ~((y_46_im <= 4.5e-5))) 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(t_0); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -300.0], N[Not[LessEqual[y$46$im, 4.5e-5]], $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[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -300 \lor \neg \left(y.im \leq 4.5 \cdot 10^{-5}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(t_0 + \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.im < -300 or 4.50000000000000028e-5 < y.im Initial program 35.2%
Taylor expanded in y.im around 0 55.2%
if -300 < y.im < 4.50000000000000028e-5Initial program 46.9%
exp-diff46.9%
exp-to-pow46.9%
hypot-def46.9%
*-commutative46.9%
exp-prod46.9%
fma-def46.9%
hypot-def88.0%
*-commutative88.0%
Simplified88.0%
add-cube-cbrt87.1%
pow387.9%
fma-udef87.9%
*-commutative87.9%
*-commutative87.9%
fma-def87.9%
Applied egg-rr87.9%
Taylor expanded in y.im around 0 63.3%
unpow263.3%
unpow263.3%
hypot-def87.4%
Simplified87.4%
rem-cube-cbrt87.4%
fma-udef87.4%
hypot-udef46.7%
*-commutative46.7%
+-commutative46.7%
*-commutative46.7%
hypot-udef87.4%
Applied egg-rr87.4%
Final simplification70.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -1.95e-112)
(* (sin t_0) (exp (- (* y.re (log (- x.re))) (* (atan2 x.im x.re) y.im))))
(if (<= x.re -2.8e-232)
(* (sin (fabs t_0)) t_1)
(if (<= x.re -3.3e-268)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(* t_1 (sin (+ t_0 (* (log (hypot x.re x.im)) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -1.95e-112) {
tmp = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -2.8e-232) {
tmp = sin(fabs(t_0)) * t_1;
} else if (x_46_re <= -3.3e-268) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else {
tmp = t_1 * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -1.95e-112) {
tmp = Math.sin(t_0) * Math.exp(((y_46_re * Math.log(-x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -2.8e-232) {
tmp = Math.sin(Math.abs(t_0)) * t_1;
} else if (x_46_re <= -3.3e-268) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else {
tmp = t_1 * Math.sin((t_0 + (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_re <= -1.95e-112: tmp = math.sin(t_0) * math.exp(((y_46_re * math.log(-x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif x_46_re <= -2.8e-232: tmp = math.sin(math.fabs(t_0)) * t_1 elif x_46_re <= -3.3e-268: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) else: tmp = t_1 * math.sin((t_0 + (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -1.95e-112) tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (x_46_re <= -2.8e-232) tmp = Float64(sin(abs(t_0)) * t_1); elseif (x_46_re <= -3.3e-268) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); else tmp = Float64(t_1 * sin(Float64(t_0 + Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_re <= -1.95e-112) tmp = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); elseif (x_46_re <= -2.8e-232) tmp = sin(abs(t_0)) * t_1; elseif (x_46_re <= -3.3e-268) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); else tmp = t_1 * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -1.95e-112], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.8e-232], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -3.3e-268], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -1.95 \cdot 10^{-112}:\\
\;\;\;\;\sin t_0 \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.re \leq -2.8 \cdot 10^{-232}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_1\\
\mathbf{elif}\;x.re \leq -3.3 \cdot 10^{-268}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if x.re < -1.9500000000000001e-112Initial program 37.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 73.4%
mul-1-neg73.4%
Simplified73.4%
if -1.9500000000000001e-112 < x.re < -2.79999999999999993e-232Initial program 27.6%
exp-diff22.0%
exp-to-pow22.0%
hypot-def22.0%
*-commutative22.0%
exp-prod22.0%
fma-def22.0%
hypot-def55.4%
*-commutative55.4%
Simplified55.4%
add-cube-cbrt60.7%
pow360.7%
fma-udef60.7%
*-commutative60.7%
*-commutative60.7%
fma-def60.7%
Applied egg-rr60.7%
Taylor expanded in y.im around 0 54.9%
unpow254.9%
unpow254.9%
hypot-def54.8%
Simplified54.8%
Taylor expanded in y.im around 0 45.5%
pow-base-145.5%
*-lft-identity45.5%
Simplified45.5%
*-commutative50.6%
add-sqr-sqrt28.1%
fabs-sqr28.1%
add-sqr-sqrt67.3%
Applied egg-rr62.3%
if -2.79999999999999993e-232 < x.re < -3.29999999999999993e-268Initial program 28.6%
exp-diff28.6%
exp-to-pow28.6%
hypot-def28.6%
*-commutative28.6%
exp-prod28.6%
fma-def28.6%
hypot-def57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.re around 0 71.4%
rec-exp71.4%
distribute-rgt-neg-in71.4%
Simplified71.4%
Taylor expanded in x.re around -inf 85.7%
if -3.29999999999999993e-268 < x.re Initial program 44.7%
exp-diff40.5%
exp-to-pow40.5%
hypot-def40.5%
*-commutative40.5%
exp-prod39.7%
fma-def39.7%
hypot-def74.6%
*-commutative74.6%
Simplified74.6%
add-cube-cbrt72.0%
pow371.9%
fma-udef71.9%
*-commutative71.9%
*-commutative71.9%
fma-def71.9%
Applied egg-rr71.9%
Taylor expanded in y.im around 0 53.2%
unpow253.2%
unpow253.2%
hypot-def63.8%
Simplified63.8%
rem-cube-cbrt65.9%
fma-udef65.9%
hypot-udef37.1%
*-commutative37.1%
+-commutative37.1%
*-commutative37.1%
hypot-udef65.9%
Applied egg-rr65.9%
Final simplification68.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin (+ t_1 (* y.im (log x.re)))))
(t_3 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -8.2e-113)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) (* (atan2 x.im x.re) y.im))))
(if (<= x.re -1.52e-232)
(* (sin (fabs t_1)) t_3)
(if (<= x.re -1.1e-304)
(* t_0 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 1.02e-131)
(* t_3 (sin (pow (cbrt t_1) 3.0)))
(if (<= x.re 1.95e-23) (* t_0 t_2) (* t_3 t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((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 + (y_46_im * log(x_46_re))));
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -8.2e-113) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -1.52e-232) {
tmp = sin(fabs(t_1)) * t_3;
} else if (x_46_re <= -1.1e-304) {
tmp = t_0 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 1.02e-131) {
tmp = t_3 * sin(pow(cbrt(t_1), 3.0));
} else if (x_46_re <= 1.95e-23) {
tmp = t_0 * t_2;
} else {
tmp = t_3 * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((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 + (y_46_im * Math.log(x_46_re))));
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -8.2e-113) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -1.52e-232) {
tmp = Math.sin(Math.abs(t_1)) * t_3;
} else if (x_46_re <= -1.1e-304) {
tmp = t_0 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 1.02e-131) {
tmp = t_3 * Math.sin(Math.pow(Math.cbrt(t_1), 3.0));
} else if (x_46_re <= 1.95e-23) {
tmp = t_0 * t_2;
} else {
tmp = t_3 * t_2;
}
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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -8.2e-113) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (x_46_re <= -1.52e-232) tmp = Float64(sin(abs(t_1)) * t_3); elseif (x_46_re <= -1.1e-304) tmp = Float64(t_0 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 1.02e-131) tmp = Float64(t_3 * sin((cbrt(t_1) ^ 3.0))); elseif (x_46_re <= 1.95e-23) tmp = Float64(t_0 * t_2); else tmp = Float64(t_3 * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -8.2e-113], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.52e-232], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, -1.1e-304], N[(t$95$0 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.02e-131], N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.95e-23], N[(t$95$0 * t$95$2), $MachinePrecision], N[(t$95$3 * t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin \left(t_1 + y.im \cdot \log x.re\right)\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -8.2 \cdot 10^{-113}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.re \leq -1.52 \cdot 10^{-232}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot t_3\\
\mathbf{elif}\;x.re \leq -1.1 \cdot 10^{-304}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-131}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq 1.95 \cdot 10^{-23}:\\
\;\;\;\;t_0 \cdot t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot t_2\\
\end{array}
\end{array}
if x.re < -8.1999999999999999e-113Initial program 37.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 73.4%
mul-1-neg73.4%
Simplified73.4%
if -8.1999999999999999e-113 < x.re < -1.52e-232Initial program 27.6%
exp-diff22.0%
exp-to-pow22.0%
hypot-def22.0%
*-commutative22.0%
exp-prod22.0%
fma-def22.0%
hypot-def55.4%
*-commutative55.4%
Simplified55.4%
add-cube-cbrt60.7%
pow360.7%
fma-udef60.7%
*-commutative60.7%
*-commutative60.7%
fma-def60.7%
Applied egg-rr60.7%
Taylor expanded in y.im around 0 54.9%
unpow254.9%
unpow254.9%
hypot-def54.8%
Simplified54.8%
Taylor expanded in y.im around 0 45.5%
pow-base-145.5%
*-lft-identity45.5%
Simplified45.5%
*-commutative50.6%
add-sqr-sqrt28.1%
fabs-sqr28.1%
add-sqr-sqrt67.3%
Applied egg-rr62.3%
if -1.52e-232 < x.re < -1.1e-304Initial program 33.3%
exp-diff20.0%
exp-to-pow20.0%
hypot-def20.0%
*-commutative20.0%
exp-prod20.0%
fma-def20.0%
hypot-def46.7%
*-commutative46.7%
Simplified46.7%
Taylor expanded in y.re around 0 53.8%
rec-exp53.8%
distribute-rgt-neg-in53.8%
Simplified53.8%
Taylor expanded in x.re around -inf 60.5%
if -1.1e-304 < x.re < 1.02000000000000001e-131Initial program 49.9%
exp-diff43.4%
exp-to-pow43.4%
hypot-def43.4%
*-commutative43.4%
exp-prod43.4%
fma-def43.4%
hypot-def71.7%
*-commutative71.7%
Simplified71.7%
add-cube-cbrt71.2%
pow369.0%
fma-udef69.0%
*-commutative69.0%
*-commutative69.0%
fma-def69.0%
Applied egg-rr69.0%
Taylor expanded in y.im around 0 54.8%
unpow254.8%
unpow254.8%
hypot-def63.0%
Simplified63.0%
Taylor expanded in y.im around 0 19.6%
unpow1/351.2%
Simplified51.2%
if 1.02000000000000001e-131 < x.re < 1.95e-23Initial program 62.4%
exp-diff58.2%
exp-to-pow58.2%
hypot-def58.2%
*-commutative58.2%
exp-prod58.2%
fma-def58.2%
hypot-def87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.re around 0 79.4%
rec-exp82.9%
distribute-rgt-neg-in82.9%
Simplified79.4%
Taylor expanded in x.im around 0 62.9%
if 1.95e-23 < x.re Initial program 35.1%
exp-diff35.1%
exp-to-pow35.1%
hypot-def35.1%
*-commutative35.1%
exp-prod33.3%
fma-def33.3%
hypot-def76.5%
*-commutative76.5%
Simplified76.5%
add-cube-cbrt72.9%
pow374.2%
fma-udef74.2%
*-commutative74.2%
*-commutative74.2%
fma-def74.2%
Applied egg-rr74.2%
Taylor expanded in y.im around 0 48.8%
unpow248.8%
unpow248.8%
hypot-def65.0%
Simplified65.0%
rem-cube-cbrt69.1%
rem-cbrt-cube35.3%
pow1/323.6%
pow-to-exp22.6%
pow-exp36.9%
Applied egg-rr36.9%
Taylor expanded in x.im around 0 68.5%
Final simplification65.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 (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im)))))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (* t_1 t_3))
(t_5 (* t_3 (sin (+ t_0 (* y.im (log x.re)))))))
(if (<= x.re -1.02e+86)
t_4
(if (<= x.re 9e-302)
(* (sin (fabs t_0)) t_3)
(if (<= x.re 1.7e-267)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (+ t_0 (* y.im (log x.im)))))
(if (<= x.re 2.05e-187)
t_2
(if (<= x.re 3.9e-95)
t_5
(if (<= x.re 5.8e-68) t_2 (if (<= x.re 4.3e-30) t_4 t_5)))))))))
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 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_1 * t_3;
double t_5 = t_3 * sin((t_0 + (y_46_im * log(x_46_re))));
double tmp;
if (x_46_re <= -1.02e+86) {
tmp = t_4;
} else if (x_46_re <= 9e-302) {
tmp = sin(fabs(t_0)) * t_3;
} else if (x_46_re <= 1.7e-267) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 + (y_46_im * log(x_46_im))));
} else if (x_46_re <= 2.05e-187) {
tmp = t_2;
} else if (x_46_re <= 3.9e-95) {
tmp = t_5;
} else if (x_46_re <= 5.8e-68) {
tmp = t_2;
} else if (x_46_re <= 4.3e-30) {
tmp = t_4;
} else {
tmp = t_5;
}
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.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_1 * t_3;
double t_5 = t_3 * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))));
double tmp;
if (x_46_re <= -1.02e+86) {
tmp = t_4;
} else if (x_46_re <= 9e-302) {
tmp = Math.sin(Math.abs(t_0)) * t_3;
} else if (x_46_re <= 1.7e-267) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_0 + (y_46_im * Math.log(x_46_im))));
} else if (x_46_re <= 2.05e-187) {
tmp = t_2;
} else if (x_46_re <= 3.9e-95) {
tmp = t_5;
} else if (x_46_re <= 5.8e-68) {
tmp = t_2;
} else if (x_46_re <= 4.3e-30) {
tmp = t_4;
} else {
tmp = t_5;
}
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.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = t_1 * t_3 t_5 = t_3 * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) tmp = 0 if x_46_re <= -1.02e+86: tmp = t_4 elif x_46_re <= 9e-302: tmp = math.sin(math.fabs(t_0)) * t_3 elif x_46_re <= 1.7e-267: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_0 + (y_46_im * math.log(x_46_im)))) elif x_46_re <= 2.05e-187: tmp = t_2 elif x_46_re <= 3.9e-95: tmp = t_5 elif x_46_re <= 5.8e-68: tmp = t_2 elif x_46_re <= 4.3e-30: tmp = t_4 else: tmp = t_5 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 * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = Float64(t_1 * t_3) t_5 = Float64(t_3 * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) tmp = 0.0 if (x_46_re <= -1.02e+86) tmp = t_4; elseif (x_46_re <= 9e-302) tmp = Float64(sin(abs(t_0)) * t_3); elseif (x_46_re <= 1.7e-267) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_0 + Float64(y_46_im * log(x_46_im))))); elseif (x_46_re <= 2.05e-187) tmp = t_2; elseif (x_46_re <= 3.9e-95) tmp = t_5; elseif (x_46_re <= 5.8e-68) tmp = t_2; elseif (x_46_re <= 4.3e-30) tmp = t_4; else tmp = t_5; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = t_1 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); t_3 = hypot(x_46_im, x_46_re) ^ y_46_re; t_4 = t_1 * t_3; t_5 = t_3 * sin((t_0 + (y_46_im * log(x_46_re)))); tmp = 0.0; if (x_46_re <= -1.02e+86) tmp = t_4; elseif (x_46_re <= 9e-302) tmp = sin(abs(t_0)) * t_3; elseif (x_46_re <= 1.7e-267) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 + (y_46_im * log(x_46_im)))); elseif (x_46_re <= 2.05e-187) tmp = t_2; elseif (x_46_re <= 3.9e-95) tmp = t_5; elseif (x_46_re <= 5.8e-68) tmp = t_2; elseif (x_46_re <= 4.3e-30) tmp = t_4; else tmp = t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.02e+86], t$95$4, If[LessEqual[x$46$re, 9e-302], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 1.7e-267], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.05e-187], t$95$2, If[LessEqual[x$46$re, 3.9e-95], t$95$5, If[LessEqual[x$46$re, 5.8e-68], t$95$2, If[LessEqual[x$46$re, 4.3e-30], t$95$4, t$95$5]]]]]]]]]]]]]
\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 e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := t_1 \cdot t_3\\
t_5 := t_3 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\mathbf{if}\;x.re \leq -1.02 \cdot 10^{+86}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 9 \cdot 10^{-302}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_3\\
\mathbf{elif}\;x.re \leq 1.7 \cdot 10^{-267}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t_0 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-187}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq 3.9 \cdot 10^{-95}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq 4.3 \cdot 10^{-30}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\end{array}
\end{array}
if x.re < -1.01999999999999996e86 or 5.8000000000000001e-68 < x.re < 4.29999999999999966e-30Initial program 17.3%
exp-diff15.4%
exp-to-pow15.4%
hypot-def15.4%
*-commutative15.4%
exp-prod15.4%
fma-def15.4%
hypot-def67.2%
*-commutative67.2%
Simplified67.2%
add-cube-cbrt63.1%
pow370.9%
fma-udef70.9%
*-commutative70.9%
*-commutative70.9%
fma-def70.9%
Applied egg-rr70.9%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-def50.7%
Simplified50.7%
Taylor expanded in y.im around 0 53.2%
pow-base-153.2%
*-lft-identity53.2%
Simplified53.2%
if -1.01999999999999996e86 < x.re < 9.00000000000000018e-302Initial program 48.1%
exp-diff40.6%
exp-to-pow40.6%
hypot-def40.6%
*-commutative40.6%
exp-prod40.6%
fma-def40.6%
hypot-def62.9%
*-commutative62.9%
Simplified62.9%
add-cube-cbrt63.9%
pow365.2%
fma-udef65.2%
*-commutative65.2%
*-commutative65.2%
fma-def65.2%
Applied egg-rr65.2%
Taylor expanded in y.im around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.im around 0 48.1%
pow-base-148.1%
*-lft-identity48.1%
Simplified48.1%
*-commutative57.1%
add-sqr-sqrt28.6%
fabs-sqr28.6%
add-sqr-sqrt64.6%
Applied egg-rr53.1%
if 9.00000000000000018e-302 < x.re < 1.7000000000000001e-267Initial program 57.1%
exp-diff57.1%
exp-to-pow57.1%
hypot-def57.1%
*-commutative57.1%
exp-prod57.1%
fma-def57.1%
hypot-def100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y.re around 0 86.2%
rec-exp57.2%
distribute-rgt-neg-in57.2%
Simplified86.2%
Taylor expanded in x.re around 0 85.7%
if 1.7000000000000001e-267 < x.re < 2.0500000000000001e-187 or 3.9e-95 < x.re < 5.8000000000000001e-68Initial program 46.4%
Taylor expanded in y.im around 0 49.5%
Taylor expanded in x.re around inf 58.1%
if 2.0500000000000001e-187 < x.re < 3.9e-95 or 4.29999999999999966e-30 < x.re Initial program 44.4%
exp-diff43.3%
exp-to-pow43.3%
hypot-def43.3%
*-commutative43.3%
exp-prod42.0%
fma-def42.0%
hypot-def76.3%
*-commutative76.3%
Simplified76.3%
add-cube-cbrt75.9%
pow376.9%
fma-udef76.9%
*-commutative76.9%
*-commutative76.9%
fma-def76.9%
Applied egg-rr76.9%
Taylor expanded in y.im around 0 58.7%
unpow258.7%
unpow258.7%
hypot-def68.1%
Simplified68.1%
rem-cube-cbrt70.0%
rem-cbrt-cube35.7%
pow1/319.4%
pow-to-exp18.6%
pow-exp37.3%
Applied egg-rr37.3%
Taylor expanded in x.im around 0 66.9%
Final simplification59.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin (+ t_1 (* y.im (log x.re)))))
(t_3 (sin t_1))
(t_4 (* t_3 t_0))
(t_5 (* t_0 t_2))
(t_6 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= x.re -2.5e+87)
t_4
(if (<= x.re 1.75e-301)
(* (sin (fabs t_1)) t_0)
(if (<= x.re 1.7e-267)
(* t_6 (sin (+ t_1 (* y.im (log x.im)))))
(if (<= x.re 2e-177)
(* t_6 t_2)
(if (<= x.re 3.4e-95)
t_5
(if (<= x.re 2.3e-65)
(* t_3 (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im))))
(if (<= x.re 8e-31) t_4 t_5)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin((t_1 + (y_46_im * log(x_46_re))));
double t_3 = sin(t_1);
double t_4 = t_3 * t_0;
double t_5 = t_0 * t_2;
double t_6 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (x_46_re <= -2.5e+87) {
tmp = t_4;
} else if (x_46_re <= 1.75e-301) {
tmp = sin(fabs(t_1)) * t_0;
} else if (x_46_re <= 1.7e-267) {
tmp = t_6 * sin((t_1 + (y_46_im * log(x_46_im))));
} else if (x_46_re <= 2e-177) {
tmp = t_6 * t_2;
} else if (x_46_re <= 3.4e-95) {
tmp = t_5;
} else if (x_46_re <= 2.3e-65) {
tmp = t_3 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= 8e-31) {
tmp = t_4;
} else {
tmp = t_5;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
double t_3 = Math.sin(t_1);
double t_4 = t_3 * t_0;
double t_5 = t_0 * t_2;
double t_6 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (x_46_re <= -2.5e+87) {
tmp = t_4;
} else if (x_46_re <= 1.75e-301) {
tmp = Math.sin(Math.abs(t_1)) * t_0;
} else if (x_46_re <= 1.7e-267) {
tmp = t_6 * Math.sin((t_1 + (y_46_im * Math.log(x_46_im))));
} else if (x_46_re <= 2e-177) {
tmp = t_6 * t_2;
} else if (x_46_re <= 3.4e-95) {
tmp = t_5;
} else if (x_46_re <= 2.3e-65) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= 8e-31) {
tmp = t_4;
} else {
tmp = t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin((t_1 + (y_46_im * math.log(x_46_re)))) t_3 = math.sin(t_1) t_4 = t_3 * t_0 t_5 = t_0 * t_2 t_6 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if x_46_re <= -2.5e+87: tmp = t_4 elif x_46_re <= 1.75e-301: tmp = math.sin(math.fabs(t_1)) * t_0 elif x_46_re <= 1.7e-267: tmp = t_6 * math.sin((t_1 + (y_46_im * math.log(x_46_im)))) elif x_46_re <= 2e-177: tmp = t_6 * t_2 elif x_46_re <= 3.4e-95: tmp = t_5 elif x_46_re <= 2.3e-65: tmp = t_3 * math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif x_46_re <= 8e-31: tmp = t_4 else: tmp = t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) t_3 = sin(t_1) t_4 = Float64(t_3 * t_0) t_5 = Float64(t_0 * t_2) t_6 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (x_46_re <= -2.5e+87) tmp = t_4; elseif (x_46_re <= 1.75e-301) tmp = Float64(sin(abs(t_1)) * t_0); elseif (x_46_re <= 1.7e-267) tmp = Float64(t_6 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif (x_46_re <= 2e-177) tmp = Float64(t_6 * t_2); elseif (x_46_re <= 3.4e-95) tmp = t_5; elseif (x_46_re <= 2.3e-65) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (x_46_re <= 8e-31) tmp = t_4; else tmp = t_5; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin((t_1 + (y_46_im * log(x_46_re)))); t_3 = sin(t_1); t_4 = t_3 * t_0; t_5 = t_0 * t_2; t_6 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); tmp = 0.0; if (x_46_re <= -2.5e+87) tmp = t_4; elseif (x_46_re <= 1.75e-301) tmp = sin(abs(t_1)) * t_0; elseif (x_46_re <= 1.7e-267) tmp = t_6 * sin((t_1 + (y_46_im * log(x_46_im)))); elseif (x_46_re <= 2e-177) tmp = t_6 * t_2; elseif (x_46_re <= 3.4e-95) tmp = t_5; elseif (x_46_re <= 2.3e-65) tmp = t_3 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); elseif (x_46_re <= 8e-31) tmp = t_4; else tmp = t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$0 * t$95$2), $MachinePrecision]}, Block[{t$95$6 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.5e+87], t$95$4, If[LessEqual[x$46$re, 1.75e-301], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 1.7e-267], N[(t$95$6 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2e-177], N[(t$95$6 * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 3.4e-95], t$95$5, If[LessEqual[x$46$re, 2.3e-65], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 8e-31], t$95$4, t$95$5]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin \left(t_1 + y.im \cdot \log x.re\right)\\
t_3 := \sin t_1\\
t_4 := t_3 \cdot t_0\\
t_5 := t_0 \cdot t_2\\
t_6 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;x.re \leq -2.5 \cdot 10^{+87}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 1.75 \cdot 10^{-301}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot t_0\\
\mathbf{elif}\;x.re \leq 1.7 \cdot 10^{-267}:\\
\;\;\;\;t_6 \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{-177}:\\
\;\;\;\;t_6 \cdot t_2\\
\mathbf{elif}\;x.re \leq 3.4 \cdot 10^{-95}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-65}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.re \leq 8 \cdot 10^{-31}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\end{array}
\end{array}
if x.re < -2.4999999999999999e87 or 2.3e-65 < x.re < 8.000000000000001e-31Initial program 17.3%
exp-diff15.4%
exp-to-pow15.4%
hypot-def15.4%
*-commutative15.4%
exp-prod15.4%
fma-def15.4%
hypot-def67.2%
*-commutative67.2%
Simplified67.2%
add-cube-cbrt63.1%
pow370.9%
fma-udef70.9%
*-commutative70.9%
*-commutative70.9%
fma-def70.9%
Applied egg-rr70.9%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-def50.7%
Simplified50.7%
Taylor expanded in y.im around 0 53.2%
pow-base-153.2%
*-lft-identity53.2%
Simplified53.2%
if -2.4999999999999999e87 < x.re < 1.74999999999999996e-301Initial program 48.1%
exp-diff40.6%
exp-to-pow40.6%
hypot-def40.6%
*-commutative40.6%
exp-prod40.6%
fma-def40.6%
hypot-def62.9%
*-commutative62.9%
Simplified62.9%
add-cube-cbrt63.9%
pow365.2%
fma-udef65.2%
*-commutative65.2%
*-commutative65.2%
fma-def65.2%
Applied egg-rr65.2%
Taylor expanded in y.im around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.im around 0 48.1%
pow-base-148.1%
*-lft-identity48.1%
Simplified48.1%
*-commutative57.1%
add-sqr-sqrt28.6%
fabs-sqr28.6%
add-sqr-sqrt64.6%
Applied egg-rr53.1%
if 1.74999999999999996e-301 < x.re < 1.7000000000000001e-267Initial program 57.1%
exp-diff57.1%
exp-to-pow57.1%
hypot-def57.1%
*-commutative57.1%
exp-prod57.1%
fma-def57.1%
hypot-def100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y.re around 0 86.2%
rec-exp57.2%
distribute-rgt-neg-in57.2%
Simplified86.2%
Taylor expanded in x.re around 0 85.7%
if 1.7000000000000001e-267 < x.re < 1.9999999999999999e-177Initial program 43.3%
exp-diff34.6%
exp-to-pow34.6%
hypot-def34.6%
*-commutative34.6%
exp-prod34.7%
fma-def34.7%
hypot-def60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in y.re around 0 62.9%
rec-exp58.1%
distribute-rgt-neg-in58.1%
Simplified62.9%
Taylor expanded in x.im around 0 49.3%
if 1.9999999999999999e-177 < x.re < 3.39999999999999993e-95 or 8.000000000000001e-31 < x.re Initial program 44.3%
exp-diff43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod41.8%
fma-def41.8%
hypot-def77.0%
*-commutative77.0%
Simplified77.0%
add-cube-cbrt76.5%
pow377.5%
fma-udef77.5%
*-commutative77.5%
*-commutative77.5%
fma-def77.5%
Applied egg-rr77.5%
Taylor expanded in y.im around 0 58.9%
unpow258.9%
unpow258.9%
hypot-def68.6%
Simplified68.6%
rem-cube-cbrt70.4%
rem-cbrt-cube35.4%
pow1/319.8%
pow-to-exp19.1%
pow-exp37.0%
Applied egg-rr37.0%
Taylor expanded in x.im around 0 68.2%
if 3.39999999999999993e-95 < x.re < 2.3e-65Initial program 57.1%
Taylor expanded in y.im around 0 80.3%
Taylor expanded in x.re around inf 80.3%
Final simplification59.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 (pow (hypot x.im x.re) y.re))
(t_3 (* t_1 t_2)))
(if (<= x.re -4.5e+88)
t_3
(if (<= x.re -1.5e-304)
(* (sin (fabs t_0)) t_2)
(if (<= x.re 9.2e-265)
t_3
(if (or (<= x.re 1.16e-184)
(and (not (<= x.re 2.15e-94)) (<= x.re 5.5e-40)))
(* t_1 (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im))))
(* t_2 (sin (+ t_0 (* 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 = 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 = t_1 * t_2;
double tmp;
if (x_46_re <= -4.5e+88) {
tmp = t_3;
} else if (x_46_re <= -1.5e-304) {
tmp = sin(fabs(t_0)) * t_2;
} else if (x_46_re <= 9.2e-265) {
tmp = t_3;
} else if ((x_46_re <= 1.16e-184) || (!(x_46_re <= 2.15e-94) && (x_46_re <= 5.5e-40))) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_2 * sin((t_0 + (y_46_im * log(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 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 = t_1 * t_2;
double tmp;
if (x_46_re <= -4.5e+88) {
tmp = t_3;
} else if (x_46_re <= -1.5e-304) {
tmp = Math.sin(Math.abs(t_0)) * t_2;
} else if (x_46_re <= 9.2e-265) {
tmp = t_3;
} else if ((x_46_re <= 1.16e-184) || (!(x_46_re <= 2.15e-94) && (x_46_re <= 5.5e-40))) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_2 * Math.sin((t_0 + (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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_1 * t_2 tmp = 0 if x_46_re <= -4.5e+88: tmp = t_3 elif x_46_re <= -1.5e-304: tmp = math.sin(math.fabs(t_0)) * t_2 elif x_46_re <= 9.2e-265: tmp = t_3 elif (x_46_re <= 1.16e-184) or (not (x_46_re <= 2.15e-94) and (x_46_re <= 5.5e-40)): tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) else: tmp = t_2 * math.sin((t_0 + (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(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 = Float64(t_1 * t_2) tmp = 0.0 if (x_46_re <= -4.5e+88) tmp = t_3; elseif (x_46_re <= -1.5e-304) tmp = Float64(sin(abs(t_0)) * t_2); elseif (x_46_re <= 9.2e-265) tmp = t_3; elseif ((x_46_re <= 1.16e-184) || (!(x_46_re <= 2.15e-94) && (x_46_re <= 5.5e-40))) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(t_2 * sin(Float64(t_0 + 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 = y_46_re * atan2(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 = t_1 * t_2; tmp = 0.0; if (x_46_re <= -4.5e+88) tmp = t_3; elseif (x_46_re <= -1.5e-304) tmp = sin(abs(t_0)) * t_2; elseif (x_46_re <= 9.2e-265) tmp = t_3; elseif ((x_46_re <= 1.16e-184) || (~((x_46_re <= 2.15e-94)) && (x_46_re <= 5.5e-40))) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = t_2 * sin((t_0 + (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[(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[(t$95$1 * t$95$2), $MachinePrecision]}, If[LessEqual[x$46$re, -4.5e+88], t$95$3, If[LessEqual[x$46$re, -1.5e-304], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 9.2e-265], t$95$3, If[Or[LessEqual[x$46$re, 1.16e-184], And[N[Not[LessEqual[x$46$re, 2.15e-94]], $MachinePrecision], LessEqual[x$46$re, 5.5e-40]]], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := \sin t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t_1 \cdot t_2\\
\mathbf{if}\;x.re \leq -4.5 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.re \leq -1.5 \cdot 10^{-304}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_2\\
\mathbf{elif}\;x.re \leq 9.2 \cdot 10^{-265}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.re \leq 1.16 \cdot 10^{-184} \lor \neg \left(x.re \leq 2.15 \cdot 10^{-94}\right) \land x.re \leq 5.5 \cdot 10^{-40}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.5e88 or -1.5000000000000001e-304 < x.re < 9.1999999999999996e-265Initial program 25.0%
exp-diff23.2%
exp-to-pow23.2%
hypot-def23.2%
*-commutative23.2%
exp-prod23.2%
fma-def23.2%
hypot-def71.4%
*-commutative71.4%
Simplified71.4%
add-cube-cbrt65.7%
pow372.9%
fma-udef72.9%
*-commutative72.9%
*-commutative72.9%
fma-def72.9%
Applied egg-rr72.9%
Taylor expanded in y.im around 0 49.1%
unpow249.1%
unpow249.1%
hypot-def52.4%
Simplified52.4%
Taylor expanded in y.im around 0 51.3%
pow-base-151.3%
*-lft-identity51.3%
Simplified51.3%
if -4.5e88 < x.re < -1.5000000000000001e-304Initial program 47.3%
exp-diff39.6%
exp-to-pow39.6%
hypot-def39.6%
*-commutative39.6%
exp-prod39.6%
fma-def39.6%
hypot-def61.4%
*-commutative61.4%
Simplified61.4%
add-cube-cbrt63.8%
pow363.8%
fma-udef63.8%
*-commutative63.8%
*-commutative63.8%
fma-def63.8%
Applied egg-rr63.8%
Taylor expanded in y.im around 0 49.1%
unpow249.1%
unpow249.1%
hypot-def51.5%
Simplified51.5%
Taylor expanded in y.im around 0 46.1%
pow-base-146.1%
*-lft-identity46.1%
Simplified46.1%
*-commutative55.4%
add-sqr-sqrt28.4%
fabs-sqr28.4%
add-sqr-sqrt64.5%
Applied egg-rr52.6%
if 9.1999999999999996e-265 < x.re < 1.15999999999999998e-184 or 2.1499999999999999e-94 < x.re < 5.50000000000000002e-40Initial program 38.7%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in x.re around inf 59.4%
if 1.15999999999999998e-184 < x.re < 2.1499999999999999e-94 or 5.50000000000000002e-40 < x.re Initial program 45.1%
exp-diff44.0%
exp-to-pow44.0%
hypot-def44.0%
*-commutative44.0%
exp-prod42.8%
fma-def42.8%
hypot-def77.1%
*-commutative77.1%
Simplified77.1%
add-cube-cbrt75.6%
pow376.5%
fma-udef76.5%
*-commutative76.5%
*-commutative76.5%
fma-def76.5%
Applied egg-rr76.5%
Taylor expanded in y.im around 0 58.9%
unpow258.9%
unpow258.9%
hypot-def68.1%
Simplified68.1%
rem-cube-cbrt71.0%
rem-cbrt-cube35.6%
pow1/318.7%
pow-to-exp18.0%
pow-exp37.1%
Applied egg-rr37.1%
Taylor expanded in x.im around 0 68.0%
Final simplification58.6%
(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 (* y.im (log x.im)))))
(t_3 (sin t_1))
(t_4 (* t_3 (exp (- (* y.re (log x.im)) t_0))))
(t_5 (pow (hypot x.im x.re) y.re)))
(if (<= x.im -1.4e-178)
(* t_3 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3.6e-275)
(* (sin (fabs t_1)) t_5)
(if (<= x.im 9e-202)
t_4
(if (<= x.im 5.2e-163)
(* t_5 (sin (+ t_1 (* y.im (log x.re)))))
(if (<= x.im 4.2e-141)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_2)
(if (<= x.im 2.85e+75) (* t_5 t_2) t_4))))))))
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 + (y_46_im * log(x_46_im))));
double t_3 = sin(t_1);
double t_4 = t_3 * exp(((y_46_re * log(x_46_im)) - t_0));
double t_5 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_im <= -1.4e-178) {
tmp = t_3 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.6e-275) {
tmp = sin(fabs(t_1)) * t_5;
} else if (x_46_im <= 9e-202) {
tmp = t_4;
} else if (x_46_im <= 5.2e-163) {
tmp = t_5 * sin((t_1 + (y_46_im * log(x_46_re))));
} else if (x_46_im <= 4.2e-141) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_2;
} else if (x_46_im <= 2.85e+75) {
tmp = t_5 * t_2;
} else {
tmp = t_4;
}
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 + (y_46_im * Math.log(x_46_im))));
double t_3 = Math.sin(t_1);
double t_4 = t_3 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_5 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_im <= -1.4e-178) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.6e-275) {
tmp = Math.sin(Math.abs(t_1)) * t_5;
} else if (x_46_im <= 9e-202) {
tmp = t_4;
} else if (x_46_im <= 5.2e-163) {
tmp = t_5 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
} else if (x_46_im <= 4.2e-141) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_2;
} else if (x_46_im <= 2.85e+75) {
tmp = t_5 * t_2;
} else {
tmp = t_4;
}
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 + (y_46_im * math.log(x_46_im)))) t_3 = math.sin(t_1) t_4 = t_3 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_5 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_im <= -1.4e-178: tmp = t_3 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3.6e-275: tmp = math.sin(math.fabs(t_1)) * t_5 elif x_46_im <= 9e-202: tmp = t_4 elif x_46_im <= 5.2e-163: tmp = t_5 * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) elif x_46_im <= 4.2e-141: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_2 elif x_46_im <= 2.85e+75: tmp = t_5 * t_2 else: tmp = t_4 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(Float64(t_1 + Float64(y_46_im * log(x_46_im)))) t_3 = sin(t_1) t_4 = Float64(t_3 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))) t_5 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_im <= -1.4e-178) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3.6e-275) tmp = Float64(sin(abs(t_1)) * t_5); elseif (x_46_im <= 9e-202) tmp = t_4; elseif (x_46_im <= 5.2e-163) tmp = Float64(t_5 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); elseif (x_46_im <= 4.2e-141) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_2); elseif (x_46_im <= 2.85e+75) tmp = Float64(t_5 * t_2); else tmp = t_4; 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 + (y_46_im * log(x_46_im)))); t_3 = sin(t_1); t_4 = t_3 * exp(((y_46_re * log(x_46_im)) - t_0)); t_5 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_im <= -1.4e-178) tmp = t_3 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3.6e-275) tmp = sin(abs(t_1)) * t_5; elseif (x_46_im <= 9e-202) tmp = t_4; elseif (x_46_im <= 5.2e-163) tmp = t_5 * sin((t_1 + (y_46_im * log(x_46_re)))); elseif (x_46_im <= 4.2e-141) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_2; elseif (x_46_im <= 2.85e+75) tmp = t_5 * t_2; else tmp = t_4; 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[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$im, -1.4e-178], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.6e-275], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[x$46$im, 9e-202], t$95$4, If[LessEqual[x$46$im, 5.2e-163], N[(t$95$5 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.2e-141], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$im, 2.85e+75], N[(t$95$5 * t$95$2), $MachinePrecision], t$95$4]]]]]]]]]]]]
\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 \left(t_1 + y.im \cdot \log x.im\right)\\
t_3 := \sin t_1\\
t_4 := t_3 \cdot e^{y.re \cdot \log x.im - t_0}\\
t_5 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.im \leq -1.4 \cdot 10^{-178}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 3.6 \cdot 10^{-275}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot t_5\\
\mathbf{elif}\;x.im \leq 9 \cdot 10^{-202}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{-163}:\\
\;\;\;\;t_5 \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\mathbf{elif}\;x.im \leq 4.2 \cdot 10^{-141}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t_2\\
\mathbf{elif}\;x.im \leq 2.85 \cdot 10^{+75}:\\
\;\;\;\;t_5 \cdot t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if x.im < -1.4000000000000001e-178Initial program 45.0%
Taylor expanded in y.im around 0 55.3%
Taylor expanded in x.im around -inf 67.8%
mul-1-neg67.8%
Simplified67.8%
if -1.4000000000000001e-178 < x.im < 3.5999999999999997e-275Initial program 38.0%
exp-diff31.7%
exp-to-pow31.7%
hypot-def31.7%
*-commutative31.7%
exp-prod31.3%
fma-def31.3%
hypot-def59.4%
*-commutative59.4%
Simplified59.4%
add-cube-cbrt59.2%
pow362.3%
fma-udef62.3%
*-commutative62.3%
*-commutative62.3%
fma-def62.3%
Applied egg-rr62.3%
Taylor expanded in y.im around 0 50.7%
unpow250.7%
unpow250.7%
hypot-def56.6%
Simplified56.6%
Taylor expanded in y.im around 0 42.1%
pow-base-142.1%
*-lft-identity42.1%
Simplified42.1%
*-commutative47.8%
add-sqr-sqrt32.0%
fabs-sqr32.0%
add-sqr-sqrt54.1%
Applied egg-rr48.3%
if 3.5999999999999997e-275 < x.im < 9.00000000000000078e-202 or 2.8500000000000002e75 < x.im Initial program 27.8%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in x.re around 0 75.7%
if 9.00000000000000078e-202 < x.im < 5.20000000000000003e-163Initial program 33.5%
exp-diff33.5%
exp-to-pow33.5%
hypot-def33.5%
*-commutative33.5%
exp-prod22.5%
fma-def22.5%
hypot-def44.9%
*-commutative44.9%
Simplified44.9%
add-cube-cbrt34.8%
pow344.4%
fma-udef44.4%
*-commutative44.4%
*-commutative44.4%
fma-def44.4%
Applied egg-rr44.4%
Taylor expanded in y.im around 0 25.9%
unpow225.9%
unpow225.9%
hypot-def46.3%
Simplified46.3%
rem-cube-cbrt56.1%
rem-cbrt-cube12.4%
pow1/311.4%
pow-to-exp21.1%
pow-exp35.0%
Applied egg-rr35.0%
Taylor expanded in x.im around 0 55.9%
if 5.20000000000000003e-163 < x.im < 4.1999999999999999e-141Initial program 62.3%
exp-diff49.7%
exp-to-pow49.7%
hypot-def49.7%
*-commutative49.7%
exp-prod50.0%
fma-def50.0%
hypot-def75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in y.re around 0 63.2%
rec-exp62.9%
distribute-rgt-neg-in62.9%
Simplified63.3%
Taylor expanded in x.re around 0 53.4%
if 4.1999999999999999e-141 < x.im < 2.8500000000000002e75Initial program 47.5%
exp-diff40.7%
exp-to-pow40.7%
hypot-def40.7%
*-commutative40.7%
exp-prod40.7%
fma-def40.7%
hypot-def65.8%
*-commutative65.8%
Simplified65.8%
add-cube-cbrt67.7%
pow365.4%
fma-udef65.4%
*-commutative65.4%
*-commutative65.4%
fma-def65.4%
Applied egg-rr65.4%
Taylor expanded in y.im around 0 61.4%
unpow261.4%
unpow261.4%
hypot-def66.2%
Simplified66.2%
Taylor expanded in x.re around 0 57.0%
pow-base-157.0%
*-lft-identity57.0%
fma-def57.0%
Simplified57.0%
fma-udef57.0%
+-commutative57.0%
Applied egg-rr57.0%
Final simplification64.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -1.3e-112)
(* (sin t_0) (exp (- (* y.re (log (- x.re))) (* (atan2 x.im x.re) y.im))))
(if (<= x.re -2.2e-232)
(* (sin (fabs t_0)) t_1)
(if (<= x.re -1e-308)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(* t_1 (sin (+ t_0 (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -1.3e-112) {
tmp = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -2.2e-232) {
tmp = sin(fabs(t_0)) * t_1;
} else if (x_46_re <= -1e-308) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -1.3e-112) {
tmp = Math.sin(t_0) * Math.exp(((y_46_re * Math.log(-x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (x_46_re <= -2.2e-232) {
tmp = Math.sin(Math.abs(t_0)) * t_1;
} else if (x_46_re <= -1e-308) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else {
tmp = t_1 * Math.sin((t_0 + (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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_re <= -1.3e-112: tmp = math.sin(t_0) * math.exp(((y_46_re * math.log(-x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif x_46_re <= -2.2e-232: tmp = math.sin(math.fabs(t_0)) * t_1 elif x_46_re <= -1e-308: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) else: tmp = t_1 * math.sin((t_0 + (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(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -1.3e-112) tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (x_46_re <= -2.2e-232) tmp = Float64(sin(abs(t_0)) * t_1); elseif (x_46_re <= -1e-308) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); else tmp = Float64(t_1 * sin(Float64(t_0 + 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_re <= -1.3e-112) tmp = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); elseif (x_46_re <= -2.2e-232) tmp = sin(abs(t_0)) * t_1; elseif (x_46_re <= -1e-308) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); else tmp = t_1 * sin((t_0 + (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -1.3e-112], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.2e-232], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -1e-308], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -1.3 \cdot 10^{-112}:\\
\;\;\;\;\sin t_0 \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.re \leq -2.2 \cdot 10^{-232}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_1\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-308}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.29999999999999996e-112Initial program 37.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 73.4%
mul-1-neg73.4%
Simplified73.4%
if -1.29999999999999996e-112 < x.re < -2.20000000000000002e-232Initial program 27.6%
exp-diff22.0%
exp-to-pow22.0%
hypot-def22.0%
*-commutative22.0%
exp-prod22.0%
fma-def22.0%
hypot-def55.4%
*-commutative55.4%
Simplified55.4%
add-cube-cbrt60.7%
pow360.7%
fma-udef60.7%
*-commutative60.7%
*-commutative60.7%
fma-def60.7%
Applied egg-rr60.7%
Taylor expanded in y.im around 0 54.9%
unpow254.9%
unpow254.9%
hypot-def54.8%
Simplified54.8%
Taylor expanded in y.im around 0 45.5%
pow-base-145.5%
*-lft-identity45.5%
Simplified45.5%
*-commutative50.6%
add-sqr-sqrt28.1%
fabs-sqr28.1%
add-sqr-sqrt67.3%
Applied egg-rr62.3%
if -2.20000000000000002e-232 < x.re < -9.9999999999999991e-309Initial program 37.5%
exp-diff25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod25.0%
fma-def25.0%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.re around 0 50.6%
rec-exp50.6%
distribute-rgt-neg-in50.6%
Simplified50.6%
Taylor expanded in x.re around -inf 56.9%
if -9.9999999999999991e-309 < x.re Initial program 44.7%
exp-diff41.7%
exp-to-pow41.7%
hypot-def41.7%
*-commutative41.7%
exp-prod40.9%
fma-def40.9%
hypot-def76.6%
*-commutative76.6%
Simplified76.6%
add-cube-cbrt73.8%
pow373.7%
fma-udef73.7%
*-commutative73.7%
*-commutative73.7%
fma-def73.7%
Applied egg-rr73.7%
Taylor expanded in y.im around 0 53.0%
unpow253.0%
unpow253.0%
hypot-def64.3%
Simplified64.3%
rem-cube-cbrt66.6%
rem-cbrt-cube31.8%
pow1/316.0%
pow-to-exp15.4%
pow-exp31.9%
Applied egg-rr31.9%
Taylor expanded in x.im around 0 58.9%
Final simplification64.1%
(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)
(exp (- (* y.re (log (- x.re))) (* (atan2 x.im x.re) y.im)))))
(t_2 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -2.6e-112)
t_1
(if (<= x.re -4.2e-246)
(* (sin (fabs t_0)) t_2)
(if (<= x.re -2e-310) t_1 (* t_2 (sin (+ t_0 (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -2.6e-112) {
tmp = t_1;
} else if (x_46_re <= -4.2e-246) {
tmp = sin(fabs(t_0)) * t_2;
} else if (x_46_re <= -2e-310) {
tmp = t_1;
} else {
tmp = t_2 * sin((t_0 + (y_46_im * log(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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.exp(((y_46_re * Math.log(-x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -2.6e-112) {
tmp = t_1;
} else if (x_46_re <= -4.2e-246) {
tmp = Math.sin(Math.abs(t_0)) * t_2;
} else if (x_46_re <= -2e-310) {
tmp = t_1;
} else {
tmp = t_2 * Math.sin((t_0 + (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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.exp(((y_46_re * math.log(-x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_re <= -2.6e-112: tmp = t_1 elif x_46_re <= -4.2e-246: tmp = math.sin(math.fabs(t_0)) * t_2 elif x_46_re <= -2e-310: tmp = t_1 else: tmp = t_2 * math.sin((t_0 + (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(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -2.6e-112) tmp = t_1; elseif (x_46_re <= -4.2e-246) tmp = Float64(sin(abs(t_0)) * t_2); elseif (x_46_re <= -2e-310) tmp = t_1; else tmp = Float64(t_2 * sin(Float64(t_0 + 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0) * exp(((y_46_re * log(-x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_re <= -2.6e-112) tmp = t_1; elseif (x_46_re <= -4.2e-246) tmp = sin(abs(t_0)) * t_2; elseif (x_46_re <= -2e-310) tmp = t_1; else tmp = t_2 * sin((t_0 + (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -2.6e-112], t$95$1, If[LessEqual[x$46$re, -4.2e-246], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -2e-310], t$95$1, N[(t$95$2 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := \sin t_0 \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -2.6 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.re \leq -4.2 \cdot 10^{-246}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_2\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.59999999999999992e-112 or -4.19999999999999989e-246 < x.re < -1.999999999999994e-310Initial program 37.5%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in x.re around -inf 72.2%
mul-1-neg72.2%
Simplified72.2%
if -2.59999999999999992e-112 < x.re < -4.19999999999999989e-246Initial program 29.8%
exp-diff24.8%
exp-to-pow24.8%
hypot-def24.8%
*-commutative24.8%
exp-prod24.8%
fma-def24.8%
hypot-def54.8%
*-commutative54.8%
Simplified54.8%
add-cube-cbrt64.6%
pow359.6%
fma-udef59.6%
*-commutative59.6%
*-commutative59.6%
fma-def59.6%
Applied egg-rr59.6%
Taylor expanded in y.im around 0 49.6%
unpow249.6%
unpow249.6%
hypot-def49.5%
Simplified49.5%
Taylor expanded in y.im around 0 41.0%
pow-base-141.0%
*-lft-identity41.0%
Simplified41.0%
*-commutative45.5%
add-sqr-sqrt25.3%
fabs-sqr25.3%
add-sqr-sqrt65.6%
Applied egg-rr56.2%
if -1.999999999999994e-310 < x.re Initial program 44.7%
exp-diff41.7%
exp-to-pow41.7%
hypot-def41.7%
*-commutative41.7%
exp-prod40.9%
fma-def40.9%
hypot-def76.6%
*-commutative76.6%
Simplified76.6%
add-cube-cbrt73.8%
pow373.7%
fma-udef73.7%
*-commutative73.7%
*-commutative73.7%
fma-def73.7%
Applied egg-rr73.7%
Taylor expanded in y.im around 0 53.0%
unpow253.0%
unpow253.0%
hypot-def64.3%
Simplified64.3%
rem-cube-cbrt66.6%
rem-cbrt-cube31.8%
pow1/316.0%
pow-to-exp15.4%
pow-exp31.9%
Applied egg-rr31.9%
Taylor expanded in x.im around 0 58.9%
Final simplification64.1%
(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 (* (sin t_0) t_1)))
(if (<= x.re -2.2e+86)
t_2
(if (<= x.re -6.2e-304)
(* (sin (fabs t_0)) t_1)
(if (<= x.re 2.15e-275)
t_2
(* t_1 (sin (+ t_0 (* 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 = 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 = sin(t_0) * t_1;
double tmp;
if (x_46_re <= -2.2e+86) {
tmp = t_2;
} else if (x_46_re <= -6.2e-304) {
tmp = sin(fabs(t_0)) * t_1;
} else if (x_46_re <= 2.15e-275) {
tmp = t_2;
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(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 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.sin(t_0) * t_1;
double tmp;
if (x_46_re <= -2.2e+86) {
tmp = t_2;
} else if (x_46_re <= -6.2e-304) {
tmp = Math.sin(Math.abs(t_0)) * t_1;
} else if (x_46_re <= 2.15e-275) {
tmp = t_2;
} else {
tmp = t_1 * Math.sin((t_0 + (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 = 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.sin(t_0) * t_1 tmp = 0 if x_46_re <= -2.2e+86: tmp = t_2 elif x_46_re <= -6.2e-304: tmp = math.sin(math.fabs(t_0)) * t_1 elif x_46_re <= 2.15e-275: tmp = t_2 else: tmp = t_1 * math.sin((t_0 + (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(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(t_0) * t_1) tmp = 0.0 if (x_46_re <= -2.2e+86) tmp = t_2; elseif (x_46_re <= -6.2e-304) tmp = Float64(sin(abs(t_0)) * t_1); elseif (x_46_re <= 2.15e-275) tmp = t_2; else tmp = Float64(t_1 * sin(Float64(t_0 + 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin(t_0) * t_1; tmp = 0.0; if (x_46_re <= -2.2e+86) tmp = t_2; elseif (x_46_re <= -6.2e-304) tmp = sin(abs(t_0)) * t_1; elseif (x_46_re <= 2.15e-275) tmp = t_2; else tmp = t_1 * sin((t_0 + (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[(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[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[x$46$re, -2.2e+86], t$95$2, If[LessEqual[x$46$re, -6.2e-304], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2.15e-275], t$95$2, N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t_0 \cdot t_1\\
\mathbf{if}\;x.re \leq -2.2 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq -6.2 \cdot 10^{-304}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_1\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-275}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.20000000000000003e86 or -6.1999999999999997e-304 < x.re < 2.14999999999999988e-275Initial program 19.2%
exp-diff17.3%
exp-to-pow17.3%
hypot-def17.3%
*-commutative17.3%
exp-prod17.3%
fma-def17.3%
hypot-def69.2%
*-commutative69.2%
Simplified69.2%
add-cube-cbrt63.2%
pow371.0%
fma-udef71.0%
*-commutative71.0%
*-commutative71.0%
fma-def71.0%
Applied egg-rr71.0%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-def48.9%
Simplified48.9%
Taylor expanded in y.im around 0 49.4%
pow-base-149.4%
*-lft-identity49.4%
Simplified49.4%
if -2.20000000000000003e86 < x.re < -6.1999999999999997e-304Initial program 47.3%
exp-diff39.6%
exp-to-pow39.6%
hypot-def39.6%
*-commutative39.6%
exp-prod39.6%
fma-def39.6%
hypot-def61.4%
*-commutative61.4%
Simplified61.4%
add-cube-cbrt63.8%
pow363.8%
fma-udef63.8%
*-commutative63.8%
*-commutative63.8%
fma-def63.8%
Applied egg-rr63.8%
Taylor expanded in y.im around 0 49.1%
unpow249.1%
unpow249.1%
hypot-def51.5%
Simplified51.5%
Taylor expanded in y.im around 0 46.1%
pow-base-146.1%
*-lft-identity46.1%
Simplified46.1%
*-commutative55.4%
add-sqr-sqrt28.4%
fabs-sqr28.4%
add-sqr-sqrt64.5%
Applied egg-rr52.6%
if 2.14999999999999988e-275 < x.re Initial program 45.3%
exp-diff42.1%
exp-to-pow42.1%
hypot-def42.1%
*-commutative42.1%
exp-prod41.2%
fma-def41.2%
hypot-def75.5%
*-commutative75.5%
Simplified75.5%
add-cube-cbrt74.2%
pow374.1%
fma-udef74.1%
*-commutative74.1%
*-commutative74.1%
fma-def74.1%
Applied egg-rr74.1%
Taylor expanded in y.im around 0 53.1%
unpow253.1%
unpow253.1%
hypot-def64.2%
Simplified64.2%
rem-cube-cbrt65.7%
rem-cbrt-cube31.8%
pow1/316.0%
pow-to-exp15.4%
pow-exp32.6%
Applied egg-rr32.6%
Taylor expanded in x.im around 0 59.9%
Final simplification55.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -9.5e+85)
(* (sin t_0) t_1)
(if (<= x.re 2.5e-302)
(* (sin (fabs t_0)) t_1)
(if (<= x.re 2.4e-234)
(* t_1 (sin (+ t_0 (* y.im (log x.im)))))
(* t_1 (sin (+ t_0 (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -9.5e+85) {
tmp = sin(t_0) * t_1;
} else if (x_46_re <= 2.5e-302) {
tmp = sin(fabs(t_0)) * t_1;
} else if (x_46_re <= 2.4e-234) {
tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_im))));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -9.5e+85) {
tmp = Math.sin(t_0) * t_1;
} else if (x_46_re <= 2.5e-302) {
tmp = Math.sin(Math.abs(t_0)) * t_1;
} else if (x_46_re <= 2.4e-234) {
tmp = t_1 * Math.sin((t_0 + (y_46_im * Math.log(x_46_im))));
} else {
tmp = t_1 * Math.sin((t_0 + (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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_re <= -9.5e+85: tmp = math.sin(t_0) * t_1 elif x_46_re <= 2.5e-302: tmp = math.sin(math.fabs(t_0)) * t_1 elif x_46_re <= 2.4e-234: tmp = t_1 * math.sin((t_0 + (y_46_im * math.log(x_46_im)))) else: tmp = t_1 * math.sin((t_0 + (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(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -9.5e+85) tmp = Float64(sin(t_0) * t_1); elseif (x_46_re <= 2.5e-302) tmp = Float64(sin(abs(t_0)) * t_1); elseif (x_46_re <= 2.4e-234) tmp = Float64(t_1 * sin(Float64(t_0 + Float64(y_46_im * log(x_46_im))))); else tmp = Float64(t_1 * sin(Float64(t_0 + 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_re <= -9.5e+85) tmp = sin(t_0) * t_1; elseif (x_46_re <= 2.5e-302) tmp = sin(abs(t_0)) * t_1; elseif (x_46_re <= 2.4e-234) tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_im)))); else tmp = t_1 * sin((t_0 + (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -9.5e+85], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2.5e-302], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2.4e-234], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -9.5 \cdot 10^{+85}:\\
\;\;\;\;\sin t_0 \cdot t_1\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-302}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot t_1\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-234}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.49999999999999945e85Initial program 15.6%
exp-diff13.3%
exp-to-pow13.3%
hypot-def13.3%
*-commutative13.3%
exp-prod13.3%
fma-def13.3%
hypot-def64.4%
*-commutative64.4%
Simplified64.4%
add-cube-cbrt62.0%
pow370.9%
fma-udef70.9%
*-commutative70.9%
*-commutative70.9%
fma-def70.9%
Applied egg-rr70.9%
Taylor expanded in y.im around 0 43.4%
unpow243.4%
unpow243.4%
hypot-def45.4%
Simplified45.4%
Taylor expanded in y.im around 0 45.9%
pow-base-145.9%
*-lft-identity45.9%
Simplified45.9%
if -9.49999999999999945e85 < x.re < 2.50000000000000017e-302Initial program 48.1%
exp-diff40.6%
exp-to-pow40.6%
hypot-def40.6%
*-commutative40.6%
exp-prod40.6%
fma-def40.6%
hypot-def62.9%
*-commutative62.9%
Simplified62.9%
add-cube-cbrt63.9%
pow365.2%
fma-udef65.2%
*-commutative65.2%
*-commutative65.2%
fma-def65.2%
Applied egg-rr65.2%
Taylor expanded in y.im around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.im around 0 48.1%
pow-base-148.1%
*-lft-identity48.1%
Simplified48.1%
*-commutative57.1%
add-sqr-sqrt28.6%
fabs-sqr28.6%
add-sqr-sqrt64.6%
Applied egg-rr53.1%
if 2.50000000000000017e-302 < x.re < 2.3999999999999999e-234Initial program 49.9%
exp-diff49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.9%
fma-def49.9%
hypot-def87.4%
*-commutative87.4%
Simplified87.4%
add-cube-cbrt80.4%
pow374.2%
fma-udef74.2%
*-commutative74.2%
*-commutative74.2%
fma-def74.2%
Applied egg-rr74.2%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-def68.2%
Simplified68.2%
Taylor expanded in x.re around 0 56.5%
pow-base-156.5%
*-lft-identity56.5%
fma-def56.5%
Simplified56.5%
fma-udef56.5%
+-commutative56.5%
Applied egg-rr56.5%
if 2.3999999999999999e-234 < x.re Initial program 43.9%
exp-diff40.4%
exp-to-pow40.4%
hypot-def40.4%
*-commutative40.4%
exp-prod39.4%
fma-def39.4%
hypot-def74.7%
*-commutative74.7%
Simplified74.7%
add-cube-cbrt73.3%
pow373.2%
fma-udef73.2%
*-commutative73.2%
*-commutative73.2%
fma-def73.2%
Applied egg-rr73.2%
Taylor expanded in y.im around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def63.2%
Simplified63.2%
rem-cube-cbrt64.7%
rem-cbrt-cube31.5%
pow1/316.0%
pow-to-exp15.4%
pow-exp33.0%
Applied egg-rr33.0%
Taylor expanded in x.im around 0 61.3%
Final simplification55.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 40.6%
exp-diff36.3%
exp-to-pow36.3%
hypot-def36.3%
*-commutative36.3%
exp-prod35.9%
fma-def35.9%
hypot-def69.9%
*-commutative69.9%
Simplified69.9%
add-cube-cbrt68.8%
pow370.3%
fma-udef70.3%
*-commutative70.3%
*-commutative70.3%
fma-def70.3%
Applied egg-rr70.3%
Taylor expanded in y.im around 0 50.3%
unpow250.3%
unpow250.3%
hypot-def57.2%
Simplified57.2%
Taylor expanded in y.im around 0 45.2%
pow-base-145.2%
*-lft-identity45.2%
Simplified45.2%
Final simplification45.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow (hypot x.im x.re) y.re) (sin (* y.im (log x.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(x_46_im)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(x_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(x_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(x_46_im)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(x_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.im\right)
\end{array}
Initial program 40.6%
exp-diff36.3%
exp-to-pow36.3%
hypot-def36.3%
*-commutative36.3%
exp-prod35.9%
fma-def35.9%
hypot-def69.9%
*-commutative69.9%
Simplified69.9%
add-cube-cbrt68.8%
pow370.3%
fma-udef70.3%
*-commutative70.3%
*-commutative70.3%
fma-def70.3%
Applied egg-rr70.3%
Taylor expanded in y.im around 0 50.3%
unpow250.3%
unpow250.3%
hypot-def57.2%
Simplified57.2%
Taylor expanded in x.re around 0 27.5%
pow-base-127.5%
*-lft-identity27.5%
fma-def27.5%
Simplified27.5%
Taylor expanded in y.re around 0 20.4%
Final simplification20.4%
herbie shell --seed 2023318
(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)))))