
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.re -1.08e-47)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= y.re 4e+51)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(* y.im (* (log (hypot x.im x.re)) (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1.08e-47) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else if (y_46_re <= 4e+51) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = y_46_im * (log(hypot(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1.08e-47) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); elseif (y_46_re <= 4e+51) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.08e-47], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4e+51], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1.08 \cdot 10^{-47}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+51}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -1.08000000000000005e-47Initial program 45.3%
Taylor expanded in y.im around 0 89.4%
if -1.08000000000000005e-47 < y.re < 4e51Initial program 42.1%
cancel-sign-sub-inv42.1%
fma-define42.1%
hypot-define42.1%
distribute-lft-neg-in42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
if 4e51 < y.re Initial program 33.9%
Taylor expanded in y.re around 0 45.8%
*-commutative45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.6%
Simplified74.6%
add-cbrt-cube57.7%
pow357.7%
*-commutative57.7%
hypot-undefine35.6%
+-commutative35.6%
hypot-define57.7%
Applied egg-rr57.7%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine74.7%
unpow274.7%
unpow274.7%
hypot-undefine74.7%
Simplified74.7%
Final simplification83.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -1.08e-47)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= y.re 1.05e-6)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* y.im (* (log (hypot x.im x.re)) (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1.08e-47) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else if (y_46_re <= 1.05e-6) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_im * (log(hypot(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -1.08e-47) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); elseif (y_46_re <= 1.05e-6) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.08e-47], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-6], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.08 \cdot 10^{-47}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-6}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -1.08000000000000005e-47Initial program 45.3%
Taylor expanded in y.im around 0 89.4%
if -1.08000000000000005e-47 < y.re < 1.0499999999999999e-6Initial program 44.3%
exp-diff44.3%
exp-to-pow44.3%
hypot-define44.3%
*-commutative44.3%
exp-prod43.9%
fma-define43.9%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
if 1.0499999999999999e-6 < y.re Initial program 30.8%
Taylor expanded in y.re around 0 41.5%
*-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine70.8%
Simplified70.8%
add-cbrt-cube55.4%
pow355.4%
*-commutative55.4%
hypot-undefine32.3%
+-commutative32.3%
hypot-define55.4%
Applied egg-rr55.4%
Taylor expanded in y.im around 0 69.4%
unpow269.4%
unpow269.4%
hypot-undefine72.4%
unpow272.4%
unpow272.4%
hypot-undefine71.0%
Simplified71.0%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (* y.im t_0)))
(if (<= y.re -1.08e-47)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 1.05e-6)
(*
(+ (sin t_1) (* y.re (* (atan2 x.im x.re) (cos t_1))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* y.im (* t_0 (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_im * t_0;
double tmp;
if (y_46_re <= -1.08e-47) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.05e-6) {
tmp = (sin(t_1) + (y_46_re * (atan2(x_46_im, x_46_re) * cos(t_1)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_0 * pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = y_46_im * t_0;
double tmp;
if (y_46_re <= -1.08e-47) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.05e-6) {
tmp = (Math.sin(t_1) + (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.cos(t_1)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = y_46_im * t_0 tmp = 0 if y_46_re <= -1.08e-47: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 1.05e-6: tmp = (math.sin(t_1) + (y_46_re * (math.atan2(x_46_im, x_46_re) * math.cos(t_1)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = y_46_im * (t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_im * t_0) tmp = 0.0 if (y_46_re <= -1.08e-47) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1.05e-6) tmp = Float64(Float64(sin(t_1) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * cos(t_1)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(y_46_im * Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = y_46_im * t_0; tmp = 0.0; if (y_46_re <= -1.08e-47) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 1.05e-6) tmp = (sin(t_1) + (y_46_re * (atan2(x_46_im, x_46_re) * cos(t_1)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = y_46_im * (t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -1.08e-47], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-6], N[(N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.im \cdot t\_0\\
\mathbf{if}\;y.re \leq -1.08 \cdot 10^{-47}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-6}:\\
\;\;\;\;\left(\sin t\_1 + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \cos t\_1\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -1.08000000000000005e-47Initial program 45.3%
Taylor expanded in y.im around 0 89.4%
if -1.08000000000000005e-47 < y.re < 1.0499999999999999e-6Initial program 44.3%
Taylor expanded in y.re around 0 44.3%
*-commutative44.3%
unpow244.3%
unpow244.3%
hypot-undefine44.3%
*-commutative44.3%
*-commutative44.3%
unpow244.3%
unpow244.3%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 85.1%
neg-mul-185.1%
distribute-rgt-neg-in85.1%
Simplified85.1%
if 1.0499999999999999e-6 < y.re Initial program 30.8%
Taylor expanded in y.re around 0 41.5%
*-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine70.8%
Simplified70.8%
add-cbrt-cube55.4%
pow355.4%
*-commutative55.4%
hypot-undefine32.3%
+-commutative32.3%
hypot-define55.4%
Applied egg-rr55.4%
Taylor expanded in y.im around 0 69.4%
unpow269.4%
unpow269.4%
hypot-undefine72.4%
unpow272.4%
unpow272.4%
hypot-undefine71.0%
Simplified71.0%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_3 (* t_2 (sin t_1))))
(if (<= y.im -9.6e+151)
t_3
(if (<= y.im -54.0)
(* t_2 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 1.12e+113)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_3 = t_2 * sin(t_1);
double tmp;
if (y_46_im <= -9.6e+151) {
tmp = t_3;
} else if (y_46_im <= -54.0) {
tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 1.12e+113) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_3 = Float64(t_2 * sin(t_1)) tmp = 0.0 if (y_46_im <= -9.6e+151) tmp = t_3; elseif (y_46_im <= -54.0) tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 1.12e+113) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -9.6e+151], t$95$3, If[LessEqual[y$46$im, -54.0], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.12e+113], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_3 := t\_2 \cdot \sin t\_1\\
\mathbf{if}\;y.im \leq -9.6 \cdot 10^{+151}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -54:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{+113}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -9.6000000000000004e151 or 1.1200000000000001e113 < y.im Initial program 39.8%
Taylor expanded in y.im around 0 73.9%
if -9.6000000000000004e151 < y.im < -54Initial program 34.8%
Taylor expanded in y.re around 0 43.4%
*-commutative43.4%
unpow243.4%
unpow243.4%
hypot-undefine69.6%
Simplified69.6%
if -54 < y.im < 1.1200000000000001e113Initial program 43.4%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod41.9%
fma-define41.9%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 85.5%
Final simplification79.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -9.2e+154)
(* t_1 (sin t_0))
(if (or (<= y.im -330000.0) (not (<= y.im 5.6e-40)))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -9.2e+154) {
tmp = t_1 * sin(t_0);
} else if ((y_46_im <= -330000.0) || !(y_46_im <= 5.6e-40)) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -9.2e+154) tmp = Float64(t_1 * sin(t_0)); elseif ((y_46_im <= -330000.0) || !(y_46_im <= 5.6e-40)) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -9.2e+154], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -330000.0], N[Not[LessEqual[y$46$im, 5.6e-40]], $MachinePrecision]], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -9.2 \cdot 10^{+154}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq -330000 \lor \neg \left(y.im \leq 5.6 \cdot 10^{-40}\right):\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -9.1999999999999999e154Initial program 47.2%
Taylor expanded in y.im around 0 72.5%
if -9.1999999999999999e154 < y.im < -3.3e5 or 5.5999999999999999e-40 < y.im Initial program 34.6%
Taylor expanded in y.re around 0 40.6%
*-commutative40.6%
unpow240.6%
unpow240.6%
hypot-undefine69.8%
Simplified69.8%
if -3.3e5 < y.im < 5.5999999999999999e-40Initial program 44.8%
cancel-sign-sub-inv44.8%
fma-define44.8%
hypot-define44.8%
distribute-lft-neg-in44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 63.3%
unpow263.3%
unpow263.3%
hypot-undefine89.9%
Simplified89.9%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -7200000.0) (not (<= y.im 0.19)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -7200000.0) || !(y_46_im <= 0.19)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -7200000.0) || !(y_46_im <= 0.19)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -7200000.0], N[Not[LessEqual[y$46$im, 0.19]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -7200000 \lor \neg \left(y.im \leq 0.19\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -7.2e6 or 0.19 < y.im Initial program 35.9%
Taylor expanded in y.im around 0 65.7%
if -7.2e6 < y.im < 0.19Initial program 46.3%
cancel-sign-sub-inv46.3%
fma-define46.3%
hypot-define46.3%
distribute-lft-neg-in46.3%
distribute-rgt-neg-out46.3%
fma-define46.3%
hypot-define89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y.im around 0 64.2%
unpow264.2%
unpow264.2%
hypot-undefine88.9%
Simplified88.9%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -1.95e-5)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.re 1.35e+26)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -1.95e-5) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 1.35e+26) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else {
tmp = sin((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.log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -1.95e-5) {
tmp = Math.exp(((t_2 * -y_46_re) - t_0)) * Math.sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 1.35e+26) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_1);
} else {
tmp = Math.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.log((-1.0 / x_46_re)) tmp = 0 if x_46_re <= -1.95e-5: tmp = math.exp(((t_2 * -y_46_re) - t_0)) * math.sin((t_1 - (y_46_im * t_2))) elif x_46_re <= 1.35e+26: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_1) else: tmp = math.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 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -1.95e-5) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_re <= 1.35e+26) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_1)); else tmp = Float64(sin(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 = log((-1.0 / x_46_re)); tmp = 0.0; if (x_46_re <= -1.95e-5) tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2))); elseif (x_46_re <= 1.35e+26) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1); else tmp = sin((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[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.95e-5], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.35e+26], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(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 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1.95 \cdot 10^{-5}:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 1.35 \cdot 10^{+26}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(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.95e-5Initial program 29.5%
cancel-sign-sub-inv29.5%
fma-define29.5%
hypot-define29.5%
distribute-lft-neg-in29.5%
distribute-rgt-neg-out29.5%
fma-define29.5%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in x.re around -inf 86.5%
+-commutative86.5%
neg-mul-186.5%
sub-neg86.5%
mul-1-neg86.5%
+-commutative86.5%
mul-1-neg86.5%
unsub-neg86.5%
*-commutative86.5%
Simplified86.5%
if -1.95e-5 < x.re < 1.35e26Initial program 54.1%
Taylor expanded in y.im around 0 63.3%
if 1.35e26 < x.re Initial program 30.6%
Taylor expanded in y.re around 0 32.4%
*-commutative32.4%
unpow232.4%
unpow232.4%
hypot-undefine65.3%
Simplified65.3%
Taylor expanded in x.im around 0 75.3%
Final simplification73.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -9.6e-135)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 2.15e+45)
(* (sin (* y.im t_0)) (exp (* (atan2 x.im x.re) (- y.im))))
(* y.im (* t_0 (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -9.6e-135) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.15e+45) {
tmp = sin((y_46_im * t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_0 * pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -9.6e-135) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.15e+45) {
tmp = Math.sin((y_46_im * t_0)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -9.6e-135: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.15e+45: tmp = math.sin((y_46_im * t_0)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = y_46_im * (t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -9.6e-135) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.15e+45) tmp = Float64(sin(Float64(y_46_im * t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(y_46_im * Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -9.6e-135) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.15e+45) tmp = sin((y_46_im * t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = y_46_im * (t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9.6e-135], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.15e+45], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -9.6 \cdot 10^{-135}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+45}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -9.5999999999999994e-135Initial program 45.4%
Taylor expanded in y.im around 0 79.9%
if -9.5999999999999994e-135 < y.re < 2.1500000000000002e45Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.re around 0 35.8%
neg-mul-135.8%
distribute-lft-neg-in35.8%
*-commutative35.8%
unpow235.8%
unpow235.8%
hypot-undefine64.3%
Simplified64.3%
if 2.1500000000000002e45 < y.re Initial program 33.9%
Taylor expanded in y.re around 0 45.8%
*-commutative45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.6%
Simplified74.6%
add-cbrt-cube57.7%
pow357.7%
*-commutative57.7%
hypot-undefine35.6%
+-commutative35.6%
hypot-define57.7%
Applied egg-rr57.7%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine74.7%
unpow274.7%
unpow274.7%
hypot-undefine74.7%
Simplified74.7%
Final simplification72.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (log (hypot x.im x.re))))
(if (<= y.re -1.4e-31)
(/ 1.0 (/ 1.0 (* (sin (* y.re (atan2 x.im x.re))) t_0)))
(if (<= y.re 1.58e+50)
(* (sin (* y.im t_1)) (exp (* (atan2 x.im x.re) (- y.im))))
(* y.im (* t_1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -1.4e-31) {
tmp = 1.0 / (1.0 / (sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0));
} else if (y_46_re <= 1.58e+50) {
tmp = sin((y_46_im * t_1)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_1 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -1.4e-31) {
tmp = 1.0 / (1.0 / (Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0));
} else if (y_46_re <= 1.58e+50) {
tmp = Math.sin((y_46_im * t_1)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = y_46_im * (t_1 * t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -1.4e-31: tmp = 1.0 / (1.0 / (math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0)) elif y_46_re <= 1.58e+50: tmp = math.sin((y_46_im * t_1)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = y_46_im * (t_1 * t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -1.4e-31) tmp = Float64(1.0 / Float64(1.0 / Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0))); elseif (y_46_re <= 1.58e+50) tmp = Float64(sin(Float64(y_46_im * t_1)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(y_46_im * Float64(t_1 * t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -1.4e-31) tmp = 1.0 / (1.0 / (sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0)); elseif (y_46_re <= 1.58e+50) tmp = sin((y_46_im * t_1)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = y_46_im * (t_1 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.4e-31], N[(1.0 / N[(1.0 / N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.58e+50], N[(N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -1.4 \cdot 10^{-31}:\\
\;\;\;\;\frac{1}{\frac{1}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0}}\\
\mathbf{elif}\;y.re \leq 1.58 \cdot 10^{+50}:\\
\;\;\;\;\sin \left(y.im \cdot t\_1\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_1 \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.3999999999999999e-31Initial program 45.2%
exp-diff34.2%
exp-to-pow34.2%
hypot-define34.2%
*-commutative34.2%
exp-prod34.2%
fma-define34.2%
hypot-define64.4%
*-commutative64.4%
Simplified64.4%
add-cbrt-cube64.4%
pow364.4%
Applied egg-rr64.4%
rem-cbrt-cube64.4%
associate-*l/64.4%
clear-num64.4%
fma-undefine64.4%
*-commutative64.4%
rem-exp-log31.5%
*-commutative31.5%
+-commutative31.5%
*-commutative31.5%
fma-define31.5%
rem-exp-log64.4%
Applied egg-rr64.4%
Taylor expanded in y.im around 0 81.1%
unpow281.1%
unpow281.1%
hypot-undefine82.4%
Simplified82.4%
if -1.3999999999999999e-31 < y.re < 1.5800000000000001e50Initial program 42.3%
cancel-sign-sub-inv42.3%
fma-define42.3%
hypot-define42.3%
distribute-lft-neg-in42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.re around 0 34.2%
neg-mul-134.2%
distribute-lft-neg-in34.2%
*-commutative34.2%
unpow234.2%
unpow234.2%
hypot-undefine60.2%
Simplified60.2%
if 1.5800000000000001e50 < y.re Initial program 33.9%
Taylor expanded in y.re around 0 45.8%
*-commutative45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.6%
Simplified74.6%
add-cbrt-cube57.7%
pow357.7%
*-commutative57.7%
hypot-undefine35.6%
+-commutative35.6%
hypot-define57.7%
Applied egg-rr57.7%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine74.7%
unpow274.7%
unpow274.7%
hypot-undefine74.7%
Simplified74.7%
Final simplification69.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.im (* (log (hypot x.im x.re)) t_0))))
(if (<= y.im -186000.0)
0.0
(if (<= y.im -6.4e-231)
t_1
(if (<= y.im 1.1e-161)
(/ 1.0 (/ 1.0 (* (sin (* y.re (atan2 x.im x.re))) t_0)))
(if (<= y.im 1.5e+115) t_1 0.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_0);
double tmp;
if (y_46_im <= -186000.0) {
tmp = 0.0;
} else if (y_46_im <= -6.4e-231) {
tmp = t_1;
} else if (y_46_im <= 1.1e-161) {
tmp = 1.0 / (1.0 / (sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0));
} else if (y_46_im <= 1.5e+115) {
tmp = t_1;
} else {
tmp = 0.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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * t_0);
double tmp;
if (y_46_im <= -186000.0) {
tmp = 0.0;
} else if (y_46_im <= -6.4e-231) {
tmp = t_1;
} else if (y_46_im <= 1.1e-161) {
tmp = 1.0 / (1.0 / (Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0));
} else if (y_46_im <= 1.5e+115) {
tmp = t_1;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * t_0) tmp = 0 if y_46_im <= -186000.0: tmp = 0.0 elif y_46_im <= -6.4e-231: tmp = t_1 elif y_46_im <= 1.1e-161: tmp = 1.0 / (1.0 / (math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0)) elif y_46_im <= 1.5e+115: tmp = t_1 else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * t_0)) tmp = 0.0 if (y_46_im <= -186000.0) tmp = 0.0; elseif (y_46_im <= -6.4e-231) tmp = t_1; elseif (y_46_im <= 1.1e-161) tmp = Float64(1.0 / Float64(1.0 / Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0))); elseif (y_46_im <= 1.5e+115) tmp = t_1; else tmp = 0.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_0); tmp = 0.0; if (y_46_im <= -186000.0) tmp = 0.0; elseif (y_46_im <= -6.4e-231) tmp = t_1; elseif (y_46_im <= 1.1e-161) tmp = 1.0 / (1.0 / (sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0)); elseif (y_46_im <= 1.5e+115) tmp = t_1; else tmp = 0.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -186000.0], 0.0, If[LessEqual[y$46$im, -6.4e-231], t$95$1, If[LessEqual[y$46$im, 1.1e-161], N[(1.0 / N[(1.0 / N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.5e+115], t$95$1, 0.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -186000:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq -6.4 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-161}:\\
\;\;\;\;\frac{1}{\frac{1}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0}}\\
\mathbf{elif}\;y.im \leq 1.5 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -186000 or 1.5e115 < y.im Initial program 38.7%
cancel-sign-sub-inv38.7%
fma-define38.7%
hypot-define38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine33.9%
Simplified33.9%
Taylor expanded in y.re around 0 4.3%
*-commutative4.3%
expm1-log1p-u3.7%
expm1-undefine23.8%
*-commutative23.8%
Applied egg-rr23.8%
Taylor expanded in y.re around 0 49.5%
if -186000 < y.im < -6.40000000000000016e-231 or 1.10000000000000001e-161 < y.im < 1.5e115Initial program 50.0%
Taylor expanded in y.re around 0 48.6%
*-commutative48.6%
unpow248.6%
unpow248.6%
hypot-undefine67.7%
Simplified67.7%
add-cbrt-cube58.5%
pow358.5%
*-commutative58.5%
hypot-undefine39.5%
+-commutative39.5%
hypot-define58.5%
Applied egg-rr58.5%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-undefine65.6%
unpow265.6%
unpow265.6%
hypot-undefine72.1%
Simplified72.1%
if -6.40000000000000016e-231 < y.im < 1.10000000000000001e-161Initial program 27.5%
exp-diff27.5%
exp-to-pow27.5%
hypot-define27.5%
*-commutative27.5%
exp-prod27.5%
fma-define27.5%
hypot-define86.9%
*-commutative86.9%
Simplified86.9%
add-cbrt-cube87.0%
pow387.0%
Applied egg-rr87.0%
rem-cbrt-cube86.9%
associate-*l/86.9%
clear-num86.9%
fma-undefine86.9%
*-commutative86.9%
rem-exp-log47.7%
*-commutative47.7%
+-commutative47.7%
*-commutative47.7%
fma-define47.7%
rem-exp-log86.9%
Applied egg-rr86.9%
Taylor expanded in y.im around 0 43.9%
unpow243.9%
unpow243.9%
hypot-undefine75.1%
Simplified75.1%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.im (* (log (hypot x.im x.re)) t_0))))
(if (<= y.im -26000.0)
0.0
(if (<= y.im -1.6e-231)
t_1
(if (<= y.im 1.15e-163)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.im 1.8e+116) t_1 0.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_0);
double tmp;
if (y_46_im <= -26000.0) {
tmp = 0.0;
} else if (y_46_im <= -1.6e-231) {
tmp = t_1;
} else if (y_46_im <= 1.15e-163) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 1.8e+116) {
tmp = t_1;
} else {
tmp = 0.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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * t_0);
double tmp;
if (y_46_im <= -26000.0) {
tmp = 0.0;
} else if (y_46_im <= -1.6e-231) {
tmp = t_1;
} else if (y_46_im <= 1.15e-163) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 1.8e+116) {
tmp = t_1;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * t_0) tmp = 0 if y_46_im <= -26000.0: tmp = 0.0 elif y_46_im <= -1.6e-231: tmp = t_1 elif y_46_im <= 1.15e-163: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 1.8e+116: tmp = t_1 else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * t_0)) tmp = 0.0 if (y_46_im <= -26000.0) tmp = 0.0; elseif (y_46_im <= -1.6e-231) tmp = t_1; elseif (y_46_im <= 1.15e-163) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 1.8e+116) tmp = t_1; else tmp = 0.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_0); tmp = 0.0; if (y_46_im <= -26000.0) tmp = 0.0; elseif (y_46_im <= -1.6e-231) tmp = t_1; elseif (y_46_im <= 1.15e-163) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 1.8e+116) tmp = t_1; else tmp = 0.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -26000.0], 0.0, If[LessEqual[y$46$im, -1.6e-231], t$95$1, If[LessEqual[y$46$im, 1.15e-163], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 1.8e+116], t$95$1, 0.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -26000:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq -1.6 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-163}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -26000 or 1.79999999999999985e116 < y.im Initial program 38.7%
cancel-sign-sub-inv38.7%
fma-define38.7%
hypot-define38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine33.9%
Simplified33.9%
Taylor expanded in y.re around 0 4.3%
*-commutative4.3%
expm1-log1p-u3.7%
expm1-undefine23.8%
*-commutative23.8%
Applied egg-rr23.8%
Taylor expanded in y.re around 0 49.5%
if -26000 < y.im < -1.60000000000000004e-231 or 1.15e-163 < y.im < 1.79999999999999985e116Initial program 50.0%
Taylor expanded in y.re around 0 48.6%
*-commutative48.6%
unpow248.6%
unpow248.6%
hypot-undefine67.7%
Simplified67.7%
add-cbrt-cube58.5%
pow358.5%
*-commutative58.5%
hypot-undefine39.5%
+-commutative39.5%
hypot-define58.5%
Applied egg-rr58.5%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-undefine65.6%
unpow265.6%
unpow265.6%
hypot-undefine72.1%
Simplified72.1%
if -1.60000000000000004e-231 < y.im < 1.15e-163Initial program 27.5%
cancel-sign-sub-inv27.5%
fma-define27.5%
hypot-define27.5%
distribute-lft-neg-in27.5%
distribute-rgt-neg-out27.5%
fma-define27.5%
hypot-define86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine75.1%
Simplified75.1%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.im (* (log (hypot x.im x.re)) (pow (hypot x.im x.re) y.re)))))
(if (<= y.im -29500.0)
0.0
(if (<= y.im -3.8e-297)
t_0
(if (<= y.im 4.4e-208)
(log1p (expm1 (* y.re (atan2 x.im x.re))))
(if (<= y.im 4.8e+115) t_0 0.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * (log(hypot(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re));
double tmp;
if (y_46_im <= -29500.0) {
tmp = 0.0;
} else if (y_46_im <= -3.8e-297) {
tmp = t_0;
} else if (y_46_im <= 4.4e-208) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_im <= 4.8e+115) {
tmp = t_0;
} else {
tmp = 0.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_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
double tmp;
if (y_46_im <= -29500.0) {
tmp = 0.0;
} else if (y_46_im <= -3.8e-297) {
tmp = t_0;
} else if (y_46_im <= 4.4e-208) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_im <= 4.8e+115) {
tmp = t_0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)) tmp = 0 if y_46_im <= -29500.0: tmp = 0.0 elif y_46_im <= -3.8e-297: tmp = t_0 elif y_46_im <= 4.4e-208: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) elif y_46_im <= 4.8e+115: tmp = t_0 else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))) tmp = 0.0 if (y_46_im <= -29500.0) tmp = 0.0; elseif (y_46_im <= -3.8e-297) tmp = t_0; elseif (y_46_im <= 4.4e-208) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 4.8e+115) tmp = t_0; else tmp = 0.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$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -29500.0], 0.0, If[LessEqual[y$46$im, -3.8e-297], t$95$0, If[LessEqual[y$46$im, 4.4e-208], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 4.8e+115], t$95$0, 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\mathbf{if}\;y.im \leq -29500:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq -3.8 \cdot 10^{-297}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{-208}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{+115}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -29500 or 4.8000000000000001e115 < y.im Initial program 38.7%
cancel-sign-sub-inv38.7%
fma-define38.7%
hypot-define38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine33.9%
Simplified33.9%
Taylor expanded in y.re around 0 4.3%
*-commutative4.3%
expm1-log1p-u3.7%
expm1-undefine23.8%
*-commutative23.8%
Applied egg-rr23.8%
Taylor expanded in y.re around 0 49.5%
if -29500 < y.im < -3.80000000000000005e-297 or 4.4000000000000001e-208 < y.im < 4.8000000000000001e115Initial program 48.3%
Taylor expanded in y.re around 0 45.6%
*-commutative45.6%
unpow245.6%
unpow245.6%
hypot-undefine66.9%
Simplified66.9%
add-cbrt-cube54.0%
pow354.0%
*-commutative54.0%
hypot-undefine35.4%
+-commutative35.4%
hypot-define54.0%
Applied egg-rr54.0%
Taylor expanded in y.im around 0 53.1%
unpow253.1%
unpow253.1%
hypot-undefine65.0%
unpow265.0%
unpow265.0%
hypot-undefine71.4%
Simplified71.4%
if -3.80000000000000005e-297 < y.im < 4.4000000000000001e-208Initial program 20.6%
cancel-sign-sub-inv20.6%
fma-define20.6%
hypot-define20.6%
distribute-lft-neg-in20.6%
distribute-rgt-neg-out20.6%
fma-define20.6%
hypot-define85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y.im around 0 26.2%
unpow226.2%
unpow226.2%
hypot-undefine73.2%
Simplified73.2%
Taylor expanded in y.re around 0 58.5%
log1p-expm1-u71.6%
Applied egg-rr71.6%
Final simplification62.3%
(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) (pow x.re y.re))))
(if (<= y.re -4e-29)
t_1
(if (<= y.re 4.1e-190)
(cbrt (pow t_0 3.0))
(if (<= y.re 1.7e+81) (log1p (expm1 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -4e-29) {
tmp = t_1;
} else if (y_46_re <= 4.1e-190) {
tmp = cbrt(pow(t_0, 3.0));
} else if (y_46_re <= 1.7e+81) {
tmp = log1p(expm1(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -4e-29) {
tmp = t_1;
} else if (y_46_re <= 4.1e-190) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else if (y_46_re <= 1.7e+81) {
tmp = Math.log1p(Math.expm1(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(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -4e-29) tmp = t_1; elseif (y_46_re <= 4.1e-190) tmp = cbrt((t_0 ^ 3.0)); elseif (y_46_re <= 1.7e+81) tmp = log1p(expm1(t_0)); else tmp = 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[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4e-29], t$95$1, If[LessEqual[y$46$re, 4.1e-190], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[y$46$re, 1.7e+81], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{-190}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{+81}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -3.99999999999999977e-29 or 1.70000000000000001e81 < y.re Initial program 40.0%
cancel-sign-sub-inv40.0%
fma-define40.0%
hypot-define40.0%
distribute-lft-neg-in40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.im around 0 69.8%
unpow269.8%
unpow269.8%
hypot-undefine70.5%
Simplified70.5%
Taylor expanded in x.im around 0 61.2%
if -3.99999999999999977e-29 < y.re < 4.1000000000000002e-190Initial program 42.3%
cancel-sign-sub-inv42.3%
fma-define42.3%
hypot-define42.3%
distribute-lft-neg-in42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in y.im around 0 17.3%
unpow217.3%
unpow217.3%
hypot-undefine20.5%
Simplified20.5%
Taylor expanded in y.re around 0 20.5%
*-commutative20.5%
add-cbrt-cube34.5%
pow334.5%
*-commutative34.5%
Applied egg-rr34.5%
if 4.1000000000000002e-190 < y.re < 1.70000000000000001e81Initial program 42.2%
cancel-sign-sub-inv42.2%
fma-define42.2%
hypot-define42.2%
distribute-lft-neg-in42.2%
distribute-rgt-neg-out42.2%
fma-define42.3%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 20.0%
unpow220.0%
unpow220.0%
hypot-undefine36.2%
Simplified36.2%
Taylor expanded in y.re around 0 26.7%
log1p-expm1-u34.3%
Applied egg-rr34.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -48000000.0)
0.0
(if (<= y.im -2e-292)
(* (sin t_0) (pow x.im y.re))
(if (<= y.im 3.1e-68) (log1p (expm1 t_0)) 0.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -48000000.0) {
tmp = 0.0;
} else if (y_46_im <= -2e-292) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else if (y_46_im <= 3.1e-68) {
tmp = log1p(expm1(t_0));
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -48000000.0) {
tmp = 0.0;
} else if (y_46_im <= -2e-292) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else if (y_46_im <= 3.1e-68) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -48000000.0: tmp = 0.0 elif y_46_im <= -2e-292: tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) elif y_46_im <= 3.1e-68: tmp = math.log1p(math.expm1(t_0)) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -48000000.0) tmp = 0.0; elseif (y_46_im <= -2e-292) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); elseif (y_46_im <= 3.1e-68) tmp = log1p(expm1(t_0)); else tmp = 0.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[LessEqual[y$46$im, -48000000.0], 0.0, If[LessEqual[y$46$im, -2e-292], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.1e-68], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], 0.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -48000000:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-292}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.im \leq 3.1 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -4.8e7 or 3.0999999999999999e-68 < y.im Initial program 39.6%
cancel-sign-sub-inv39.6%
fma-define39.6%
hypot-define39.6%
distribute-lft-neg-in39.6%
distribute-rgt-neg-out39.6%
fma-define39.6%
hypot-define70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in y.im around 0 41.3%
unpow241.3%
unpow241.3%
hypot-undefine37.0%
Simplified37.0%
Taylor expanded in y.re around 0 4.3%
*-commutative4.3%
expm1-log1p-u3.7%
expm1-undefine19.2%
*-commutative19.2%
Applied egg-rr19.2%
Taylor expanded in y.re around 0 43.7%
if -4.8e7 < y.im < -2.0000000000000001e-292Initial program 50.8%
cancel-sign-sub-inv50.8%
fma-define50.8%
hypot-define50.8%
distribute-lft-neg-in50.8%
distribute-rgt-neg-out50.8%
fma-define50.8%
hypot-define91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in y.im around 0 53.9%
unpow253.9%
unpow253.9%
hypot-undefine58.2%
Simplified58.2%
Taylor expanded in x.re around 0 42.1%
if -2.0000000000000001e-292 < y.im < 3.0999999999999999e-68Initial program 37.0%
cancel-sign-sub-inv37.0%
fma-define37.0%
hypot-define37.0%
distribute-lft-neg-in37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in y.im around 0 39.9%
unpow239.9%
unpow239.9%
hypot-undefine65.1%
Simplified65.1%
Taylor expanded in y.re around 0 44.2%
log1p-expm1-u51.7%
Applied egg-rr51.7%
Final simplification45.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -9.5e-131) 0.0 (if (<= y.im 6.2e-68) (log1p (expm1 (* y.re (atan2 x.im x.re)))) 0.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -9.5e-131) {
tmp = 0.0;
} else if (y_46_im <= 6.2e-68) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -9.5e-131) {
tmp = 0.0;
} else if (y_46_im <= 6.2e-68) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -9.5e-131: tmp = 0.0 elif y_46_im <= 6.2e-68: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -9.5e-131) tmp = 0.0; elseif (y_46_im <= 6.2e-68) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = 0.0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -9.5e-131], 0.0, If[LessEqual[y$46$im, 6.2e-68], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-131}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -9.4999999999999996e-131 or 6.1999999999999999e-68 < y.im Initial program 42.2%
cancel-sign-sub-inv42.2%
fma-define42.2%
hypot-define42.2%
distribute-lft-neg-in42.2%
distribute-rgt-neg-out42.2%
fma-define42.2%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine40.2%
Simplified40.2%
Taylor expanded in y.re around 0 5.8%
*-commutative5.8%
expm1-log1p-u5.1%
expm1-undefine17.4%
*-commutative17.4%
Applied egg-rr17.4%
Taylor expanded in y.re around 0 41.3%
if -9.4999999999999996e-131 < y.im < 6.1999999999999999e-68Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 42.8%
unpow242.8%
unpow242.8%
hypot-undefine63.9%
Simplified63.9%
Taylor expanded in y.re around 0 39.2%
log1p-expm1-u45.8%
Applied egg-rr45.8%
Final simplification42.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2.3e-292) 0.0 (if (<= y.im 5e-68) (* y.re (atan2 x.im x.re)) 0.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2.3e-292) {
tmp = 0.0;
} else if (y_46_im <= 5e-68) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-2.3d-292)) then
tmp = 0.0d0
else if (y_46im <= 5d-68) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2.3e-292) {
tmp = 0.0;
} else if (y_46_im <= 5e-68) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -2.3e-292: tmp = 0.0 elif y_46_im <= 5e-68: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -2.3e-292) tmp = 0.0; elseif (y_46_im <= 5e-68) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = 0.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -2.3e-292) tmp = 0.0; elseif (y_46_im <= 5e-68) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = 0.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -2.3e-292], 0.0, If[LessEqual[y$46$im, 5e-68], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{-292}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{-68}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -2.2999999999999999e-292 or 4.99999999999999971e-68 < y.im Initial program 42.5%
cancel-sign-sub-inv42.5%
fma-define42.5%
hypot-define42.5%
distribute-lft-neg-in42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 44.6%
unpow244.6%
unpow244.6%
hypot-undefine42.5%
Simplified42.5%
Taylor expanded in y.re around 0 8.0%
*-commutative8.0%
expm1-log1p-u7.3%
expm1-undefine16.2%
*-commutative16.2%
Applied egg-rr16.2%
Taylor expanded in y.re around 0 39.5%
if -2.2999999999999999e-292 < y.im < 4.99999999999999971e-68Initial program 37.0%
cancel-sign-sub-inv37.0%
fma-define37.0%
hypot-define37.0%
distribute-lft-neg-in37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in y.im around 0 39.9%
unpow239.9%
unpow239.9%
hypot-undefine65.1%
Simplified65.1%
Taylor expanded in y.re around 0 44.2%
Final simplification40.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 0.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 0.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 0.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 0.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 41.2%
cancel-sign-sub-inv41.2%
fma-define41.2%
hypot-define41.2%
distribute-lft-neg-in41.2%
distribute-rgt-neg-out41.2%
fma-define41.2%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 43.5%
unpow243.5%
unpow243.5%
hypot-undefine48.0%
Simplified48.0%
Taylor expanded in y.re around 0 16.7%
*-commutative16.7%
expm1-log1p-u16.1%
expm1-undefine14.8%
*-commutative14.8%
Applied egg-rr14.8%
Taylor expanded in y.re around 0 34.6%
Final simplification34.6%
herbie shell --seed 2024144
(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)))))