
(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 20 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))))
(*
(exp
(-
(* (log (pow (exp (cbrt (pow t_0 2.0))) (cbrt t_0))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin
(+
(* y.im (log (pow (cbrt (hypot x.re x.im)) 3.0)))
(* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(((log(pow(exp(cbrt(pow(t_0, 2.0))), cbrt(t_0))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((y_46_im * log(pow(cbrt(hypot(x_46_re, x_46_im)), 3.0))) + (y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_re, x_46_im));
return Math.exp(((Math.log(Math.pow(Math.exp(Math.cbrt(Math.pow(t_0, 2.0))), Math.cbrt(t_0))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((y_46_im * Math.log(Math.pow(Math.cbrt(Math.hypot(x_46_re, x_46_im)), 3.0))) + (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) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(Float64(Float64(log((exp(cbrt((t_0 ^ 2.0))) ^ cbrt(t_0))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(y_46_im * log((cbrt(hypot(x_46_re, x_46_im)) ^ 3.0))) + Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(N[Log[N[Power[N[Exp[N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision], N[Power[t$95$0, 1/3], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$im * N[Log[N[Power[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\log \left({\left(e^{\sqrt[3]{{t_0}^{2}}}\right)}^{\left(\sqrt[3]{t_0}\right)}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left({\left(\sqrt[3]{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{3}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
\end{array}
Initial program 39.9%
hypot-udef58.9%
add-cube-cbrt58.9%
pow358.9%
Applied egg-rr58.9%
add-exp-log58.9%
hypot-udef78.8%
add-cube-cbrt78.8%
exp-prod78.8%
cbrt-unprod78.8%
pow278.8%
Applied egg-rr78.8%
Final simplification78.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(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[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 39.9%
Simplified78.8%
Final simplification78.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -3e+204)
(* (fabs t_1) (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.im -4.5e+165)
(* (exp (- (* t_0 y.re) t_2)) (sin (+ t_1 (* y.im (log x.im)))))
(if (or (<= y.im -7e+15) (not (<= y.im 3e+105)))
(* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re))))
(*
(sin (fma t_0 y.im t_1))
(/ (pow (hypot x.re x.im) y.re) (+ t_2 1.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -3e+204) {
tmp = fabs(t_1) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= -4.5e+165) {
tmp = exp(((t_0 * y_46_re) - t_2)) * sin((t_1 + (y_46_im * log(x_46_im))));
} else if ((y_46_im <= -7e+15) || !(y_46_im <= 3e+105)) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = sin(fma(t_0, y_46_im, t_1)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_2 + 1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -3e+204) tmp = Float64(abs(t_1) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= -4.5e+165) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - t_2)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif ((y_46_im <= -7e+15) || !(y_46_im <= 3e+105)) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_2 + 1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -3e+204], N[(N[Abs[t$95$1], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.5e+165], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -7e+15], N[Not[LessEqual[y$46$im, 3e+105]], $MachinePrecision]], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -3 \cdot 10^{+204}:\\
\;\;\;\;\left|t_1\right| \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{+165}:\\
\;\;\;\;e^{t_0 \cdot y.re - t_2} \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -7 \cdot 10^{+15} \lor \neg \left(y.im \leq 3 \cdot 10^{+105}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_2 + 1}\\
\end{array}
\end{array}
if y.im < -2.99999999999999983e204Initial program 47.1%
Taylor expanded in y.im around 0 71.0%
Taylor expanded in y.re around 0 82.4%
*-commutative82.4%
distribute-lft-neg-in82.4%
*-commutative82.4%
Simplified82.4%
*-commutative82.4%
add-sqr-sqrt52.9%
sqrt-unprod64.7%
pow264.7%
Applied egg-rr64.7%
*-commutative64.7%
unpow264.7%
rem-sqrt-square94.1%
Simplified94.1%
if -2.99999999999999983e204 < y.im < -4.4999999999999996e165Initial program 22.2%
Simplified49.0%
Taylor expanded in x.re around 0 57.9%
if -4.4999999999999996e165 < y.im < -7e15 or 3.0000000000000001e105 < y.im Initial program 32.5%
Taylor expanded in y.im around 0 58.2%
Taylor expanded in y.re around 0 64.2%
associate-*r*64.2%
exp-neg64.2%
associate-*l/64.2%
*-lft-identity64.2%
exp-prod66.5%
Simplified66.5%
if -7e15 < y.im < 3.0000000000000001e105Initial program 44.4%
exp-diff42.3%
+-rgt-identity42.3%
+-rgt-identity42.3%
exp-to-pow42.3%
hypot-def42.3%
exp-prod42.3%
fma-def42.3%
hypot-def80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 82.7%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.re -1e-310)
(*
(sin (fma t_1 y.im t_2))
(exp (- (* (log (/ -1.0 x.re)) (- y.re)) t_0)))
(* (exp (- (* t_1 y.re) t_0)) (sin (+ t_2 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1e-310) {
tmp = sin(fma(t_1, y_46_im, t_2)) * exp(((log((-1.0 / x_46_re)) * -y_46_re) - t_0));
} else {
tmp = exp(((t_1 * y_46_re) - t_0)) * sin((t_2 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -1e-310) tmp = Float64(sin(fma(t_1, y_46_im, t_2)) * exp(Float64(Float64(log(Float64(-1.0 / x_46_re)) * Float64(-y_46_re)) - t_0))); else tmp = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_0)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1e-310], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_2\right)\right) \cdot e^{\log \left(\frac{-1}{x.re}\right) \cdot \left(-y.re\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;e^{t_1 \cdot y.re - t_0} \cdot \sin \left(t_2 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.999999999999969e-311Initial program 37.4%
Simplified78.8%
Taylor expanded in x.re around -inf 75.0%
mul-1-neg75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
Simplified75.0%
if -9.999999999999969e-311 < x.re Initial program 42.4%
Simplified78.9%
Taylor expanded in x.im around 0 77.4%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (fabs t_1))
(t_4 (log (hypot x.re x.im))))
(if (<= y.im -2.5e+201)
(* t_3 (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.im -4.5e+165)
(* (exp (- (* t_4 y.re) t_2)) (sin (+ t_1 (* y.im (log x.im)))))
(if (<= y.im -1.12e+15)
t_0
(if (<= y.im 175000000000.0)
(* (sin (fma t_4 y.im t_1)) (pow (hypot x.re x.im) y.re))
(if (<= y.im 2e+139)
(*
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
(sin t_3))
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_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = fabs(t_1);
double t_4 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -2.5e+201) {
tmp = t_3 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= -4.5e+165) {
tmp = exp(((t_4 * y_46_re) - t_2)) * sin((t_1 + (y_46_im * log(x_46_im))));
} else if (y_46_im <= -1.12e+15) {
tmp = t_0;
} else if (y_46_im <= 175000000000.0) {
tmp = sin(fma(t_4, y_46_im, t_1)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 2e+139) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * sin(t_3);
} else {
tmp = 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) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = abs(t_1) t_4 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -2.5e+201) tmp = Float64(t_3 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= -4.5e+165) tmp = Float64(exp(Float64(Float64(t_4 * y_46_re) - t_2)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif (y_46_im <= -1.12e+15) tmp = t_0; elseif (y_46_im <= 175000000000.0) tmp = Float64(sin(fma(t_4, y_46_im, t_1)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 2e+139) 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_2)) * sin(t_3)); else tmp = 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] * N[(y$46$re / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Abs[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.5e+201], N[(t$95$3 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.5e+165], N[(N[Exp[N[(N[(t$95$4 * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.12e+15], t$95$0, If[LessEqual[y$46$im, 175000000000.0], N[(N[Sin[N[(t$95$4 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2e+139], 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$2), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := \left|t_1\right|\\
t_4 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+201}:\\
\;\;\;\;t_3 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{+165}:\\
\;\;\;\;e^{t_4 \cdot y.re - t_2} \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -1.12 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 175000000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_4, y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+139}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot \sin t_3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -2.4999999999999998e201Initial program 47.1%
Taylor expanded in y.im around 0 71.0%
Taylor expanded in y.re around 0 82.4%
*-commutative82.4%
distribute-lft-neg-in82.4%
*-commutative82.4%
Simplified82.4%
*-commutative82.4%
add-sqr-sqrt52.9%
sqrt-unprod64.7%
pow264.7%
Applied egg-rr64.7%
*-commutative64.7%
unpow264.7%
rem-sqrt-square94.1%
Simplified94.1%
if -2.4999999999999998e201 < y.im < -4.4999999999999996e165Initial program 22.2%
Simplified49.0%
Taylor expanded in x.re around 0 57.9%
if -4.4999999999999996e165 < y.im < -1.12e15 or 2.00000000000000007e139 < y.im Initial program 30.4%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 63.6%
associate-*r*63.6%
exp-neg63.6%
associate-*l/63.6%
*-lft-identity63.6%
exp-prod66.0%
Simplified66.0%
if -1.12e15 < y.im < 1.75e11Initial program 43.2%
exp-diff43.2%
+-rgt-identity43.2%
+-rgt-identity43.2%
exp-to-pow43.2%
hypot-def43.2%
exp-prod43.2%
fma-def43.2%
hypot-def85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 84.7%
if 1.75e11 < y.im < 2.00000000000000007e139Initial program 57.1%
Taylor expanded in y.im around 0 61.9%
*-commutative38.6%
add-sqr-sqrt19.3%
sqrt-unprod43.3%
pow243.3%
Applied egg-rr33.3%
*-commutative43.3%
unpow243.3%
rem-sqrt-square48.2%
Simplified81.0%
Final simplification78.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re)))))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -2.5e+201)
(* (fabs t_2) (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.im -2.9e+165)
(* (exp (- (* t_1 y.re) t_3)) (sin (+ t_2 (* y.im (log x.im)))))
(if (<= y.im -4e+15)
t_0
(if (<= y.im 0.0076)
(* (sin (fma t_1 y.im t_2)) (pow (hypot x.re x.im) y.re))
(if (<= y.im 2e+164)
(*
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_3))
(sin (* y.im (log (hypot x.im x.re)))))
t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * (y_46_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -2.5e+201) {
tmp = fabs(t_2) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= -2.9e+165) {
tmp = exp(((t_1 * y_46_re) - t_3)) * sin((t_2 + (y_46_im * log(x_46_im))));
} else if (y_46_im <= -4e+15) {
tmp = t_0;
} else if (y_46_im <= 0.0076) {
tmp = sin(fma(t_1, y_46_im, t_2)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 2e+164) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = 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) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -2.5e+201) tmp = Float64(abs(t_2) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= -2.9e+165) tmp = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_3)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_im))))); elseif (y_46_im <= -4e+15) tmp = t_0; elseif (y_46_im <= 0.0076) tmp = Float64(sin(fma(t_1, y_46_im, t_2)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 2e+164) 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_3)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = 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] * N[(y$46$re / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -2.5e+201], N[(N[Abs[t$95$2], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.9e+165], N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4e+15], t$95$0, If[LessEqual[y$46$im, 0.0076], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2e+164], 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$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+201}:\\
\;\;\;\;\left|t_2\right| \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq -2.9 \cdot 10^{+165}:\\
\;\;\;\;e^{t_1 \cdot y.re - t_3} \cdot \sin \left(t_2 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -4 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 0.0076:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+164}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_3} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -2.4999999999999998e201Initial program 47.1%
Taylor expanded in y.im around 0 71.0%
Taylor expanded in y.re around 0 82.4%
*-commutative82.4%
distribute-lft-neg-in82.4%
*-commutative82.4%
Simplified82.4%
*-commutative82.4%
add-sqr-sqrt52.9%
sqrt-unprod64.7%
pow264.7%
Applied egg-rr64.7%
*-commutative64.7%
unpow264.7%
rem-sqrt-square94.1%
Simplified94.1%
if -2.4999999999999998e201 < y.im < -2.90000000000000006e165Initial program 22.2%
Simplified49.0%
Taylor expanded in x.re around 0 57.9%
if -2.90000000000000006e165 < y.im < -4e15 or 2e164 < y.im Initial program 30.0%
Taylor expanded in y.im around 0 56.2%
Taylor expanded in y.re around 0 64.6%
associate-*r*64.6%
exp-neg64.6%
associate-*l/64.6%
*-lft-identity64.6%
exp-prod67.3%
Simplified67.3%
if -4e15 < y.im < 0.00759999999999999998Initial program 42.8%
exp-diff42.8%
+-rgt-identity42.8%
+-rgt-identity42.8%
exp-to-pow42.8%
hypot-def42.8%
exp-prod42.8%
fma-def42.8%
hypot-def85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 86.1%
if 0.00759999999999999998 < y.im < 2e164Initial program 51.0%
Taylor expanded in y.re around 0 51.0%
unpow251.0%
unpow251.0%
hypot-def71.7%
Simplified71.7%
Final simplification78.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.5e+201)
(* (fabs t_1) (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.im -4.5e+165)
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ t_1 (* y.im (log x.im)))))
(if (or (<= y.im -2.2e+17) (not (<= y.im 3.1e+105)))
(* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re))))
(* (sin (fma t_0 y.im t_1)) (pow (hypot x.re x.im) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.5e+201) {
tmp = fabs(t_1) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= -4.5e+165) {
tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_1 + (y_46_im * log(x_46_im))));
} else if ((y_46_im <= -2.2e+17) || !(y_46_im <= 3.1e+105)) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = sin(fma(t_0, y_46_im, t_1)) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.5e+201) tmp = Float64(abs(t_1) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= -4.5e+165) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif ((y_46_im <= -2.2e+17) || !(y_46_im <= 3.1e+105)) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * (hypot(x_46_re, x_46_im) ^ 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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.5e+201], N[(N[Abs[t$95$1], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.5e+165], 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[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -2.2e+17], N[Not[LessEqual[y$46$im, 3.1e+105]], $MachinePrecision]], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+201}:\\
\;\;\;\;\left|t_1\right| \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{+165}:\\
\;\;\;\;e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.im \leq -2.2 \cdot 10^{+17} \lor \neg \left(y.im \leq 3.1 \cdot 10^{+105}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.4999999999999998e201Initial program 47.1%
Taylor expanded in y.im around 0 71.0%
Taylor expanded in y.re around 0 82.4%
*-commutative82.4%
distribute-lft-neg-in82.4%
*-commutative82.4%
Simplified82.4%
*-commutative82.4%
add-sqr-sqrt52.9%
sqrt-unprod64.7%
pow264.7%
Applied egg-rr64.7%
*-commutative64.7%
unpow264.7%
rem-sqrt-square94.1%
Simplified94.1%
if -2.4999999999999998e201 < y.im < -4.4999999999999996e165Initial program 22.2%
Simplified49.0%
Taylor expanded in x.re around 0 57.9%
if -4.4999999999999996e165 < y.im < -2.2e17 or 3.10000000000000004e105 < y.im Initial program 32.5%
Taylor expanded in y.im around 0 58.2%
Taylor expanded in y.re around 0 64.2%
associate-*r*64.2%
exp-neg64.2%
associate-*l/64.2%
*-lft-identity64.2%
exp-prod66.5%
Simplified66.5%
if -2.2e17 < y.im < 3.10000000000000004e105Initial program 44.4%
exp-diff42.3%
+-rgt-identity42.3%
+-rgt-identity42.3%
exp-to-pow42.3%
hypot-def42.3%
exp-prod42.3%
fma-def42.3%
hypot-def80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 80.4%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.35e+14) (not (<= y.im 3.2e+105)))
(* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) 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.35e+14) || !(y_46_im <= 3.2e+105)) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} 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_re, x_46_im), 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.35e+14) || !(y_46_im <= 3.2e+105)) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); 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_re, x_46_im) ^ 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.35e+14], N[Not[LessEqual[y$46$im, 3.2e+105]], $MachinePrecision]], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $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$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+14} \lor \neg \left(y.im \leq 3.2 \cdot 10^{+105}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\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.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.35e14 or 3.2e105 < y.im Initial program 33.9%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.re around 0 64.5%
associate-*r*64.5%
exp-neg64.5%
associate-*l/64.5%
*-lft-identity64.5%
exp-prod66.3%
Simplified66.3%
if -1.35e14 < y.im < 3.2e105Initial program 44.4%
exp-diff42.3%
+-rgt-identity42.3%
+-rgt-identity42.3%
exp-to-pow42.3%
hypot-def42.3%
exp-prod42.3%
fma-def42.3%
hypot-def80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 80.4%
Final simplification74.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(/ (pow (hypot x.re x.im) y.re) (+ (* (atan2 x.im x.re) y.im) 1.0))
(sin (* y.im (log (hypot x.im x.re))))))
(t_1
(* (atan2 x.im x.re) (/ y.re (pow (exp y.im) (atan2 x.im x.re))))))
(if (<= y.im -2.4e+15)
t_1
(if (<= y.im -1.2e-272)
t_0
(if (<= y.im 9.6e-133)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(if (<= y.im 6.8e+105) 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 = (pow(hypot(x_46_re, x_46_im), y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.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_re / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -2.4e+15) {
tmp = t_1;
} else if (y_46_im <= -1.2e-272) {
tmp = t_0;
} else if (y_46_im <= 9.6e-133) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 6.8e+105) {
tmp = t_0;
} 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.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / ((Math.atan2(x_46_im, x_46_re) * y_46_im) + 1.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_re / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -2.4e+15) {
tmp = t_1;
} else if (y_46_im <= -1.2e-272) {
tmp = t_0;
} else if (y_46_im <= 9.6e-133) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 6.8e+105) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / ((math.atan2(x_46_im, x_46_re) * y_46_im) + 1.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_re / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -2.4e+15: tmp = t_1 elif y_46_im <= -1.2e-272: tmp = t_0 elif y_46_im <= 9.6e-133: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 6.8e+105: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -2.4e+15) tmp = t_1; elseif (y_46_im <= -1.2e-272) tmp = t_0; elseif (y_46_im <= 9.6e-133) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 6.8e+105) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((hypot(x_46_re, x_46_im) ^ y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = atan2(x_46_im, x_46_re) * (y_46_re / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -2.4e+15) tmp = t_1; elseif (y_46_im <= -1.2e-272) tmp = t_0; elseif (y_46_im <= 9.6e-133) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 6.8e+105) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / 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, -2.4e+15], t$95$1, If[LessEqual[y$46$im, -1.2e-272], t$95$0, If[LessEqual[y$46$im, 9.6e-133], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.8e+105], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1} \cdot \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 \frac{y.re}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.2 \cdot 10^{-272}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 9.6 \cdot 10^{-133}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 6.8 \cdot 10^{+105}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -2.4e15 or 6.7999999999999999e105 < y.im Initial program 33.9%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.re around 0 64.5%
associate-*r*64.5%
exp-neg64.5%
associate-*l/64.5%
*-lft-identity64.5%
exp-prod66.3%
Simplified66.3%
if -2.4e15 < y.im < -1.19999999999999995e-272 or 9.6e-133 < y.im < 6.7999999999999999e105Initial program 43.1%
exp-diff40.0%
+-rgt-identity40.0%
+-rgt-identity40.0%
exp-to-pow40.0%
hypot-def40.0%
exp-prod40.0%
fma-def40.0%
hypot-def75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.im around 0 79.2%
Taylor expanded in y.im around inf 39.6%
unpow239.6%
unpow239.6%
hypot-def71.4%
Simplified71.4%
if -1.19999999999999995e-272 < y.im < 9.6e-133Initial program 46.9%
Taylor expanded in y.im around 0 64.0%
Taylor expanded in y.im around 0 64.0%
unpow264.0%
unpow264.0%
hypot-def75.6%
Simplified75.6%
Final simplification70.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -6.2e-220)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 4.9e-306)
(* t_2 (pow (hypot x.im x.re) y.re))
(if (or (<= x.im 8.4e-222) (not (<= x.im 9e-18)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.im)) t_0)))
(*
t_1
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im 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 t_2 = sin(t_1);
double tmp;
if (x_46_im <= -6.2e-220) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 4.9e-306) {
tmp = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if ((x_46_im <= 8.4e-222) || !(x_46_im <= 9e-18)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * 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 t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -6.2e-220) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 4.9e-306) {
tmp = t_2 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if ((x_46_im <= 8.4e-222) || !(x_46_im <= 9e-18)) {
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));
} else {
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));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -6.2e-220: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 4.9e-306: tmp = t_2 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif (x_46_im <= 8.4e-222) or not (x_46_im <= 9e-18): 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)) else: 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)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -6.2e-220) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 4.9e-306) tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif ((x_46_im <= 8.4e-222) || !(x_46_im <= 9e-18)) 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))); else 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))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -6.2e-220) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 4.9e-306) tmp = t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif ((x_46_im <= 8.4e-222) || ~((x_46_im <= 9e-18))) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * 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]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -6.2e-220], N[(t$95$2 * 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, 4.9e-306], N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 8.4e-222], N[Not[LessEqual[x$46$im, 9e-18]], $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], 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]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.im \leq -6.2 \cdot 10^{-220}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 4.9 \cdot 10^{-306}:\\
\;\;\;\;t_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 8.4 \cdot 10^{-222} \lor \neg \left(x.im \leq 9 \cdot 10^{-18}\right):\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\end{array}
\end{array}
if x.im < -6.20000000000000023e-220Initial program 36.1%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.im around -inf 68.1%
mul-1-neg68.1%
Simplified68.1%
if -6.20000000000000023e-220 < x.im < 4.90000000000000025e-306Initial program 61.8%
Taylor expanded in y.im around 0 53.3%
Taylor expanded in y.im around 0 48.7%
unpow248.7%
unpow248.7%
hypot-def49.9%
Simplified49.9%
if 4.90000000000000025e-306 < x.im < 8.3999999999999996e-222 or 8.99999999999999987e-18 < x.im Initial program 32.9%
hypot-udef44.7%
add-cube-cbrt44.7%
pow344.7%
Applied egg-rr44.7%
add-exp-log44.7%
hypot-udef74.0%
add-cube-cbrt74.0%
exp-prod74.0%
cbrt-unprod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in y.re around 0 32.6%
unpow232.6%
unpow232.6%
hypot-def69.3%
Simplified69.3%
Taylor expanded in x.re around 0 66.9%
pow-base-166.9%
unpow166.9%
Simplified66.9%
if 8.3999999999999996e-222 < x.im < 8.99999999999999987e-18Initial program 52.2%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.re around 0 68.6%
Final simplification66.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)))
(t_2 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= x.re -1.65e-47)
(*
(sin t_1)
(exp (- (* y.re (log (- (* -0.5 (/ x.im (/ x.re x.im))) x.re))) t_0)))
(if (<= x.re -2.1e-112)
(* (fabs t_1) t_2)
(if (<= x.re -1.06e-223)
(* t_1 t_2)
(if (<= x.re 45000.0)
(*
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.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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.65e-47) {
tmp = sin(t_1) * exp(((y_46_re * log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0));
} else if (x_46_re <= -2.1e-112) {
tmp = fabs(t_1) * t_2;
} else if (x_46_re <= -1.06e-223) {
tmp = t_1 * t_2;
} else if (x_46_re <= 45000.0) {
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_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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.65e-47) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0));
} else if (x_46_re <= -2.1e-112) {
tmp = Math.abs(t_1) * t_2;
} else if (x_46_re <= -1.06e-223) {
tmp = t_1 * t_2;
} else if (x_46_re <= 45000.0) {
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_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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -1.65e-47: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0)) elif x_46_re <= -2.1e-112: tmp = math.fabs(t_1) * t_2 elif x_46_re <= -1.06e-223: tmp = t_1 * t_2 elif x_46_re <= 45000.0: 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_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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= -1.65e-47) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(Float64(-0.5 * Float64(x_46_im / Float64(x_46_re / x_46_im))) - x_46_re))) - t_0))); elseif (x_46_re <= -2.1e-112) tmp = Float64(abs(t_1) * t_2); elseif (x_46_re <= -1.06e-223) tmp = Float64(t_1 * t_2); elseif (x_46_re <= 45000.0) 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_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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -1.65e-47) tmp = sin(t_1) * exp(((y_46_re * log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0)); elseif (x_46_re <= -2.1e-112) tmp = abs(t_1) * t_2; elseif (x_46_re <= -1.06e-223) tmp = t_1 * t_2; elseif (x_46_re <= 45000.0) 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_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.65e-47], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[(N[(-0.5 * N[(x$46$im / N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.1e-112], N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -1.06e-223], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 45000.0], 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$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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;x.re \leq -1.65 \cdot 10^{-47}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \frac{x.im}{\frac{x.re}{x.im}} - x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.1 \cdot 10^{-112}:\\
\;\;\;\;\left|t_1\right| \cdot t_2\\
\mathbf{elif}\;x.re \leq -1.06 \cdot 10^{-223}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;x.re \leq 45000:\\
\;\;\;\;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.re - t_0}\\
\end{array}
\end{array}
if x.re < -1.65000000000000002e-47Initial program 29.6%
Taylor expanded in y.im around 0 53.5%
Taylor expanded in x.re around -inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
unpow264.1%
associate-/l*66.8%
Simplified66.8%
if -1.65000000000000002e-47 < x.re < -2.1000000000000001e-112Initial program 49.9%
Taylor expanded in y.im around 0 41.2%
Taylor expanded in y.re around 0 36.3%
*-commutative36.3%
distribute-lft-neg-in36.3%
*-commutative36.3%
Simplified36.3%
*-commutative36.3%
add-sqr-sqrt16.1%
sqrt-unprod50.0%
pow250.0%
Applied egg-rr50.0%
*-commutative50.0%
unpow250.0%
rem-sqrt-square61.4%
Simplified61.4%
if -2.1000000000000001e-112 < x.re < -1.05999999999999994e-223Initial program 52.6%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.re around 0 68.1%
*-commutative68.1%
distribute-lft-neg-in68.1%
*-commutative68.1%
Simplified68.1%
if -1.05999999999999994e-223 < x.re < 45000Initial program 48.7%
Taylor expanded in y.im around 0 64.5%
Taylor expanded in y.re around 0 63.2%
if 45000 < x.re Initial program 33.9%
hypot-udef52.3%
add-cube-cbrt52.4%
pow352.4%
Applied egg-rr52.4%
add-exp-log52.4%
hypot-udef76.2%
add-cube-cbrt76.3%
exp-prod76.3%
cbrt-unprod76.3%
pow276.3%
Applied egg-rr76.3%
Taylor expanded in y.re around 0 27.3%
unpow227.3%
unpow227.3%
hypot-def72.9%
Simplified72.9%
Taylor expanded in x.im around 0 72.9%
pow-base-172.9%
unpow172.9%
Simplified72.9%
Final simplification66.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= x.re -1.8e-48)
(*
(sin t_1)
(exp (- (* y.re (log (- (* -0.5 (/ x.im (/ x.re x.im))) x.re))) t_0)))
(if (<= x.re -2.6e-114)
(* (fabs t_1) t_2)
(if (<= x.re -8.2e-224)
(* t_1 t_2)
(if (<= x.re 2.45e-61)
(*
t_1
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(exp
(-
(+
(* 0.5 (/ y.re (* (/ x.re x.im) (/ x.re x.im))))
(* y.re (log x.re)))
t_0))
(sin (* y.im (log x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.8e-48) {
tmp = sin(t_1) * exp(((y_46_re * log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0));
} else if (x_46_re <= -2.6e-114) {
tmp = fabs(t_1) * t_2;
} else if (x_46_re <= -8.2e-224) {
tmp = t_1 * t_2;
} else if (x_46_re <= 2.45e-61) {
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 = exp((((0.5 * (y_46_re / ((x_46_re / x_46_im) * (x_46_re / x_46_im)))) + (y_46_re * log(x_46_re))) - t_0)) * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = exp((y_46im * -atan2(x_46im, x_46re)))
if (x_46re <= (-1.8d-48)) then
tmp = sin(t_1) * exp(((y_46re * log((((-0.5d0) * (x_46im / (x_46re / x_46im))) - x_46re))) - t_0))
else if (x_46re <= (-2.6d-114)) then
tmp = abs(t_1) * t_2
else if (x_46re <= (-8.2d-224)) then
tmp = t_1 * t_2
else if (x_46re <= 2.45d-61) then
tmp = t_1 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = exp((((0.5d0 * (y_46re / ((x_46re / x_46im) * (x_46re / x_46im)))) + (y_46re * log(x_46re))) - t_0)) * sin((y_46im * log(x_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.8e-48) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0));
} else if (x_46_re <= -2.6e-114) {
tmp = Math.abs(t_1) * t_2;
} else if (x_46_re <= -8.2e-224) {
tmp = t_1 * t_2;
} else if (x_46_re <= 2.45e-61) {
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.exp((((0.5 * (y_46_re / ((x_46_re / x_46_im) * (x_46_re / x_46_im)))) + (y_46_re * Math.log(x_46_re))) - t_0)) * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -1.8e-48: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0)) elif x_46_re <= -2.6e-114: tmp = math.fabs(t_1) * t_2 elif x_46_re <= -8.2e-224: tmp = t_1 * t_2 elif x_46_re <= 2.45e-61: 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.exp((((0.5 * (y_46_re / ((x_46_re / x_46_im) * (x_46_re / x_46_im)))) + (y_46_re * math.log(x_46_re))) - t_0)) * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= -1.8e-48) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(Float64(-0.5 * Float64(x_46_im / Float64(x_46_re / x_46_im))) - x_46_re))) - t_0))); elseif (x_46_re <= -2.6e-114) tmp = Float64(abs(t_1) * t_2); elseif (x_46_re <= -8.2e-224) tmp = Float64(t_1 * t_2); elseif (x_46_re <= 2.45e-61) 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(exp(Float64(Float64(Float64(0.5 * Float64(y_46_re / Float64(Float64(x_46_re / x_46_im) * Float64(x_46_re / x_46_im)))) + Float64(y_46_re * log(x_46_re))) - t_0)) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -1.8e-48) tmp = sin(t_1) * exp(((y_46_re * log(((-0.5 * (x_46_im / (x_46_re / x_46_im))) - x_46_re))) - t_0)); elseif (x_46_re <= -2.6e-114) tmp = abs(t_1) * t_2; elseif (x_46_re <= -8.2e-224) tmp = t_1 * t_2; elseif (x_46_re <= 2.45e-61) 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 = exp((((0.5 * (y_46_re / ((x_46_re / x_46_im) * (x_46_re / x_46_im)))) + (y_46_re * log(x_46_re))) - t_0)) * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.8e-48], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[(N[(-0.5 * N[(x$46$im / N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.6e-114], N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -8.2e-224], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 2.45e-61], 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[Exp[N[(N[(N[(0.5 * N[(y$46$re / N[(N[(x$46$re / x$46$im), $MachinePrecision] * N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $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 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;x.re \leq -1.8 \cdot 10^{-48}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \frac{x.im}{\frac{x.re}{x.im}} - x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.6 \cdot 10^{-114}:\\
\;\;\;\;\left|t_1\right| \cdot t_2\\
\mathbf{elif}\;x.re \leq -8.2 \cdot 10^{-224}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;x.re \leq 2.45 \cdot 10^{-61}:\\
\;\;\;\;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}:\\
\;\;\;\;e^{\left(0.5 \cdot \frac{y.re}{\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}} + y.re \cdot \log x.re\right) - t_0} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.8000000000000001e-48Initial program 29.6%
Taylor expanded in y.im around 0 53.5%
Taylor expanded in x.re around -inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
unpow264.1%
associate-/l*66.8%
Simplified66.8%
if -1.8000000000000001e-48 < x.re < -2.60000000000000013e-114Initial program 49.9%
Taylor expanded in y.im around 0 41.2%
Taylor expanded in y.re around 0 36.3%
*-commutative36.3%
distribute-lft-neg-in36.3%
*-commutative36.3%
Simplified36.3%
*-commutative36.3%
add-sqr-sqrt16.1%
sqrt-unprod50.0%
pow250.0%
Applied egg-rr50.0%
*-commutative50.0%
unpow250.0%
rem-sqrt-square61.4%
Simplified61.4%
if -2.60000000000000013e-114 < x.re < -8.19999999999999972e-224Initial program 52.6%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.re around 0 68.1%
*-commutative68.1%
distribute-lft-neg-in68.1%
*-commutative68.1%
Simplified68.1%
if -8.19999999999999972e-224 < x.re < 2.45000000000000001e-61Initial program 47.6%
Taylor expanded in y.im around 0 65.7%
Taylor expanded in y.re around 0 64.1%
if 2.45000000000000001e-61 < x.re Initial program 38.0%
Simplified75.0%
Taylor expanded in x.re around inf 62.9%
mul-1-neg62.9%
unsub-neg62.9%
associate-/l*64.1%
unpow264.1%
unpow264.1%
times-frac67.7%
log-rec67.7%
distribute-lft-neg-out67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in x.im around 0 67.2%
Taylor expanded in y.re around 0 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification64.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -4.2e-219)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 5e-283)
(* (/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)) t_2)
(if (or (<= x.im 3.8e-218) (not (<= x.im 1.4e-17)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))
(*
t_1
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im 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 t_2 = sin(t_1);
double tmp;
if (x_46_im <= -4.2e-219) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 5e-283) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0)) * t_2;
} else if ((x_46_im <= 3.8e-218) || !(x_46_im <= 1.4e-17)) {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * 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 t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -4.2e-219) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 5e-283) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0)) * t_2;
} else if ((x_46_im <= 3.8e-218) || !(x_46_im <= 1.4e-17)) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else {
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));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -4.2e-219: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 5e-283: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0)) * t_2 elif (x_46_im <= 3.8e-218) or not (x_46_im <= 1.4e-17): tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) else: 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)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -4.2e-219) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 5e-283) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0)) * t_2); elseif ((x_46_im <= 3.8e-218) || !(x_46_im <= 1.4e-17)) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); else 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))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -4.2e-219) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 5e-283) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (t_0 + 1.0)) * t_2; elseif ((x_46_im <= 3.8e-218) || ~((x_46_im <= 1.4e-17))) tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * 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]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -4.2e-219], N[(t$95$2 * 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, 5e-283], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[Or[LessEqual[x$46$im, 3.8e-218], N[Not[LessEqual[x$46$im, 1.4e-17]], $MachinePrecision]], N[(t$95$2 * 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[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]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.im \leq -4.2 \cdot 10^{-219}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 5 \cdot 10^{-283}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1} \cdot t_2\\
\mathbf{elif}\;x.im \leq 3.8 \cdot 10^{-218} \lor \neg \left(x.im \leq 1.4 \cdot 10^{-17}\right):\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\end{array}
\end{array}
if x.im < -4.20000000000000001e-219Initial program 36.1%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.im around -inf 68.1%
mul-1-neg68.1%
Simplified68.1%
if -4.20000000000000001e-219 < x.im < 5.0000000000000001e-283Initial program 57.6%
exp-diff49.9%
+-rgt-identity49.9%
+-rgt-identity49.9%
exp-to-pow49.9%
hypot-def49.9%
exp-prod49.9%
fma-def49.9%
hypot-def81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.im around 0 77.8%
Taylor expanded in y.im around 0 44.3%
*-commutative44.3%
Simplified44.3%
if 5.0000000000000001e-283 < x.im < 3.7999999999999999e-218 or 1.3999999999999999e-17 < x.im Initial program 32.0%
Taylor expanded in y.im around 0 36.9%
Taylor expanded in x.re around 0 56.7%
*-commutative56.7%
*-commutative56.7%
Simplified56.7%
if 3.7999999999999999e-218 < x.im < 1.3999999999999999e-17Initial program 53.4%
Taylor expanded in y.im around 0 67.9%
Taylor expanded in y.re around 0 67.9%
Final simplification62.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 (* (exp (* y.im (- (atan2 x.im x.re)))) (log1p (expm1 t_0))))
(t_3 (* (atan2 x.im x.re) y.im)))
(if (<= y.re -0.19)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re 29500000.0)
t_2
(if (<= y.re 4.1e+99)
(* t_1 (exp (- (* y.re (log (- x.im))) t_3)))
(if (<= y.re 4.8e+176)
t_2
(* (/ (pow (hypot x.re x.im) y.re) (+ t_3 1.0)) 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 = sin(t_0);
double t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log1p(expm1(t_0));
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_re <= -0.19) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 29500000.0) {
tmp = t_2;
} else if (y_46_re <= 4.1e+99) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_3));
} else if (y_46_re <= 4.8e+176) {
tmp = t_2;
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_3 + 1.0)) * 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.sin(t_0);
double t_2 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.log1p(Math.expm1(t_0));
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_re <= -0.19) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 29500000.0) {
tmp = t_2;
} else if (y_46_re <= 4.1e+99) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_3));
} else if (y_46_re <= 4.8e+176) {
tmp = t_2;
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (t_3 + 1.0)) * 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.sin(t_0) t_2 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.log1p(math.expm1(t_0)) t_3 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if y_46_re <= -0.19: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 29500000.0: tmp = t_2 elif y_46_re <= 4.1e+99: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_3)) elif y_46_re <= 4.8e+176: tmp = t_2 else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (t_3 + 1.0)) * 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 = sin(t_0) t_2 = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log1p(expm1(t_0))) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_re <= -0.19) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 29500000.0) tmp = t_2; elseif (y_46_re <= 4.1e+99) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_3))); elseif (y_46_re <= 4.8e+176) tmp = t_2; else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_3 + 1.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[(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[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, -0.19], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 29500000.0], t$95$2, If[LessEqual[y$46$re, 4.1e+99], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.8e+176], t$95$2, N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -0.19:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 29500000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{+99}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_3}\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+176}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_3 + 1} \cdot t_1\\
\end{array}
\end{array}
if y.re < -0.19Initial program 45.2%
Taylor expanded in y.im around 0 82.4%
Taylor expanded in y.im around 0 79.2%
unpow279.2%
unpow279.2%
hypot-def79.2%
Simplified79.2%
if -0.19 < y.re < 2.95e7 or 4.09999999999999979e99 < y.re < 4.8000000000000003e176Initial program 39.9%
Taylor expanded in y.im around 0 36.1%
Taylor expanded in y.re around 0 50.2%
*-commutative50.2%
distribute-lft-neg-in50.2%
*-commutative50.2%
Simplified50.2%
*-commutative50.2%
log1p-expm1-u52.9%
Applied egg-rr52.9%
if 2.95e7 < y.re < 4.09999999999999979e99Initial program 37.5%
Taylor expanded in y.im around 0 54.4%
Taylor expanded in x.im around -inf 50.3%
mul-1-neg50.3%
Simplified50.3%
if 4.8000000000000003e176 < y.re Initial program 32.4%
exp-diff20.6%
+-rgt-identity20.6%
+-rgt-identity20.6%
exp-to-pow20.6%
hypot-def20.6%
exp-prod20.6%
fma-def20.6%
hypot-def47.1%
*-commutative47.1%
Simplified47.1%
Taylor expanded in y.im around 0 64.8%
Taylor expanded in y.im around 0 64.8%
*-commutative64.8%
Simplified64.8%
Final simplification60.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (exp (* y.im (- (atan2 x.im x.re)))) (log1p (expm1 t_0))))
(t_2 (sin t_0))
(t_3 (* t_2 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -4.2)
t_3
(if (<= y.re 26500000.0)
t_1
(if (<= y.re 6.6e+98)
(* t_2 (exp (- (* y.re (log (- x.im))) (* (atan2 x.im x.re) y.im))))
(if (<= y.re 1.05e+160) t_1 t_3))))))
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_im * -atan2(x_46_im, x_46_re))) * log1p(expm1(t_0));
double t_2 = sin(t_0);
double t_3 = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.2) {
tmp = t_3;
} else if (y_46_re <= 26500000.0) {
tmp = t_1;
} else if (y_46_re <= 6.6e+98) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_re <= 1.05e+160) {
tmp = t_1;
} else {
tmp = t_3;
}
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.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.log1p(Math.expm1(t_0));
double t_2 = Math.sin(t_0);
double t_3 = t_2 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.2) {
tmp = t_3;
} else if (y_46_re <= 26500000.0) {
tmp = t_1;
} else if (y_46_re <= 6.6e+98) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_re <= 1.05e+160) {
tmp = t_1;
} else {
tmp = t_3;
}
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.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.log1p(math.expm1(t_0)) t_2 = math.sin(t_0) t_3 = t_2 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -4.2: tmp = t_3 elif y_46_re <= 26500000.0: tmp = t_1 elif y_46_re <= 6.6e+98: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif y_46_re <= 1.05e+160: tmp = t_1 else: tmp = t_3 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(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log1p(expm1(t_0))) t_2 = sin(t_0) t_3 = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -4.2) tmp = t_3; elseif (y_46_re <= 26500000.0) tmp = t_1; elseif (y_46_re <= 6.6e+98) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (y_46_re <= 1.05e+160) tmp = t_1; else tmp = t_3; 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[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.2], t$95$3, If[LessEqual[y$46$re, 26500000.0], t$95$1, If[LessEqual[y$46$re, 6.6e+98], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+160], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
t_2 := \sin t_0\\
t_3 := t_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.2:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 26500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 6.6 \cdot 10^{+98}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.re < -4.20000000000000018 or 1.04999999999999998e160 < y.re Initial program 39.8%
Taylor expanded in y.im around 0 72.6%
Taylor expanded in y.im around 0 70.6%
unpow270.6%
unpow270.6%
hypot-def70.6%
Simplified70.6%
if -4.20000000000000018 < y.re < 2.65e7 or 6.60000000000000056e98 < y.re < 1.04999999999999998e160Initial program 40.5%
Taylor expanded in y.im around 0 35.9%
Taylor expanded in y.re around 0 50.9%
*-commutative50.9%
distribute-lft-neg-in50.9%
*-commutative50.9%
Simplified50.9%
*-commutative50.9%
log1p-expm1-u53.7%
Applied egg-rr53.7%
if 2.65e7 < y.re < 6.60000000000000056e98Initial program 37.5%
Taylor expanded in y.im around 0 54.4%
Taylor expanded in x.im around -inf 50.3%
mul-1-neg50.3%
Simplified50.3%
Final simplification59.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -0.102)
(and (not (<= y.re 1.7))
(or (<= y.re 1.55e+98) (not (<= y.re 3.9e+160)))))
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(* (exp (* y.im (- (atan2 x.im x.re)))) (log1p (expm1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -0.102) || (!(y_46_re <= 1.7) && ((y_46_re <= 1.55e+98) || !(y_46_re <= 3.9e+160)))) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -0.102) || (!(y_46_re <= 1.7) && ((y_46_re <= 1.55e+98) || !(y_46_re <= 3.9e+160)))) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -0.102) or (not (y_46_re <= 1.7) and ((y_46_re <= 1.55e+98) or not (y_46_re <= 3.9e+160))): tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -0.102) || (!(y_46_re <= 1.7) && ((y_46_re <= 1.55e+98) || !(y_46_re <= 3.9e+160)))) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log1p(expm1(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -0.102], And[N[Not[LessEqual[y$46$re, 1.7]], $MachinePrecision], Or[LessEqual[y$46$re, 1.55e+98], N[Not[LessEqual[y$46$re, 3.9e+160]], $MachinePrecision]]]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.102 \lor \neg \left(y.re \leq 1.7\right) \land \left(y.re \leq 1.55 \cdot 10^{+98} \lor \neg \left(y.re \leq 3.9 \cdot 10^{+160}\right)\right):\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.re < -0.101999999999999993 or 1.69999999999999996 < y.re < 1.5500000000000001e98 or 3.90000000000000007e160 < y.re Initial program 39.3%
Taylor expanded in y.im around 0 69.8%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-def65.8%
Simplified65.8%
if -0.101999999999999993 < y.re < 1.69999999999999996 or 1.5500000000000001e98 < y.re < 3.90000000000000007e160Initial program 40.5%
Taylor expanded in y.im around 0 35.1%
Taylor expanded in y.re around 0 50.9%
*-commutative50.9%
distribute-lft-neg-in50.9%
*-commutative50.9%
Simplified50.9%
*-commutative50.9%
log1p-expm1-u53.7%
Applied egg-rr53.7%
Final simplification59.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -2.9) (not (<= y.re 17.0)))
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(* t_0 (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 t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.9) || !(y_46_re <= 17.0)) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.9) || !(y_46_re <= 17.0)) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -2.9) or not (y_46_re <= 17.0): tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * 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) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -2.9) || !(y_46_re <= 17.0)) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * 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) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -2.9) || ~((y_46_re <= 17.0))) tmp = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * 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_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.9], N[Not[LessEqual[y$46$re, 17.0]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.9 \lor \neg \left(y.re \leq 17\right):\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.re < -2.89999999999999991 or 17 < y.re Initial program 35.8%
Taylor expanded in y.im around 0 65.1%
Taylor expanded in y.im around 0 61.5%
unpow261.5%
unpow261.5%
hypot-def61.5%
Simplified61.5%
if -2.89999999999999991 < y.re < 17Initial program 44.7%
Taylor expanded in y.im around 0 36.2%
Taylor expanded in y.re around 0 53.7%
*-commutative53.7%
distribute-lft-neg-in53.7%
*-commutative53.7%
Simplified53.7%
Final simplification57.9%
(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(Float64(y_46_re * 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[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}
\end{array}
Initial program 39.9%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 38.3%
*-commutative38.3%
distribute-lft-neg-in38.3%
*-commutative38.3%
Simplified38.3%
Final simplification38.3%
(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(Float64(y_46_re * 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[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 39.9%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 38.3%
*-commutative38.3%
distribute-lft-neg-in38.3%
*-commutative38.3%
Simplified38.3%
expm1-log1p-u18.7%
expm1-udef18.7%
add-sqr-sqrt10.3%
sqrt-unprod14.5%
sqr-neg14.5%
sqrt-unprod4.7%
add-sqr-sqrt9.6%
Applied egg-rr9.6%
expm1-def9.6%
expm1-log1p13.1%
*-commutative13.1%
Simplified13.1%
Final simplification13.1%
(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 39.9%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in y.re around 0 38.3%
*-commutative38.3%
distribute-lft-neg-in38.3%
*-commutative38.3%
Simplified38.3%
expm1-log1p-u18.7%
expm1-udef18.7%
add-sqr-sqrt10.3%
sqrt-unprod14.5%
sqr-neg14.5%
sqrt-unprod4.7%
add-sqr-sqrt9.6%
Applied egg-rr9.6%
expm1-def9.6%
expm1-log1p13.1%
*-commutative13.1%
Simplified13.1%
Taylor expanded in y.im around 0 10.4%
*-commutative10.4%
Simplified10.4%
Final simplification10.4%
herbie shell --seed 2023188
(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)))))