
(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 16 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 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im)))
(t_3 (sin (fma t_2 y.im t_1))))
(if (<= y.re 3.3e+71)
(* (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im)))) t_3)
(if (<= y.re 1.2e+199)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (fabs t_1)))
(* t_3 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 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 t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = sin(fma(t_2, y_46_im, t_1));
double tmp;
if (y_46_re <= 3.3e+71) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_3;
} else if (y_46_re <= 1.2e+199) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(fabs(t_1));
} else {
tmp = t_3 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + 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)) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = sin(fma(t_2, y_46_im, t_1)) tmp = 0.0 if (y_46_re <= 3.3e+71) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_3); elseif (y_46_re <= 1.2e+199) 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(abs(t_1))); else tmp = Float64(t_3 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + 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]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 3.3e+71], N[(N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+199], 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[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + 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}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := \sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right)\\
\mathbf{if}\;y.re \leq 3.3 \cdot 10^{+71}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t_3\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+199}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t_0}\\
\end{array}
\end{array}
if y.re < 3.2999999999999998e71Initial program 41.1%
fma-neg41.1%
hypot-def41.1%
distribute-rgt-neg-out41.1%
fma-def40.6%
hypot-def84.2%
*-commutative84.2%
Simplified84.2%
if 3.2999999999999998e71 < y.re < 1.20000000000000007e199Initial program 36.8%
add-sqr-sqrt13.2%
sqrt-unprod28.9%
pow228.9%
Applied egg-rr28.9%
*-commutative28.9%
unpow228.9%
rem-sqrt-square42.1%
Simplified42.1%
Taylor expanded in y.im around 0 79.0%
if 1.20000000000000007e199 < y.re Initial program 41.7%
exp-diff33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
fma-def33.3%
hypot-def55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y.im around 0 80.6%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin (fma (log (hypot x.re x.im)) y.im t_2)))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))))
(if (<= y.re -3.3e+58)
(* t_2 t_4)
(if (<= y.re 6.5e+45)
(* t_3 (/ t_0 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 1.3e+199)
(* t_4 (sin (fabs t_2)))
(if (<= y.re 1e+266)
(* t_3 (/ t_0 (+ 1.0 t_1)))
(* t_4 (sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double tmp;
if (y_46_re <= -3.3e+58) {
tmp = t_2 * t_4;
} else if (y_46_re <= 6.5e+45) {
tmp = t_3 * (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.3e+199) {
tmp = t_4 * sin(fabs(t_2));
} else if (y_46_re <= 1e+266) {
tmp = t_3 * (t_0 / (1.0 + t_1));
} else {
tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) tmp = 0.0 if (y_46_re <= -3.3e+58) tmp = Float64(t_2 * t_4); elseif (y_46_re <= 6.5e+45) tmp = Float64(t_3 * Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1.3e+199) tmp = Float64(t_4 * sin(abs(t_2))); elseif (y_46_re <= 1e+266) tmp = Float64(t_3 * Float64(t_0 / Float64(1.0 + t_1))); else tmp = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = 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$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+58], N[(t$95$2 * t$95$4), $MachinePrecision], If[LessEqual[y$46$re, 6.5e+45], N[(t$95$3 * N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.3e+199], N[(t$95$4 * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e+266], N[(t$95$3 * N[(t$95$0 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_2\right)\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1}\\
\mathbf{if}\;y.re \leq -3.3 \cdot 10^{+58}:\\
\;\;\;\;t_2 \cdot t_4\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+45}:\\
\;\;\;\;t_3 \cdot \frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+199}:\\
\;\;\;\;t_4 \cdot \sin \left(\left|t_2\right|\right)\\
\mathbf{elif}\;y.re \leq 10^{+266}:\\
\;\;\;\;t_3 \cdot \frac{t_0}{1 + t_1}\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.29999999999999983e58Initial program 41.8%
Taylor expanded in y.im around 0 85.5%
Taylor expanded in y.re around 0 85.5%
if -3.29999999999999983e58 < y.re < 6.50000000000000034e45Initial program 40.5%
exp-diff38.9%
exp-to-pow38.9%
hypot-def38.9%
*-commutative38.9%
exp-prod38.3%
fma-def38.3%
hypot-def81.5%
*-commutative81.5%
Simplified81.5%
if 6.50000000000000034e45 < y.re < 1.3000000000000001e199Initial program 38.1%
add-sqr-sqrt16.7%
sqrt-unprod31.0%
pow231.0%
Applied egg-rr31.0%
*-commutative31.0%
unpow231.0%
rem-sqrt-square42.9%
Simplified42.9%
Taylor expanded in y.im around 0 73.9%
if 1.3000000000000001e199 < y.re < 1e266Initial program 57.1%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
fma-def42.9%
hypot-def57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.im around 0 90.5%
if 1e266 < y.re Initial program 20.0%
Taylor expanded in y.re around 0 40.0%
unpow226.7%
unpow226.7%
hypot-def40.0%
Simplified86.7%
Final simplification82.2%
(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 (fma (log (hypot x.re x.im)) y.im t_1)))
(t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_4 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -1.98e-10)
(* t_3 (sin (+ t_1 (fabs t_4))))
(if (<= y.re 3000000.0)
(* t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.5e+199)
(* t_3 (sin (fabs t_1)))
(if (<= y.re 2e+268)
(* t_2 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(* t_3 (sin 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(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_4 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -1.98e-10) {
tmp = t_3 * sin((t_1 + fabs(t_4)));
} else if (y_46_re <= 3000000.0) {
tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.5e+199) {
tmp = t_3 * sin(fabs(t_1));
} else if (y_46_re <= 2e+268) {
tmp = t_2 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else {
tmp = t_3 * sin(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(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) t_3 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_4 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -1.98e-10) tmp = Float64(t_3 * sin(Float64(t_1 + abs(t_4)))); elseif (y_46_re <= 3000000.0) tmp = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1.5e+199) tmp = Float64(t_3 * sin(abs(t_1))); elseif (y_46_re <= 2e+268) tmp = Float64(t_2 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); else tmp = Float64(t_3 * sin(t_4)); 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[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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]}, Block[{t$95$4 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.98e-10], N[(t$95$3 * N[Sin[N[(t$95$1 + N[Abs[t$95$4], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3000000.0], N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.5e+199], N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+268], N[(t$95$2 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[t$95$4], $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 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -1.98 \cdot 10^{-10}:\\
\;\;\;\;t_3 \cdot \sin \left(t_1 + \left|t_4\right|\right)\\
\mathbf{elif}\;y.re \leq 3000000:\\
\;\;\;\;t_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+199}:\\
\;\;\;\;t_3 \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+268}:\\
\;\;\;\;t_2 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t_0}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin t_4\\
\end{array}
\end{array}
if y.re < -1.9799999999999999e-10Initial program 42.4%
add-sqr-sqrt24.2%
sqrt-unprod27.2%
pow227.2%
*-commutative27.2%
hypot-udef63.7%
Applied egg-rr63.7%
unpow263.7%
rem-sqrt-square84.9%
hypot-def43.9%
unpow243.9%
unpow243.9%
+-commutative43.9%
unpow243.9%
unpow243.9%
hypot-def84.9%
Simplified84.9%
if -1.9799999999999999e-10 < y.re < 3e6Initial program 37.9%
fma-neg37.9%
hypot-def37.9%
distribute-rgt-neg-out37.9%
fma-def37.9%
hypot-def82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 79.8%
neg-mul-179.8%
*-commutative79.8%
distribute-rgt-neg-in79.8%
Simplified79.8%
if 3e6 < y.re < 1.5e199Initial program 42.9%
add-sqr-sqrt16.3%
sqrt-unprod34.7%
pow234.7%
Applied egg-rr34.7%
*-commutative34.7%
unpow234.7%
rem-sqrt-square44.9%
Simplified44.9%
Taylor expanded in y.im around 0 73.6%
if 1.5e199 < y.re < 1.9999999999999999e268Initial program 57.1%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
fma-def42.9%
hypot-def57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.im around 0 90.5%
if 1.9999999999999999e268 < y.re Initial program 20.0%
Taylor expanded in y.re around 0 40.0%
unpow226.7%
unpow226.7%
hypot-def40.0%
Simplified86.7%
Final simplification81.2%
(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 (fma (log (hypot x.re x.im)) y.im t_1)))
(t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -0.00175)
(* t_1 t_3)
(if (<= y.re 3400000.0)
(* t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.5e+199)
(* t_3 (sin (fabs t_1)))
(if (<= y.re 6.2e+264)
(* t_2 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(* t_3 (sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
double t_3 = 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 <= -0.00175) {
tmp = t_1 * t_3;
} else if (y_46_re <= 3400000.0) {
tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.5e+199) {
tmp = t_3 * sin(fabs(t_1));
} else if (y_46_re <= 6.2e+264) {
tmp = t_2 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else {
tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) t_3 = 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 <= -0.00175) tmp = Float64(t_1 * t_3); elseif (y_46_re <= 3400000.0) tmp = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1.5e+199) tmp = Float64(t_3 * sin(abs(t_1))); elseif (y_46_re <= 6.2e+264) tmp = Float64(t_2 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); else tmp = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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, -0.00175], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 3400000.0], N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.5e+199], N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+264], N[(t$95$2 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)\\
t_3 := 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 -0.00175:\\
\;\;\;\;t_1 \cdot t_3\\
\mathbf{elif}\;y.re \leq 3400000:\\
\;\;\;\;t_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+199}:\\
\;\;\;\;t_3 \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+264}:\\
\;\;\;\;t_2 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t_0}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -0.00175000000000000004Initial program 42.8%
Taylor expanded in y.im around 0 84.2%
Taylor expanded in y.re around 0 84.2%
if -0.00175000000000000004 < y.re < 3.4e6Initial program 37.8%
fma-neg37.8%
hypot-def37.8%
distribute-rgt-neg-out37.8%
fma-def37.8%
hypot-def81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 78.8%
neg-mul-178.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if 3.4e6 < y.re < 1.5e199Initial program 42.9%
add-sqr-sqrt16.3%
sqrt-unprod34.7%
pow234.7%
Applied egg-rr34.7%
*-commutative34.7%
unpow234.7%
rem-sqrt-square44.9%
Simplified44.9%
Taylor expanded in y.im around 0 73.6%
if 1.5e199 < y.re < 6.19999999999999962e264Initial program 57.1%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
fma-def42.9%
hypot-def57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.im around 0 90.5%
if 6.19999999999999962e264 < y.re Initial program 20.0%
Taylor expanded in y.re around 0 40.0%
unpow226.7%
unpow226.7%
hypot-def40.0%
Simplified86.7%
Final simplification80.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 (fma (log (hypot x.re x.im)) y.im t_0)))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -0.00175)
(* t_0 t_2)
(if (<= y.re 3200000.0)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 3.9e+194)
(* t_2 (sin (fabs t_0)))
(* t_1 (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
double t_2 = 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 <= -0.00175) {
tmp = t_0 * t_2;
} else if (y_46_re <= 3200000.0) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 3.9e+194) {
tmp = t_2 * sin(fabs(t_0));
} else {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -0.00175) tmp = Float64(t_0 * t_2); elseif (y_46_re <= 3200000.0) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 3.9e+194) tmp = Float64(t_2 * sin(abs(t_0))); else tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00175], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 3200000.0], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.9e+194], N[(t$95$2 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right)\\
t_2 := 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 -0.00175:\\
\;\;\;\;t_0 \cdot t_2\\
\mathbf{elif}\;y.re \leq 3200000:\\
\;\;\;\;t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 3.9 \cdot 10^{+194}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -0.00175000000000000004Initial program 42.8%
Taylor expanded in y.im around 0 84.2%
Taylor expanded in y.re around 0 84.2%
if -0.00175000000000000004 < y.re < 3.2e6Initial program 37.8%
fma-neg37.8%
hypot-def37.8%
distribute-rgt-neg-out37.8%
fma-def37.8%
hypot-def81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 78.8%
neg-mul-178.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if 3.2e6 < y.re < 3.90000000000000016e194Initial program 40.4%
add-sqr-sqrt17.0%
sqrt-unprod36.2%
pow236.2%
Applied egg-rr36.2%
*-commutative36.2%
unpow236.2%
rem-sqrt-square42.6%
Simplified42.6%
Taylor expanded in y.im around 0 72.4%
if 3.90000000000000016e194 < y.re Initial program 44.7%
exp-diff36.8%
exp-to-pow36.8%
hypot-def36.8%
*-commutative36.8%
exp-prod36.8%
fma-def36.8%
hypot-def57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in y.im around 0 71.1%
unpow271.1%
unpow271.1%
hypot-def71.1%
Simplified71.1%
Final simplification77.8%
(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 -0.00039)
(* t_0 t_1)
(if (<= y.re 2e-8)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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 <= -0.00039) {
tmp = t_0 * t_1;
} else if (y_46_re <= 2e-8) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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 <= -0.00039) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 2e-8) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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, -0.00039], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2e-8], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
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 -0.00039:\\
\;\;\;\;t_0 \cdot t_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.89999999999999993e-4Initial program 42.8%
Taylor expanded in y.im around 0 84.2%
Taylor expanded in y.re around 0 84.2%
if -3.89999999999999993e-4 < y.re < 2e-8Initial program 37.0%
fma-neg37.0%
hypot-def37.0%
distribute-rgt-neg-out37.0%
fma-def37.0%
hypot-def81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.re around 0 79.1%
neg-mul-179.1%
*-commutative79.1%
distribute-rgt-neg-in79.1%
Simplified79.1%
if 2e-8 < y.re Initial program 43.2%
Taylor expanded in y.re around 0 50.0%
unpow219.4%
unpow219.4%
hypot-def29.6%
Simplified72.8%
Final simplification78.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re)))))
(t_1 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -7e+47)
(* y.re (* (atan2 x.im x.re) t_1))
(if (<= y.im 9.4e+92) (* t_0 (pow (hypot x.im x.re) y.re)) (* t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -7e+47) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_im <= 9.4e+92) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_im <= -7e+47) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_1)); elseif (y_46_im <= 9.4e+92) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -7e+47], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.4e+92], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{+47}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t_1\right)\\
\mathbf{elif}\;y.im \leq 9.4 \cdot 10^{+92}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot t_1\\
\end{array}
\end{array}
if y.im < -7.00000000000000031e47Initial program 39.7%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in y.re around 0 64.6%
*-commutative64.6%
distribute-rgt-neg-in64.6%
Simplified64.6%
if -7.00000000000000031e47 < y.im < 9.4000000000000001e92Initial program 41.0%
exp-diff39.0%
exp-to-pow39.0%
hypot-def39.0%
*-commutative39.0%
exp-prod38.8%
fma-def38.8%
hypot-def77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 65.2%
unpow265.2%
unpow265.2%
hypot-def82.7%
Simplified82.7%
if 9.4000000000000001e92 < y.im Initial program 40.4%
fma-neg40.4%
hypot-def40.4%
distribute-rgt-neg-out40.4%
fma-def40.4%
hypot-def76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.re around 0 63.9%
neg-mul-163.9%
*-commutative63.9%
distribute-rgt-neg-in63.9%
Simplified63.9%
Final simplification75.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.28e+47) (not (<= y.im 1.55e+119)))
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.28e+47) || !(y_46_im <= 1.55e+119)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.28e+47) || !(y_46_im <= 1.55e+119)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.28e+47], N[Not[LessEqual[y$46$im, 1.55e+119]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.28 \cdot 10^{+47} \lor \neg \left(y.im \leq 1.55 \cdot 10^{+119}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.2799999999999999e47 or 1.54999999999999998e119 < y.im Initial program 39.2%
Taylor expanded in y.im around 0 50.0%
Taylor expanded in y.re around 0 63.9%
*-commutative63.9%
distribute-rgt-neg-in63.9%
Simplified63.9%
if -1.2799999999999999e47 < y.im < 1.54999999999999998e119Initial program 41.5%
exp-diff39.5%
exp-to-pow39.5%
hypot-def39.5%
*-commutative39.5%
exp-prod39.3%
fma-def39.3%
hypot-def77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in y.im around 0 65.3%
unpow265.3%
unpow265.3%
hypot-def82.4%
Simplified82.4%
Final simplification75.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))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3
(*
t_0
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(t_4 (exp (- (* y.re (log (- x.re))) t_2))))
(if (<= x.re -5e+275)
(* t_4 t_1)
(if (<= x.re -1.05e+46)
(* (sin (* y.im (log (hypot x.im x.re)))) t_4)
(if (<= x.re -5e-187)
t_3
(if (<= x.re 2.8e-288)
(* t_1 (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
(if (<= x.re 1750000000.0)
t_3
(/
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re))
(exp t_2)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_4 = exp(((y_46_re * log(-x_46_re)) - t_2));
double tmp;
if (x_46_re <= -5e+275) {
tmp = t_4 * t_1;
} else if (x_46_re <= -1.05e+46) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_4;
} else if (x_46_re <= -5e-187) {
tmp = t_3;
} else if (x_46_re <= 2.8e-288) {
tmp = t_1 * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
} else if (x_46_re <= 1750000000.0) {
tmp = t_3;
} else {
tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / exp(t_2);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = t_0 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_4 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_2));
double tmp;
if (x_46_re <= -5e+275) {
tmp = t_4 * t_1;
} else if (x_46_re <= -1.05e+46) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_4;
} else if (x_46_re <= -5e-187) {
tmp = t_3;
} else if (x_46_re <= 2.8e-288) {
tmp = t_1 * Math.pow(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0))), y_46_re);
} else if (x_46_re <= 1750000000.0) {
tmp = t_3;
} else {
tmp = (Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re)) / Math.exp(t_2);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = t_0 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) t_4 = math.exp(((y_46_re * math.log(-x_46_re)) - t_2)) tmp = 0 if x_46_re <= -5e+275: tmp = t_4 * t_1 elif x_46_re <= -1.05e+46: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_4 elif x_46_re <= -5e-187: tmp = t_3 elif x_46_re <= 2.8e-288: tmp = t_1 * math.pow(math.sqrt((math.pow(x_46_re, 2.0) + math.pow(x_46_im, 2.0))), y_46_re) elif x_46_re <= 1750000000.0: tmp = t_3 else: tmp = (math.sin((t_0 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re)) / math.exp(t_2) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2))) t_4 = exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_2)) tmp = 0.0 if (x_46_re <= -5e+275) tmp = Float64(t_4 * t_1); elseif (x_46_re <= -1.05e+46) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_4); elseif (x_46_re <= -5e-187) tmp = t_3; elseif (x_46_re <= 2.8e-288) tmp = Float64(t_1 * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re)); elseif (x_46_re <= 1750000000.0) tmp = t_3; else tmp = Float64(Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_2)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)); t_4 = exp(((y_46_re * log(-x_46_re)) - t_2)); tmp = 0.0; if (x_46_re <= -5e+275) tmp = t_4 * t_1; elseif (x_46_re <= -1.05e+46) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_4; elseif (x_46_re <= -5e-187) tmp = t_3; elseif (x_46_re <= 2.8e-288) tmp = t_1 * (sqrt(((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re); elseif (x_46_re <= 1750000000.0) tmp = t_3; else tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_2); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5e+275], N[(t$95$4 * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -1.05e+46], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[x$46$re, -5e-187], t$95$3, If[LessEqual[x$46$re, 2.8e-288], N[(t$95$1 * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1750000000.0], t$95$3, N[(N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$2], $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
t_4 := e^{y.re \cdot \log \left(-x.re\right) - t_2}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{+275}:\\
\;\;\;\;t_4 \cdot t_1\\
\mathbf{elif}\;x.re \leq -1.05 \cdot 10^{+46}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_4\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-187}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.re \leq 2.8 \cdot 10^{-288}:\\
\;\;\;\;t_1 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 1750000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{e^{t_2}}\\
\end{array}
\end{array}
if x.re < -5.0000000000000003e275Initial program 0.0%
Taylor expanded in y.im around 0 15.0%
Taylor expanded in x.re around -inf 87.5%
mul-1-neg87.5%
Simplified87.5%
if -5.0000000000000003e275 < x.re < -1.05e46Initial program 13.5%
Taylor expanded in x.re around -inf 13.5%
mul-1-neg61.0%
Simplified13.5%
Taylor expanded in y.re around 0 18.9%
unpow218.9%
unpow218.9%
hypot-def78.6%
Simplified78.6%
if -1.05e46 < x.re < -4.9999999999999996e-187 or 2.7999999999999999e-288 < x.re < 1.75e9Initial program 54.2%
Taylor expanded in y.im around 0 62.1%
Taylor expanded in y.re around 0 70.5%
if -4.9999999999999996e-187 < x.re < 2.7999999999999999e-288Initial program 48.5%
exp-diff45.6%
exp-to-pow45.6%
hypot-def45.6%
*-commutative45.6%
exp-prod45.6%
fma-def45.6%
hypot-def85.5%
*-commutative85.5%
Simplified85.5%
add-cbrt-cube85.4%
add-cbrt-cube85.4%
cbrt-undiv85.4%
pow385.4%
pow385.4%
Applied egg-rr85.4%
hypot-def68.9%
unpow268.9%
unpow268.9%
+-commutative68.9%
unpow268.9%
unpow268.9%
hypot-def85.4%
exp-prod85.5%
*-commutative85.5%
exp-prod85.5%
Simplified85.5%
Taylor expanded in y.im around 0 58.1%
+-commutative58.1%
Simplified58.1%
if 1.75e9 < x.re Initial program 34.6%
exp-diff28.8%
exp-to-pow28.8%
hypot-def28.8%
*-commutative28.8%
exp-prod27.8%
fma-def27.8%
hypot-def64.6%
*-commutative64.6%
Simplified64.6%
add-cbrt-cube64.6%
add-cbrt-cube64.6%
cbrt-undiv64.6%
pow364.6%
pow364.6%
Applied egg-rr64.6%
hypot-def50.1%
unpow250.1%
unpow250.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-def64.6%
exp-prod68.9%
*-commutative68.9%
exp-prod67.6%
Simplified67.6%
Taylor expanded in x.im around 0 67.5%
Final simplification69.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (- x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3
(*
t_0
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2)))))
(if (<= x.re -7.2e+45)
(* (exp (- (* y.re t_1) t_2)) (sin (+ t_0 (* y.im t_1))))
(if (<= x.re -9e-189)
t_3
(if (<= x.re 8.5e-284)
(* (sin t_0) (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
(if (<= x.re 930000000.0)
t_3
(/
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re))
(exp t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_re <= -7.2e+45) {
tmp = exp(((y_46_re * t_1) - t_2)) * sin((t_0 + (y_46_im * t_1)));
} else if (x_46_re <= -9e-189) {
tmp = t_3;
} else if (x_46_re <= 8.5e-284) {
tmp = sin(t_0) * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
} else if (x_46_re <= 930000000.0) {
tmp = t_3;
} else {
tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / exp(t_2);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = log(-x_46re)
t_2 = atan2(x_46im, x_46re) * y_46im
t_3 = t_0 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_2))
if (x_46re <= (-7.2d+45)) then
tmp = exp(((y_46re * t_1) - t_2)) * sin((t_0 + (y_46im * t_1)))
else if (x_46re <= (-9d-189)) then
tmp = t_3
else if (x_46re <= 8.5d-284) then
tmp = sin(t_0) * (sqrt(((x_46re ** 2.0d0) + (x_46im ** 2.0d0))) ** y_46re)
else if (x_46re <= 930000000.0d0) then
tmp = t_3
else
tmp = (sin((t_0 + (y_46im * log(x_46re)))) * (x_46re ** y_46re)) / exp(t_2)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(-x_46_re);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = t_0 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_re <= -7.2e+45) {
tmp = Math.exp(((y_46_re * t_1) - t_2)) * Math.sin((t_0 + (y_46_im * t_1)));
} else if (x_46_re <= -9e-189) {
tmp = t_3;
} else if (x_46_re <= 8.5e-284) {
tmp = Math.sin(t_0) * Math.pow(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0))), y_46_re);
} else if (x_46_re <= 930000000.0) {
tmp = t_3;
} else {
tmp = (Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re)) / Math.exp(t_2);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.log(-x_46_re) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = t_0 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) tmp = 0 if x_46_re <= -7.2e+45: tmp = math.exp(((y_46_re * t_1) - t_2)) * math.sin((t_0 + (y_46_im * t_1))) elif x_46_re <= -9e-189: tmp = t_3 elif x_46_re <= 8.5e-284: tmp = math.sin(t_0) * math.pow(math.sqrt((math.pow(x_46_re, 2.0) + math.pow(x_46_im, 2.0))), y_46_re) elif x_46_re <= 930000000.0: tmp = t_3 else: tmp = (math.sin((t_0 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re)) / math.exp(t_2) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(Float64(-x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2))) tmp = 0.0 if (x_46_re <= -7.2e+45) tmp = Float64(exp(Float64(Float64(y_46_re * t_1) - t_2)) * sin(Float64(t_0 + Float64(y_46_im * t_1)))); elseif (x_46_re <= -9e-189) tmp = t_3; elseif (x_46_re <= 8.5e-284) tmp = Float64(sin(t_0) * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re)); elseif (x_46_re <= 930000000.0) tmp = t_3; else tmp = Float64(Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_2)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = log(-x_46_re); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)); tmp = 0.0; if (x_46_re <= -7.2e+45) tmp = exp(((y_46_re * t_1) - t_2)) * sin((t_0 + (y_46_im * t_1))); elseif (x_46_re <= -9e-189) tmp = t_3; elseif (x_46_re <= 8.5e-284) tmp = sin(t_0) * (sqrt(((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re); elseif (x_46_re <= 930000000.0) tmp = t_3; else tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_2); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -7.2e+45], N[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -9e-189], t$95$3, If[LessEqual[x$46$re, 8.5e-284], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 930000000.0], t$95$3, N[(N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(-x.re\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
\mathbf{if}\;x.re \leq -7.2 \cdot 10^{+45}:\\
\;\;\;\;e^{y.re \cdot t_1 - t_2} \cdot \sin \left(t_0 + y.im \cdot t_1\right)\\
\mathbf{elif}\;x.re \leq -9 \cdot 10^{-189}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{-284}:\\
\;\;\;\;\sin t_0 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 930000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{e^{t_2}}\\
\end{array}
\end{array}
if x.re < -7.2e45Initial program 11.1%
Taylor expanded in x.re around -inf 11.1%
mul-1-neg65.7%
Simplified11.1%
Taylor expanded in x.re around -inf 77.9%
mul-1-neg65.7%
Simplified77.9%
if -7.2e45 < x.re < -8.9999999999999992e-189 or 8.4999999999999995e-284 < x.re < 9.3e8Initial program 54.2%
Taylor expanded in y.im around 0 62.1%
Taylor expanded in y.re around 0 70.5%
if -8.9999999999999992e-189 < x.re < 8.4999999999999995e-284Initial program 48.5%
exp-diff45.6%
exp-to-pow45.6%
hypot-def45.6%
*-commutative45.6%
exp-prod45.6%
fma-def45.6%
hypot-def85.5%
*-commutative85.5%
Simplified85.5%
add-cbrt-cube85.4%
add-cbrt-cube85.4%
cbrt-undiv85.4%
pow385.4%
pow385.4%
Applied egg-rr85.4%
hypot-def68.9%
unpow268.9%
unpow268.9%
+-commutative68.9%
unpow268.9%
unpow268.9%
hypot-def85.4%
exp-prod85.5%
*-commutative85.5%
exp-prod85.5%
Simplified85.5%
Taylor expanded in y.im around 0 58.1%
+-commutative58.1%
Simplified58.1%
if 9.3e8 < x.re Initial program 34.6%
exp-diff28.8%
exp-to-pow28.8%
hypot-def28.8%
*-commutative28.8%
exp-prod27.8%
fma-def27.8%
hypot-def64.6%
*-commutative64.6%
Simplified64.6%
add-cbrt-cube64.6%
add-cbrt-cube64.6%
cbrt-undiv64.6%
pow364.6%
pow364.6%
Applied egg-rr64.6%
hypot-def50.1%
unpow250.1%
unpow250.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-def64.6%
exp-prod68.9%
*-commutative68.9%
exp-prod67.6%
Simplified67.6%
Taylor expanded in x.im around 0 67.5%
Final simplification69.3%
(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))
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(t_2
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.re -0.00018)
t_1
(if (<= y.re -2.15e-224)
t_2
(if (<= y.re 1.25e-183)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log (- x.re))) t_0)))
(if (<= y.re 3000000.0) t_2 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)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -0.00018) {
tmp = t_1;
} else if (y_46_re <= -2.15e-224) {
tmp = t_2;
} else if (y_46_re <= 1.25e-183) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (y_46_re <= 3000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -0.00018) {
tmp = t_1;
} else if (y_46_re <= -2.15e-224) {
tmp = t_2;
} else if (y_46_re <= 1.25e-183) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (y_46_re <= 3000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
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)) * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_2 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) tmp = 0 if y_46_re <= -0.00018: tmp = t_1 elif y_46_re <= -2.15e-224: tmp = t_2 elif y_46_re <= 1.25e-183: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif y_46_re <= 3000000.0: tmp = t_2 else: tmp = 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(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) t_2 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_re <= -0.00018) tmp = t_1; elseif (y_46_re <= -2.15e-224) tmp = t_2; elseif (y_46_re <= 1.25e-183) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (y_46_re <= 3000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_2 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); tmp = 0.0; if (y_46_re <= -0.00018) tmp = t_1; elseif (y_46_re <= -2.15e-224) tmp = t_2; elseif (y_46_re <= 1.25e-183) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (y_46_re <= 3000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00018], t$95$1, If[LessEqual[y$46$re, -2.15e-224], t$95$2, If[LessEqual[y$46$re, 1.25e-183], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3000000.0], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
t_2 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.re \leq -0.00018:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -2.15 \cdot 10^{-224}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{-183}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;y.re \leq 3000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -1.80000000000000011e-4 or 3e6 < y.re Initial program 42.6%
Taylor expanded in y.im around 0 69.0%
Taylor expanded in y.re around 0 72.4%
if -1.80000000000000011e-4 < y.re < -2.15e-224 or 1.2500000000000001e-183 < y.re < 3e6Initial program 38.4%
Taylor expanded in y.im around 0 32.2%
Taylor expanded in y.re around 0 55.9%
*-commutative55.9%
distribute-rgt-neg-in55.9%
Simplified55.9%
if -2.15e-224 < y.re < 1.2500000000000001e-183Initial program 36.7%
Taylor expanded in x.re around -inf 22.9%
mul-1-neg24.9%
Simplified22.9%
Taylor expanded in y.re around 0 20.6%
unpow220.6%
unpow220.6%
hypot-def49.0%
Simplified49.0%
Final simplification64.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -0.00105) (not (<= y.re 3000000.0)))
(*
(* y.re (atan2 x.im x.re))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.00105) || !(y_46_re <= 3000000.0)) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-0.00105d0)) .or. (.not. (y_46re <= 3000000.0d0))) then
tmp = (y_46re * atan2(x_46im, x_46re)) * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - (atan2(x_46im, x_46re) * y_46im)))
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.00105) || !(y_46_re <= 3000000.0)) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * 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)));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -0.00105) or not (y_46_re <= 3000000.0): tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * 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))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -0.00105) || !(y_46_re <= 3000000.0)) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * 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)))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -0.00105) || ~((y_46_re <= 3000000.0))) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -0.00105], N[Not[LessEqual[y$46$re, 3000000.0]], $MachinePrecision]], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.00105 \lor \neg \left(y.re \leq 3000000\right):\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -0.00104999999999999994 or 3e6 < y.re Initial program 42.6%
Taylor expanded in y.im around 0 69.0%
Taylor expanded in y.re around 0 72.4%
if -0.00104999999999999994 < y.re < 3e6Initial program 37.8%
Taylor expanded in y.im around 0 26.8%
Taylor expanded in y.re around 0 48.0%
*-commutative48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
Final simplification62.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -4e-310)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (or (<= x.im 5.4e-135) (not (<= x.im 1.2e-29)))
(* t_1 (exp (- (* y.re (log x.im)) t_0)))
(* t_1 (exp (- (* y.re (log x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -4e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if ((x_46_im <= 5.4e-135) || !(x_46_im <= 1.2e-29)) {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-4d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else if ((x_46im <= 5.4d-135) .or. (.not. (x_46im <= 1.2d-29))) then
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -4e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if ((x_46_im <= 5.4e-135) || !(x_46_im <= 1.2e-29)) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -4e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif (x_46_im <= 5.4e-135) or not (x_46_im <= 1.2e-29): tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -4e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif ((x_46_im <= 5.4e-135) || !(x_46_im <= 1.2e-29)) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -4e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif ((x_46_im <= 5.4e-135) || ~((x_46_im <= 1.2e-29))) tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -4e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 5.4e-135], N[Not[LessEqual[x$46$im, 1.2e-29]], $MachinePrecision]], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -4 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 5.4 \cdot 10^{-135} \lor \neg \left(x.im \leq 1.2 \cdot 10^{-29}\right):\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\end{array}
\end{array}
if x.im < -3.999999999999988e-310Initial program 41.9%
Taylor expanded in y.im around 0 49.6%
Taylor expanded in x.im around -inf 53.3%
mul-1-neg53.3%
Simplified53.3%
if -3.999999999999988e-310 < x.im < 5.39999999999999997e-135 or 1.19999999999999996e-29 < x.im Initial program 38.0%
Taylor expanded in y.im around 0 54.1%
Taylor expanded in x.re around 0 60.4%
*-commutative60.4%
*-commutative60.4%
Simplified60.4%
if 5.39999999999999997e-135 < x.im < 1.19999999999999996e-29Initial program 44.8%
Taylor expanded in y.im around 0 46.4%
Taylor expanded in x.im around 0 40.8%
*-commutative40.8%
Simplified40.8%
Final simplification55.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -2.2e-282)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.05e-179)
(* (exp (- (* y.re (log (- x.re))) t_0)) t_1)
(if (<= x.im 1.2e-29)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.2e-282) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.05e-179) {
tmp = exp(((y_46_re * log(-x_46_re)) - t_0)) * t_1;
} else if (x_46_im <= 1.2e-29) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-2.2d-282)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 1.05d-179) then
tmp = exp(((y_46re * log(-x_46re)) - t_0)) * t_1
else if (x_46im <= 1.2d-29) then
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.2e-282) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.05e-179) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0)) * t_1;
} else if (x_46_im <= 1.2e-29) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -2.2e-282: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.05e-179: tmp = math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) * t_1 elif x_46_im <= 1.2e-29: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -2.2e-282) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.05e-179) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0)) * t_1); elseif (x_46_im <= 1.2e-29) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -2.2e-282) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.05e-179) tmp = exp(((y_46_re * log(-x_46_re)) - t_0)) * t_1; elseif (x_46_im <= 1.2e-29) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2.2e-282], N[(t$95$1 * 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, 1.05e-179], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$im, 1.2e-29], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{-282}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.05 \cdot 10^{-179}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t_0} \cdot t_1\\
\mathbf{elif}\;x.im \leq 1.2 \cdot 10^{-29}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -2.19999999999999981e-282Initial program 42.5%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in x.im around -inf 54.6%
mul-1-neg54.6%
Simplified54.6%
if -2.19999999999999981e-282 < x.im < 1.0499999999999999e-179Initial program 33.9%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in x.re around -inf 46.9%
mul-1-neg46.9%
Simplified46.9%
if 1.0499999999999999e-179 < x.im < 1.19999999999999996e-29Initial program 46.3%
Taylor expanded in y.im around 0 47.8%
Taylor expanded in x.im around 0 40.2%
*-commutative40.2%
Simplified40.2%
if 1.19999999999999996e-29 < x.im Initial program 38.0%
Taylor expanded in y.im around 0 56.9%
Taylor expanded in x.re around 0 68.3%
*-commutative68.3%
*-commutative68.3%
Simplified68.3%
Final simplification55.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.re -1e-310)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(*
(sin (* y.re (atan2 x.im x.re)))
(exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -1e-310) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= (-1d-310)) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
else
tmp = sin((y_46re * atan2(x_46im, x_46re))) * exp(((y_46re * log(x_46re)) - (atan2(x_46im, x_46re) * y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -1e-310) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= -1e-310: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= -1e-310) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= -1e-310) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -1e-310], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if x.re < -9.999999999999969e-311Initial program 41.1%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in y.re around 0 44.6%
*-commutative44.6%
distribute-rgt-neg-in44.6%
Simplified44.6%
if -9.999999999999969e-311 < x.re Initial program 40.1%
Taylor expanded in y.im around 0 49.0%
Taylor expanded in x.im around 0 48.2%
*-commutative48.2%
Simplified48.2%
Final simplification46.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)
\end{array}
Initial program 40.6%
Taylor expanded in y.im around 0 51.2%
Taylor expanded in y.re around 0 38.8%
*-commutative38.8%
distribute-rgt-neg-in38.8%
Simplified38.8%
Final simplification38.8%
herbie shell --seed 2023308
(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)))))