
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= x.re -1.4e+140)
(*
(exp (- (* (log (- x.re)) y.re) (* (atan2 x.im x.re) y.im)))
(* y.im t_0))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (x_46_re <= -1.4e+140) {
tmp = exp(((log(-x_46_re) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * t_0);
} else {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_re <= -1.4e+140) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * t_0)); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.4e+140], N[(N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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)\\
\mathbf{if}\;x.re \leq -1.4 \cdot 10^{+140}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\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}
if x.re < -1.39999999999999991e140Initial program 2.9%
Taylor expanded in x.re around -inf 2.9%
mul-1-neg2.9%
Simplified2.9%
Taylor expanded in y.re around 0 5.9%
unpow25.9%
unpow25.9%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-define90.5%
Simplified90.5%
if -1.39999999999999991e140 < x.re Initial program 48.7%
cancel-sign-sub-inv48.7%
fma-define48.7%
hypot-define48.7%
distribute-lft-neg-in48.7%
distribute-rgt-neg-out48.7%
fma-define48.7%
hypot-define80.2%
*-commutative80.2%
Simplified80.2%
Final simplification81.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 (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)))
(sin (fabs t_0)))))
(if (<= y.re -1.02e-10)
t_2
(if (<= y.re 3.8e+23)
(* t_1 (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.re 2.1e+189) (* t_1 (pow (hypot x.im x.re) y.re)) 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(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))) * sin(fabs(t_0));
double tmp;
if (y_46_re <= -1.02e-10) {
tmp = t_2;
} else if (y_46_re <= 3.8e+23) {
tmp = t_1 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.1e+189) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) t_2 = 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(abs(t_0))) tmp = 0.0 if (y_46_re <= -1.02e-10) tmp = t_2; elseif (y_46_re <= 3.8e+23) tmp = Float64(t_1 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_re <= 2.1e+189) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[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[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.02e-10], t$95$2, If[LessEqual[y$46$re, 3.8e+23], N[(t$95$1 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e+189], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \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} \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{if}\;y.re \leq -1.02 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+23}:\\
\;\;\;\;t\_1 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+189}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.01999999999999997e-10 or 2.09999999999999992e189 < y.re Initial program 36.8%
Taylor expanded in y.im around 0 73.6%
*-commutative73.6%
add-sqr-sqrt47.2%
sqrt-unprod47.1%
pow247.1%
*-commutative47.1%
Applied egg-rr47.1%
unpow247.1%
rem-sqrt-square80.5%
Simplified80.5%
if -1.01999999999999997e-10 < y.re < 3.79999999999999975e23Initial program 44.3%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod41.1%
fma-define41.1%
hypot-define75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y.re around 0 77.7%
rec-exp77.7%
distribute-lft-neg-in77.7%
Simplified77.7%
if 3.79999999999999975e23 < y.re < 2.09999999999999992e189Initial program 51.5%
exp-diff36.4%
exp-to-pow36.4%
hypot-define36.4%
*-commutative36.4%
exp-prod36.4%
fma-define36.4%
hypot-define57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y.im around 0 69.9%
unpow269.9%
unpow269.9%
hypot-undefine69.9%
Simplified69.9%
Final simplification77.7%
(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 -1.02e-10)
(* t_1 (sin (fabs t_0)))
(if (<= y.re 1420000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* y.im (- (atan2 x.im x.re)))))
(* 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 <= -1.02e-10) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_re <= 1420000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} 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 <= -1.02e-10) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_re <= 1420000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); 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, -1.02e-10], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1420000.0], 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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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 -1.02 \cdot 10^{-10}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{elif}\;y.re \leq 1420000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\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 < -1.01999999999999997e-10Initial program 37.5%
Taylor expanded in y.im around 0 82.9%
*-commutative82.9%
add-sqr-sqrt53.2%
sqrt-unprod61.0%
pow261.0%
*-commutative61.0%
Applied egg-rr61.0%
unpow261.0%
rem-sqrt-square86.0%
Simplified86.0%
if -1.01999999999999997e-10 < y.re < 1.42e6Initial program 42.9%
exp-diff42.2%
exp-to-pow42.2%
hypot-define42.2%
*-commutative42.2%
exp-prod41.1%
fma-define41.1%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.re around 0 78.3%
rec-exp78.4%
distribute-lft-neg-in78.4%
Simplified78.4%
if 1.42e6 < y.re Initial program 47.5%
Taylor expanded in y.re around 0 45.9%
unpow221.4%
unpow221.4%
hypot-undefine29.7%
Simplified70.5%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.2e+38)
(* y.re (* (atan2 x.im x.re) (pow (exp (- y.im)) (atan2 x.im x.re))))
(if (<= y.im -11.8)
(* t_0 (sin (* y.im (log x.im))))
(if (<= y.im 3.35e+19)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.im x.re) y.re))
(* t_1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.2e+38) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_im <= -11.8) {
tmp = t_0 * sin((y_46_im * log(x_46_im)));
} else if (y_46_im <= 3.35e+19) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_1 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.2e+38) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); elseif (y_46_im <= -11.8) tmp = Float64(t_0 * sin(Float64(y_46_im * log(x_46_im)))); elseif (y_46_im <= 3.35e+19) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_1 * t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.2e+38], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -11.8], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.35e+19], 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.2 \cdot 10^{+38}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.im \leq -11.8:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq 3.35 \cdot 10^{+19}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -2.20000000000000006e38Initial program 34.6%
Taylor expanded in y.im around 0 51.3%
Taylor expanded in y.re around 0 58.2%
*-commutative58.2%
distribute-lft-neg-in58.2%
exp-prod59.8%
Simplified59.8%
if -2.20000000000000006e38 < y.im < -11.800000000000001Initial program 33.4%
Taylor expanded in y.re around 0 33.4%
unpow231.5%
unpow231.5%
hypot-undefine40.0%
Simplified58.7%
Taylor expanded in x.re around 0 58.0%
if -11.800000000000001 < y.im < 3.35e19Initial program 48.8%
exp-diff48.0%
exp-to-pow48.0%
hypot-define48.0%
*-commutative48.0%
exp-prod47.6%
fma-define47.6%
hypot-define88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y.im around 0 67.3%
unpow267.3%
unpow267.3%
hypot-undefine86.8%
Simplified86.8%
if 3.35e19 < y.im Initial program 38.5%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 66.5%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -800000.0)
(* t_0 t_1)
(if (<= y.re 4e+23)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* y.im (- (atan2 x.im x.re)))))
(* 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 <= -800000.0) {
tmp = t_0 * t_1;
} else if (y_46_re <= 4e+23) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} 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 <= -800000.0) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 4e+23) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); 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, -800000.0], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 4e+23], 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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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 -800000:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\end{array}
\end{array}
if y.re < -8e5Initial program 36.1%
Taylor expanded in y.im around 0 83.7%
Taylor expanded in y.re around 0 85.3%
if -8e5 < y.re < 3.9999999999999997e23Initial program 44.8%
exp-diff41.9%
exp-to-pow41.9%
hypot-define41.9%
*-commutative41.9%
exp-prod40.9%
fma-define40.9%
hypot-define75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y.re around 0 77.9%
rec-exp77.9%
distribute-lft-neg-in77.9%
Simplified77.9%
if 3.9999999999999997e23 < y.re Initial program 44.6%
Taylor expanded in y.im around 0 60.7%
Final simplification75.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_2 (log (- x.re)))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (* y.im (log (hypot x.re x.im)))))
(t_5 (* y.re (atan2 x.im x.re))))
(if (<= x.re -1.05e+140)
t_4
(if (<= x.re -2.9e-79)
(* t_3 (sin (+ t_5 (* t_2 y.im))))
(if (<= x.re -2.15e-187)
(* t_1 (sin t_5))
(if (<= x.re -2.4e-192)
(* t_3 (sin (* y.im (log x.im))))
(if (<= x.re -7.4e-238)
t_4
(if (<= x.re 2.15e-216)
(* t_5 t_1)
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = log(-x_46_re);
double t_3 = exp(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * (y_46_im * log(hypot(x_46_re, x_46_im)));
double t_5 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.05e+140) {
tmp = t_4;
} else if (x_46_re <= -2.9e-79) {
tmp = t_3 * sin((t_5 + (t_2 * y_46_im)));
} else if (x_46_re <= -2.15e-187) {
tmp = t_1 * sin(t_5);
} else if (x_46_re <= -2.4e-192) {
tmp = t_3 * sin((y_46_im * log(x_46_im)));
} else if (x_46_re <= -7.4e-238) {
tmp = t_4;
} else if (x_46_re <= 2.15e-216) {
tmp = t_5 * t_1;
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = 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 = Math.log(-x_46_re);
double t_3 = Math.exp(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
double t_5 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.05e+140) {
tmp = t_4;
} else if (x_46_re <= -2.9e-79) {
tmp = t_3 * Math.sin((t_5 + (t_2 * y_46_im)));
} else if (x_46_re <= -2.15e-187) {
tmp = t_1 * Math.sin(t_5);
} else if (x_46_re <= -2.4e-192) {
tmp = t_3 * Math.sin((y_46_im * Math.log(x_46_im)));
} else if (x_46_re <= -7.4e-238) {
tmp = t_4;
} else if (x_46_re <= 2.15e-216) {
tmp = t_5 * t_1;
} else {
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));
}
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.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_2 = math.log(-x_46_re) t_3 = math.exp(((t_2 * y_46_re) - t_0)) t_4 = t_3 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) t_5 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -1.05e+140: tmp = t_4 elif x_46_re <= -2.9e-79: tmp = t_3 * math.sin((t_5 + (t_2 * y_46_im))) elif x_46_re <= -2.15e-187: tmp = t_1 * math.sin(t_5) elif x_46_re <= -2.4e-192: tmp = t_3 * math.sin((y_46_im * math.log(x_46_im))) elif x_46_re <= -7.4e-238: tmp = t_4 elif x_46_re <= 2.15e-216: tmp = t_5 * t_1 else: 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)) 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 = 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 = log(Float64(-x_46_re)) t_3 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) t_5 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -1.05e+140) tmp = t_4; elseif (x_46_re <= -2.9e-79) tmp = Float64(t_3 * sin(Float64(t_5 + Float64(t_2 * y_46_im)))); elseif (x_46_re <= -2.15e-187) tmp = Float64(t_1 * sin(t_5)); elseif (x_46_re <= -2.4e-192) tmp = Float64(t_3 * sin(Float64(y_46_im * log(x_46_im)))); elseif (x_46_re <= -7.4e-238) tmp = t_4; elseif (x_46_re <= 2.15e-216) tmp = Float64(t_5 * t_1); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_2 = log(-x_46_re); t_3 = exp(((t_2 * y_46_re) - t_0)); t_4 = t_3 * (y_46_im * log(hypot(x_46_re, x_46_im))); t_5 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -1.05e+140) tmp = t_4; elseif (x_46_re <= -2.9e-79) tmp = t_3 * sin((t_5 + (t_2 * y_46_im))); elseif (x_46_re <= -2.15e-187) tmp = t_1 * sin(t_5); elseif (x_46_re <= -2.4e-192) tmp = t_3 * sin((y_46_im * log(x_46_im))); elseif (x_46_re <= -7.4e-238) tmp = t_4; elseif (x_46_re <= 2.15e-216) tmp = t_5 * t_1; else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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[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$2 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.05e+140], t$95$4, If[LessEqual[x$46$re, -2.9e-79], N[(t$95$3 * N[Sin[N[(t$95$5 + N[(t$95$2 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.15e-187], N[(t$95$1 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.4e-192], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -7.4e-238], t$95$4, If[LessEqual[x$46$re, 2.15e-216], N[(t$95$5 * t$95$1), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(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 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_2 := \log \left(-x.re\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
t_5 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -1.05 \cdot 10^{+140}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -2.9 \cdot 10^{-79}:\\
\;\;\;\;t\_3 \cdot \sin \left(t\_5 + t\_2 \cdot y.im\right)\\
\mathbf{elif}\;x.re \leq -2.15 \cdot 10^{-187}:\\
\;\;\;\;t\_1 \cdot \sin t\_5\\
\mathbf{elif}\;x.re \leq -2.4 \cdot 10^{-192}:\\
\;\;\;\;t\_3 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.re \leq -7.4 \cdot 10^{-238}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-216}:\\
\;\;\;\;t\_5 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.0500000000000001e140 or -2.3999999999999999e-192 < x.re < -7.40000000000000048e-238Initial program 13.3%
Taylor expanded in x.re around -inf 11.1%
mul-1-neg11.1%
Simplified11.1%
Taylor expanded in y.re around 0 13.3%
unpow213.3%
unpow213.3%
hypot-undefine64.5%
Simplified64.5%
Taylor expanded in y.im around 0 40.4%
+-commutative40.4%
unpow240.4%
unpow240.4%
hypot-define84.0%
Simplified84.0%
if -1.0500000000000001e140 < x.re < -2.9000000000000001e-79Initial program 61.2%
Taylor expanded in x.re around -inf 59.2%
mul-1-neg59.2%
Simplified59.2%
Taylor expanded in x.re around -inf 75.4%
mul-1-neg59.2%
Simplified75.4%
if -2.9000000000000001e-79 < x.re < -2.15e-187Initial program 69.4%
Taylor expanded in y.im around 0 82.9%
if -2.15e-187 < x.re < -2.3999999999999999e-192Initial program 39.1%
Taylor expanded in x.re around -inf 39.1%
mul-1-neg39.1%
Simplified39.1%
Taylor expanded in y.re around 0 39.1%
unpow239.1%
unpow239.1%
hypot-undefine89.1%
Simplified89.1%
Taylor expanded in x.re around 0 89.1%
if -7.40000000000000048e-238 < x.re < 2.1499999999999999e-216Initial program 44.8%
Taylor expanded in y.im around 0 72.8%
Taylor expanded in y.re around 0 76.2%
if 2.1499999999999999e-216 < x.re Initial program 40.3%
Taylor expanded in y.re around 0 36.6%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified54.8%
Taylor expanded in x.re around inf 66.7%
Final simplification74.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (- x.re)))
(t_2 (exp (- (* t_1 y.re) t_0)))
(t_3 (* y.re (atan2 x.im x.re))))
(if (<= x.re -6.9e+137)
(* t_2 (* y.im (log (hypot x.re x.im))))
(if (<= x.re -3e-82)
(* t_2 (sin (+ t_3 (* t_1 y.im))))
(if (<= x.re 2.2e-216)
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 = log(-x_46_re);
double t_2 = exp(((t_1 * y_46_re) - t_0));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6.9e+137) {
tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -3e-82) {
tmp = t_2 * sin((t_3 + (t_1 * y_46_im)));
} else if (x_46_re <= 2.2e-216) {
tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(-x_46_re);
double t_2 = Math.exp(((t_1 * y_46_re) - t_0));
double t_3 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6.9e+137) {
tmp = t_2 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -3e-82) {
tmp = t_2 * Math.sin((t_3 + (t_1 * y_46_im)));
} else if (x_46_re <= 2.2e-216) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
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));
}
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.log(-x_46_re) t_2 = math.exp(((t_1 * y_46_re) - t_0)) t_3 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -6.9e+137: tmp = t_2 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_re <= -3e-82: tmp = t_2 * math.sin((t_3 + (t_1 * y_46_im))) elif x_46_re <= 2.2e-216: tmp = t_3 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: 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)) 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 = log(Float64(-x_46_re)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - t_0)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -6.9e+137) tmp = Float64(t_2 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_re <= -3e-82) tmp = Float64(t_2 * sin(Float64(t_3 + Float64(t_1 * y_46_im)))); elseif (x_46_re <= 2.2e-216) tmp = Float64(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))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 = log(-x_46_re); t_2 = exp(((t_1 * y_46_re) - t_0)); t_3 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -6.9e+137) tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_re <= -3e-82) tmp = t_2 * sin((t_3 + (t_1 * y_46_im))); elseif (x_46_re <= 2.2e-216) tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.9e+137], N[(t$95$2 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3e-82], N[(t$95$2 * N[Sin[N[(t$95$3 + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.2e-216], N[(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]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(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 := \log \left(-x.re\right)\\
t_2 := e^{t\_1 \cdot y.re - t\_0}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6.9 \cdot 10^{+137}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq -3 \cdot 10^{-82}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_3 + t\_1 \cdot y.im\right)\\
\mathbf{elif}\;x.re \leq 2.2 \cdot 10^{-216}:\\
\;\;\;\;t\_3 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -6.90000000000000039e137Initial program 2.9%
Taylor expanded in x.re around -inf 2.9%
mul-1-neg2.9%
Simplified2.9%
Taylor expanded in y.re around 0 5.9%
unpow25.9%
unpow25.9%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-define90.5%
Simplified90.5%
if -6.90000000000000039e137 < x.re < -2.9999999999999999e-82Initial program 61.2%
Taylor expanded in x.re around -inf 59.2%
mul-1-neg59.2%
Simplified59.2%
Taylor expanded in x.re around -inf 75.4%
mul-1-neg59.2%
Simplified75.4%
if -2.9999999999999999e-82 < x.re < 2.1999999999999999e-216Initial program 53.4%
Taylor expanded in y.im around 0 66.8%
Taylor expanded in y.re around 0 69.8%
if 2.1999999999999999e-216 < x.re Initial program 40.3%
Taylor expanded in y.re around 0 36.6%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified54.8%
Taylor expanded in x.re around inf 66.7%
Final simplification72.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (exp (- (* (log (- x.re)) y.re) t_1))))
(if (<= x.re -2e+134)
(* t_2 (* y.im (log (hypot x.re x.im))))
(if (<= x.re -1e-90)
(* t_2 t_0)
(if (<= x.re 2.3e-216)
(*
(* y.re (atan2 x.im x.re))
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(* t_0 (exp (- (* y.re (log x.re)) t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = exp(((log(-x_46_re) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -2e+134) {
tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -1e-90) {
tmp = t_2 * t_0;
} else if (x_46_re <= 2.3e-216) {
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))))) - t_1));
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_re)) - t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -2e+134) {
tmp = t_2 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -1e-90) {
tmp = t_2 * t_0;
} else if (x_46_re <= 2.3e-216) {
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))))) - t_1));
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im t_2 = math.exp(((math.log(-x_46_re) * y_46_re) - t_1)) tmp = 0 if x_46_re <= -2e+134: tmp = t_2 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_re <= -1e-90: tmp = t_2 * t_0 elif x_46_re <= 2.3e-216: 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))))) - t_1)) else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_1)) tmp = 0.0 if (x_46_re <= -2e+134) tmp = Float64(t_2 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_re <= -1e-90) tmp = Float64(t_2 * t_0); elseif (x_46_re <= 2.3e-216) 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))))) - t_1))); else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = atan2(x_46_im, x_46_re) * y_46_im; t_2 = exp(((log(-x_46_re) * y_46_re) - t_1)); tmp = 0.0; if (x_46_re <= -2e+134) tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_re <= -1e-90) tmp = t_2 * t_0; elseif (x_46_re <= 2.3e-216) 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))))) - t_1)); else tmp = t_0 * exp(((y_46_re * log(x_46_re)) - t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e+134], N[(t$95$2 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1e-90], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 2.3e-216], 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$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := e^{\log \left(-x.re\right) \cdot y.re - t\_1}\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{+134}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-90}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-216}:\\
\;\;\;\;\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\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -1.99999999999999984e134Initial program 2.9%
Taylor expanded in x.re around -inf 2.9%
mul-1-neg2.9%
Simplified2.9%
Taylor expanded in y.re around 0 5.9%
unpow25.9%
unpow25.9%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-define90.5%
Simplified90.5%
if -1.99999999999999984e134 < x.re < -9.99999999999999995e-91Initial program 60.7%
Taylor expanded in x.re around -inf 58.8%
mul-1-neg58.8%
Simplified58.8%
Taylor expanded in y.re around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine69.7%
Simplified69.7%
if -9.99999999999999995e-91 < x.re < 2.29999999999999997e-216Initial program 53.6%
Taylor expanded in y.im around 0 68.8%
Taylor expanded in y.re around 0 72.0%
if 2.29999999999999997e-216 < x.re Initial program 40.3%
Taylor expanded in y.re around 0 36.6%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified54.8%
Taylor expanded in x.re around inf 66.7%
Final simplification71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (- (* (log (- x.re)) y.re) t_0))))
(if (<= x.re -2.05e+132)
(* t_1 (* y.im (log (hypot x.re x.im))))
(if (<= x.re -6e+32)
(* t_1 (sin (* y.im (- (log (/ -1.0 x.re))))))
(if (<= x.re 2.15e-216)
(*
(* y.re (atan2 x.im x.re))
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 = exp(((log(-x_46_re) * y_46_re) - t_0));
double tmp;
if (x_46_re <= -2.05e+132) {
tmp = t_1 * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -6e+32) {
tmp = t_1 * sin((y_46_im * -log((-1.0 / x_46_re))));
} else if (x_46_re <= 2.15e-216) {
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))))) - t_0));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_0));
double tmp;
if (x_46_re <= -2.05e+132) {
tmp = t_1 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -6e+32) {
tmp = t_1 * Math.sin((y_46_im * -Math.log((-1.0 / x_46_re))));
} else if (x_46_re <= 2.15e-216) {
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))))) - t_0));
} else {
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));
}
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.exp(((math.log(-x_46_re) * y_46_re) - t_0)) tmp = 0 if x_46_re <= -2.05e+132: tmp = t_1 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_re <= -6e+32: tmp = t_1 * math.sin((y_46_im * -math.log((-1.0 / x_46_re)))) elif x_46_re <= 2.15e-216: 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))))) - t_0)) else: 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)) 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 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_0)) tmp = 0.0 if (x_46_re <= -2.05e+132) tmp = Float64(t_1 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_re <= -6e+32) tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(-log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 2.15e-216) 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))))) - t_0))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 = exp(((log(-x_46_re) * y_46_re) - t_0)); tmp = 0.0; if (x_46_re <= -2.05e+132) tmp = t_1 * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_re <= -6e+32) tmp = t_1 * sin((y_46_im * -log((-1.0 / x_46_re)))); elseif (x_46_re <= 2.15e-216) 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))))) - t_0)); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.05e+132], N[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -6e+32], N[(t$95$1 * N[Sin[N[(y$46$im * (-N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.15e-216], 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], 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]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{\log \left(-x.re\right) \cdot y.re - t\_0}\\
\mathbf{if}\;x.re \leq -2.05 \cdot 10^{+132}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq -6 \cdot 10^{+32}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.re}\right)\right)\right)\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-216}:\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -2.04999999999999996e132Initial program 2.9%
Taylor expanded in x.re around -inf 2.9%
mul-1-neg2.9%
Simplified2.9%
Taylor expanded in y.re around 0 5.9%
unpow25.9%
unpow25.9%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-define90.5%
Simplified90.5%
if -2.04999999999999996e132 < x.re < -6e32Initial program 53.8%
Taylor expanded in x.re around -inf 53.8%
mul-1-neg53.8%
Simplified53.8%
Taylor expanded in y.re around 0 47.7%
unpow247.7%
unpow247.7%
hypot-undefine79.4%
Simplified79.4%
Taylor expanded in x.re around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-in80.5%
Simplified80.5%
if -6e32 < x.re < 2.1499999999999999e-216Initial program 57.6%
Taylor expanded in y.im around 0 65.4%
Taylor expanded in y.re around 0 67.7%
if 2.1499999999999999e-216 < x.re Initial program 40.3%
Taylor expanded in y.re around 0 36.6%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified54.8%
Taylor expanded in x.re around inf 66.7%
Final simplification71.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))))
(if (<= x.im -1.1e-54)
(* (sin t_1) (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3.4e-285)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -1.1e-54) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.4e-285) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.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 tmp;
if (x_46_im <= -1.1e-54) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.4e-285) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
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_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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_im <= -1.1e-54: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3.4e-285: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: 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_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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -1.1e-54) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3.4e-285) tmp = Float64(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))))) - t_0))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_im <= -1.1e-54) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3.4e-285) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1.1e-54], N[(N[Sin[t$95$1], $MachinePrecision] * 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.4e-285], N[(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] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -1.1 \cdot 10^{-54}:\\
\;\;\;\;\sin t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 3.4 \cdot 10^{-285}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -1.1e-54Initial program 33.1%
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.1e-54 < x.im < 3.3999999999999999e-285Initial program 57.8%
Taylor expanded in y.im around 0 52.8%
Taylor expanded in y.re around 0 56.3%
if 3.3999999999999999e-285 < x.im Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-define41.6%
hypot-define41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x.re around 0 69.2%
+-commutative69.2%
neg-mul-169.2%
unsub-neg69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in y.re around 0 36.7%
*-commutative36.7%
unpow236.7%
unpow236.7%
hypot-undefine69.4%
Simplified69.4%
Final simplification65.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (exp (- (* (log (- x.re)) y.re) t_1)))
(t_3 (* t_2 (* y.im (log (hypot x.re x.im))))))
(if (<= x.re -1.06e+107)
t_3
(if (<= x.re -6.5e-42)
(* t_2 t_0)
(if (<= x.re -2.5e-129)
t_3
(if (<= x.re -7e-151)
(* (pow (hypot x.im x.re) y.re) t_0)
(if (<= x.re -4e-310)
t_3
(* t_0 (exp (- (* y.re (log x.re)) t_1))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = exp(((log(-x_46_re) * y_46_re) - t_1));
double t_3 = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im)));
double tmp;
if (x_46_re <= -1.06e+107) {
tmp = t_3;
} else if (x_46_re <= -6.5e-42) {
tmp = t_2 * t_0;
} else if (x_46_re <= -2.5e-129) {
tmp = t_3;
} else if (x_46_re <= -7e-151) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else if (x_46_re <= -4e-310) {
tmp = t_3;
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_re)) - t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_1));
double t_3 = t_2 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
double tmp;
if (x_46_re <= -1.06e+107) {
tmp = t_3;
} else if (x_46_re <= -6.5e-42) {
tmp = t_2 * t_0;
} else if (x_46_re <= -2.5e-129) {
tmp = t_3;
} else if (x_46_re <= -7e-151) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else if (x_46_re <= -4e-310) {
tmp = t_3;
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im t_2 = math.exp(((math.log(-x_46_re) * y_46_re) - t_1)) t_3 = t_2 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) tmp = 0 if x_46_re <= -1.06e+107: tmp = t_3 elif x_46_re <= -6.5e-42: tmp = t_2 * t_0 elif x_46_re <= -2.5e-129: tmp = t_3 elif x_46_re <= -7e-151: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 elif x_46_re <= -4e-310: tmp = t_3 else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_1)) t_3 = Float64(t_2 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) tmp = 0.0 if (x_46_re <= -1.06e+107) tmp = t_3; elseif (x_46_re <= -6.5e-42) tmp = Float64(t_2 * t_0); elseif (x_46_re <= -2.5e-129) tmp = t_3; elseif (x_46_re <= -7e-151) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0); elseif (x_46_re <= -4e-310) tmp = t_3; else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = atan2(x_46_im, x_46_re) * y_46_im; t_2 = exp(((log(-x_46_re) * y_46_re) - t_1)); t_3 = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im))); tmp = 0.0; if (x_46_re <= -1.06e+107) tmp = t_3; elseif (x_46_re <= -6.5e-42) tmp = t_2 * t_0; elseif (x_46_re <= -2.5e-129) tmp = t_3; elseif (x_46_re <= -7e-151) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; elseif (x_46_re <= -4e-310) tmp = t_3; else tmp = t_0 * exp(((y_46_re * log(x_46_re)) - t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.06e+107], t$95$3, If[LessEqual[x$46$re, -6.5e-42], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, -2.5e-129], t$95$3, If[LessEqual[x$46$re, -7e-151], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, -4e-310], t$95$3, N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := e^{\log \left(-x.re\right) \cdot y.re - t\_1}\\
t_3 := t\_2 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{if}\;x.re \leq -1.06 \cdot 10^{+107}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -6.5 \cdot 10^{-42}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{elif}\;x.re \leq -2.5 \cdot 10^{-129}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -7 \cdot 10^{-151}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.re \leq -4 \cdot 10^{-310}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -1.06e107 or -6.4999999999999998e-42 < x.re < -2.50000000000000014e-129 or -6.99999999999999991e-151 < x.re < -3.999999999999988e-310Initial program 39.2%
Taylor expanded in x.re around -inf 35.8%
mul-1-neg35.8%
Simplified35.8%
Taylor expanded in y.re around 0 34.8%
unpow234.8%
unpow234.8%
hypot-undefine65.2%
Simplified65.2%
Taylor expanded in y.im around 0 48.0%
+-commutative48.0%
unpow248.0%
unpow248.0%
hypot-define73.1%
Simplified73.1%
if -1.06e107 < x.re < -6.4999999999999998e-42Initial program 52.9%
Taylor expanded in y.im around 0 62.5%
Taylor expanded in x.re around -inf 68.3%
mul-1-neg52.9%
Simplified68.3%
if -2.50000000000000014e-129 < x.re < -6.99999999999999991e-151Initial program 57.1%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-undefine100.0%
Simplified100.0%
if -3.999999999999988e-310 < x.re Initial program 41.5%
Taylor expanded in y.im around 0 48.4%
Taylor expanded in x.im around 0 52.8%
*-commutative52.8%
*-commutative52.8%
Simplified52.8%
Final simplification63.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (exp (- (* (log (- x.re)) y.re) t_1))))
(if (<= x.re -1e+141)
(* t_2 (* y.im (log (hypot x.re x.im))))
(if (<= x.re -4.4e+32)
(* t_2 (sin (* y.im (- (log (/ -1.0 x.re))))))
(if (<= x.re 1.8e-274)
(*
t_0
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(* (sin t_0) (exp (- (* y.re (log x.re)) t_1))))))))
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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = exp(((log(-x_46_re) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -1e+141) {
tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -4.4e+32) {
tmp = t_2 * sin((y_46_im * -log((-1.0 / x_46_re))));
} else if (x_46_re <= 1.8e-274) {
tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
} else {
tmp = sin(t_0) * exp(((y_46_re * log(x_46_re)) - 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -1e+141) {
tmp = t_2 * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_re <= -4.4e+32) {
tmp = t_2 * Math.sin((y_46_im * -Math.log((-1.0 / x_46_re))));
} else if (x_46_re <= 1.8e-274) {
tmp = t_0 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
} else {
tmp = Math.sin(t_0) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
}
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.atan2(x_46_im, x_46_re) * y_46_im t_2 = math.exp(((math.log(-x_46_re) * y_46_re) - t_1)) tmp = 0 if x_46_re <= -1e+141: tmp = t_2 * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_re <= -4.4e+32: tmp = t_2 * math.sin((y_46_im * -math.log((-1.0 / x_46_re)))) elif x_46_re <= 1.8e-274: tmp = t_0 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) else: tmp = math.sin(t_0) * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) 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(atan(x_46_im, x_46_re) * y_46_im) t_2 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_1)) tmp = 0.0 if (x_46_re <= -1e+141) tmp = Float64(t_2 * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_re <= -4.4e+32) tmp = Float64(t_2 * sin(Float64(y_46_im * Float64(-log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 1.8e-274) tmp = 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_1))); else tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); 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 = atan2(x_46_im, x_46_re) * y_46_im; t_2 = exp(((log(-x_46_re) * y_46_re) - t_1)); tmp = 0.0; if (x_46_re <= -1e+141) tmp = t_2 * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_re <= -4.4e+32) tmp = t_2 * sin((y_46_im * -log((-1.0 / x_46_re)))); elseif (x_46_re <= 1.8e-274) tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)); else tmp = sin(t_0) * exp(((y_46_re * log(x_46_re)) - 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1e+141], N[(t$95$2 * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -4.4e+32], N[(t$95$2 * N[Sin[N[(y$46$im * (-N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.8e-274], 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$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := e^{\log \left(-x.re\right) \cdot y.re - t\_1}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{+141}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq -4.4 \cdot 10^{+32}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.re}\right)\right)\right)\\
\mathbf{elif}\;x.re \leq 1.8 \cdot 10^{-274}:\\
\;\;\;\;t\_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -1.00000000000000002e141Initial program 2.9%
Taylor expanded in x.re around -inf 2.9%
mul-1-neg2.9%
Simplified2.9%
Taylor expanded in y.re around 0 5.9%
unpow25.9%
unpow25.9%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
hypot-define90.5%
Simplified90.5%
if -1.00000000000000002e141 < x.re < -4.40000000000000002e32Initial program 53.8%
Taylor expanded in x.re around -inf 53.8%
mul-1-neg53.8%
Simplified53.8%
Taylor expanded in y.re around 0 47.7%
unpow247.7%
unpow247.7%
hypot-undefine79.4%
Simplified79.4%
Taylor expanded in x.re around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-in80.5%
Simplified80.5%
if -4.40000000000000002e32 < x.re < 1.79999999999999991e-274Initial program 57.3%
Taylor expanded in y.im around 0 64.8%
Taylor expanded in y.re around 0 68.6%
if 1.79999999999999991e-274 < x.re Initial program 42.0%
Taylor expanded in y.im around 0 45.3%
Taylor expanded in x.im around 0 50.1%
*-commutative50.1%
*-commutative50.1%
Simplified50.1%
Final simplification64.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2e+44) (not (<= y.im 6.2e+46))) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2e+44) || !(y_46_im <= 6.2e+46)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2e+44) || !(y_46_im <= 6.2e+46)) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2e+44) or not (y_46_im <= 6.2e+46): tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2e+44) || !(y_46_im <= 6.2e+46)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2e+44) || ~((y_46_im <= 6.2e+46))) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2e+44], N[Not[LessEqual[y$46$im, 6.2e+46]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2 \cdot 10^{+44} \lor \neg \left(y.im \leq 6.2 \cdot 10^{+46}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -2.0000000000000002e44 or 6.1999999999999995e46 < y.im Initial program 34.7%
Taylor expanded in y.im around 0 55.2%
Taylor expanded in y.re around 0 61.9%
*-commutative61.9%
distribute-lft-neg-in61.9%
Simplified61.9%
if -2.0000000000000002e44 < y.im < 6.1999999999999995e46Initial program 48.3%
Taylor expanded in y.im around 0 49.3%
Taylor expanded in y.im around 0 47.4%
unpow247.4%
unpow247.4%
hypot-undefine53.4%
Simplified53.4%
Final simplification56.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.18e+41)
(* y.re (* (atan2 x.im x.re) (pow (exp (- y.im)) (atan2 x.im x.re))))
(if (<= y.im 1.1e+43)
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.18e+41) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 1.1e+43) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.18e+41) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(-y_46_im), Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 1.1e+43) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.18e+41: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(-y_46_im), math.atan2(x_46_im, x_46_re))) elif y_46_im <= 1.1e+43: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.18e+41) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); elseif (y_46_im <= 1.1e+43) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.18e+41) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(-y_46_im) ^ atan2(x_46_im, x_46_re))); elseif (y_46_im <= 1.1e+43) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.18e+41], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.1e+43], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.18 \cdot 10^{+41}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{+43}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.im < -1.17999999999999998e41Initial program 34.6%
Taylor expanded in y.im around 0 51.3%
Taylor expanded in y.re around 0 58.2%
*-commutative58.2%
distribute-lft-neg-in58.2%
exp-prod59.8%
Simplified59.8%
if -1.17999999999999998e41 < y.im < 1.1e43Initial program 48.3%
Taylor expanded in y.im around 0 49.3%
Taylor expanded in y.im around 0 47.4%
unpow247.4%
unpow247.4%
hypot-undefine53.4%
Simplified53.4%
if 1.1e43 < y.im Initial program 34.9%
Taylor expanded in y.im around 0 60.1%
Taylor expanded in y.re around 0 66.5%
*-commutative66.5%
distribute-lft-neg-in66.5%
Simplified66.5%
Final simplification57.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)
\end{array}
Initial program 42.7%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 37.2%
*-commutative37.2%
distribute-lft-neg-in37.2%
Simplified37.2%
Final simplification37.2%
(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) * 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 y.im}\right)
\end{array}
Initial program 42.7%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 37.2%
*-commutative37.2%
distribute-lft-neg-in37.2%
Simplified37.2%
add-log-exp37.2%
*-un-lft-identity37.2%
log-prod37.2%
metadata-eval37.2%
add-log-exp37.2%
add-sqr-sqrt17.2%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod9.2%
add-sqr-sqrt15.7%
Applied egg-rr15.7%
+-lft-identity15.7%
Simplified15.7%
Final simplification15.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (- 1.0 (* (atan2 x.im x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * (1.0 - (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) * (1.0d0 - (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) * (1.0 - (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) * (1.0 - (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) * Float64(1.0 - Float64(atan(x_46_im, x_46_re) * 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) * (1.0 - (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[(1.0 - 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 \left(1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\right)
\end{array}
Initial program 42.7%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 37.2%
*-commutative37.2%
distribute-lft-neg-in37.2%
Simplified37.2%
Taylor expanded in y.im around 0 12.9%
neg-mul-112.9%
unsub-neg12.9%
Simplified12.9%
Final simplification12.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 42.7%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 37.2%
*-commutative37.2%
distribute-lft-neg-in37.2%
Simplified37.2%
Taylor expanded in y.im around 0 11.0%
herbie shell --seed 2024086
(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)))))