
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_1)))
(t_3 (* (atan2 x.im x.re) y.re))
(t_4 (sin t_3))
(t_5 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.re -1.26e-11)
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(if (<= y.re 2.3e-137)
(* t_5 (sin (fma t_0 y.im t_3)))
(if (<= y.re 2.4e-22)
(* t_5 (sin (pow (cbrt (fma (log (hypot x.im x.re)) y.im t_3)) 3.0)))
(if (<= y.re 1.8e+14)
(* t_4 t_2)
(if (<= y.re 2.5e+42)
(* t_4 (exp (- (+ (exp (log1p (* y.re t_0))) -1.0) t_1)))
(* t_2 (+ t_4 (* y.im (* t_0 (cos t_3))))))))))))
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_im * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_1);
double t_3 = atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = sin(t_3);
double t_5 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.26e-11) {
tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
} else if (y_46_re <= 2.3e-137) {
tmp = t_5 * sin(fma(t_0, y_46_im, t_3));
} else if (y_46_re <= 2.4e-22) {
tmp = t_5 * sin(pow(cbrt(fma(log(hypot(x_46_im, x_46_re)), y_46_im, t_3)), 3.0));
} else if (y_46_re <= 1.8e+14) {
tmp = t_4 * t_2;
} else if (y_46_re <= 2.5e+42) {
tmp = t_4 * exp(((exp(log1p((y_46_re * t_0))) + -1.0) - t_1));
} else {
tmp = t_2 * (t_4 + (y_46_im * (t_0 * cos(t_3))));
}
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_im * atan(x_46_im, x_46_re)) t_2 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_1)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_4 = sin(t_3) t_5 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1.26e-11) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1))); elseif (y_46_re <= 2.3e-137) tmp = Float64(t_5 * sin(fma(t_0, y_46_im, t_3))); elseif (y_46_re <= 2.4e-22) tmp = Float64(t_5 * sin((cbrt(fma(log(hypot(x_46_im, x_46_re)), y_46_im, t_3)) ^ 3.0))); elseif (y_46_re <= 1.8e+14) tmp = Float64(t_4 * t_2); elseif (y_46_re <= 2.5e+42) tmp = Float64(t_4 * exp(Float64(Float64(exp(log1p(Float64(y_46_re * t_0))) + -1.0) - t_1))); else tmp = Float64(t_2 * Float64(t_4 + Float64(y_46_im * Float64(t_0 * cos(t_3))))); 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.26e-11], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.3e-137], N[(t$95$5 * N[Sin[N[(t$95$0 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-22], N[(t$95$5 * N[Sin[N[Power[N[Power[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$3), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.8e+14], N[(t$95$4 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 2.5e+42], N[(t$95$4 * N[Exp[N[(N[(N[Exp[N[Log[1 + N[(y$46$re * t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(t$95$4 + N[(y$46$im * N[(t$95$0 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision]), $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.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_1}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_4 := \sin t\_3\\
t_5 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.re \leq -1.26 \cdot 10^{-11}:\\
\;\;\;\;t\_3 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1}\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-137}:\\
\;\;\;\;t\_5 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_3\right)\right)\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;t\_5 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.im, t\_3\right)}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+14}:\\
\;\;\;\;t\_4 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_4 \cdot e^{\left(e^{\mathsf{log1p}\left(y.re \cdot t\_0\right)} + -1\right) - t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(t\_4 + y.im \cdot \left(t\_0 \cdot \cos t\_3\right)\right)\\
\end{array}
\end{array}
if y.re < -1.26e-11Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -1.26e-11 < y.re < 2.30000000000000008e-137Initial program 41.5%
exp-diff41.5%
exp-to-pow41.5%
hypot-define41.5%
*-commutative41.5%
exp-prod41.4%
fma-define41.4%
hypot-define85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y.re around 0 86.7%
rec-exp86.8%
distribute-rgt-neg-in86.8%
Simplified86.8%
if 2.30000000000000008e-137 < y.re < 2.40000000000000002e-22Initial program 34.4%
exp-diff34.4%
exp-to-pow34.4%
hypot-define34.4%
*-commutative34.4%
exp-prod34.4%
fma-define34.4%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.re around 0 75.5%
rec-exp75.5%
distribute-rgt-neg-in75.5%
Simplified75.5%
add-cube-cbrt84.5%
pow388.1%
hypot-define43.8%
+-commutative43.8%
hypot-define88.1%
*-commutative88.1%
Applied egg-rr88.1%
if 2.40000000000000002e-22 < y.re < 1.8e14Initial program 55.4%
exp-diff44.3%
exp-to-pow44.3%
hypot-define44.3%
*-commutative44.3%
exp-prod44.3%
fma-define44.3%
hypot-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in y.im around 0 88.9%
Taylor expanded in y.im around 0 88.9%
if 1.8e14 < y.re < 2.50000000000000003e42Initial program 37.5%
expm1-log1p-u37.5%
expm1-undefine37.5%
*-commutative37.5%
hypot-define37.5%
Applied egg-rr37.5%
Taylor expanded in y.im around 0 75.0%
if 2.50000000000000003e42 < y.re Initial program 34.1%
exp-diff22.0%
exp-to-pow22.0%
hypot-define22.0%
*-commutative22.0%
exp-prod22.0%
fma-define22.0%
hypot-define56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in y.im around 0 75.7%
Taylor expanded in y.im around 0 73.3%
+-commutative73.3%
unpow273.3%
unpow273.3%
hypot-undefine85.5%
Simplified85.5%
Final simplification85.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.im (- (atan2 x.im x.re)))))
(if (<= y.im -3.2e+169)
(* (exp t_2) (+ (sin t_0) (* y.im t_1)))
(* (exp (fma t_1 y.re t_2)) (sin (fma t_1 y.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_re;
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_im * -atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -3.2e+169) {
tmp = exp(t_2) * (sin(t_0) + (y_46_im * t_1));
} else {
tmp = exp(fma(t_1, y_46_re, t_2)) * sin(fma(t_1, y_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_re) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= -3.2e+169) tmp = Float64(exp(t_2) * Float64(sin(t_0) + Float64(y_46_im * t_1))); else tmp = Float64(exp(fma(t_1, y_46_re, t_2)) * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $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$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[y$46$im, -3.2e+169], N[(N[Exp[t$95$2], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{+169}:\\
\;\;\;\;e^{t\_2} \cdot \left(\sin t\_0 + y.im \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_2\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -3.1999999999999998e169Initial program 38.1%
exp-diff29.8%
exp-to-pow29.8%
hypot-define29.8%
*-commutative29.8%
exp-prod29.8%
fma-define29.8%
hypot-define38.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in y.re around 0 50.7%
rec-exp50.7%
distribute-rgt-neg-in50.7%
Simplified50.7%
Taylor expanded in y.im around 0 62.6%
+-commutative26.2%
unpow226.2%
unpow226.2%
hypot-undefine22.3%
Simplified67.1%
Taylor expanded in y.re around 0 71.3%
if -3.1999999999999998e169 < y.im Initial program 38.6%
fmm-def38.6%
hypot-define38.6%
distribute-rgt-neg-out38.6%
fma-define38.6%
hypot-define84.4%
*-commutative84.4%
Simplified84.4%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (log (hypot x.im x.re)))
(t_3 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.re -7.5e-12)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= y.re 4e-139)
(* t_3 (sin (fma (log (hypot x.re x.im)) y.im t_1)))
(if (<= y.re 2.4e-22)
(* t_3 (sin (pow (cbrt (fma t_2 y.im t_1)) 3.0)))
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 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_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.5e-12) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (y_46_re <= 4e-139) {
tmp = t_3 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else if (y_46_re <= 2.4e-22) {
tmp = t_3 * sin(pow(cbrt(fma(t_2, y_46_im, t_1)), 3.0));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -7.5e-12) 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))); elseif (y_46_re <= 4e-139) tmp = Float64(t_3 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); elseif (y_46_re <= 2.4e-22) tmp = Float64(t_3 * sin((cbrt(fma(t_2, y_46_im, t_1)) ^ 3.0))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7.5e-12], 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], If[LessEqual[y$46$re, 4e-139], N[(t$95$3 * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-22], N[(t$95$3 * N[Sin[N[Power[N[Power[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{-139}:\\
\;\;\;\;t\_3 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;t\_3 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(t\_2, y.im, t\_1\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -7.5e-12Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -7.5e-12 < y.re < 4.00000000000000012e-139Initial program 41.5%
exp-diff41.5%
exp-to-pow41.5%
hypot-define41.5%
*-commutative41.5%
exp-prod41.4%
fma-define41.4%
hypot-define85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y.re around 0 86.7%
rec-exp86.8%
distribute-rgt-neg-in86.8%
Simplified86.8%
if 4.00000000000000012e-139 < y.re < 2.40000000000000002e-22Initial program 34.4%
exp-diff34.4%
exp-to-pow34.4%
hypot-define34.4%
*-commutative34.4%
exp-prod34.4%
fma-define34.4%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.re around 0 75.5%
rec-exp75.5%
distribute-rgt-neg-in75.5%
Simplified75.5%
add-cube-cbrt84.5%
pow388.1%
hypot-define43.8%
+-commutative43.8%
hypot-define88.1%
*-commutative88.1%
Applied egg-rr88.1%
if 2.40000000000000002e-22 < y.re Initial program 37.9%
exp-diff24.1%
exp-to-pow24.1%
hypot-define24.1%
*-commutative24.1%
exp-prod24.1%
fma-define24.1%
hypot-define56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in y.re around inf 32.9%
+-commutative32.9%
associate-/l*32.9%
unpow232.9%
unpow232.9%
hypot-undefine70.9%
Simplified70.9%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.re)))
(if (<= y.re -1.3e-11)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= y.re 2.4e-22)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (log (hypot x.re x.im)) y.im t_1)))
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))
(sin
(*
y.re
(+
(atan2 x.im x.re)
(* y.im (/ (log (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_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double tmp;
if (y_46_re <= -1.3e-11) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (y_46_re <= 2.4e-22) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(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_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) tmp = 0.0 if (y_46_re <= -1.3e-11) 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))); elseif (y_46_re <= 2.4e-22) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-11], 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], If[LessEqual[y$46$re, 2.4e-22], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(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] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -1.3e-11Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -1.3e-11 < y.re < 2.40000000000000002e-22Initial program 39.7%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod39.5%
fma-define39.5%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.re around 0 83.8%
rec-exp83.8%
distribute-rgt-neg-in83.8%
Simplified83.8%
if 2.40000000000000002e-22 < y.re Initial program 37.9%
exp-diff24.1%
exp-to-pow24.1%
hypot-define24.1%
*-commutative24.1%
exp-prod24.1%
fma-define24.1%
hypot-define56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in y.re around inf 32.9%
+-commutative32.9%
associate-/l*32.9%
unpow232.9%
unpow232.9%
hypot-undefine70.9%
Simplified70.9%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (sin t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -9e+153)
(* t_3 (+ t_1 (* y.im t_2)))
(if (<= y.im -42000.0)
(*
t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(if (<= y.im 6e+45)
(* (sin (fma t_2 y.im t_0)) (pow (hypot x.im x.re) y.re))
(* t_3 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = sin(t_0);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -9e+153) {
tmp = t_3 * (t_1 + (y_46_im * t_2));
} else if (y_46_im <= -42000.0) {
tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
} else if (y_46_im <= 6e+45) {
tmp = sin(fma(t_2, y_46_im, t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_3 * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = sin(t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -9e+153) tmp = Float64(t_3 * Float64(t_1 + Float64(y_46_im * t_2))); elseif (y_46_im <= -42000.0) tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); elseif (y_46_im <= 6e+45) tmp = Float64(sin(fma(t_2, y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_3 * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -9e+153], N[(t$95$3 * N[(t$95$1 + N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -42000.0], N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6e+45], N[(N[Sin[N[(t$95$2 * 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], N[(t$95$3 * t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \sin t\_0\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -9 \cdot 10^{+153}:\\
\;\;\;\;t\_3 \cdot \left(t\_1 + y.im \cdot t\_2\right)\\
\mathbf{elif}\;y.im \leq -42000:\\
\;\;\;\;t\_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq 6 \cdot 10^{+45}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot t\_1\\
\end{array}
\end{array}
if y.im < -9.0000000000000002e153Initial program 33.9%
exp-diff27.2%
exp-to-pow27.2%
hypot-define27.2%
*-commutative27.2%
exp-prod27.2%
fma-define27.2%
hypot-define43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in y.re around 0 50.7%
rec-exp50.7%
distribute-rgt-neg-in50.7%
Simplified50.7%
Taylor expanded in y.im around 0 57.0%
+-commutative24.6%
unpow224.6%
unpow224.6%
hypot-undefine24.9%
Simplified60.6%
Taylor expanded in y.re around 0 67.2%
if -9.0000000000000002e153 < y.im < -42000Initial program 40.5%
Taylor expanded in y.im around 0 70.2%
Taylor expanded in y.re around 0 73.5%
if -42000 < y.im < 6.00000000000000021e45Initial program 41.7%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod41.0%
fma-define41.0%
hypot-define90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in y.im around 0 68.4%
unpow268.4%
unpow268.4%
hypot-undefine91.9%
Simplified91.9%
if 6.00000000000000021e45 < y.im Initial program 32.1%
exp-diff23.2%
exp-to-pow23.2%
hypot-define23.2%
*-commutative23.2%
exp-prod23.2%
fma-define23.2%
hypot-define50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in y.re around 0 54.6%
rec-exp54.6%
distribute-rgt-neg-in54.6%
Simplified54.6%
Taylor expanded in y.im around 0 64.7%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (sin (* y.im (log (hypot x.re x.im)))))
(t_2 (* y.im (atan2 x.im x.re)))
(t_3 (* (atan2 x.im x.re) y.re))
(t_4
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(t_5 (exp (* y.im (- (atan2 x.im x.re)))))
(t_6 (* y.re (* (atan2 x.im x.re) t_5))))
(if (<= y.re -1.3e-11)
t_4
(if (<= y.re -2.4e-225)
t_6
(if (<= y.re 8.5e-97)
(* t_5 t_1)
(if (<= y.re 2.4e-22)
t_6
(if (<= y.re 3.1e+48)
t_4
(if (<= y.re 2.25e+73)
(* (sin t_3) t_0)
(* (/ t_0 (+ 1.0 t_2)) t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_re, x_46_im))));
double t_2 = y_46_im * atan2(x_46_im, x_46_re);
double t_3 = atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_5 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double t_6 = y_46_re * (atan2(x_46_im, x_46_re) * t_5);
double tmp;
if (y_46_re <= -1.3e-11) {
tmp = t_4;
} else if (y_46_re <= -2.4e-225) {
tmp = t_6;
} else if (y_46_re <= 8.5e-97) {
tmp = t_5 * t_1;
} else if (y_46_re <= 2.4e-22) {
tmp = t_6;
} else if (y_46_re <= 3.1e+48) {
tmp = t_4;
} else if (y_46_re <= 2.25e+73) {
tmp = sin(t_3) * t_0;
} else {
tmp = (t_0 / (1.0 + t_2)) * 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);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
double t_2 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = t_3 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_5 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double t_6 = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_5);
double tmp;
if (y_46_re <= -1.3e-11) {
tmp = t_4;
} else if (y_46_re <= -2.4e-225) {
tmp = t_6;
} else if (y_46_re <= 8.5e-97) {
tmp = t_5 * t_1;
} else if (y_46_re <= 2.4e-22) {
tmp = t_6;
} else if (y_46_re <= 3.1e+48) {
tmp = t_4;
} else if (y_46_re <= 2.25e+73) {
tmp = Math.sin(t_3) * t_0;
} else {
tmp = (t_0 / (1.0 + t_2)) * 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) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) t_2 = y_46_im * math.atan2(x_46_im, x_46_re) t_3 = math.atan2(x_46_im, x_46_re) * y_46_re t_4 = t_3 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) t_5 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) t_6 = y_46_re * (math.atan2(x_46_im, x_46_re) * t_5) tmp = 0 if y_46_re <= -1.3e-11: tmp = t_4 elif y_46_re <= -2.4e-225: tmp = t_6 elif y_46_re <= 8.5e-97: tmp = t_5 * t_1 elif y_46_re <= 2.4e-22: tmp = t_6 elif y_46_re <= 3.1e+48: tmp = t_4 elif y_46_re <= 2.25e+73: tmp = math.sin(t_3) * t_0 else: tmp = (t_0 / (1.0 + t_2)) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) t_2 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_4 = Float64(t_3 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2))) t_5 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) t_6 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_5)) tmp = 0.0 if (y_46_re <= -1.3e-11) tmp = t_4; elseif (y_46_re <= -2.4e-225) tmp = t_6; elseif (y_46_re <= 8.5e-97) tmp = Float64(t_5 * t_1); elseif (y_46_re <= 2.4e-22) tmp = t_6; elseif (y_46_re <= 3.1e+48) tmp = t_4; elseif (y_46_re <= 2.25e+73) tmp = Float64(sin(t_3) * t_0); else tmp = Float64(Float64(t_0 / Float64(1.0 + t_2)) * 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; t_1 = sin((y_46_im * log(hypot(x_46_re, x_46_im)))); t_2 = y_46_im * atan2(x_46_im, x_46_re); t_3 = atan2(x_46_im, x_46_re) * y_46_re; t_4 = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)); t_5 = exp((y_46_im * -atan2(x_46_im, x_46_re))); t_6 = y_46_re * (atan2(x_46_im, x_46_re) * t_5); tmp = 0.0; if (y_46_re <= -1.3e-11) tmp = t_4; elseif (y_46_re <= -2.4e-225) tmp = t_6; elseif (y_46_re <= 8.5e-97) tmp = t_5 * t_1; elseif (y_46_re <= 2.4e-22) tmp = t_6; elseif (y_46_re <= 3.1e+48) tmp = t_4; elseif (y_46_re <= 2.25e+73) tmp = sin(t_3) * t_0; else tmp = (t_0 / (1.0 + t_2)) * 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * 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$re), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-11], t$95$4, If[LessEqual[y$46$re, -2.4e-225], t$95$6, If[LessEqual[y$46$re, 8.5e-97], N[(t$95$5 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-22], t$95$6, If[LessEqual[y$46$re, 3.1e+48], t$95$4, If[LessEqual[y$46$re, 2.25e+73], N[(N[Sin[t$95$3], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(t$95$0 / N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
t_2 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_4 := t\_3 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_2}\\
t_5 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_6 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_5\right)\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-225}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{-97}:\\
\;\;\;\;t\_5 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+48}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 2.25 \cdot 10^{+73}:\\
\;\;\;\;\sin t\_3 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{1 + t\_2} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.3e-11 or 2.40000000000000002e-22 < y.re < 3.10000000000000005e48Initial program 40.4%
Taylor expanded in y.im around 0 79.8%
Taylor expanded in y.re around 0 81.6%
if -1.3e-11 < y.re < -2.39999999999999996e-225 or 8.5000000000000002e-97 < y.re < 2.40000000000000002e-22Initial program 30.8%
Taylor expanded in y.im around 0 36.0%
Taylor expanded in y.re around 0 65.4%
if -2.39999999999999996e-225 < y.re < 8.5000000000000002e-97Initial program 46.2%
exp-diff46.2%
exp-to-pow46.2%
hypot-define46.2%
*-commutative46.2%
exp-prod46.0%
fma-define46.0%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.re around 0 88.4%
rec-exp88.4%
distribute-rgt-neg-in88.4%
Simplified88.4%
Taylor expanded in y.re around 0 43.6%
+-commutative43.6%
unpow243.6%
unpow243.6%
hypot-undefine80.5%
Simplified80.5%
if 3.10000000000000005e48 < y.re < 2.24999999999999992e73Initial program 75.0%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.im around 0 100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-undefine100.0%
Simplified100.0%
if 2.24999999999999992e73 < y.re Initial program 25.7%
exp-diff14.3%
exp-to-pow14.3%
hypot-define14.3%
*-commutative14.3%
exp-prod14.3%
fma-define14.3%
hypot-define51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in y.im around 0 71.6%
Taylor expanded in y.re around 0 22.9%
+-commutative3.3%
unpow23.3%
unpow23.3%
hypot-undefine7.3%
Simplified71.6%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -1.16e-11)
(* t_1 t_2)
(if (<= y.re 2.4e-22)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.re 8.8e+72)
(* (sin t_1) t_2)
(*
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))
(sin (* y.im (log (hypot x.re x.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -1.16e-11) {
tmp = t_1 * t_2;
} else if (y_46_re <= 2.4e-22) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 8.8e+72) {
tmp = sin(t_1) * t_2;
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -1.16e-11) {
tmp = t_1 * t_2;
} else if (y_46_re <= 2.4e-22) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 8.8e+72) {
tmp = Math.sin(t_1) * t_2;
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.atan2(x_46_im, x_46_re) * y_46_re t_2 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) tmp = 0 if y_46_re <= -1.16e-11: tmp = t_1 * t_2 elif y_46_re <= 2.4e-22: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) elif y_46_re <= 8.8e+72: tmp = math.sin(t_1) * t_2 else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_re <= -1.16e-11) tmp = Float64(t_1 * t_2); elseif (y_46_re <= 2.4e-22) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_re <= 8.8e+72) tmp = Float64(sin(t_1) * t_2); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0)) * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = atan2(x_46_im, x_46_re) * y_46_re; t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); tmp = 0.0; if (y_46_re <= -1.16e-11) tmp = t_1 * t_2; elseif (y_46_re <= 2.4e-22) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_re <= 8.8e+72) tmp = sin(t_1) * t_2; else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.16e-11], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-22], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.8e+72], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], N[(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] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -1.16 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+72}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.1600000000000001e-11Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -1.1600000000000001e-11 < y.re < 2.40000000000000002e-22Initial program 39.7%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod39.5%
fma-define39.5%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.re around 0 83.8%
rec-exp83.8%
distribute-rgt-neg-in83.8%
Simplified83.8%
Taylor expanded in y.im around inf 39.6%
unpow239.6%
unpow239.6%
hypot-undefine83.8%
associate-/l*83.8%
Simplified83.8%
if 2.40000000000000002e-22 < y.re < 8.8e72Initial program 56.5%
Taylor expanded in y.im around 0 78.3%
if 8.8e72 < y.re Initial program 25.7%
exp-diff14.3%
exp-to-pow14.3%
hypot-define14.3%
*-commutative14.3%
exp-prod14.3%
fma-define14.3%
hypot-define51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in y.im around 0 71.6%
Taylor expanded in y.re around 0 22.9%
+-commutative3.3%
unpow23.3%
unpow23.3%
hypot-undefine7.3%
Simplified71.6%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -1.3e-11)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= y.re 2.4e-22)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.re 5e+72)
(* (sin t_1) t_2)
(* (/ t_2 (+ 1.0 t_0)) (sin (* y.im (log (hypot x.re x.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.3e-11) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (y_46_re <= 2.4e-22) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 5e+72) {
tmp = sin(t_1) * t_2;
} else {
tmp = (t_2 / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.3e-11) {
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 if (y_46_re <= 2.4e-22) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 5e+72) {
tmp = Math.sin(t_1) * t_2;
} else {
tmp = (t_2 / (1.0 + t_0)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.atan2(x_46_im, x_46_re) * y_46_re t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -1.3e-11: 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)) elif y_46_re <= 2.4e-22: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) elif y_46_re <= 5e+72: tmp = math.sin(t_1) * t_2 else: tmp = (t_2 / (1.0 + t_0)) * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.3e-11) 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))); elseif (y_46_re <= 2.4e-22) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_re <= 5e+72) tmp = Float64(sin(t_1) * t_2); else tmp = Float64(Float64(t_2 / Float64(1.0 + t_0)) * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = atan2(x_46_im, x_46_re) * y_46_re; t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_re <= -1.3e-11) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (y_46_re <= 2.4e-22) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_re <= 5e+72) tmp = sin(t_1) * t_2; else tmp = (t_2 / (1.0 + t_0)) * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-11], 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], If[LessEqual[y$46$re, 2.4e-22], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+72], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(t$95$2 / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{1 + t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.3e-11Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -1.3e-11 < y.re < 2.40000000000000002e-22Initial program 39.7%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod39.5%
fma-define39.5%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.re around 0 83.8%
rec-exp83.8%
distribute-rgt-neg-in83.8%
Simplified83.8%
Taylor expanded in y.im around inf 39.6%
unpow239.6%
unpow239.6%
hypot-undefine83.8%
associate-/l*83.8%
Simplified83.8%
if 2.40000000000000002e-22 < y.re < 4.99999999999999992e72Initial program 56.5%
Taylor expanded in y.im around 0 78.3%
Taylor expanded in y.im around 0 69.8%
+-commutative69.8%
unpow269.8%
unpow269.8%
hypot-undefine69.8%
Simplified69.8%
if 4.99999999999999992e72 < y.re Initial program 25.7%
exp-diff14.3%
exp-to-pow14.3%
hypot-define14.3%
*-commutative14.3%
exp-prod14.3%
fma-define14.3%
hypot-define51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in y.im around 0 71.6%
Taylor expanded in y.re around 0 22.9%
+-commutative3.3%
unpow23.3%
unpow23.3%
hypot-undefine7.3%
Simplified71.6%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* y.im (- (atan2 x.im x.re)))))
(t_1 (sin (* (atan2 x.im x.re) y.re)))
(t_2 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -9.8e-45)
(* t_1 t_2)
(if (<= y.re -2.4e-225)
(* y.re (* (atan2 x.im x.re) t_0))
(if (<= y.re 1.5e-96)
(* t_0 (sin (* y.im (log (hypot x.re x.im)))))
(* t_1 (/ t_2 (+ 1.0 (* 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 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double t_1 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -9.8e-45) {
tmp = t_1 * t_2;
} else if (y_46_re <= -2.4e-225) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
} else if (y_46_re <= 1.5e-96) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
} else {
tmp = t_1 * (t_2 / (1.0 + (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 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -9.8e-45) {
tmp = t_1 * t_2;
} else if (y_46_re <= -2.4e-225) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_0);
} else if (y_46_re <= 1.5e-96) {
tmp = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
} else {
tmp = t_1 * (t_2 / (1.0 + (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 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) t_1 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -9.8e-45: tmp = t_1 * t_2 elif y_46_re <= -2.4e-225: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_0) elif y_46_re <= 1.5e-96: tmp = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) else: tmp = t_1 * (t_2 / (1.0 + (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 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) t_1 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -9.8e-45) tmp = Float64(t_1 * t_2); elseif (y_46_re <= -2.4e-225) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)); elseif (y_46_re <= 1.5e-96) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))); else tmp = Float64(t_1 * Float64(t_2 / Float64(1.0 + Float64(y_46_im * 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 = exp((y_46_im * -atan2(x_46_im, x_46_re))); t_1 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_re <= -9.8e-45) tmp = t_1 * t_2; elseif (y_46_re <= -2.4e-225) tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_0); elseif (y_46_re <= 1.5e-96) tmp = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); else tmp = t_1 * (t_2 / (1.0 + (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[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -9.8e-45], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, -2.4e-225], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.5e-96], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$2 / N[(1.0 + N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_1 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -9.8 \cdot 10^{-45}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-225}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-96}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{t\_2}{1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.re < -9.7999999999999996e-45Initial program 38.7%
Taylor expanded in y.im around 0 77.6%
Taylor expanded in y.im around 0 75.2%
+-commutative75.2%
unpow275.2%
unpow275.2%
hypot-undefine76.4%
Simplified76.4%
if -9.7999999999999996e-45 < y.re < -2.39999999999999996e-225Initial program 32.1%
Taylor expanded in y.im around 0 41.1%
Taylor expanded in y.re around 0 70.8%
if -2.39999999999999996e-225 < y.re < 1.5e-96Initial program 46.2%
exp-diff46.2%
exp-to-pow46.2%
hypot-define46.2%
*-commutative46.2%
exp-prod46.0%
fma-define46.0%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.re around 0 88.4%
rec-exp88.4%
distribute-rgt-neg-in88.4%
Simplified88.4%
Taylor expanded in y.re around 0 43.6%
+-commutative43.6%
unpow243.6%
unpow243.6%
hypot-undefine80.5%
Simplified80.5%
if 1.5e-96 < y.re Initial program 33.8%
exp-diff23.4%
exp-to-pow23.4%
hypot-define23.4%
*-commutative23.4%
exp-prod23.4%
fma-define23.4%
hypot-define59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in y.im around 0 65.6%
Taylor expanded in y.im around 0 56.4%
Final simplification70.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.re -1.3e-11)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= y.re -2.7e-226)
(* y.re (* (atan2 x.im x.re) t_2))
(if (<= y.re 3.1e-93)
(* t_2 (sin (* y.im (log (hypot x.re x.im)))))
(* (sin t_1) (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.3e-11) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (y_46_re <= -2.7e-226) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_2);
} else if (y_46_re <= 3.1e-93) {
tmp = t_2 * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
} else {
tmp = sin(t_1) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.3e-11) {
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 if (y_46_re <= -2.7e-226) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_2);
} else if (y_46_re <= 3.1e-93) {
tmp = t_2 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
} else {
tmp = Math.sin(t_1) * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.atan2(x_46_im, x_46_re) * y_46_re t_2 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -1.3e-11: 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)) elif y_46_re <= -2.7e-226: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_2) elif y_46_re <= 3.1e-93: tmp = t_2 * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) else: tmp = math.sin(t_1) * (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1.3e-11) 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))); elseif (y_46_re <= -2.7e-226) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_2)); elseif (y_46_re <= 3.1e-93) tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))); else tmp = Float64(sin(t_1) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = atan2(x_46_im, x_46_re) * y_46_re; t_2 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -1.3e-11) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (y_46_re <= -2.7e-226) tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_2); elseif (y_46_re <= 3.1e-93) tmp = t_2 * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); else tmp = sin(t_1) * ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-11], 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], If[LessEqual[y$46$re, -2.7e-226], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-93], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$1], $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]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;y.re \leq -2.7 \cdot 10^{-226}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_2\right)\\
\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-93}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\end{array}
\end{array}
if y.re < -1.3e-11Initial program 37.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 83.6%
if -1.3e-11 < y.re < -2.70000000000000014e-226Initial program 36.3%
Taylor expanded in y.im around 0 38.0%
Taylor expanded in y.re around 0 66.1%
if -2.70000000000000014e-226 < y.re < 3.1e-93Initial program 46.2%
exp-diff46.2%
exp-to-pow46.2%
hypot-define46.2%
*-commutative46.2%
exp-prod46.0%
fma-define46.0%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.re around 0 88.4%
rec-exp88.4%
distribute-rgt-neg-in88.4%
Simplified88.4%
Taylor expanded in y.re around 0 43.6%
+-commutative43.6%
unpow243.6%
unpow243.6%
hypot-undefine80.5%
Simplified80.5%
if 3.1e-93 < y.re Initial program 33.8%
exp-diff23.4%
exp-to-pow23.4%
hypot-define23.4%
*-commutative23.4%
exp-prod23.4%
fma-define23.4%
hypot-define59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in y.im around 0 65.6%
Taylor expanded in y.im around 0 56.4%
Final simplification72.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* y.im (- (atan2 x.im x.re)))))
(t_1 (* y.re (* (atan2 x.im x.re) t_0)))
(t_2
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.re x.im) y.re))))
(if (<= y.re -9.8e-45)
t_2
(if (<= y.re -1.45e-225)
t_1
(if (<= y.re 1.7e-93)
(* t_0 (sin (* y.im (log (hypot x.re x.im)))))
(if (<= y.re 2.4e-22) t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
double t_2 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -9.8e-45) {
tmp = t_2;
} else if (y_46_re <= -1.45e-225) {
tmp = t_1;
} else if (y_46_re <= 1.7e-93) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
} else if (y_46_re <= 2.4e-22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double t_1 = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_0);
double t_2 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -9.8e-45) {
tmp = t_2;
} else if (y_46_re <= -1.45e-225) {
tmp = t_1;
} else if (y_46_re <= 1.7e-93) {
tmp = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
} else if (y_46_re <= 2.4e-22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) t_1 = y_46_re * (math.atan2(x_46_im, x_46_re) * t_0) t_2 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -9.8e-45: tmp = t_2 elif y_46_re <= -1.45e-225: tmp = t_1 elif y_46_re <= 1.7e-93: tmp = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) elif y_46_re <= 2.4e-22: tmp = t_1 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)) t_2 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -9.8e-45) tmp = t_2; elseif (y_46_re <= -1.45e-225) tmp = t_1; elseif (y_46_re <= 1.7e-93) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))); elseif (y_46_re <= 2.4e-22) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((y_46_im * -atan2(x_46_im, x_46_re))); t_1 = y_46_re * (atan2(x_46_im, x_46_re) * t_0); t_2 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re); tmp = 0.0; if (y_46_re <= -9.8e-45) tmp = t_2; elseif (y_46_re <= -1.45e-225) tmp = t_1; elseif (y_46_re <= 1.7e-93) tmp = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (y_46_re <= 2.4e-22) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.8e-45], t$95$2, If[LessEqual[y$46$re, -1.45e-225], t$95$1, If[LessEqual[y$46$re, 1.7e-93], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-22], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_1 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\right)\\
t_2 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -9.8 \cdot 10^{-45}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.45 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-93}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -9.7999999999999996e-45 or 2.40000000000000002e-22 < y.re Initial program 38.4%
Taylor expanded in y.im around 0 72.5%
Taylor expanded in y.im around 0 69.0%
+-commutative69.0%
unpow269.0%
unpow269.0%
hypot-undefine69.7%
Simplified69.7%
if -9.7999999999999996e-45 < y.re < -1.4499999999999999e-225 or 1.70000000000000001e-93 < y.re < 2.40000000000000002e-22Initial program 27.7%
Taylor expanded in y.im around 0 37.6%
Taylor expanded in y.re around 0 68.1%
if -1.4499999999999999e-225 < y.re < 1.70000000000000001e-93Initial program 46.2%
exp-diff46.2%
exp-to-pow46.2%
hypot-define46.2%
*-commutative46.2%
exp-prod46.0%
fma-define46.0%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.re around 0 88.4%
rec-exp88.4%
distribute-rgt-neg-in88.4%
Simplified88.4%
Taylor expanded in y.re around 0 43.6%
+-commutative43.6%
unpow243.6%
unpow243.6%
hypot-undefine80.5%
Simplified80.5%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re)))
(t_1 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -1.65e-39)
(* y.re (* (atan2 x.im x.re) t_1))
(if (<= y.im 2.55e+42)
(* t_0 (pow (hypot x.re x.im) y.re))
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.65e-39) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_im <= 2.55e+42) {
tmp = t_0 * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = 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.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.65e-39) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_im <= 2.55e+42) {
tmp = t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -1.65e-39: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_1) elif y_46_im <= 2.55e+42: tmp = t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.65e-39) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_1)); elseif (y_46_im <= 2.55e+42) tmp = Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = 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 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_1 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -1.65e-39) tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1); elseif (y_46_im <= 2.55e+42) tmp = t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re); else tmp = 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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.65e-39], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.55e+42], N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -1.65 \cdot 10^{-39}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_1\right)\\
\mathbf{elif}\;y.im \leq 2.55 \cdot 10^{+42}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -1.64999999999999992e-39Initial program 37.8%
Taylor expanded in y.im around 0 51.2%
Taylor expanded in y.re around 0 53.0%
if -1.64999999999999992e-39 < y.im < 2.55e42Initial program 41.7%
Taylor expanded in y.im around 0 54.3%
Taylor expanded in y.im around 0 54.3%
+-commutative54.3%
unpow254.3%
unpow254.3%
hypot-undefine65.3%
Simplified65.3%
if 2.55e42 < y.im Initial program 32.1%
exp-diff23.2%
exp-to-pow23.2%
hypot-define23.2%
*-commutative23.2%
exp-prod23.2%
fma-define23.2%
hypot-define50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in y.re around 0 54.6%
rec-exp54.6%
distribute-rgt-neg-in54.6%
Simplified54.6%
Taylor expanded in y.im around 0 64.7%
Final simplification61.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -9.8e-45) (not (<= y.re 2.4e-22))) (* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.re x.im) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.8e-45) || !(y_46_re <= 2.4e-22)) {
tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.8e-45) || !(y_46_re <= 2.4e-22)) {
tmp = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -9.8e-45) or not (y_46_re <= 2.4e-22): tmp = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -9.8e-45) || !(y_46_re <= 2.4e-22)) tmp = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -9.8e-45) || ~((y_46_re <= 2.4e-22))) tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * (hypot(x_46_re, x_46_im) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -9.8e-45], N[Not[LessEqual[y$46$re, 2.4e-22]], $MachinePrecision]], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.8 \cdot 10^{-45} \lor \neg \left(y.re \leq 2.4 \cdot 10^{-22}\right):\\
\;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -9.7999999999999996e-45 or 2.40000000000000002e-22 < y.re Initial program 38.4%
Taylor expanded in y.im around 0 72.5%
Taylor expanded in y.im around 0 69.0%
+-commutative69.0%
unpow269.0%
unpow269.0%
hypot-undefine69.7%
Simplified69.7%
if -9.7999999999999996e-45 < y.re < 2.40000000000000002e-22Initial program 38.8%
Taylor expanded in y.im around 0 31.1%
Taylor expanded in y.re around 0 52.8%
Final simplification61.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(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)
\end{array}
Initial program 38.6%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in y.re around 0 41.5%
Final simplification41.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (exp (* y.im (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * atan2(x_46im, x_46re))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * atan(x_46_im, x_46_re))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)
\end{array}
Initial program 38.6%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in y.re around 0 41.5%
add-sqr-sqrt23.2%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod10.4%
add-sqr-sqrt18.5%
distribute-rgt-neg-in18.5%
Applied egg-rr18.5%
Taylor expanded in y.re around 0 18.5%
Final simplification18.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (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) {
return 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
code = 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) {
return 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): return 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) return 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) tmp = atan2(x_46_im, x_46_re) * y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re
\end{array}
Initial program 38.6%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in y.re around 0 41.5%
add-sqr-sqrt23.2%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod10.4%
add-sqr-sqrt18.5%
distribute-rgt-neg-in18.5%
Applied egg-rr18.5%
Taylor expanded in y.im around 0 16.1%
Final simplification16.1%
herbie shell --seed 2024130
(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)))))