
(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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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 13 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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(cos (* y.im (log (/ -1.0 x.im))))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (cos (fma (log (hypot x.re x.im)) y.im t_1)))
(t_3 (* t_2 (pow (hypot x.im x.re) y.re)))
(t_4 (cos t_1))
(t_5 (* t_2 (exp (* (atan2 x.im x.re) (- y.im)))))
(t_6 (* (atan2 x.im x.re) y.im))
(t_7 (exp (- (* y.re (log x.re)) t_6)))
(t_8 (* t_4 (exp (- (* y.re (log x.im)) t_6))))
(t_9 (* t_4 t_7))
(t_10 (* (exp (- (* y.re (log (- x.re))) t_6)) t_4))
(t_11
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_6)))
(t_12 (* t_4 t_11))
(t_13 (* t_7 (cos (+ t_1 (* y.im (log x.re)))))))
(if (<= x.re -1e+120)
t_10
(if (<= x.re -1.9e-34)
t_11
(if (<= x.re -4.8e-52)
t_10
(if (<= x.re -4.3e-57)
t_3
(if (<= x.re -1.12e-114)
t_11
(if (<= x.re -1.6e-124)
t_5
(if (<= x.re -1e-154)
t_8
(if (<= x.re -2.65e-163)
t_0
(if (<= x.re -3.2e-192)
t_5
(if (<= x.re -6.4e-232)
t_3
(if (<= x.re -7.2e-258)
t_11
(if (<= x.re -4.5e-258)
t_5
(if (<= x.re -9.5e-260)
t_11
(if (<= x.re -1.6e-278)
t_10
(if (<= x.re 5e-310)
t_11
(if (<= x.re 1.1e-305)
t_9
(if (<= x.re 8.2e-294)
t_11
(if (<= x.re 1.05e-267)
t_13
(if (<= x.re 1.15e-261)
t_11
(if (<= x.re 6.2e-242)
t_5
(if (<= x.re 4.1e-204)
t_9
(if (<= x.re 3.5e-196)
t_5
(if (<= x.re 9.5e-189)
t_11
(if (<= x.re 4.5e-171)
t_3
(if (<= x.re 3.7e-147)
t_11
(if (<= x.re 6.4e-69)
t_13
(if (<= x.re 5.3e-61)
t_3
(if (<= x.re 3.6e-23)
t_12
(if (<=
x.re
4.15e-22)
t_5
(if (<=
x.re
2.1e+42)
t_12
(if (<=
x.re
8e+130)
t_13
(if (<=
x.re
8.5e+132)
t_5
(if (<=
x.re
1.1e+176)
t_13
(if (<=
x.re
2.7e+177)
t_3
(if (<=
x.re
2.6e+252)
t_13
(if (<=
x.re
4e+253)
t_11
(if (<=
x.re
2.4e+284)
t_9
(if (<=
x.re
1.12e+288)
t_11
(if (<=
x.re
2.4e+291)
t_0
(if (<=
x.re
2.9e+291)
t_8
t_11))))))))))))))))))))))))))))))))))))))))))
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) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * cos((y_46_im * log((-1.0 / x_46_im))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
double t_3 = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = cos(t_1);
double t_5 = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_6 = atan2(x_46_im, x_46_re) * y_46_im;
double t_7 = exp(((y_46_re * log(x_46_re)) - t_6));
double t_8 = t_4 * exp(((y_46_re * log(x_46_im)) - t_6));
double t_9 = t_4 * t_7;
double t_10 = exp(((y_46_re * log(-x_46_re)) - t_6)) * t_4;
double t_11 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_6));
double t_12 = t_4 * t_11;
double t_13 = t_7 * cos((t_1 + (y_46_im * log(x_46_re))));
double tmp;
if (x_46_re <= -1e+120) {
tmp = t_10;
} else if (x_46_re <= -1.9e-34) {
tmp = t_11;
} else if (x_46_re <= -4.8e-52) {
tmp = t_10;
} else if (x_46_re <= -4.3e-57) {
tmp = t_3;
} else if (x_46_re <= -1.12e-114) {
tmp = t_11;
} else if (x_46_re <= -1.6e-124) {
tmp = t_5;
} else if (x_46_re <= -1e-154) {
tmp = t_8;
} else if (x_46_re <= -2.65e-163) {
tmp = t_0;
} else if (x_46_re <= -3.2e-192) {
tmp = t_5;
} else if (x_46_re <= -6.4e-232) {
tmp = t_3;
} else if (x_46_re <= -7.2e-258) {
tmp = t_11;
} else if (x_46_re <= -4.5e-258) {
tmp = t_5;
} else if (x_46_re <= -9.5e-260) {
tmp = t_11;
} else if (x_46_re <= -1.6e-278) {
tmp = t_10;
} else if (x_46_re <= 5e-310) {
tmp = t_11;
} else if (x_46_re <= 1.1e-305) {
tmp = t_9;
} else if (x_46_re <= 8.2e-294) {
tmp = t_11;
} else if (x_46_re <= 1.05e-267) {
tmp = t_13;
} else if (x_46_re <= 1.15e-261) {
tmp = t_11;
} else if (x_46_re <= 6.2e-242) {
tmp = t_5;
} else if (x_46_re <= 4.1e-204) {
tmp = t_9;
} else if (x_46_re <= 3.5e-196) {
tmp = t_5;
} else if (x_46_re <= 9.5e-189) {
tmp = t_11;
} else if (x_46_re <= 4.5e-171) {
tmp = t_3;
} else if (x_46_re <= 3.7e-147) {
tmp = t_11;
} else if (x_46_re <= 6.4e-69) {
tmp = t_13;
} else if (x_46_re <= 5.3e-61) {
tmp = t_3;
} else if (x_46_re <= 3.6e-23) {
tmp = t_12;
} else if (x_46_re <= 4.15e-22) {
tmp = t_5;
} else if (x_46_re <= 2.1e+42) {
tmp = t_12;
} else if (x_46_re <= 8e+130) {
tmp = t_13;
} else if (x_46_re <= 8.5e+132) {
tmp = t_5;
} else if (x_46_re <= 1.1e+176) {
tmp = t_13;
} else if (x_46_re <= 2.7e+177) {
tmp = t_3;
} else if (x_46_re <= 2.6e+252) {
tmp = t_13;
} else if (x_46_re <= 4e+253) {
tmp = t_11;
} else if (x_46_re <= 2.4e+284) {
tmp = t_9;
} else if (x_46_re <= 1.12e+288) {
tmp = t_11;
} else if (x_46_re <= 2.4e+291) {
tmp = t_0;
} else if (x_46_re <= 2.9e+291) {
tmp = t_8;
} else {
tmp = t_11;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * cos(Float64(y_46_im * log(Float64(-1.0 / x_46_im))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) t_3 = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_4 = cos(t_1) t_5 = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_6 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_7 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_6)) t_8 = Float64(t_4 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_6))) t_9 = Float64(t_4 * t_7) t_10 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_6)) * t_4) t_11 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_6)) t_12 = Float64(t_4 * t_11) t_13 = Float64(t_7 * cos(Float64(t_1 + Float64(y_46_im * log(x_46_re))))) tmp = 0.0 if (x_46_re <= -1e+120) tmp = t_10; elseif (x_46_re <= -1.9e-34) tmp = t_11; elseif (x_46_re <= -4.8e-52) tmp = t_10; elseif (x_46_re <= -4.3e-57) tmp = t_3; elseif (x_46_re <= -1.12e-114) tmp = t_11; elseif (x_46_re <= -1.6e-124) tmp = t_5; elseif (x_46_re <= -1e-154) tmp = t_8; elseif (x_46_re <= -2.65e-163) tmp = t_0; elseif (x_46_re <= -3.2e-192) tmp = t_5; elseif (x_46_re <= -6.4e-232) tmp = t_3; elseif (x_46_re <= -7.2e-258) tmp = t_11; elseif (x_46_re <= -4.5e-258) tmp = t_5; elseif (x_46_re <= -9.5e-260) tmp = t_11; elseif (x_46_re <= -1.6e-278) tmp = t_10; elseif (x_46_re <= 5e-310) tmp = t_11; elseif (x_46_re <= 1.1e-305) tmp = t_9; elseif (x_46_re <= 8.2e-294) tmp = t_11; elseif (x_46_re <= 1.05e-267) tmp = t_13; elseif (x_46_re <= 1.15e-261) tmp = t_11; elseif (x_46_re <= 6.2e-242) tmp = t_5; elseif (x_46_re <= 4.1e-204) tmp = t_9; elseif (x_46_re <= 3.5e-196) tmp = t_5; elseif (x_46_re <= 9.5e-189) tmp = t_11; elseif (x_46_re <= 4.5e-171) tmp = t_3; elseif (x_46_re <= 3.7e-147) tmp = t_11; elseif (x_46_re <= 6.4e-69) tmp = t_13; elseif (x_46_re <= 5.3e-61) tmp = t_3; elseif (x_46_re <= 3.6e-23) tmp = t_12; elseif (x_46_re <= 4.15e-22) tmp = t_5; elseif (x_46_re <= 2.1e+42) tmp = t_12; elseif (x_46_re <= 8e+130) tmp = t_13; elseif (x_46_re <= 8.5e+132) tmp = t_5; elseif (x_46_re <= 1.1e+176) tmp = t_13; elseif (x_46_re <= 2.7e+177) tmp = t_3; elseif (x_46_re <= 2.6e+252) tmp = t_13; elseif (x_46_re <= 4e+253) tmp = t_11; elseif (x_46_re <= 2.4e+284) tmp = t_9; elseif (x_46_re <= 1.12e+288) tmp = t_11; elseif (x_46_re <= 2.4e+291) tmp = t_0; elseif (x_46_re <= 2.9e+291) tmp = t_8; else tmp = t_11; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$4 * t$95$7), $MachinePrecision]}, Block[{t$95$10 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$11 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$6), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$12 = N[(t$95$4 * t$95$11), $MachinePrecision]}, Block[{t$95$13 = N[(t$95$7 * N[Cos[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1e+120], t$95$10, If[LessEqual[x$46$re, -1.9e-34], t$95$11, If[LessEqual[x$46$re, -4.8e-52], t$95$10, If[LessEqual[x$46$re, -4.3e-57], t$95$3, If[LessEqual[x$46$re, -1.12e-114], t$95$11, If[LessEqual[x$46$re, -1.6e-124], t$95$5, If[LessEqual[x$46$re, -1e-154], t$95$8, If[LessEqual[x$46$re, -2.65e-163], t$95$0, If[LessEqual[x$46$re, -3.2e-192], t$95$5, If[LessEqual[x$46$re, -6.4e-232], t$95$3, If[LessEqual[x$46$re, -7.2e-258], t$95$11, If[LessEqual[x$46$re, -4.5e-258], t$95$5, If[LessEqual[x$46$re, -9.5e-260], t$95$11, If[LessEqual[x$46$re, -1.6e-278], t$95$10, If[LessEqual[x$46$re, 5e-310], t$95$11, If[LessEqual[x$46$re, 1.1e-305], t$95$9, If[LessEqual[x$46$re, 8.2e-294], t$95$11, If[LessEqual[x$46$re, 1.05e-267], t$95$13, If[LessEqual[x$46$re, 1.15e-261], t$95$11, If[LessEqual[x$46$re, 6.2e-242], t$95$5, If[LessEqual[x$46$re, 4.1e-204], t$95$9, If[LessEqual[x$46$re, 3.5e-196], t$95$5, If[LessEqual[x$46$re, 9.5e-189], t$95$11, If[LessEqual[x$46$re, 4.5e-171], t$95$3, If[LessEqual[x$46$re, 3.7e-147], t$95$11, If[LessEqual[x$46$re, 6.4e-69], t$95$13, If[LessEqual[x$46$re, 5.3e-61], t$95$3, If[LessEqual[x$46$re, 3.6e-23], t$95$12, If[LessEqual[x$46$re, 4.15e-22], t$95$5, If[LessEqual[x$46$re, 2.1e+42], t$95$12, If[LessEqual[x$46$re, 8e+130], t$95$13, If[LessEqual[x$46$re, 8.5e+132], t$95$5, If[LessEqual[x$46$re, 1.1e+176], t$95$13, If[LessEqual[x$46$re, 2.7e+177], t$95$3, If[LessEqual[x$46$re, 2.6e+252], t$95$13, If[LessEqual[x$46$re, 4e+253], t$95$11, If[LessEqual[x$46$re, 2.4e+284], t$95$9, If[LessEqual[x$46$re, 1.12e+288], t$95$11, If[LessEqual[x$46$re, 2.4e+291], t$95$0, If[LessEqual[x$46$re, 2.9e+291], t$95$8, t$95$11]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}}} \cdot \cos \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
t_3 := t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := \cos t\_1\\
t_5 := t\_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_7 := e^{y.re \cdot \log x.re - t\_6}\\
t_8 := t\_4 \cdot e^{y.re \cdot \log x.im - t\_6}\\
t_9 := t\_4 \cdot t\_7\\
t_10 := e^{y.re \cdot \log \left(-x.re\right) - t\_6} \cdot t\_4\\
t_11 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_6}\\
t_12 := t\_4 \cdot t\_11\\
t_13 := t\_7 \cdot \cos \left(t\_1 + y.im \cdot \log x.re\right)\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{+120}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;x.re \leq -1.9 \cdot 10^{-34}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;x.re \leq -4.3 \cdot 10^{-57}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -1.12 \cdot 10^{-114}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-124}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-154}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -2.65 \cdot 10^{-163}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -3.2 \cdot 10^{-192}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -6.4 \cdot 10^{-232}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -7.2 \cdot 10^{-258}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq -4.5 \cdot 10^{-258}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -9.5 \cdot 10^{-260}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-278}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{-310}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 1.1 \cdot 10^{-305}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;x.re \leq 8.2 \cdot 10^{-294}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 1.05 \cdot 10^{-267}:\\
\;\;\;\;t\_13\\
\mathbf{elif}\;x.re \leq 1.15 \cdot 10^{-261}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{-242}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 4.1 \cdot 10^{-204}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;x.re \leq 3.5 \cdot 10^{-196}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 9.5 \cdot 10^{-189}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 3.7 \cdot 10^{-147}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 6.4 \cdot 10^{-69}:\\
\;\;\;\;t\_13\\
\mathbf{elif}\;x.re \leq 5.3 \cdot 10^{-61}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-23}:\\
\;\;\;\;t\_12\\
\mathbf{elif}\;x.re \leq 4.15 \cdot 10^{-22}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{+42}:\\
\;\;\;\;t\_12\\
\mathbf{elif}\;x.re \leq 8 \cdot 10^{+130}:\\
\;\;\;\;t\_13\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{+132}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.1 \cdot 10^{+176}:\\
\;\;\;\;t\_13\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{+177}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+252}:\\
\;\;\;\;t\_13\\
\mathbf{elif}\;x.re \leq 4 \cdot 10^{+253}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+284}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;x.re \leq 1.12 \cdot 10^{+288}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+291}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 2.9 \cdot 10^{+291}:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_11\\
\end{array}
\end{array}
if x.re < -9.9999999999999998e119 or -1.9000000000000001e-34 < x.re < -4.8000000000000003e-52 or -9.5000000000000001e-260 < x.re < -1.60000000000000009e-278Initial program 16.7%
Taylor expanded in y.im around 0 49.1%
Taylor expanded in x.re around -inf 92.0%
mul-1-neg92.0%
Simplified92.0%
if -9.9999999999999998e119 < x.re < -1.9000000000000001e-34 or -4.30000000000000022e-57 < x.re < -1.11999999999999995e-114 or -6.39999999999999973e-232 < x.re < -7.19999999999999958e-258 or -4.50000000000000008e-258 < x.re < -9.5000000000000001e-260 or -1.60000000000000009e-278 < x.re < 4.999999999999985e-310 or 1.09999999999999998e-305 < x.re < 8.1999999999999998e-294 or 1.0500000000000001e-267 < x.re < 1.15e-261 or 3.50000000000000004e-196 < x.re < 9.499999999999999e-189 or 4.5000000000000004e-171 < x.re < 3.7000000000000002e-147 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 1.12e288 or 2.9000000000000001e291 < x.re Initial program 52.9%
Taylor expanded in y.im around 0 72.2%
Taylor expanded in y.re around 0 85.5%
if -4.8000000000000003e-52 < x.re < -4.30000000000000022e-57 or -3.2000000000000002e-192 < x.re < -6.39999999999999973e-232 or 9.499999999999999e-189 < x.re < 4.5000000000000004e-171 or 6.39999999999999997e-69 < x.re < 5.3e-61 or 1.10000000000000004e176 < x.re < 2.69999999999999991e177Initial program 62.5%
exp-diff54.2%
exp-to-pow54.2%
hypot-define54.2%
*-commutative54.2%
exp-prod54.2%
fma-define54.2%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.im around 0 71.5%
unpow271.5%
unpow271.5%
hypot-undefine88.4%
Simplified88.4%
if -1.11999999999999995e-114 < x.re < -1.60000000000000002e-124 or -2.65000000000000008e-163 < x.re < -3.2000000000000002e-192 or -7.19999999999999958e-258 < x.re < -4.50000000000000008e-258 or 1.15e-261 < x.re < 6.20000000000000031e-242 or 4.1000000000000001e-204 < x.re < 3.50000000000000004e-196 or 3.5999999999999998e-23 < x.re < 4.14999999999999981e-22 or 8.0000000000000005e130 < x.re < 8.49999999999999969e132Initial program 33.3%
exp-diff27.8%
exp-to-pow27.8%
hypot-define27.8%
*-commutative27.8%
exp-prod27.8%
fma-define27.8%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.re around 0 72.5%
rec-exp72.5%
distribute-rgt-neg-in72.5%
Simplified72.5%
if -1.60000000000000002e-124 < x.re < -9.9999999999999997e-155 or 2.4e291 < x.re < 2.9000000000000001e291Initial program 71.4%
Taylor expanded in y.im around 0 86.2%
Taylor expanded in x.re around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -9.9999999999999997e-155 < x.re < -2.65000000000000008e-163 or 1.12e288 < x.re < 2.4e291Initial program 33.3%
exp-diff33.3%
exp-to-pow33.3%
hypot-define33.3%
*-commutative33.3%
exp-prod33.3%
fma-define33.3%
hypot-define33.9%
*-commutative33.9%
Simplified33.9%
Taylor expanded in x.im around -inf 40.3%
+-commutative40.3%
mul-1-neg40.3%
unsub-neg40.3%
Simplified40.3%
Taylor expanded in y.re around 0 73.7%
cos-neg73.7%
Simplified73.7%
if 4.999999999999985e-310 < x.re < 1.09999999999999998e-305 or 6.20000000000000031e-242 < x.re < 4.1000000000000001e-204 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284Initial program 38.5%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in x.re around inf 100.0%
if 8.1999999999999998e-294 < x.re < 1.0500000000000001e-267 or 3.7000000000000002e-147 < x.re < 6.39999999999999997e-69 or 2.09999999999999995e42 < x.re < 8.0000000000000005e130 or 8.49999999999999969e132 < x.re < 1.10000000000000004e176 or 2.69999999999999991e177 < x.re < 2.60000000000000018e252Initial program 41.4%
Taylor expanded in x.re around inf 69.7%
Taylor expanded in x.re around inf 95.2%
if 5.3e-61 < x.re < 3.5999999999999998e-23 or 4.14999999999999981e-22 < x.re < 2.09999999999999995e42Initial program 76.5%
Taylor expanded in y.im around 0 100.0%
Final simplification90.2%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im))))
(t_4 (* y.im (log (hypot x.im x.re)))))
(if (<= (* (cos (+ (* t_2 y.im) t_0)) t_3) (- INFINITY))
(* (- (cos t_4) (* y.re (* (atan2 x.im x.re) (sin t_4)))) t_3)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_4 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if ((cos(((t_2 * y_46_im) + t_0)) * t_3) <= -((double) INFINITY)) {
tmp = (cos(t_4) - (y_46_re * (atan2(x_46_im, x_46_re) * sin(t_4)))) * t_3;
} else {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(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(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_4 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (Float64(cos(Float64(Float64(t_2 * y_46_im) + t_0)) * t_3) <= Float64(-Inf)) tmp = Float64(Float64(cos(t_4) - Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * sin(t_4)))) * t_3); else tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(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[(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]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Cos[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], (-Infinity)], N[(N[(N[Cos[t$95$4], $MachinePrecision] - N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], 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[Cos[N[(t$95$1 * y$46$im + t$95$0), $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)\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;\cos \left(t\_2 \cdot y.im + t\_0\right) \cdot t\_3 \leq -\infty:\\
\;\;\;\;\left(\cos t\_4 - y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sin t\_4\right)\right) \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 42.3%
Taylor expanded in y.re around 0 65.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
hypot-undefine65.4%
mul-1-neg65.4%
unsub-neg65.4%
Simplified65.4%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 44.3%
cancel-sign-sub-inv44.3%
fma-define44.3%
hypot-define44.3%
distribute-lft-neg-in44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define86.3%
*-commutative86.3%
Simplified86.3%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (hypot x.re x.im))))
(if (<= (* (cos (+ (* t_0 y.im) t_2)) t_1) INFINITY)
(* (cos (* y.im (log (hypot x.im x.re)))) t_1)
(*
(exp (fma t_3 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (fma t_3 y.im t_2))))))
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))));
double t_1 = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((cos(((t_0 * y_46_im) + t_2)) * t_1) <= ((double) INFINITY)) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else {
tmp = exp(fma(t_3, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_3, y_46_im, t_2));
}
return tmp;
}
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)))) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (Float64(cos(Float64(Float64(t_0 * y_46_im) + t_2)) * t_1) <= Inf) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); else tmp = Float64(exp(fma(t_3, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_3, y_46_im, t_2))); 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[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], Infinity], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Exp[N[(t$95$3 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$3 * y$46$im + t$95$2), $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)\\
t_1 := e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;\cos \left(t\_0 \cdot y.im + t\_2\right) \cdot t\_1 \leq \infty:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_3, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_3, y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 79.6%
Taylor expanded in y.re around 0 83.8%
unpow283.8%
unpow283.8%
hypot-undefine83.8%
Simplified83.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
cancel-sign-sub-inv0.0%
fma-define0.0%
hypot-define0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define84.6%
*-commutative84.6%
Simplified84.6%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= (* (cos (+ (* t_1 y.im) t_0)) t_2) INFINITY)
(* (cos (* y.im (log (hypot x.im x.re)))) t_2)
(*
(cos (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)))))))
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(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((cos(((t_1 * y_46_im) + t_0)) * t_2) <= ((double) INFINITY)) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2;
} else {
tmp = cos(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)));
}
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(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(cos(Float64(Float64(t_1 * y_46_im) + t_0)) * t_2) <= Inf) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2); else tmp = Float64(cos(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)))); 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[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Cos[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], Infinity], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[Cos[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]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;\cos \left(t\_1 \cdot y.im + t\_0\right) \cdot t\_2 \leq \infty:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\cos \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}}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 79.6%
Taylor expanded in y.re around 0 83.8%
unpow283.8%
unpow283.8%
hypot-undefine83.8%
Simplified83.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-define0.0%
*-commutative0.0%
exp-prod0.0%
fma-define0.0%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= (* (cos (+ (* t_1 y.im) t_0)) t_2) INFINITY)
(* (cos (* y.im (log (hypot x.im x.re)))) t_2)
(*
(cos (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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((cos(((t_1 * y_46_im) + t_0)) * t_2) <= ((double) INFINITY)) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2;
} else {
tmp = cos(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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(cos(Float64(Float64(t_1 * y_46_im) + t_0)) * t_2) <= Inf) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_2); else tmp = Float64(cos(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[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Cos[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], Infinity], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[Cos[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 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;\cos \left(t\_1 \cdot y.im + t\_0\right) \cdot t\_2 \leq \infty:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\cos \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 (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 79.6%
Taylor expanded in y.re around 0 83.8%
unpow283.8%
unpow283.8%
hypot-undefine83.8%
Simplified83.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-define0.0%
*-commutative0.0%
exp-prod0.0%
fma-define0.0%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 41.8%
unpow241.8%
unpow241.8%
hypot-undefine67.4%
Simplified67.4%
Final simplification76.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (cos t_0))
(t_2 (cos (fma (log (hypot x.re x.im)) y.im t_0)))
(t_3 (* t_2 (pow (hypot x.im x.re) y.re)))
(t_4 (* t_2 (exp (* (atan2 x.im x.re) (- y.im)))))
(t_5 (* (atan2 x.im x.re) y.im))
(t_6 (* (exp (- (* y.re (log (- x.re))) t_5)) t_1))
(t_7 (exp (- (* y.re (log x.re)) t_5)))
(t_8
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_5)))
(t_9 (* t_1 t_8))
(t_10 (* t_7 (cos (+ t_0 (* y.im (log x.re))))))
(t_11 (* t_1 t_7)))
(if (<= y.re -0.0122)
t_9
(if (<= y.re -1.6e-122)
t_4
(if (<= y.re -2e-128)
t_10
(if (<= y.re -1.65e-143)
t_8
(if (<= y.re -6.5e-150)
t_3
(if (<= y.re -1.8e-169)
t_4
(if (<= y.re -7.3e-171)
t_10
(if (<= y.re -2.3e-178)
t_9
(if (<= y.re -1.15e-179)
(* t_1 (exp (- (* y.re (log x.im)) t_5)))
(if (<= y.re -1.1e-179)
(*
t_1
(exp
(-
(*
y.re
(log (+ x.im (* 0.5 (/ (pow x.re 2.0) x.im)))))
t_5)))
(if (<= y.re -2.7e-211)
t_3
(if (<= y.re -2.4e-226)
t_8
(if (<= y.re -2.4e-286)
t_4
(if (<= y.re -5e-288)
t_10
(if (<= y.re -6.2e-291)
t_6
(if (<= y.re 6.4e-208)
t_4
(if (<= y.re 1e-164)
t_6
(if (<= y.re 5.4e-160)
t_3
(if (<= y.re 9.2e-147)
t_4
(if (<= y.re 3.9e-121)
t_8
(if (<= y.re 9.5e-20)
t_4
(if (<= y.re 1.5e-13)
t_3
(if (<= y.re 9.5e-12)
t_8
(if (<= y.re 1.1e-11)
t_11
(if (<= y.re 1.2e+70)
t_8
(if (<= y.re 1.02e+89)
t_11
(if (<= y.re 4.5e+152)
t_8
(if (<= y.re 4.6e+152)
t_6
(if (<= y.re 5e+174)
t_3
(if (<=
y.re
5.6e+199)
t_9
(if (<=
y.re
8.8e+204)
t_4
(if (<=
y.re
8.5e+205)
t_10
(if (<=
y.re
2.8e+210)
t_6
(if (<=
y.re
2.4e+224)
t_4
(if (<=
y.re
1e+266)
t_9
t_8)))))))))))))))))))))))))))))))))))))
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 = cos(t_0);
double t_2 = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
double t_3 = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_5 = atan2(x_46_im, x_46_re) * y_46_im;
double t_6 = exp(((y_46_re * log(-x_46_re)) - t_5)) * t_1;
double t_7 = exp(((y_46_re * log(x_46_re)) - t_5));
double t_8 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_5));
double t_9 = t_1 * t_8;
double t_10 = t_7 * cos((t_0 + (y_46_im * log(x_46_re))));
double t_11 = t_1 * t_7;
double tmp;
if (y_46_re <= -0.0122) {
tmp = t_9;
} else if (y_46_re <= -1.6e-122) {
tmp = t_4;
} else if (y_46_re <= -2e-128) {
tmp = t_10;
} else if (y_46_re <= -1.65e-143) {
tmp = t_8;
} else if (y_46_re <= -6.5e-150) {
tmp = t_3;
} else if (y_46_re <= -1.8e-169) {
tmp = t_4;
} else if (y_46_re <= -7.3e-171) {
tmp = t_10;
} else if (y_46_re <= -2.3e-178) {
tmp = t_9;
} else if (y_46_re <= -1.15e-179) {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_5));
} else if (y_46_re <= -1.1e-179) {
tmp = t_1 * exp(((y_46_re * log((x_46_im + (0.5 * (pow(x_46_re, 2.0) / x_46_im))))) - t_5));
} else if (y_46_re <= -2.7e-211) {
tmp = t_3;
} else if (y_46_re <= -2.4e-226) {
tmp = t_8;
} else if (y_46_re <= -2.4e-286) {
tmp = t_4;
} else if (y_46_re <= -5e-288) {
tmp = t_10;
} else if (y_46_re <= -6.2e-291) {
tmp = t_6;
} else if (y_46_re <= 6.4e-208) {
tmp = t_4;
} else if (y_46_re <= 1e-164) {
tmp = t_6;
} else if (y_46_re <= 5.4e-160) {
tmp = t_3;
} else if (y_46_re <= 9.2e-147) {
tmp = t_4;
} else if (y_46_re <= 3.9e-121) {
tmp = t_8;
} else if (y_46_re <= 9.5e-20) {
tmp = t_4;
} else if (y_46_re <= 1.5e-13) {
tmp = t_3;
} else if (y_46_re <= 9.5e-12) {
tmp = t_8;
} else if (y_46_re <= 1.1e-11) {
tmp = t_11;
} else if (y_46_re <= 1.2e+70) {
tmp = t_8;
} else if (y_46_re <= 1.02e+89) {
tmp = t_11;
} else if (y_46_re <= 4.5e+152) {
tmp = t_8;
} else if (y_46_re <= 4.6e+152) {
tmp = t_6;
} else if (y_46_re <= 5e+174) {
tmp = t_3;
} else if (y_46_re <= 5.6e+199) {
tmp = t_9;
} else if (y_46_re <= 8.8e+204) {
tmp = t_4;
} else if (y_46_re <= 8.5e+205) {
tmp = t_10;
} else if (y_46_re <= 2.8e+210) {
tmp = t_6;
} else if (y_46_re <= 2.4e+224) {
tmp = t_4;
} else if (y_46_re <= 1e+266) {
tmp = t_9;
} else {
tmp = t_8;
}
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 = cos(t_0) t_2 = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) t_3 = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_4 = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_5 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_6 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_5)) * t_1) t_7 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_5)) t_8 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_5)) t_9 = Float64(t_1 * t_8) t_10 = Float64(t_7 * cos(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) t_11 = Float64(t_1 * t_7) tmp = 0.0 if (y_46_re <= -0.0122) tmp = t_9; elseif (y_46_re <= -1.6e-122) tmp = t_4; elseif (y_46_re <= -2e-128) tmp = t_10; elseif (y_46_re <= -1.65e-143) tmp = t_8; elseif (y_46_re <= -6.5e-150) tmp = t_3; elseif (y_46_re <= -1.8e-169) tmp = t_4; elseif (y_46_re <= -7.3e-171) tmp = t_10; elseif (y_46_re <= -2.3e-178) tmp = t_9; elseif (y_46_re <= -1.15e-179) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_5))); elseif (y_46_re <= -1.1e-179) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(x_46_im + Float64(0.5 * Float64((x_46_re ^ 2.0) / x_46_im))))) - t_5))); elseif (y_46_re <= -2.7e-211) tmp = t_3; elseif (y_46_re <= -2.4e-226) tmp = t_8; elseif (y_46_re <= -2.4e-286) tmp = t_4; elseif (y_46_re <= -5e-288) tmp = t_10; elseif (y_46_re <= -6.2e-291) tmp = t_6; elseif (y_46_re <= 6.4e-208) tmp = t_4; elseif (y_46_re <= 1e-164) tmp = t_6; elseif (y_46_re <= 5.4e-160) tmp = t_3; elseif (y_46_re <= 9.2e-147) tmp = t_4; elseif (y_46_re <= 3.9e-121) tmp = t_8; elseif (y_46_re <= 9.5e-20) tmp = t_4; elseif (y_46_re <= 1.5e-13) tmp = t_3; elseif (y_46_re <= 9.5e-12) tmp = t_8; elseif (y_46_re <= 1.1e-11) tmp = t_11; elseif (y_46_re <= 1.2e+70) tmp = t_8; elseif (y_46_re <= 1.02e+89) tmp = t_11; elseif (y_46_re <= 4.5e+152) tmp = t_8; elseif (y_46_re <= 4.6e+152) tmp = t_6; elseif (y_46_re <= 5e+174) tmp = t_3; elseif (y_46_re <= 5.6e+199) tmp = t_9; elseif (y_46_re <= 8.8e+204) tmp = t_4; elseif (y_46_re <= 8.5e+205) tmp = t_10; elseif (y_46_re <= 2.8e+210) tmp = t_6; elseif (y_46_re <= 2.4e+224) tmp = t_4; elseif (y_46_re <= 1e+266) tmp = t_9; else tmp = t_8; 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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$6 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$9 = N[(t$95$1 * t$95$8), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$7 * N[Cos[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$1 * t$95$7), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0122], t$95$9, If[LessEqual[y$46$re, -1.6e-122], t$95$4, If[LessEqual[y$46$re, -2e-128], t$95$10, If[LessEqual[y$46$re, -1.65e-143], t$95$8, If[LessEqual[y$46$re, -6.5e-150], t$95$3, If[LessEqual[y$46$re, -1.8e-169], t$95$4, If[LessEqual[y$46$re, -7.3e-171], t$95$10, If[LessEqual[y$46$re, -2.3e-178], t$95$9, If[LessEqual[y$46$re, -1.15e-179], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.1e-179], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$im + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.7e-211], t$95$3, If[LessEqual[y$46$re, -2.4e-226], t$95$8, If[LessEqual[y$46$re, -2.4e-286], t$95$4, If[LessEqual[y$46$re, -5e-288], t$95$10, If[LessEqual[y$46$re, -6.2e-291], t$95$6, If[LessEqual[y$46$re, 6.4e-208], t$95$4, If[LessEqual[y$46$re, 1e-164], t$95$6, If[LessEqual[y$46$re, 5.4e-160], t$95$3, If[LessEqual[y$46$re, 9.2e-147], t$95$4, If[LessEqual[y$46$re, 3.9e-121], t$95$8, If[LessEqual[y$46$re, 9.5e-20], t$95$4, If[LessEqual[y$46$re, 1.5e-13], t$95$3, If[LessEqual[y$46$re, 9.5e-12], t$95$8, If[LessEqual[y$46$re, 1.1e-11], t$95$11, If[LessEqual[y$46$re, 1.2e+70], t$95$8, If[LessEqual[y$46$re, 1.02e+89], t$95$11, If[LessEqual[y$46$re, 4.5e+152], t$95$8, If[LessEqual[y$46$re, 4.6e+152], t$95$6, If[LessEqual[y$46$re, 5e+174], t$95$3, If[LessEqual[y$46$re, 5.6e+199], t$95$9, If[LessEqual[y$46$re, 8.8e+204], t$95$4, If[LessEqual[y$46$re, 8.5e+205], t$95$10, If[LessEqual[y$46$re, 2.8e+210], t$95$6, If[LessEqual[y$46$re, 2.4e+224], t$95$4, If[LessEqual[y$46$re, 1e+266], t$95$9, t$95$8]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \cos t\_0\\
t_2 := \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
t_3 := t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := t\_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_5 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_6 := e^{y.re \cdot \log \left(-x.re\right) - t\_5} \cdot t\_1\\
t_7 := e^{y.re \cdot \log x.re - t\_5}\\
t_8 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_5}\\
t_9 := t\_1 \cdot t\_8\\
t_10 := t\_7 \cdot \cos \left(t\_0 + y.im \cdot \log x.re\right)\\
t_11 := t\_1 \cdot t\_7\\
\mathbf{if}\;y.re \leq -0.0122:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;y.re \leq -1.6 \cdot 10^{-122}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -2 \cdot 10^{-128}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-143}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq -6.5 \cdot 10^{-150}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -1.8 \cdot 10^{-169}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -7.3 \cdot 10^{-171}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;y.re \leq -2.3 \cdot 10^{-178}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;y.re \leq -1.15 \cdot 10^{-179}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_5}\\
\mathbf{elif}\;y.re \leq -1.1 \cdot 10^{-179}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}\right) - t\_5}\\
\mathbf{elif}\;y.re \leq -2.7 \cdot 10^{-211}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-226}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-286}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -5 \cdot 10^{-288}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;y.re \leq -6.2 \cdot 10^{-291}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-208}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 10^{-164}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{-160}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-147}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 3.9 \cdot 10^{-121}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-13}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-12}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-11}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+70}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq 1.02 \cdot 10^{+89}:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{+152}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{+152}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+174}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{+199}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+204}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+205}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{+210}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{+224}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 10^{+266}:\\
\;\;\;\;t\_9\\
\mathbf{else}:\\
\;\;\;\;t\_8\\
\end{array}
\end{array}
if y.re < -0.0122000000000000008 or -7.30000000000000015e-171 < y.re < -2.29999999999999994e-178 or 4.9999999999999997e174 < y.re < 5.6000000000000002e199 or 2.40000000000000001e224 < y.re < 1e266Initial program 50.0%
Taylor expanded in y.im around 0 81.1%
if -0.0122000000000000008 < y.re < -1.6000000000000001e-122 or -6.49999999999999997e-150 < y.re < -1.80000000000000001e-169 or -2.4e-226 < y.re < -2.39999999999999993e-286 or -6.20000000000000023e-291 < y.re < 6.4000000000000003e-208 or 5.40000000000000019e-160 < y.re < 9.19999999999999962e-147 or 3.9e-121 < y.re < 9.5e-20 or 5.6000000000000002e199 < y.re < 8.80000000000000046e204 or 2.8000000000000002e210 < y.re < 2.40000000000000001e224Initial program 47.0%
exp-diff45.8%
exp-to-pow45.8%
hypot-define45.8%
*-commutative45.8%
exp-prod45.8%
fma-define45.8%
hypot-define93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in y.re around 0 94.3%
rec-exp94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -1.6000000000000001e-122 < y.re < -2.00000000000000011e-128 or -1.80000000000000001e-169 < y.re < -7.30000000000000015e-171 or -2.39999999999999993e-286 < y.re < -5.00000000000000011e-288 or 8.80000000000000046e204 < y.re < 8.49999999999999997e205Initial program 40.0%
Taylor expanded in x.re around inf 50.9%
Taylor expanded in x.re around inf 90.2%
if -2.00000000000000011e-128 < y.re < -1.65e-143 or -2.6999999999999999e-211 < y.re < -2.4e-226 or 9.19999999999999962e-147 < y.re < 3.9e-121 or 1.49999999999999992e-13 < y.re < 9.4999999999999995e-12 or 1.1000000000000001e-11 < y.re < 1.19999999999999993e70 or 1.0199999999999999e89 < y.re < 4.5000000000000001e152 or 1e266 < y.re Initial program 47.9%
Taylor expanded in y.im around 0 81.3%
Taylor expanded in y.re around 0 95.9%
if -1.65e-143 < y.re < -6.49999999999999997e-150 or -1.10000000000000002e-179 < y.re < -2.6999999999999999e-211 or 9.99999999999999962e-165 < y.re < 5.40000000000000019e-160 or 9.5e-20 < y.re < 1.49999999999999992e-13 or 4.5999999999999997e152 < y.re < 4.9999999999999997e174Initial program 31.3%
exp-diff31.3%
exp-to-pow31.3%
hypot-define31.3%
*-commutative31.3%
exp-prod31.3%
fma-define31.3%
hypot-define75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in y.im around 0 57.2%
unpow257.2%
unpow257.2%
hypot-undefine81.4%
Simplified81.4%
if -2.29999999999999994e-178 < y.re < -1.14999999999999994e-179Initial program 0.0%
Taylor expanded in y.im around 0 3.1%
Taylor expanded in x.re around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.14999999999999994e-179 < y.re < -1.10000000000000002e-179Initial program 0.0%
Taylor expanded in y.im around 0 3.1%
Taylor expanded in x.re around 0 3.1%
if -5.00000000000000011e-288 < y.re < -6.20000000000000023e-291 or 6.4000000000000003e-208 < y.re < 9.99999999999999962e-165 or 4.5000000000000001e152 < y.re < 4.5999999999999997e152 or 8.49999999999999997e205 < y.re < 2.8000000000000002e210Initial program 0.0%
Taylor expanded in y.im around 0 38.5%
Taylor expanded in x.re around -inf 75.4%
mul-1-neg75.4%
Simplified75.4%
if 9.4999999999999995e-12 < y.re < 1.1000000000000001e-11 or 1.19999999999999993e70 < y.re < 1.0199999999999999e89Initial program 0.0%
Taylor expanded in y.im around 0 51.2%
Taylor expanded in x.re around inf 100.0%
Final simplification88.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (cos t_0))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re (log x.re)) t_2)))
(t_4 (* t_3 (cos (+ t_0 (* y.im (log x.re))))))
(t_5
(*
(cos (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.im x.re) y.re)))
(t_6 (* t_1 t_3))
(t_7 (* (exp (- (* y.re (log (- x.re))) t_2)) t_1))
(t_8
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_2))))
(if (<= x.re -7e+119)
t_7
(if (<= x.re -2e-46)
t_8
(if (<= x.re -7e-53)
t_7
(if (<= x.re -4.3e-57)
t_5
(if (<= x.re -2e-115)
t_8
(if (<= x.re -1.95e-115)
(*
t_1
(exp
(-
(* y.re (log (+ x.im (* 0.5 (/ (pow x.re 2.0) x.im)))))
t_2)))
(if (<= x.re -1.78e-124)
t_5
(if (<= x.re -7.5e-149)
t_8
(if (<= x.re -4.3e-160)
t_5
(if (<= x.re -1.15e-192)
t_8
(if (<= x.re -9.8e-234)
t_5
(if (<= x.re -7.6e-260)
t_8
(if (<= x.re -5e-310)
t_7
(if (<= x.re 9e-306)
t_6
(if (<= x.re 2.35e-297)
t_8
(if (<= x.re 9e-267)
t_4
(if (<= x.re 2.6e-242)
t_5
(if (<= x.re 3.05e-192)
t_4
(if (<= x.re 9e-189)
t_8
(if (<= x.re 5.5e-171)
t_5
(if (<= x.re 1.55e-148)
t_8
(if (<= x.re 5.3e-73)
t_4
(if (<= x.re 1.36e-61)
t_5
(if (<= x.re 4.2e+42)
(* t_1 t_8)
(if (<= x.re 6.8e+132)
t_4
(if (<= x.re 7.5e+132)
t_5
(if (<= x.re 9.2e+175)
t_4
(if (<= x.re 2.7e+177)
t_5
(if (<=
x.re
2.6e+252)
t_4
(if (<=
x.re
4e+253)
t_8
(if (<=
x.re
2.4e+284)
t_6
(if (or (<=
x.re
2.5e+284)
(not
(<=
x.re
3.8e+293)))
t_8
t_4))))))))))))))))))))))))))))))))))
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 = cos(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(x_46_re)) - t_2));
double t_4 = t_3 * cos((t_0 + (y_46_im * log(x_46_re))));
double t_5 = cos(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);
double t_6 = t_1 * t_3;
double t_7 = exp(((y_46_re * log(-x_46_re)) - t_2)) * t_1;
double t_8 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2));
double tmp;
if (x_46_re <= -7e+119) {
tmp = t_7;
} else if (x_46_re <= -2e-46) {
tmp = t_8;
} else if (x_46_re <= -7e-53) {
tmp = t_7;
} else if (x_46_re <= -4.3e-57) {
tmp = t_5;
} else if (x_46_re <= -2e-115) {
tmp = t_8;
} else if (x_46_re <= -1.95e-115) {
tmp = t_1 * exp(((y_46_re * log((x_46_im + (0.5 * (pow(x_46_re, 2.0) / x_46_im))))) - t_2));
} else if (x_46_re <= -1.78e-124) {
tmp = t_5;
} else if (x_46_re <= -7.5e-149) {
tmp = t_8;
} else if (x_46_re <= -4.3e-160) {
tmp = t_5;
} else if (x_46_re <= -1.15e-192) {
tmp = t_8;
} else if (x_46_re <= -9.8e-234) {
tmp = t_5;
} else if (x_46_re <= -7.6e-260) {
tmp = t_8;
} else if (x_46_re <= -5e-310) {
tmp = t_7;
} else if (x_46_re <= 9e-306) {
tmp = t_6;
} else if (x_46_re <= 2.35e-297) {
tmp = t_8;
} else if (x_46_re <= 9e-267) {
tmp = t_4;
} else if (x_46_re <= 2.6e-242) {
tmp = t_5;
} else if (x_46_re <= 3.05e-192) {
tmp = t_4;
} else if (x_46_re <= 9e-189) {
tmp = t_8;
} else if (x_46_re <= 5.5e-171) {
tmp = t_5;
} else if (x_46_re <= 1.55e-148) {
tmp = t_8;
} else if (x_46_re <= 5.3e-73) {
tmp = t_4;
} else if (x_46_re <= 1.36e-61) {
tmp = t_5;
} else if (x_46_re <= 4.2e+42) {
tmp = t_1 * t_8;
} else if (x_46_re <= 6.8e+132) {
tmp = t_4;
} else if (x_46_re <= 7.5e+132) {
tmp = t_5;
} else if (x_46_re <= 9.2e+175) {
tmp = t_4;
} else if (x_46_re <= 2.7e+177) {
tmp = t_5;
} else if (x_46_re <= 2.6e+252) {
tmp = t_4;
} else if (x_46_re <= 4e+253) {
tmp = t_8;
} else if (x_46_re <= 2.4e+284) {
tmp = t_6;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_8;
} else {
tmp = t_4;
}
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 = cos(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) t_4 = Float64(t_3 * cos(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) t_5 = Float64(cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_6 = Float64(t_1 * t_3) t_7 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_2)) * t_1) t_8 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_2)) tmp = 0.0 if (x_46_re <= -7e+119) tmp = t_7; elseif (x_46_re <= -2e-46) tmp = t_8; elseif (x_46_re <= -7e-53) tmp = t_7; elseif (x_46_re <= -4.3e-57) tmp = t_5; elseif (x_46_re <= -2e-115) tmp = t_8; elseif (x_46_re <= -1.95e-115) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(x_46_im + Float64(0.5 * Float64((x_46_re ^ 2.0) / x_46_im))))) - t_2))); elseif (x_46_re <= -1.78e-124) tmp = t_5; elseif (x_46_re <= -7.5e-149) tmp = t_8; elseif (x_46_re <= -4.3e-160) tmp = t_5; elseif (x_46_re <= -1.15e-192) tmp = t_8; elseif (x_46_re <= -9.8e-234) tmp = t_5; elseif (x_46_re <= -7.6e-260) tmp = t_8; elseif (x_46_re <= -5e-310) tmp = t_7; elseif (x_46_re <= 9e-306) tmp = t_6; elseif (x_46_re <= 2.35e-297) tmp = t_8; elseif (x_46_re <= 9e-267) tmp = t_4; elseif (x_46_re <= 2.6e-242) tmp = t_5; elseif (x_46_re <= 3.05e-192) tmp = t_4; elseif (x_46_re <= 9e-189) tmp = t_8; elseif (x_46_re <= 5.5e-171) tmp = t_5; elseif (x_46_re <= 1.55e-148) tmp = t_8; elseif (x_46_re <= 5.3e-73) tmp = t_4; elseif (x_46_re <= 1.36e-61) tmp = t_5; elseif (x_46_re <= 4.2e+42) tmp = Float64(t_1 * t_8); elseif (x_46_re <= 6.8e+132) tmp = t_4; elseif (x_46_re <= 7.5e+132) tmp = t_5; elseif (x_46_re <= 9.2e+175) tmp = t_4; elseif (x_46_re <= 2.7e+177) tmp = t_5; elseif (x_46_re <= 2.6e+252) tmp = t_4; elseif (x_46_re <= 4e+253) tmp = t_8; elseif (x_46_re <= 2.4e+284) tmp = t_6; elseif ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) tmp = t_8; else tmp = t_4; 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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Cos[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Cos[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]}, Block[{t$95$6 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$7 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$8 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -7e+119], t$95$7, If[LessEqual[x$46$re, -2e-46], t$95$8, If[LessEqual[x$46$re, -7e-53], t$95$7, If[LessEqual[x$46$re, -4.3e-57], t$95$5, If[LessEqual[x$46$re, -2e-115], t$95$8, If[LessEqual[x$46$re, -1.95e-115], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$im + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.78e-124], t$95$5, If[LessEqual[x$46$re, -7.5e-149], t$95$8, If[LessEqual[x$46$re, -4.3e-160], t$95$5, If[LessEqual[x$46$re, -1.15e-192], t$95$8, If[LessEqual[x$46$re, -9.8e-234], t$95$5, If[LessEqual[x$46$re, -7.6e-260], t$95$8, If[LessEqual[x$46$re, -5e-310], t$95$7, If[LessEqual[x$46$re, 9e-306], t$95$6, If[LessEqual[x$46$re, 2.35e-297], t$95$8, If[LessEqual[x$46$re, 9e-267], t$95$4, If[LessEqual[x$46$re, 2.6e-242], t$95$5, If[LessEqual[x$46$re, 3.05e-192], t$95$4, If[LessEqual[x$46$re, 9e-189], t$95$8, If[LessEqual[x$46$re, 5.5e-171], t$95$5, If[LessEqual[x$46$re, 1.55e-148], t$95$8, If[LessEqual[x$46$re, 5.3e-73], t$95$4, If[LessEqual[x$46$re, 1.36e-61], t$95$5, If[LessEqual[x$46$re, 4.2e+42], N[(t$95$1 * t$95$8), $MachinePrecision], If[LessEqual[x$46$re, 6.8e+132], t$95$4, If[LessEqual[x$46$re, 7.5e+132], t$95$5, If[LessEqual[x$46$re, 9.2e+175], t$95$4, If[LessEqual[x$46$re, 2.7e+177], t$95$5, If[LessEqual[x$46$re, 2.6e+252], t$95$4, If[LessEqual[x$46$re, 4e+253], t$95$8, If[LessEqual[x$46$re, 2.4e+284], t$95$6, If[Or[LessEqual[x$46$re, 2.5e+284], N[Not[LessEqual[x$46$re, 3.8e+293]], $MachinePrecision]], t$95$8, t$95$4]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \cos t\_0\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log x.re - t\_2}\\
t_4 := t\_3 \cdot \cos \left(t\_0 + y.im \cdot \log x.re\right)\\
t_5 := \cos \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}\\
t_6 := t\_1 \cdot t\_3\\
t_7 := e^{y.re \cdot \log \left(-x.re\right) - t\_2} \cdot t\_1\\
t_8 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_2}\\
\mathbf{if}\;x.re \leq -7 \cdot 10^{+119}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-46}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -7 \cdot 10^{-53}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -4.3 \cdot 10^{-57}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-115}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -1.95 \cdot 10^{-115}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}\right) - t\_2}\\
\mathbf{elif}\;x.re \leq -1.78 \cdot 10^{-124}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -7.5 \cdot 10^{-149}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -4.3 \cdot 10^{-160}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -1.15 \cdot 10^{-192}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -9.8 \cdot 10^{-234}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -7.6 \cdot 10^{-260}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 9 \cdot 10^{-306}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 2.35 \cdot 10^{-297}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq 9 \cdot 10^{-267}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-242}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3.05 \cdot 10^{-192}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 9 \cdot 10^{-189}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-171}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.55 \cdot 10^{-148}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq 5.3 \cdot 10^{-73}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 1.36 \cdot 10^{-61}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+42}:\\
\;\;\;\;t\_1 \cdot t\_8\\
\mathbf{elif}\;x.re \leq 6.8 \cdot 10^{+132}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+132}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 9.2 \cdot 10^{+175}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{+177}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+252}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 4 \cdot 10^{+253}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+284}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{+284} \lor \neg \left(x.re \leq 3.8 \cdot 10^{+293}\right):\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x.re < -7.0000000000000001e119 or -2.00000000000000005e-46 < x.re < -6.99999999999999987e-53 or -7.6000000000000006e-260 < x.re < -4.999999999999985e-310Initial program 22.6%
Taylor expanded in y.im around 0 52.0%
Taylor expanded in x.re around -inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -7.0000000000000001e119 < x.re < -2.00000000000000005e-46 or -4.30000000000000022e-57 < x.re < -2.0000000000000001e-115 or -1.78e-124 < x.re < -7.49999999999999995e-149 or -4.30000000000000014e-160 < x.re < -1.15000000000000009e-192 or -9.80000000000000015e-234 < x.re < -7.6000000000000006e-260 or 9.00000000000000009e-306 < x.re < 2.34999999999999993e-297 or 3.05e-192 < x.re < 8.9999999999999992e-189 or 5.50000000000000037e-171 < x.re < 1.5500000000000001e-148 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 48.6%
Taylor expanded in y.im around 0 70.2%
Taylor expanded in y.re around 0 84.4%
if -6.99999999999999987e-53 < x.re < -4.30000000000000022e-57 or -1.9499999999999999e-115 < x.re < -1.78e-124 or -7.49999999999999995e-149 < x.re < -4.30000000000000014e-160 or -1.15000000000000009e-192 < x.re < -9.80000000000000015e-234 or 8.9999999999999999e-267 < x.re < 2.60000000000000017e-242 or 8.9999999999999992e-189 < x.re < 5.50000000000000037e-171 or 5.29999999999999972e-73 < x.re < 1.35999999999999995e-61 or 6.80000000000000051e132 < x.re < 7.50000000000000017e132 or 9.1999999999999998e175 < x.re < 2.69999999999999991e177Initial program 63.2%
exp-diff55.3%
exp-to-pow55.3%
hypot-define55.3%
*-commutative55.3%
exp-prod55.3%
fma-define55.3%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 64.1%
unpow264.1%
unpow264.1%
hypot-undefine82.5%
Simplified82.5%
if -2.0000000000000001e-115 < x.re < -1.9499999999999999e-115Initial program 0.0%
Taylor expanded in y.im around 0 0.0%
Taylor expanded in x.re around 0 1.6%
if -4.999999999999985e-310 < x.re < 9.00000000000000009e-306 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284Initial program 25.0%
Taylor expanded in y.im around 0 51.6%
Taylor expanded in x.re around inf 100.0%
if 2.34999999999999993e-297 < x.re < 8.9999999999999999e-267 or 2.60000000000000017e-242 < x.re < 3.05e-192 or 1.5500000000000001e-148 < x.re < 5.29999999999999972e-73 or 4.19999999999999991e42 < x.re < 6.80000000000000051e132 or 7.50000000000000017e132 < x.re < 9.1999999999999998e175 or 2.69999999999999991e177 < x.re < 2.60000000000000018e252 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 40.3%
Taylor expanded in x.re around inf 66.1%
Taylor expanded in x.re around inf 93.4%
if 1.35999999999999995e-61 < x.re < 4.19999999999999991e42Initial program 72.2%
Taylor expanded in y.im around 0 94.4%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (cos t_0))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re (log x.re)) t_2)))
(t_4 (* t_1 t_3))
(t_5 (* t_3 (cos (+ t_0 (* y.im (log x.re))))))
(t_6 (* (exp (- (* y.re (log (- x.re))) t_2)) t_1))
(t_7
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_2))))
(if (<= x.re -9.5e+119)
t_6
(if (<= x.re -4e-46)
t_7
(if (<= x.re -6.6e-49)
t_6
(if (<= x.re -9.5e-95)
t_7
(if (<= x.re -5.3e-121)
t_6
(if (<= x.re -4.5e-154)
(* t_1 (exp (- (* y.re (log x.im)) t_2)))
(if (<= x.re -9.5e-206)
t_7
(if (<= x.re -6e-233)
t_6
(if (<= x.re -1.14e-259)
t_7
(if (<= x.re -5e-310)
t_6
(if (<= x.re 2.5e-304)
t_4
(if (<= x.re 5e-296)
t_7
(if (<= x.re 7.2e-268)
t_5
(if (<= x.re 3.95e-262)
t_7
(if (<= x.re 1.76e-246)
t_4
(if (<= x.re 2.15e-237)
t_7
(if (<= x.re 3e-192)
t_5
(if (<= x.re 9.5e-189)
t_7
(if (<= x.re 1e-187)
t_4
(if (<= x.re 2.5e-174)
t_7
(if (<= x.re 5.5e-171)
t_4
(if (<= x.re 6.2e-148)
t_7
(if (<= x.re 1.75e-65)
t_5
(if (<= x.re 8e-60)
t_7
(if (<= x.re 7.5e-39)
t_4
(if (<= x.re 0.00048)
t_7
(if (<= x.re 4.8e+42)
t_4
(if (<= x.re 2.3e+132)
t_5
(if (<=
x.re
8.5e+132)
t_7
(if (<=
x.re
2.6e+252)
t_5
(if (<=
x.re
4e+253)
t_7
(if (<=
x.re
2.4e+284)
t_4
(if (or (<=
x.re
2.5e+284)
(not
(<=
x.re
3.8e+293)))
t_7
t_5)))))))))))))))))))))))))))))))))))
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 = cos(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(x_46_re)) - t_2));
double t_4 = t_1 * t_3;
double t_5 = t_3 * cos((t_0 + (y_46_im * log(x_46_re))));
double t_6 = exp(((y_46_re * log(-x_46_re)) - t_2)) * t_1;
double t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2));
double tmp;
if (x_46_re <= -9.5e+119) {
tmp = t_6;
} else if (x_46_re <= -4e-46) {
tmp = t_7;
} else if (x_46_re <= -6.6e-49) {
tmp = t_6;
} else if (x_46_re <= -9.5e-95) {
tmp = t_7;
} else if (x_46_re <= -5.3e-121) {
tmp = t_6;
} else if (x_46_re <= -4.5e-154) {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_2));
} else if (x_46_re <= -9.5e-206) {
tmp = t_7;
} else if (x_46_re <= -6e-233) {
tmp = t_6;
} else if (x_46_re <= -1.14e-259) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 2.5e-304) {
tmp = t_4;
} else if (x_46_re <= 5e-296) {
tmp = t_7;
} else if (x_46_re <= 7.2e-268) {
tmp = t_5;
} else if (x_46_re <= 3.95e-262) {
tmp = t_7;
} else if (x_46_re <= 1.76e-246) {
tmp = t_4;
} else if (x_46_re <= 2.15e-237) {
tmp = t_7;
} else if (x_46_re <= 3e-192) {
tmp = t_5;
} else if (x_46_re <= 9.5e-189) {
tmp = t_7;
} else if (x_46_re <= 1e-187) {
tmp = t_4;
} else if (x_46_re <= 2.5e-174) {
tmp = t_7;
} else if (x_46_re <= 5.5e-171) {
tmp = t_4;
} else if (x_46_re <= 6.2e-148) {
tmp = t_7;
} else if (x_46_re <= 1.75e-65) {
tmp = t_5;
} else if (x_46_re <= 8e-60) {
tmp = t_7;
} else if (x_46_re <= 7.5e-39) {
tmp = t_4;
} else if (x_46_re <= 0.00048) {
tmp = t_7;
} else if (x_46_re <= 4.8e+42) {
tmp = t_4;
} else if (x_46_re <= 2.3e+132) {
tmp = t_5;
} else if (x_46_re <= 8.5e+132) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_5;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_4;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = cos(t_0)
t_2 = atan2(x_46im, x_46re) * y_46im
t_3 = exp(((y_46re * log(x_46re)) - t_2))
t_4 = t_1 * t_3
t_5 = t_3 * cos((t_0 + (y_46im * log(x_46re))))
t_6 = exp(((y_46re * log(-x_46re)) - t_2)) * t_1
t_7 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_2))
if (x_46re <= (-9.5d+119)) then
tmp = t_6
else if (x_46re <= (-4d-46)) then
tmp = t_7
else if (x_46re <= (-6.6d-49)) then
tmp = t_6
else if (x_46re <= (-9.5d-95)) then
tmp = t_7
else if (x_46re <= (-5.3d-121)) then
tmp = t_6
else if (x_46re <= (-4.5d-154)) then
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_2))
else if (x_46re <= (-9.5d-206)) then
tmp = t_7
else if (x_46re <= (-6d-233)) then
tmp = t_6
else if (x_46re <= (-1.14d-259)) then
tmp = t_7
else if (x_46re <= (-5d-310)) then
tmp = t_6
else if (x_46re <= 2.5d-304) then
tmp = t_4
else if (x_46re <= 5d-296) then
tmp = t_7
else if (x_46re <= 7.2d-268) then
tmp = t_5
else if (x_46re <= 3.95d-262) then
tmp = t_7
else if (x_46re <= 1.76d-246) then
tmp = t_4
else if (x_46re <= 2.15d-237) then
tmp = t_7
else if (x_46re <= 3d-192) then
tmp = t_5
else if (x_46re <= 9.5d-189) then
tmp = t_7
else if (x_46re <= 1d-187) then
tmp = t_4
else if (x_46re <= 2.5d-174) then
tmp = t_7
else if (x_46re <= 5.5d-171) then
tmp = t_4
else if (x_46re <= 6.2d-148) then
tmp = t_7
else if (x_46re <= 1.75d-65) then
tmp = t_5
else if (x_46re <= 8d-60) then
tmp = t_7
else if (x_46re <= 7.5d-39) then
tmp = t_4
else if (x_46re <= 0.00048d0) then
tmp = t_7
else if (x_46re <= 4.8d+42) then
tmp = t_4
else if (x_46re <= 2.3d+132) then
tmp = t_5
else if (x_46re <= 8.5d+132) then
tmp = t_7
else if (x_46re <= 2.6d+252) then
tmp = t_5
else if (x_46re <= 4d+253) then
tmp = t_7
else if (x_46re <= 2.4d+284) then
tmp = t_4
else if ((x_46re <= 2.5d+284) .or. (.not. (x_46re <= 3.8d+293))) then
tmp = t_7
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.cos(t_0);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2));
double t_4 = t_1 * t_3;
double t_5 = t_3 * Math.cos((t_0 + (y_46_im * Math.log(x_46_re))));
double t_6 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_2)) * t_1;
double t_7 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2));
double tmp;
if (x_46_re <= -9.5e+119) {
tmp = t_6;
} else if (x_46_re <= -4e-46) {
tmp = t_7;
} else if (x_46_re <= -6.6e-49) {
tmp = t_6;
} else if (x_46_re <= -9.5e-95) {
tmp = t_7;
} else if (x_46_re <= -5.3e-121) {
tmp = t_6;
} else if (x_46_re <= -4.5e-154) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_2));
} else if (x_46_re <= -9.5e-206) {
tmp = t_7;
} else if (x_46_re <= -6e-233) {
tmp = t_6;
} else if (x_46_re <= -1.14e-259) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 2.5e-304) {
tmp = t_4;
} else if (x_46_re <= 5e-296) {
tmp = t_7;
} else if (x_46_re <= 7.2e-268) {
tmp = t_5;
} else if (x_46_re <= 3.95e-262) {
tmp = t_7;
} else if (x_46_re <= 1.76e-246) {
tmp = t_4;
} else if (x_46_re <= 2.15e-237) {
tmp = t_7;
} else if (x_46_re <= 3e-192) {
tmp = t_5;
} else if (x_46_re <= 9.5e-189) {
tmp = t_7;
} else if (x_46_re <= 1e-187) {
tmp = t_4;
} else if (x_46_re <= 2.5e-174) {
tmp = t_7;
} else if (x_46_re <= 5.5e-171) {
tmp = t_4;
} else if (x_46_re <= 6.2e-148) {
tmp = t_7;
} else if (x_46_re <= 1.75e-65) {
tmp = t_5;
} else if (x_46_re <= 8e-60) {
tmp = t_7;
} else if (x_46_re <= 7.5e-39) {
tmp = t_4;
} else if (x_46_re <= 0.00048) {
tmp = t_7;
} else if (x_46_re <= 4.8e+42) {
tmp = t_4;
} else if (x_46_re <= 2.3e+132) {
tmp = t_5;
} else if (x_46_re <= 8.5e+132) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_5;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_4;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.cos(t_0) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((y_46_re * math.log(x_46_re)) - t_2)) t_4 = t_1 * t_3 t_5 = t_3 * math.cos((t_0 + (y_46_im * math.log(x_46_re)))) t_6 = math.exp(((y_46_re * math.log(-x_46_re)) - t_2)) * t_1 t_7 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) tmp = 0 if x_46_re <= -9.5e+119: tmp = t_6 elif x_46_re <= -4e-46: tmp = t_7 elif x_46_re <= -6.6e-49: tmp = t_6 elif x_46_re <= -9.5e-95: tmp = t_7 elif x_46_re <= -5.3e-121: tmp = t_6 elif x_46_re <= -4.5e-154: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_2)) elif x_46_re <= -9.5e-206: tmp = t_7 elif x_46_re <= -6e-233: tmp = t_6 elif x_46_re <= -1.14e-259: tmp = t_7 elif x_46_re <= -5e-310: tmp = t_6 elif x_46_re <= 2.5e-304: tmp = t_4 elif x_46_re <= 5e-296: tmp = t_7 elif x_46_re <= 7.2e-268: tmp = t_5 elif x_46_re <= 3.95e-262: tmp = t_7 elif x_46_re <= 1.76e-246: tmp = t_4 elif x_46_re <= 2.15e-237: tmp = t_7 elif x_46_re <= 3e-192: tmp = t_5 elif x_46_re <= 9.5e-189: tmp = t_7 elif x_46_re <= 1e-187: tmp = t_4 elif x_46_re <= 2.5e-174: tmp = t_7 elif x_46_re <= 5.5e-171: tmp = t_4 elif x_46_re <= 6.2e-148: tmp = t_7 elif x_46_re <= 1.75e-65: tmp = t_5 elif x_46_re <= 8e-60: tmp = t_7 elif x_46_re <= 7.5e-39: tmp = t_4 elif x_46_re <= 0.00048: tmp = t_7 elif x_46_re <= 4.8e+42: tmp = t_4 elif x_46_re <= 2.3e+132: tmp = t_5 elif x_46_re <= 8.5e+132: tmp = t_7 elif x_46_re <= 2.6e+252: tmp = t_5 elif x_46_re <= 4e+253: tmp = t_7 elif x_46_re <= 2.4e+284: tmp = t_4 elif (x_46_re <= 2.5e+284) or not (x_46_re <= 3.8e+293): tmp = t_7 else: tmp = t_5 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 = cos(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) t_4 = Float64(t_1 * t_3) t_5 = Float64(t_3 * cos(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) t_6 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_2)) * t_1) t_7 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_2)) tmp = 0.0 if (x_46_re <= -9.5e+119) tmp = t_6; elseif (x_46_re <= -4e-46) tmp = t_7; elseif (x_46_re <= -6.6e-49) tmp = t_6; elseif (x_46_re <= -9.5e-95) tmp = t_7; elseif (x_46_re <= -5.3e-121) tmp = t_6; elseif (x_46_re <= -4.5e-154) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2))); elseif (x_46_re <= -9.5e-206) tmp = t_7; elseif (x_46_re <= -6e-233) tmp = t_6; elseif (x_46_re <= -1.14e-259) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 2.5e-304) tmp = t_4; elseif (x_46_re <= 5e-296) tmp = t_7; elseif (x_46_re <= 7.2e-268) tmp = t_5; elseif (x_46_re <= 3.95e-262) tmp = t_7; elseif (x_46_re <= 1.76e-246) tmp = t_4; elseif (x_46_re <= 2.15e-237) tmp = t_7; elseif (x_46_re <= 3e-192) tmp = t_5; elseif (x_46_re <= 9.5e-189) tmp = t_7; elseif (x_46_re <= 1e-187) tmp = t_4; elseif (x_46_re <= 2.5e-174) tmp = t_7; elseif (x_46_re <= 5.5e-171) tmp = t_4; elseif (x_46_re <= 6.2e-148) tmp = t_7; elseif (x_46_re <= 1.75e-65) tmp = t_5; elseif (x_46_re <= 8e-60) tmp = t_7; elseif (x_46_re <= 7.5e-39) tmp = t_4; elseif (x_46_re <= 0.00048) tmp = t_7; elseif (x_46_re <= 4.8e+42) tmp = t_4; elseif (x_46_re <= 2.3e+132) tmp = t_5; elseif (x_46_re <= 8.5e+132) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_5; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_4; elseif ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) tmp = t_7; else tmp = t_5; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = cos(t_0); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((y_46_re * log(x_46_re)) - t_2)); t_4 = t_1 * t_3; t_5 = t_3 * cos((t_0 + (y_46_im * log(x_46_re)))); t_6 = exp(((y_46_re * log(-x_46_re)) - t_2)) * t_1; t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)); tmp = 0.0; if (x_46_re <= -9.5e+119) tmp = t_6; elseif (x_46_re <= -4e-46) tmp = t_7; elseif (x_46_re <= -6.6e-49) tmp = t_6; elseif (x_46_re <= -9.5e-95) tmp = t_7; elseif (x_46_re <= -5.3e-121) tmp = t_6; elseif (x_46_re <= -4.5e-154) tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_2)); elseif (x_46_re <= -9.5e-206) tmp = t_7; elseif (x_46_re <= -6e-233) tmp = t_6; elseif (x_46_re <= -1.14e-259) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 2.5e-304) tmp = t_4; elseif (x_46_re <= 5e-296) tmp = t_7; elseif (x_46_re <= 7.2e-268) tmp = t_5; elseif (x_46_re <= 3.95e-262) tmp = t_7; elseif (x_46_re <= 1.76e-246) tmp = t_4; elseif (x_46_re <= 2.15e-237) tmp = t_7; elseif (x_46_re <= 3e-192) tmp = t_5; elseif (x_46_re <= 9.5e-189) tmp = t_7; elseif (x_46_re <= 1e-187) tmp = t_4; elseif (x_46_re <= 2.5e-174) tmp = t_7; elseif (x_46_re <= 5.5e-171) tmp = t_4; elseif (x_46_re <= 6.2e-148) tmp = t_7; elseif (x_46_re <= 1.75e-65) tmp = t_5; elseif (x_46_re <= 8e-60) tmp = t_7; elseif (x_46_re <= 7.5e-39) tmp = t_4; elseif (x_46_re <= 0.00048) tmp = t_7; elseif (x_46_re <= 4.8e+42) tmp = t_4; elseif (x_46_re <= 2.3e+132) tmp = t_5; elseif (x_46_re <= 8.5e+132) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_5; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_4; elseif ((x_46_re <= 2.5e+284) || ~((x_46_re <= 3.8e+293))) tmp = t_7; else tmp = t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[Cos[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -9.5e+119], t$95$6, If[LessEqual[x$46$re, -4e-46], t$95$7, If[LessEqual[x$46$re, -6.6e-49], t$95$6, If[LessEqual[x$46$re, -9.5e-95], t$95$7, If[LessEqual[x$46$re, -5.3e-121], t$95$6, If[LessEqual[x$46$re, -4.5e-154], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -9.5e-206], t$95$7, If[LessEqual[x$46$re, -6e-233], t$95$6, If[LessEqual[x$46$re, -1.14e-259], t$95$7, If[LessEqual[x$46$re, -5e-310], t$95$6, If[LessEqual[x$46$re, 2.5e-304], t$95$4, If[LessEqual[x$46$re, 5e-296], t$95$7, If[LessEqual[x$46$re, 7.2e-268], t$95$5, If[LessEqual[x$46$re, 3.95e-262], t$95$7, If[LessEqual[x$46$re, 1.76e-246], t$95$4, If[LessEqual[x$46$re, 2.15e-237], t$95$7, If[LessEqual[x$46$re, 3e-192], t$95$5, If[LessEqual[x$46$re, 9.5e-189], t$95$7, If[LessEqual[x$46$re, 1e-187], t$95$4, If[LessEqual[x$46$re, 2.5e-174], t$95$7, If[LessEqual[x$46$re, 5.5e-171], t$95$4, If[LessEqual[x$46$re, 6.2e-148], t$95$7, If[LessEqual[x$46$re, 1.75e-65], t$95$5, If[LessEqual[x$46$re, 8e-60], t$95$7, If[LessEqual[x$46$re, 7.5e-39], t$95$4, If[LessEqual[x$46$re, 0.00048], t$95$7, If[LessEqual[x$46$re, 4.8e+42], t$95$4, If[LessEqual[x$46$re, 2.3e+132], t$95$5, If[LessEqual[x$46$re, 8.5e+132], t$95$7, If[LessEqual[x$46$re, 2.6e+252], t$95$5, If[LessEqual[x$46$re, 4e+253], t$95$7, If[LessEqual[x$46$re, 2.4e+284], t$95$4, If[Or[LessEqual[x$46$re, 2.5e+284], N[Not[LessEqual[x$46$re, 3.8e+293]], $MachinePrecision]], t$95$7, t$95$5]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \cos t\_0\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log x.re - t\_2}\\
t_4 := t\_1 \cdot t\_3\\
t_5 := t\_3 \cdot \cos \left(t\_0 + y.im \cdot \log x.re\right)\\
t_6 := e^{y.re \cdot \log \left(-x.re\right) - t\_2} \cdot t\_1\\
t_7 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_2}\\
\mathbf{if}\;x.re \leq -9.5 \cdot 10^{+119}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -4 \cdot 10^{-46}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -6.6 \cdot 10^{-49}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -9.5 \cdot 10^{-95}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -5.3 \cdot 10^{-121}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -4.5 \cdot 10^{-154}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_2}\\
\mathbf{elif}\;x.re \leq -9.5 \cdot 10^{-206}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -6 \cdot 10^{-233}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -1.14 \cdot 10^{-259}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-304}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{-296}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 7.2 \cdot 10^{-268}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3.95 \cdot 10^{-262}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 1.76 \cdot 10^{-246}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-237}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-192}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 9.5 \cdot 10^{-189}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 10^{-187}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-174}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-171}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{-148}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 1.75 \cdot 10^{-65}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 8 \cdot 10^{-60}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{-39}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 0.00048:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 4.8 \cdot 10^{+42}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{+132}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{+132}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+252}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 4 \cdot 10^{+253}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+284}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{+284} \lor \neg \left(x.re \leq 3.8 \cdot 10^{+293}\right):\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x.re < -9.4999999999999994e119 or -4.00000000000000009e-46 < x.re < -6.6e-49 or -9.49999999999999998e-95 < x.re < -5.2999999999999996e-121 or -9.49999999999999979e-206 < x.re < -5.99999999999999997e-233 or -1.14e-259 < x.re < -4.999999999999985e-310Initial program 29.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -9.4999999999999994e119 < x.re < -4.00000000000000009e-46 or -6.6e-49 < x.re < -9.49999999999999998e-95 or -4.4999999999999997e-154 < x.re < -9.49999999999999979e-206 or -5.99999999999999997e-233 < x.re < -1.14e-259 or 2.49999999999999983e-304 < x.re < 5.0000000000000003e-296 or 7.2000000000000002e-268 < x.re < 3.94999999999999994e-262 or 1.75999999999999993e-246 < x.re < 2.14999999999999991e-237 or 2.9999999999999999e-192 < x.re < 9.499999999999999e-189 or 1e-187 < x.re < 2.5000000000000001e-174 or 5.50000000000000037e-171 < x.re < 6.2000000000000003e-148 or 1.75000000000000002e-65 < x.re < 7.9999999999999998e-60 or 7.49999999999999971e-39 < x.re < 4.80000000000000012e-4 or 2.3000000000000002e132 < x.re < 8.49999999999999969e132 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 52.3%
Taylor expanded in y.im around 0 69.9%
Taylor expanded in y.re around 0 81.5%
if -5.2999999999999996e-121 < x.re < -4.4999999999999997e-154Initial program 75.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around 0 87.5%
*-commutative87.5%
Simplified87.5%
if -4.999999999999985e-310 < x.re < 2.49999999999999983e-304 or 3.94999999999999994e-262 < x.re < 1.75999999999999993e-246 or 9.499999999999999e-189 < x.re < 1e-187 or 2.5000000000000001e-174 < x.re < 5.50000000000000037e-171 or 7.9999999999999998e-60 < x.re < 7.49999999999999971e-39 or 4.80000000000000012e-4 < x.re < 4.7999999999999997e42 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284Initial program 59.1%
Taylor expanded in y.im around 0 69.0%
Taylor expanded in x.re around inf 95.5%
if 5.0000000000000003e-296 < x.re < 7.2000000000000002e-268 or 2.14999999999999991e-237 < x.re < 2.9999999999999999e-192 or 6.2000000000000003e-148 < x.re < 1.75000000000000002e-65 or 4.7999999999999997e42 < x.re < 2.3000000000000002e132 or 8.49999999999999969e132 < x.re < 2.60000000000000018e252 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 39.5%
Taylor expanded in x.re around inf 65.3%
Taylor expanded in x.re around inf 92.7%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (cos t_0))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re (log x.re)) t_2)))
(t_4 (* t_1 t_3))
(t_5 (* t_3 (cos (+ t_0 (* y.im (log x.re))))))
(t_6 (* (exp (- (* y.re (log (- x.re))) t_2)) t_1))
(t_7
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_2))))
(if (<= x.re -2e+120)
t_6
(if (<= x.re -1.9e-47)
t_7
(if (<= x.re -1.65e-47)
t_6
(if (<= x.re -7.5e-93)
t_7
(if (<= x.re -5.3e-121)
t_6
(if (<= x.re -4.5e-154)
(* t_1 (exp (- (* y.re (log x.im)) t_2)))
(if (<= x.re -6.5e-205)
t_7
(if (<= x.re -4.8e-230)
t_6
(if (<= x.re -1.1e-259)
t_7
(if (<= x.re -5e-310)
t_6
(if (<= x.re 1.3e-306)
t_4
(if (<= x.re 1.22e-294)
t_7
(if (<= x.re 2.15e-266)
t_5
(if (<= x.re 3.15e-259)
t_7
(if (<= x.re 2.1e-245)
t_4
(if (<= x.re 3.6e-241)
t_7
(if (<= x.re 3.6e-191)
t_5
(if (<= x.re 1.1e-188)
t_7
(if (<= x.re 3e-188)
t_4
(if (<= x.re 1.35e-174)
t_7
(if (<= x.re 5.5e-171)
t_4
(if (<= x.re 1.25e-147)
t_7
(if (<= x.re 1.25e-64)
t_5
(if (<= x.re 1.3e+42)
(* t_1 t_7)
(if (<= x.re 1.7e+132)
t_5
(if (<= x.re 7.5e+132)
t_7
(if (<= x.re 2.6e+252)
t_5
(if (<= x.re 4e+253)
t_7
(if (<=
x.re
2.4e+284)
t_4
(if (or (<=
x.re
2.5e+284)
(not
(<=
x.re
3.8e+293)))
t_7
t_5))))))))))))))))))))))))))))))))
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 = cos(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(x_46_re)) - t_2));
double t_4 = t_1 * t_3;
double t_5 = t_3 * cos((t_0 + (y_46_im * log(x_46_re))));
double t_6 = exp(((y_46_re * log(-x_46_re)) - t_2)) * t_1;
double t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2));
double tmp;
if (x_46_re <= -2e+120) {
tmp = t_6;
} else if (x_46_re <= -1.9e-47) {
tmp = t_7;
} else if (x_46_re <= -1.65e-47) {
tmp = t_6;
} else if (x_46_re <= -7.5e-93) {
tmp = t_7;
} else if (x_46_re <= -5.3e-121) {
tmp = t_6;
} else if (x_46_re <= -4.5e-154) {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_2));
} else if (x_46_re <= -6.5e-205) {
tmp = t_7;
} else if (x_46_re <= -4.8e-230) {
tmp = t_6;
} else if (x_46_re <= -1.1e-259) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 1.3e-306) {
tmp = t_4;
} else if (x_46_re <= 1.22e-294) {
tmp = t_7;
} else if (x_46_re <= 2.15e-266) {
tmp = t_5;
} else if (x_46_re <= 3.15e-259) {
tmp = t_7;
} else if (x_46_re <= 2.1e-245) {
tmp = t_4;
} else if (x_46_re <= 3.6e-241) {
tmp = t_7;
} else if (x_46_re <= 3.6e-191) {
tmp = t_5;
} else if (x_46_re <= 1.1e-188) {
tmp = t_7;
} else if (x_46_re <= 3e-188) {
tmp = t_4;
} else if (x_46_re <= 1.35e-174) {
tmp = t_7;
} else if (x_46_re <= 5.5e-171) {
tmp = t_4;
} else if (x_46_re <= 1.25e-147) {
tmp = t_7;
} else if (x_46_re <= 1.25e-64) {
tmp = t_5;
} else if (x_46_re <= 1.3e+42) {
tmp = t_1 * t_7;
} else if (x_46_re <= 1.7e+132) {
tmp = t_5;
} else if (x_46_re <= 7.5e+132) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_5;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_4;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = cos(t_0)
t_2 = atan2(x_46im, x_46re) * y_46im
t_3 = exp(((y_46re * log(x_46re)) - t_2))
t_4 = t_1 * t_3
t_5 = t_3 * cos((t_0 + (y_46im * log(x_46re))))
t_6 = exp(((y_46re * log(-x_46re)) - t_2)) * t_1
t_7 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_2))
if (x_46re <= (-2d+120)) then
tmp = t_6
else if (x_46re <= (-1.9d-47)) then
tmp = t_7
else if (x_46re <= (-1.65d-47)) then
tmp = t_6
else if (x_46re <= (-7.5d-93)) then
tmp = t_7
else if (x_46re <= (-5.3d-121)) then
tmp = t_6
else if (x_46re <= (-4.5d-154)) then
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_2))
else if (x_46re <= (-6.5d-205)) then
tmp = t_7
else if (x_46re <= (-4.8d-230)) then
tmp = t_6
else if (x_46re <= (-1.1d-259)) then
tmp = t_7
else if (x_46re <= (-5d-310)) then
tmp = t_6
else if (x_46re <= 1.3d-306) then
tmp = t_4
else if (x_46re <= 1.22d-294) then
tmp = t_7
else if (x_46re <= 2.15d-266) then
tmp = t_5
else if (x_46re <= 3.15d-259) then
tmp = t_7
else if (x_46re <= 2.1d-245) then
tmp = t_4
else if (x_46re <= 3.6d-241) then
tmp = t_7
else if (x_46re <= 3.6d-191) then
tmp = t_5
else if (x_46re <= 1.1d-188) then
tmp = t_7
else if (x_46re <= 3d-188) then
tmp = t_4
else if (x_46re <= 1.35d-174) then
tmp = t_7
else if (x_46re <= 5.5d-171) then
tmp = t_4
else if (x_46re <= 1.25d-147) then
tmp = t_7
else if (x_46re <= 1.25d-64) then
tmp = t_5
else if (x_46re <= 1.3d+42) then
tmp = t_1 * t_7
else if (x_46re <= 1.7d+132) then
tmp = t_5
else if (x_46re <= 7.5d+132) then
tmp = t_7
else if (x_46re <= 2.6d+252) then
tmp = t_5
else if (x_46re <= 4d+253) then
tmp = t_7
else if (x_46re <= 2.4d+284) then
tmp = t_4
else if ((x_46re <= 2.5d+284) .or. (.not. (x_46re <= 3.8d+293))) then
tmp = t_7
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.cos(t_0);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2));
double t_4 = t_1 * t_3;
double t_5 = t_3 * Math.cos((t_0 + (y_46_im * Math.log(x_46_re))));
double t_6 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_2)) * t_1;
double t_7 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2));
double tmp;
if (x_46_re <= -2e+120) {
tmp = t_6;
} else if (x_46_re <= -1.9e-47) {
tmp = t_7;
} else if (x_46_re <= -1.65e-47) {
tmp = t_6;
} else if (x_46_re <= -7.5e-93) {
tmp = t_7;
} else if (x_46_re <= -5.3e-121) {
tmp = t_6;
} else if (x_46_re <= -4.5e-154) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_2));
} else if (x_46_re <= -6.5e-205) {
tmp = t_7;
} else if (x_46_re <= -4.8e-230) {
tmp = t_6;
} else if (x_46_re <= -1.1e-259) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 1.3e-306) {
tmp = t_4;
} else if (x_46_re <= 1.22e-294) {
tmp = t_7;
} else if (x_46_re <= 2.15e-266) {
tmp = t_5;
} else if (x_46_re <= 3.15e-259) {
tmp = t_7;
} else if (x_46_re <= 2.1e-245) {
tmp = t_4;
} else if (x_46_re <= 3.6e-241) {
tmp = t_7;
} else if (x_46_re <= 3.6e-191) {
tmp = t_5;
} else if (x_46_re <= 1.1e-188) {
tmp = t_7;
} else if (x_46_re <= 3e-188) {
tmp = t_4;
} else if (x_46_re <= 1.35e-174) {
tmp = t_7;
} else if (x_46_re <= 5.5e-171) {
tmp = t_4;
} else if (x_46_re <= 1.25e-147) {
tmp = t_7;
} else if (x_46_re <= 1.25e-64) {
tmp = t_5;
} else if (x_46_re <= 1.3e+42) {
tmp = t_1 * t_7;
} else if (x_46_re <= 1.7e+132) {
tmp = t_5;
} else if (x_46_re <= 7.5e+132) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_5;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_4;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.cos(t_0) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((y_46_re * math.log(x_46_re)) - t_2)) t_4 = t_1 * t_3 t_5 = t_3 * math.cos((t_0 + (y_46_im * math.log(x_46_re)))) t_6 = math.exp(((y_46_re * math.log(-x_46_re)) - t_2)) * t_1 t_7 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) tmp = 0 if x_46_re <= -2e+120: tmp = t_6 elif x_46_re <= -1.9e-47: tmp = t_7 elif x_46_re <= -1.65e-47: tmp = t_6 elif x_46_re <= -7.5e-93: tmp = t_7 elif x_46_re <= -5.3e-121: tmp = t_6 elif x_46_re <= -4.5e-154: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_2)) elif x_46_re <= -6.5e-205: tmp = t_7 elif x_46_re <= -4.8e-230: tmp = t_6 elif x_46_re <= -1.1e-259: tmp = t_7 elif x_46_re <= -5e-310: tmp = t_6 elif x_46_re <= 1.3e-306: tmp = t_4 elif x_46_re <= 1.22e-294: tmp = t_7 elif x_46_re <= 2.15e-266: tmp = t_5 elif x_46_re <= 3.15e-259: tmp = t_7 elif x_46_re <= 2.1e-245: tmp = t_4 elif x_46_re <= 3.6e-241: tmp = t_7 elif x_46_re <= 3.6e-191: tmp = t_5 elif x_46_re <= 1.1e-188: tmp = t_7 elif x_46_re <= 3e-188: tmp = t_4 elif x_46_re <= 1.35e-174: tmp = t_7 elif x_46_re <= 5.5e-171: tmp = t_4 elif x_46_re <= 1.25e-147: tmp = t_7 elif x_46_re <= 1.25e-64: tmp = t_5 elif x_46_re <= 1.3e+42: tmp = t_1 * t_7 elif x_46_re <= 1.7e+132: tmp = t_5 elif x_46_re <= 7.5e+132: tmp = t_7 elif x_46_re <= 2.6e+252: tmp = t_5 elif x_46_re <= 4e+253: tmp = t_7 elif x_46_re <= 2.4e+284: tmp = t_4 elif (x_46_re <= 2.5e+284) or not (x_46_re <= 3.8e+293): tmp = t_7 else: tmp = t_5 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 = cos(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) t_4 = Float64(t_1 * t_3) t_5 = Float64(t_3 * cos(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) t_6 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_2)) * t_1) t_7 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_2)) tmp = 0.0 if (x_46_re <= -2e+120) tmp = t_6; elseif (x_46_re <= -1.9e-47) tmp = t_7; elseif (x_46_re <= -1.65e-47) tmp = t_6; elseif (x_46_re <= -7.5e-93) tmp = t_7; elseif (x_46_re <= -5.3e-121) tmp = t_6; elseif (x_46_re <= -4.5e-154) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2))); elseif (x_46_re <= -6.5e-205) tmp = t_7; elseif (x_46_re <= -4.8e-230) tmp = t_6; elseif (x_46_re <= -1.1e-259) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 1.3e-306) tmp = t_4; elseif (x_46_re <= 1.22e-294) tmp = t_7; elseif (x_46_re <= 2.15e-266) tmp = t_5; elseif (x_46_re <= 3.15e-259) tmp = t_7; elseif (x_46_re <= 2.1e-245) tmp = t_4; elseif (x_46_re <= 3.6e-241) tmp = t_7; elseif (x_46_re <= 3.6e-191) tmp = t_5; elseif (x_46_re <= 1.1e-188) tmp = t_7; elseif (x_46_re <= 3e-188) tmp = t_4; elseif (x_46_re <= 1.35e-174) tmp = t_7; elseif (x_46_re <= 5.5e-171) tmp = t_4; elseif (x_46_re <= 1.25e-147) tmp = t_7; elseif (x_46_re <= 1.25e-64) tmp = t_5; elseif (x_46_re <= 1.3e+42) tmp = Float64(t_1 * t_7); elseif (x_46_re <= 1.7e+132) tmp = t_5; elseif (x_46_re <= 7.5e+132) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_5; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_4; elseif ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) tmp = t_7; else tmp = t_5; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = cos(t_0); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((y_46_re * log(x_46_re)) - t_2)); t_4 = t_1 * t_3; t_5 = t_3 * cos((t_0 + (y_46_im * log(x_46_re)))); t_6 = exp(((y_46_re * log(-x_46_re)) - t_2)) * t_1; t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)); tmp = 0.0; if (x_46_re <= -2e+120) tmp = t_6; elseif (x_46_re <= -1.9e-47) tmp = t_7; elseif (x_46_re <= -1.65e-47) tmp = t_6; elseif (x_46_re <= -7.5e-93) tmp = t_7; elseif (x_46_re <= -5.3e-121) tmp = t_6; elseif (x_46_re <= -4.5e-154) tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_2)); elseif (x_46_re <= -6.5e-205) tmp = t_7; elseif (x_46_re <= -4.8e-230) tmp = t_6; elseif (x_46_re <= -1.1e-259) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 1.3e-306) tmp = t_4; elseif (x_46_re <= 1.22e-294) tmp = t_7; elseif (x_46_re <= 2.15e-266) tmp = t_5; elseif (x_46_re <= 3.15e-259) tmp = t_7; elseif (x_46_re <= 2.1e-245) tmp = t_4; elseif (x_46_re <= 3.6e-241) tmp = t_7; elseif (x_46_re <= 3.6e-191) tmp = t_5; elseif (x_46_re <= 1.1e-188) tmp = t_7; elseif (x_46_re <= 3e-188) tmp = t_4; elseif (x_46_re <= 1.35e-174) tmp = t_7; elseif (x_46_re <= 5.5e-171) tmp = t_4; elseif (x_46_re <= 1.25e-147) tmp = t_7; elseif (x_46_re <= 1.25e-64) tmp = t_5; elseif (x_46_re <= 1.3e+42) tmp = t_1 * t_7; elseif (x_46_re <= 1.7e+132) tmp = t_5; elseif (x_46_re <= 7.5e+132) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_5; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_4; elseif ((x_46_re <= 2.5e+284) || ~((x_46_re <= 3.8e+293))) tmp = t_7; else tmp = t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[Cos[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e+120], t$95$6, If[LessEqual[x$46$re, -1.9e-47], t$95$7, If[LessEqual[x$46$re, -1.65e-47], t$95$6, If[LessEqual[x$46$re, -7.5e-93], t$95$7, If[LessEqual[x$46$re, -5.3e-121], t$95$6, If[LessEqual[x$46$re, -4.5e-154], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -6.5e-205], t$95$7, If[LessEqual[x$46$re, -4.8e-230], t$95$6, If[LessEqual[x$46$re, -1.1e-259], t$95$7, If[LessEqual[x$46$re, -5e-310], t$95$6, If[LessEqual[x$46$re, 1.3e-306], t$95$4, If[LessEqual[x$46$re, 1.22e-294], t$95$7, If[LessEqual[x$46$re, 2.15e-266], t$95$5, If[LessEqual[x$46$re, 3.15e-259], t$95$7, If[LessEqual[x$46$re, 2.1e-245], t$95$4, If[LessEqual[x$46$re, 3.6e-241], t$95$7, If[LessEqual[x$46$re, 3.6e-191], t$95$5, If[LessEqual[x$46$re, 1.1e-188], t$95$7, If[LessEqual[x$46$re, 3e-188], t$95$4, If[LessEqual[x$46$re, 1.35e-174], t$95$7, If[LessEqual[x$46$re, 5.5e-171], t$95$4, If[LessEqual[x$46$re, 1.25e-147], t$95$7, If[LessEqual[x$46$re, 1.25e-64], t$95$5, If[LessEqual[x$46$re, 1.3e+42], N[(t$95$1 * t$95$7), $MachinePrecision], If[LessEqual[x$46$re, 1.7e+132], t$95$5, If[LessEqual[x$46$re, 7.5e+132], t$95$7, If[LessEqual[x$46$re, 2.6e+252], t$95$5, If[LessEqual[x$46$re, 4e+253], t$95$7, If[LessEqual[x$46$re, 2.4e+284], t$95$4, If[Or[LessEqual[x$46$re, 2.5e+284], N[Not[LessEqual[x$46$re, 3.8e+293]], $MachinePrecision]], t$95$7, t$95$5]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \cos t\_0\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log x.re - t\_2}\\
t_4 := t\_1 \cdot t\_3\\
t_5 := t\_3 \cdot \cos \left(t\_0 + y.im \cdot \log x.re\right)\\
t_6 := e^{y.re \cdot \log \left(-x.re\right) - t\_2} \cdot t\_1\\
t_7 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_2}\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{+120}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -1.9 \cdot 10^{-47}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -1.65 \cdot 10^{-47}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -7.5 \cdot 10^{-93}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -5.3 \cdot 10^{-121}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -4.5 \cdot 10^{-154}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_2}\\
\mathbf{elif}\;x.re \leq -6.5 \cdot 10^{-205}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -4.8 \cdot 10^{-230}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -1.1 \cdot 10^{-259}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 1.3 \cdot 10^{-306}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 1.22 \cdot 10^{-294}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-266}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3.15 \cdot 10^{-259}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{-245}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-241}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-191}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.1 \cdot 10^{-188}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-188}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 1.35 \cdot 10^{-174}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-171}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-147}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-64}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.3 \cdot 10^{+42}:\\
\;\;\;\;t\_1 \cdot t\_7\\
\mathbf{elif}\;x.re \leq 1.7 \cdot 10^{+132}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+132}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+252}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 4 \cdot 10^{+253}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+284}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{+284} \lor \neg \left(x.re \leq 3.8 \cdot 10^{+293}\right):\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x.re < -2e120 or -1.90000000000000007e-47 < x.re < -1.65000000000000002e-47 or -7.50000000000000034e-93 < x.re < -5.2999999999999996e-121 or -6.49999999999999956e-205 < x.re < -4.8000000000000004e-230 or -1.10000000000000005e-259 < x.re < -4.999999999999985e-310Initial program 29.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -2e120 < x.re < -1.90000000000000007e-47 or -1.65000000000000002e-47 < x.re < -7.50000000000000034e-93 or -4.4999999999999997e-154 < x.re < -6.49999999999999956e-205 or -4.8000000000000004e-230 < x.re < -1.10000000000000005e-259 or 1.3e-306 < x.re < 1.21999999999999995e-294 or 2.15000000000000014e-266 < x.re < 3.1500000000000001e-259 or 2.1000000000000001e-245 < x.re < 3.5999999999999999e-241 or 3.60000000000000019e-191 < x.re < 1.1e-188 or 3.00000000000000017e-188 < x.re < 1.34999999999999994e-174 or 5.50000000000000037e-171 < x.re < 1.25000000000000003e-147 or 1.70000000000000013e132 < x.re < 7.50000000000000017e132 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 51.3%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.re around 0 81.7%
if -5.2999999999999996e-121 < x.re < -4.4999999999999997e-154Initial program 75.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around 0 87.5%
*-commutative87.5%
Simplified87.5%
if -4.999999999999985e-310 < x.re < 1.3e-306 or 3.1500000000000001e-259 < x.re < 2.1000000000000001e-245 or 1.1e-188 < x.re < 3.00000000000000017e-188 or 1.34999999999999994e-174 < x.re < 5.50000000000000037e-171 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284Initial program 36.4%
Taylor expanded in y.im around 0 38.1%
Taylor expanded in x.re around inf 90.9%
if 1.21999999999999995e-294 < x.re < 2.15000000000000014e-266 or 3.5999999999999999e-241 < x.re < 3.60000000000000019e-191 or 1.25000000000000003e-147 < x.re < 1.25000000000000008e-64 or 1.29999999999999995e42 < x.re < 1.70000000000000013e132 or 7.50000000000000017e132 < x.re < 2.60000000000000018e252 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 39.5%
Taylor expanded in x.re around inf 65.3%
Taylor expanded in x.re around inf 92.7%
if 1.25000000000000008e-64 < x.re < 1.29999999999999995e42Initial program 71.4%
Taylor expanded in y.im around 0 90.5%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (cos t_1))
(t_3 (exp (- (* y.re (log x.re)) t_0)))
(t_4 (* t_3 (cos (+ t_1 (* y.im (log x.re))))))
(t_5 (* t_2 t_3))
(t_6 (* (exp (- (* y.re (log (- x.re))) t_0)) t_2))
(t_7
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))))
(if (<= x.re -3e+121)
t_6
(if (<= x.re -1.06e-38)
t_7
(if (<= x.re -1.75e-47)
t_6
(if (<= x.re -2e-115)
t_7
(if (<= x.re -4.5e-154)
(*
t_2
(exp
(-
(* y.re (log (+ x.im (* 0.5 (/ (pow x.re 2.0) x.im)))))
t_0)))
(if (<= x.re -1.9e-204)
t_7
(if (<= x.re -2.35e-231)
t_6
(if (<= x.re -9e-260)
t_7
(if (<= x.re -5e-310)
t_6
(if (<= x.re 1.02e-306)
t_5
(if (<= x.re 3.8e-296)
t_7
(if (<= x.re 7.4e-267)
t_4
(if (<= x.re 2.7e-265)
t_7
(if (<= x.re 2e-245)
t_5
(if (<= x.re 1.02e-242)
t_7
(if (<= x.re 9e-192)
t_4
(if (<= x.re 1.3e-188)
t_7
(if (<= x.re 4.2e-188)
t_5
(if (<= x.re 3.1e-175)
t_7
(if (<= x.re 5.8e-171)
t_5
(if (<= x.re 3e-149)
t_7
(if (<= x.re 9.8e-65)
t_4
(if (<= x.re 5.5e+42)
(* t_2 t_7)
(if (<= x.re 5.2e+132)
t_4
(if (<= x.re 2.2e+133)
t_7
(if (<= x.re 2.6e+252)
t_4
(if (<= x.re 4e+253)
t_7
(if (<= x.re 2.4e+284)
t_5
(if (or (<=
x.re
2.5e+284)
(not
(<=
x.re
3.8e+293)))
t_7
t_4)))))))))))))))))))))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = cos(t_1);
double t_3 = exp(((y_46_re * log(x_46_re)) - t_0));
double t_4 = t_3 * cos((t_1 + (y_46_im * log(x_46_re))));
double t_5 = t_2 * t_3;
double t_6 = exp(((y_46_re * log(-x_46_re)) - t_0)) * t_2;
double t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double tmp;
if (x_46_re <= -3e+121) {
tmp = t_6;
} else if (x_46_re <= -1.06e-38) {
tmp = t_7;
} else if (x_46_re <= -1.75e-47) {
tmp = t_6;
} else if (x_46_re <= -2e-115) {
tmp = t_7;
} else if (x_46_re <= -4.5e-154) {
tmp = t_2 * exp(((y_46_re * log((x_46_im + (0.5 * (pow(x_46_re, 2.0) / x_46_im))))) - t_0));
} else if (x_46_re <= -1.9e-204) {
tmp = t_7;
} else if (x_46_re <= -2.35e-231) {
tmp = t_6;
} else if (x_46_re <= -9e-260) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 1.02e-306) {
tmp = t_5;
} else if (x_46_re <= 3.8e-296) {
tmp = t_7;
} else if (x_46_re <= 7.4e-267) {
tmp = t_4;
} else if (x_46_re <= 2.7e-265) {
tmp = t_7;
} else if (x_46_re <= 2e-245) {
tmp = t_5;
} else if (x_46_re <= 1.02e-242) {
tmp = t_7;
} else if (x_46_re <= 9e-192) {
tmp = t_4;
} else if (x_46_re <= 1.3e-188) {
tmp = t_7;
} else if (x_46_re <= 4.2e-188) {
tmp = t_5;
} else if (x_46_re <= 3.1e-175) {
tmp = t_7;
} else if (x_46_re <= 5.8e-171) {
tmp = t_5;
} else if (x_46_re <= 3e-149) {
tmp = t_7;
} else if (x_46_re <= 9.8e-65) {
tmp = t_4;
} else if (x_46_re <= 5.5e+42) {
tmp = t_2 * t_7;
} else if (x_46_re <= 5.2e+132) {
tmp = t_4;
} else if (x_46_re <= 2.2e+133) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_4;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_5;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = cos(t_1)
t_3 = exp(((y_46re * log(x_46re)) - t_0))
t_4 = t_3 * cos((t_1 + (y_46im * log(x_46re))))
t_5 = t_2 * t_3
t_6 = exp(((y_46re * log(-x_46re)) - t_0)) * t_2
t_7 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0))
if (x_46re <= (-3d+121)) then
tmp = t_6
else if (x_46re <= (-1.06d-38)) then
tmp = t_7
else if (x_46re <= (-1.75d-47)) then
tmp = t_6
else if (x_46re <= (-2d-115)) then
tmp = t_7
else if (x_46re <= (-4.5d-154)) then
tmp = t_2 * exp(((y_46re * log((x_46im + (0.5d0 * ((x_46re ** 2.0d0) / x_46im))))) - t_0))
else if (x_46re <= (-1.9d-204)) then
tmp = t_7
else if (x_46re <= (-2.35d-231)) then
tmp = t_6
else if (x_46re <= (-9d-260)) then
tmp = t_7
else if (x_46re <= (-5d-310)) then
tmp = t_6
else if (x_46re <= 1.02d-306) then
tmp = t_5
else if (x_46re <= 3.8d-296) then
tmp = t_7
else if (x_46re <= 7.4d-267) then
tmp = t_4
else if (x_46re <= 2.7d-265) then
tmp = t_7
else if (x_46re <= 2d-245) then
tmp = t_5
else if (x_46re <= 1.02d-242) then
tmp = t_7
else if (x_46re <= 9d-192) then
tmp = t_4
else if (x_46re <= 1.3d-188) then
tmp = t_7
else if (x_46re <= 4.2d-188) then
tmp = t_5
else if (x_46re <= 3.1d-175) then
tmp = t_7
else if (x_46re <= 5.8d-171) then
tmp = t_5
else if (x_46re <= 3d-149) then
tmp = t_7
else if (x_46re <= 9.8d-65) then
tmp = t_4
else if (x_46re <= 5.5d+42) then
tmp = t_2 * t_7
else if (x_46re <= 5.2d+132) then
tmp = t_4
else if (x_46re <= 2.2d+133) then
tmp = t_7
else if (x_46re <= 2.6d+252) then
tmp = t_4
else if (x_46re <= 4d+253) then
tmp = t_7
else if (x_46re <= 2.4d+284) then
tmp = t_5
else if ((x_46re <= 2.5d+284) .or. (.not. (x_46re <= 3.8d+293))) then
tmp = t_7
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.cos(t_1);
double t_3 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double t_4 = t_3 * Math.cos((t_1 + (y_46_im * Math.log(x_46_re))));
double t_5 = t_2 * t_3;
double t_6 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0)) * t_2;
double t_7 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double tmp;
if (x_46_re <= -3e+121) {
tmp = t_6;
} else if (x_46_re <= -1.06e-38) {
tmp = t_7;
} else if (x_46_re <= -1.75e-47) {
tmp = t_6;
} else if (x_46_re <= -2e-115) {
tmp = t_7;
} else if (x_46_re <= -4.5e-154) {
tmp = t_2 * Math.exp(((y_46_re * Math.log((x_46_im + (0.5 * (Math.pow(x_46_re, 2.0) / x_46_im))))) - t_0));
} else if (x_46_re <= -1.9e-204) {
tmp = t_7;
} else if (x_46_re <= -2.35e-231) {
tmp = t_6;
} else if (x_46_re <= -9e-260) {
tmp = t_7;
} else if (x_46_re <= -5e-310) {
tmp = t_6;
} else if (x_46_re <= 1.02e-306) {
tmp = t_5;
} else if (x_46_re <= 3.8e-296) {
tmp = t_7;
} else if (x_46_re <= 7.4e-267) {
tmp = t_4;
} else if (x_46_re <= 2.7e-265) {
tmp = t_7;
} else if (x_46_re <= 2e-245) {
tmp = t_5;
} else if (x_46_re <= 1.02e-242) {
tmp = t_7;
} else if (x_46_re <= 9e-192) {
tmp = t_4;
} else if (x_46_re <= 1.3e-188) {
tmp = t_7;
} else if (x_46_re <= 4.2e-188) {
tmp = t_5;
} else if (x_46_re <= 3.1e-175) {
tmp = t_7;
} else if (x_46_re <= 5.8e-171) {
tmp = t_5;
} else if (x_46_re <= 3e-149) {
tmp = t_7;
} else if (x_46_re <= 9.8e-65) {
tmp = t_4;
} else if (x_46_re <= 5.5e+42) {
tmp = t_2 * t_7;
} else if (x_46_re <= 5.2e+132) {
tmp = t_4;
} else if (x_46_re <= 2.2e+133) {
tmp = t_7;
} else if (x_46_re <= 2.6e+252) {
tmp = t_4;
} else if (x_46_re <= 4e+253) {
tmp = t_7;
} else if (x_46_re <= 2.4e+284) {
tmp = t_5;
} else if ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) {
tmp = t_7;
} else {
tmp = t_4;
}
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.cos(t_1) t_3 = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) t_4 = t_3 * math.cos((t_1 + (y_46_im * math.log(x_46_re)))) t_5 = t_2 * t_3 t_6 = math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) * t_2 t_7 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) tmp = 0 if x_46_re <= -3e+121: tmp = t_6 elif x_46_re <= -1.06e-38: tmp = t_7 elif x_46_re <= -1.75e-47: tmp = t_6 elif x_46_re <= -2e-115: tmp = t_7 elif x_46_re <= -4.5e-154: tmp = t_2 * math.exp(((y_46_re * math.log((x_46_im + (0.5 * (math.pow(x_46_re, 2.0) / x_46_im))))) - t_0)) elif x_46_re <= -1.9e-204: tmp = t_7 elif x_46_re <= -2.35e-231: tmp = t_6 elif x_46_re <= -9e-260: tmp = t_7 elif x_46_re <= -5e-310: tmp = t_6 elif x_46_re <= 1.02e-306: tmp = t_5 elif x_46_re <= 3.8e-296: tmp = t_7 elif x_46_re <= 7.4e-267: tmp = t_4 elif x_46_re <= 2.7e-265: tmp = t_7 elif x_46_re <= 2e-245: tmp = t_5 elif x_46_re <= 1.02e-242: tmp = t_7 elif x_46_re <= 9e-192: tmp = t_4 elif x_46_re <= 1.3e-188: tmp = t_7 elif x_46_re <= 4.2e-188: tmp = t_5 elif x_46_re <= 3.1e-175: tmp = t_7 elif x_46_re <= 5.8e-171: tmp = t_5 elif x_46_re <= 3e-149: tmp = t_7 elif x_46_re <= 9.8e-65: tmp = t_4 elif x_46_re <= 5.5e+42: tmp = t_2 * t_7 elif x_46_re <= 5.2e+132: tmp = t_4 elif x_46_re <= 2.2e+133: tmp = t_7 elif x_46_re <= 2.6e+252: tmp = t_4 elif x_46_re <= 4e+253: tmp = t_7 elif x_46_re <= 2.4e+284: tmp = t_5 elif (x_46_re <= 2.5e+284) or not (x_46_re <= 3.8e+293): tmp = t_7 else: tmp = t_4 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = cos(t_1) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) t_4 = Float64(t_3 * cos(Float64(t_1 + Float64(y_46_im * log(x_46_re))))) t_5 = Float64(t_2 * t_3) t_6 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0)) * t_2) t_7 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) tmp = 0.0 if (x_46_re <= -3e+121) tmp = t_6; elseif (x_46_re <= -1.06e-38) tmp = t_7; elseif (x_46_re <= -1.75e-47) tmp = t_6; elseif (x_46_re <= -2e-115) tmp = t_7; elseif (x_46_re <= -4.5e-154) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(x_46_im + Float64(0.5 * Float64((x_46_re ^ 2.0) / x_46_im))))) - t_0))); elseif (x_46_re <= -1.9e-204) tmp = t_7; elseif (x_46_re <= -2.35e-231) tmp = t_6; elseif (x_46_re <= -9e-260) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 1.02e-306) tmp = t_5; elseif (x_46_re <= 3.8e-296) tmp = t_7; elseif (x_46_re <= 7.4e-267) tmp = t_4; elseif (x_46_re <= 2.7e-265) tmp = t_7; elseif (x_46_re <= 2e-245) tmp = t_5; elseif (x_46_re <= 1.02e-242) tmp = t_7; elseif (x_46_re <= 9e-192) tmp = t_4; elseif (x_46_re <= 1.3e-188) tmp = t_7; elseif (x_46_re <= 4.2e-188) tmp = t_5; elseif (x_46_re <= 3.1e-175) tmp = t_7; elseif (x_46_re <= 5.8e-171) tmp = t_5; elseif (x_46_re <= 3e-149) tmp = t_7; elseif (x_46_re <= 9.8e-65) tmp = t_4; elseif (x_46_re <= 5.5e+42) tmp = Float64(t_2 * t_7); elseif (x_46_re <= 5.2e+132) tmp = t_4; elseif (x_46_re <= 2.2e+133) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_4; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_5; elseif ((x_46_re <= 2.5e+284) || !(x_46_re <= 3.8e+293)) tmp = t_7; else tmp = t_4; 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 = cos(t_1); t_3 = exp(((y_46_re * log(x_46_re)) - t_0)); t_4 = t_3 * cos((t_1 + (y_46_im * log(x_46_re)))); t_5 = t_2 * t_3; t_6 = exp(((y_46_re * log(-x_46_re)) - t_0)) * t_2; t_7 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)); tmp = 0.0; if (x_46_re <= -3e+121) tmp = t_6; elseif (x_46_re <= -1.06e-38) tmp = t_7; elseif (x_46_re <= -1.75e-47) tmp = t_6; elseif (x_46_re <= -2e-115) tmp = t_7; elseif (x_46_re <= -4.5e-154) tmp = t_2 * exp(((y_46_re * log((x_46_im + (0.5 * ((x_46_re ^ 2.0) / x_46_im))))) - t_0)); elseif (x_46_re <= -1.9e-204) tmp = t_7; elseif (x_46_re <= -2.35e-231) tmp = t_6; elseif (x_46_re <= -9e-260) tmp = t_7; elseif (x_46_re <= -5e-310) tmp = t_6; elseif (x_46_re <= 1.02e-306) tmp = t_5; elseif (x_46_re <= 3.8e-296) tmp = t_7; elseif (x_46_re <= 7.4e-267) tmp = t_4; elseif (x_46_re <= 2.7e-265) tmp = t_7; elseif (x_46_re <= 2e-245) tmp = t_5; elseif (x_46_re <= 1.02e-242) tmp = t_7; elseif (x_46_re <= 9e-192) tmp = t_4; elseif (x_46_re <= 1.3e-188) tmp = t_7; elseif (x_46_re <= 4.2e-188) tmp = t_5; elseif (x_46_re <= 3.1e-175) tmp = t_7; elseif (x_46_re <= 5.8e-171) tmp = t_5; elseif (x_46_re <= 3e-149) tmp = t_7; elseif (x_46_re <= 9.8e-65) tmp = t_4; elseif (x_46_re <= 5.5e+42) tmp = t_2 * t_7; elseif (x_46_re <= 5.2e+132) tmp = t_4; elseif (x_46_re <= 2.2e+133) tmp = t_7; elseif (x_46_re <= 2.6e+252) tmp = t_4; elseif (x_46_re <= 4e+253) tmp = t_7; elseif (x_46_re <= 2.4e+284) tmp = t_5; elseif ((x_46_re <= 2.5e+284) || ~((x_46_re <= 3.8e+293))) tmp = t_7; else tmp = t_4; 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[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Cos[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -3e+121], t$95$6, If[LessEqual[x$46$re, -1.06e-38], t$95$7, If[LessEqual[x$46$re, -1.75e-47], t$95$6, If[LessEqual[x$46$re, -2e-115], t$95$7, If[LessEqual[x$46$re, -4.5e-154], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$im + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.9e-204], t$95$7, If[LessEqual[x$46$re, -2.35e-231], t$95$6, If[LessEqual[x$46$re, -9e-260], t$95$7, If[LessEqual[x$46$re, -5e-310], t$95$6, If[LessEqual[x$46$re, 1.02e-306], t$95$5, If[LessEqual[x$46$re, 3.8e-296], t$95$7, If[LessEqual[x$46$re, 7.4e-267], t$95$4, If[LessEqual[x$46$re, 2.7e-265], t$95$7, If[LessEqual[x$46$re, 2e-245], t$95$5, If[LessEqual[x$46$re, 1.02e-242], t$95$7, If[LessEqual[x$46$re, 9e-192], t$95$4, If[LessEqual[x$46$re, 1.3e-188], t$95$7, If[LessEqual[x$46$re, 4.2e-188], t$95$5, If[LessEqual[x$46$re, 3.1e-175], t$95$7, If[LessEqual[x$46$re, 5.8e-171], t$95$5, If[LessEqual[x$46$re, 3e-149], t$95$7, If[LessEqual[x$46$re, 9.8e-65], t$95$4, If[LessEqual[x$46$re, 5.5e+42], N[(t$95$2 * t$95$7), $MachinePrecision], If[LessEqual[x$46$re, 5.2e+132], t$95$4, If[LessEqual[x$46$re, 2.2e+133], t$95$7, If[LessEqual[x$46$re, 2.6e+252], t$95$4, If[LessEqual[x$46$re, 4e+253], t$95$7, If[LessEqual[x$46$re, 2.4e+284], t$95$5, If[Or[LessEqual[x$46$re, 2.5e+284], N[Not[LessEqual[x$46$re, 3.8e+293]], $MachinePrecision]], t$95$7, t$95$4]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\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 := \cos t\_1\\
t_3 := e^{y.re \cdot \log x.re - t\_0}\\
t_4 := t\_3 \cdot \cos \left(t\_1 + y.im \cdot \log x.re\right)\\
t_5 := t\_2 \cdot t\_3\\
t_6 := e^{y.re \cdot \log \left(-x.re\right) - t\_0} \cdot t\_2\\
t_7 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
\mathbf{if}\;x.re \leq -3 \cdot 10^{+121}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -1.06 \cdot 10^{-38}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -1.75 \cdot 10^{-47}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-115}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -4.5 \cdot 10^{-154}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}\right) - t\_0}\\
\mathbf{elif}\;x.re \leq -1.9 \cdot 10^{-204}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -2.35 \cdot 10^{-231}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -9 \cdot 10^{-260}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-306}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3.8 \cdot 10^{-296}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 7.4 \cdot 10^{-267}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{-265}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{-245}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-242}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 9 \cdot 10^{-192}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 1.3 \cdot 10^{-188}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{-188}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3.1 \cdot 10^{-175}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-171}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-149}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 9.8 \cdot 10^{-65}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{+42}:\\
\;\;\;\;t\_2 \cdot t\_7\\
\mathbf{elif}\;x.re \leq 5.2 \cdot 10^{+132}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 2.2 \cdot 10^{+133}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+252}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 4 \cdot 10^{+253}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{+284}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{+284} \lor \neg \left(x.re \leq 3.8 \cdot 10^{+293}\right):\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x.re < -3.0000000000000002e121 or -1.06000000000000001e-38 < x.re < -1.7499999999999999e-47 or -1.89999999999999991e-204 < x.re < -2.3500000000000001e-231 or -8.9999999999999995e-260 < x.re < -4.999999999999985e-310Initial program 26.3%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in x.re around -inf 91.5%
mul-1-neg91.5%
Simplified91.5%
if -3.0000000000000002e121 < x.re < -1.06000000000000001e-38 or -1.7499999999999999e-47 < x.re < -2.0000000000000001e-115 or -4.4999999999999997e-154 < x.re < -1.89999999999999991e-204 or -2.3500000000000001e-231 < x.re < -8.9999999999999995e-260 or 1.02e-306 < x.re < 3.8000000000000002e-296 or 7.39999999999999971e-267 < x.re < 2.7000000000000002e-265 or 1.9999999999999999e-245 < x.re < 1.0199999999999999e-242 or 9.00000000000000048e-192 < x.re < 1.3e-188 or 4.1999999999999998e-188 < x.re < 3.09999999999999999e-175 or 5.7999999999999997e-171 < x.re < 3.0000000000000002e-149 or 5.2e132 < x.re < 2.2e133 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 52.4%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in y.re around 0 83.1%
if -2.0000000000000001e-115 < x.re < -4.4999999999999997e-154Initial program 66.7%
Taylor expanded in y.im around 0 67.0%
Taylor expanded in x.re around 0 78.0%
if -4.999999999999985e-310 < x.re < 1.02e-306 or 2.7000000000000002e-265 < x.re < 1.9999999999999999e-245 or 1.3e-188 < x.re < 4.1999999999999998e-188 or 3.09999999999999999e-175 < x.re < 5.7999999999999997e-171 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284Initial program 36.4%
Taylor expanded in y.im around 0 38.1%
Taylor expanded in x.re around inf 90.9%
if 3.8000000000000002e-296 < x.re < 7.39999999999999971e-267 or 1.0199999999999999e-242 < x.re < 9.00000000000000048e-192 or 3.0000000000000002e-149 < x.re < 9.79999999999999929e-65 or 5.50000000000000001e42 < x.re < 5.2e132 or 2.2e133 < x.re < 2.60000000000000018e252 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 39.5%
Taylor expanded in x.re around inf 65.3%
Taylor expanded in x.re around inf 92.7%
if 9.79999999999999929e-65 < x.re < 5.50000000000000001e42Initial program 71.4%
Taylor expanded in y.im around 0 90.5%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re))))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* t_0 (exp (- (* y.re (log x.re)) t_1))))
(t_3 (* t_0 (exp (- (* y.re (log x.im)) t_1))))
(t_4 (* (exp (- (* y.re (log (- x.re))) t_1)) t_0))
(t_5
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))))
(if (<= x.re -1.45e+122)
t_4
(if (<= x.re -2.4e-47)
t_5
(if (<= x.re -3.4e-51)
t_4
(if (<= x.re -4.3e-94)
t_5
(if (<= x.re -5.3e-121)
t_4
(if (<= x.re -4.5e-154)
t_3
(if (<= x.re -2.9e-205)
t_5
(if (<= x.re -2.05e-231)
t_4
(if (<= x.re -1.95e-259)
t_5
(if (<= x.re -5e-310)
t_4
(if (<= x.re 3e-304)
t_2
(if (<= x.re 2.15e-299)
t_5
(if (<= x.re 1.8e-266)
t_2
(if (<= x.re 3.1e-261)
t_5
(if (<= x.re 1.85e-245)
t_2
(if (<= x.re 5.5e-238)
t_5
(if (<= x.re 2.95e-213)
t_2
(if (<= x.re 6.2e-204)
t_5
(if (<= x.re 7e-193)
t_2
(if (<= x.re 1.35e-188)
t_5
(if (<= x.re 7.6e-188)
t_2
(if (<= x.re 9.2e-176)
t_5
(if (<= x.re 6e-171)
t_2
(if (<= x.re 7.1e-122)
t_5
(if (<= x.re 5e-66)
t_2
(if (<= x.re 1.55e-61)
t_5
(if (<= x.re 1.2e-35)
t_2
(if (<= x.re 0.00035)
t_5
(if (<=
x.re
6.4e+42)
t_2
(if (<=
x.re
2.1e+43)
t_5
(if (<=
x.re
2e+132)
t_2
(if (<=
x.re
7.5e+132)
t_5
(if (<=
x.re
1.2e+176)
t_2
(if (<=
x.re
2.7e+177)
t_3
(if (or (<=
x.re
3.1e+227)
(and (not
(<=
x.re
3.2e+227))
(or (<=
x.re
2.6e+252)
(and (not
(<=
x.re
4e+253))
(or (<=
x.re
2.4e+284)
(and (not
(<=
x.re
2.5e+284))
(<=
x.re
3.8e+293)))))))
t_2
t_5)))))))))))))))))))))))))))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = t_0 * exp(((y_46_re * log(x_46_re)) - t_1));
double t_3 = t_0 * exp(((y_46_re * log(x_46_im)) - t_1));
double t_4 = exp(((y_46_re * log(-x_46_re)) - t_1)) * t_0;
double t_5 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -1.45e+122) {
tmp = t_4;
} else if (x_46_re <= -2.4e-47) {
tmp = t_5;
} else if (x_46_re <= -3.4e-51) {
tmp = t_4;
} else if (x_46_re <= -4.3e-94) {
tmp = t_5;
} else if (x_46_re <= -5.3e-121) {
tmp = t_4;
} else if (x_46_re <= -4.5e-154) {
tmp = t_3;
} else if (x_46_re <= -2.9e-205) {
tmp = t_5;
} else if (x_46_re <= -2.05e-231) {
tmp = t_4;
} else if (x_46_re <= -1.95e-259) {
tmp = t_5;
} else if (x_46_re <= -5e-310) {
tmp = t_4;
} else if (x_46_re <= 3e-304) {
tmp = t_2;
} else if (x_46_re <= 2.15e-299) {
tmp = t_5;
} else if (x_46_re <= 1.8e-266) {
tmp = t_2;
} else if (x_46_re <= 3.1e-261) {
tmp = t_5;
} else if (x_46_re <= 1.85e-245) {
tmp = t_2;
} else if (x_46_re <= 5.5e-238) {
tmp = t_5;
} else if (x_46_re <= 2.95e-213) {
tmp = t_2;
} else if (x_46_re <= 6.2e-204) {
tmp = t_5;
} else if (x_46_re <= 7e-193) {
tmp = t_2;
} else if (x_46_re <= 1.35e-188) {
tmp = t_5;
} else if (x_46_re <= 7.6e-188) {
tmp = t_2;
} else if (x_46_re <= 9.2e-176) {
tmp = t_5;
} else if (x_46_re <= 6e-171) {
tmp = t_2;
} else if (x_46_re <= 7.1e-122) {
tmp = t_5;
} else if (x_46_re <= 5e-66) {
tmp = t_2;
} else if (x_46_re <= 1.55e-61) {
tmp = t_5;
} else if (x_46_re <= 1.2e-35) {
tmp = t_2;
} else if (x_46_re <= 0.00035) {
tmp = t_5;
} else if (x_46_re <= 6.4e+42) {
tmp = t_2;
} else if (x_46_re <= 2.1e+43) {
tmp = t_5;
} else if (x_46_re <= 2e+132) {
tmp = t_2;
} else if (x_46_re <= 7.5e+132) {
tmp = t_5;
} else if (x_46_re <= 1.2e+176) {
tmp = t_2;
} else if (x_46_re <= 2.7e+177) {
tmp = t_3;
} else if ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) {
tmp = t_2;
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = cos((y_46re * atan2(x_46im, x_46re)))
t_1 = atan2(x_46im, x_46re) * y_46im
t_2 = t_0 * exp(((y_46re * log(x_46re)) - t_1))
t_3 = t_0 * exp(((y_46re * log(x_46im)) - t_1))
t_4 = exp(((y_46re * log(-x_46re)) - t_1)) * t_0
t_5 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_1))
if (x_46re <= (-1.45d+122)) then
tmp = t_4
else if (x_46re <= (-2.4d-47)) then
tmp = t_5
else if (x_46re <= (-3.4d-51)) then
tmp = t_4
else if (x_46re <= (-4.3d-94)) then
tmp = t_5
else if (x_46re <= (-5.3d-121)) then
tmp = t_4
else if (x_46re <= (-4.5d-154)) then
tmp = t_3
else if (x_46re <= (-2.9d-205)) then
tmp = t_5
else if (x_46re <= (-2.05d-231)) then
tmp = t_4
else if (x_46re <= (-1.95d-259)) then
tmp = t_5
else if (x_46re <= (-5d-310)) then
tmp = t_4
else if (x_46re <= 3d-304) then
tmp = t_2
else if (x_46re <= 2.15d-299) then
tmp = t_5
else if (x_46re <= 1.8d-266) then
tmp = t_2
else if (x_46re <= 3.1d-261) then
tmp = t_5
else if (x_46re <= 1.85d-245) then
tmp = t_2
else if (x_46re <= 5.5d-238) then
tmp = t_5
else if (x_46re <= 2.95d-213) then
tmp = t_2
else if (x_46re <= 6.2d-204) then
tmp = t_5
else if (x_46re <= 7d-193) then
tmp = t_2
else if (x_46re <= 1.35d-188) then
tmp = t_5
else if (x_46re <= 7.6d-188) then
tmp = t_2
else if (x_46re <= 9.2d-176) then
tmp = t_5
else if (x_46re <= 6d-171) then
tmp = t_2
else if (x_46re <= 7.1d-122) then
tmp = t_5
else if (x_46re <= 5d-66) then
tmp = t_2
else if (x_46re <= 1.55d-61) then
tmp = t_5
else if (x_46re <= 1.2d-35) then
tmp = t_2
else if (x_46re <= 0.00035d0) then
tmp = t_5
else if (x_46re <= 6.4d+42) then
tmp = t_2
else if (x_46re <= 2.1d+43) then
tmp = t_5
else if (x_46re <= 2d+132) then
tmp = t_2
else if (x_46re <= 7.5d+132) then
tmp = t_5
else if (x_46re <= 1.2d+176) then
tmp = t_2
else if (x_46re <= 2.7d+177) then
tmp = t_3
else if ((x_46re <= 3.1d+227) .or. (.not. (x_46re <= 3.2d+227)) .and. (x_46re <= 2.6d+252) .or. (.not. (x_46re <= 4d+253)) .and. (x_46re <= 2.4d+284) .or. (.not. (x_46re <= 2.5d+284)) .and. (x_46re <= 3.8d+293)) then
tmp = t_2
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = t_0 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
double t_3 = t_0 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_1));
double t_4 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_1)) * t_0;
double t_5 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1));
double tmp;
if (x_46_re <= -1.45e+122) {
tmp = t_4;
} else if (x_46_re <= -2.4e-47) {
tmp = t_5;
} else if (x_46_re <= -3.4e-51) {
tmp = t_4;
} else if (x_46_re <= -4.3e-94) {
tmp = t_5;
} else if (x_46_re <= -5.3e-121) {
tmp = t_4;
} else if (x_46_re <= -4.5e-154) {
tmp = t_3;
} else if (x_46_re <= -2.9e-205) {
tmp = t_5;
} else if (x_46_re <= -2.05e-231) {
tmp = t_4;
} else if (x_46_re <= -1.95e-259) {
tmp = t_5;
} else if (x_46_re <= -5e-310) {
tmp = t_4;
} else if (x_46_re <= 3e-304) {
tmp = t_2;
} else if (x_46_re <= 2.15e-299) {
tmp = t_5;
} else if (x_46_re <= 1.8e-266) {
tmp = t_2;
} else if (x_46_re <= 3.1e-261) {
tmp = t_5;
} else if (x_46_re <= 1.85e-245) {
tmp = t_2;
} else if (x_46_re <= 5.5e-238) {
tmp = t_5;
} else if (x_46_re <= 2.95e-213) {
tmp = t_2;
} else if (x_46_re <= 6.2e-204) {
tmp = t_5;
} else if (x_46_re <= 7e-193) {
tmp = t_2;
} else if (x_46_re <= 1.35e-188) {
tmp = t_5;
} else if (x_46_re <= 7.6e-188) {
tmp = t_2;
} else if (x_46_re <= 9.2e-176) {
tmp = t_5;
} else if (x_46_re <= 6e-171) {
tmp = t_2;
} else if (x_46_re <= 7.1e-122) {
tmp = t_5;
} else if (x_46_re <= 5e-66) {
tmp = t_2;
} else if (x_46_re <= 1.55e-61) {
tmp = t_5;
} else if (x_46_re <= 1.2e-35) {
tmp = t_2;
} else if (x_46_re <= 0.00035) {
tmp = t_5;
} else if (x_46_re <= 6.4e+42) {
tmp = t_2;
} else if (x_46_re <= 2.1e+43) {
tmp = t_5;
} else if (x_46_re <= 2e+132) {
tmp = t_2;
} else if (x_46_re <= 7.5e+132) {
tmp = t_5;
} else if (x_46_re <= 1.2e+176) {
tmp = t_2;
} else if (x_46_re <= 2.7e+177) {
tmp = t_3;
} else if ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) {
tmp = t_2;
} else {
tmp = t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im t_2 = t_0 * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) t_3 = t_0 * math.exp(((y_46_re * math.log(x_46_im)) - t_1)) t_4 = math.exp(((y_46_re * math.log(-x_46_re)) - t_1)) * t_0 t_5 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) tmp = 0 if x_46_re <= -1.45e+122: tmp = t_4 elif x_46_re <= -2.4e-47: tmp = t_5 elif x_46_re <= -3.4e-51: tmp = t_4 elif x_46_re <= -4.3e-94: tmp = t_5 elif x_46_re <= -5.3e-121: tmp = t_4 elif x_46_re <= -4.5e-154: tmp = t_3 elif x_46_re <= -2.9e-205: tmp = t_5 elif x_46_re <= -2.05e-231: tmp = t_4 elif x_46_re <= -1.95e-259: tmp = t_5 elif x_46_re <= -5e-310: tmp = t_4 elif x_46_re <= 3e-304: tmp = t_2 elif x_46_re <= 2.15e-299: tmp = t_5 elif x_46_re <= 1.8e-266: tmp = t_2 elif x_46_re <= 3.1e-261: tmp = t_5 elif x_46_re <= 1.85e-245: tmp = t_2 elif x_46_re <= 5.5e-238: tmp = t_5 elif x_46_re <= 2.95e-213: tmp = t_2 elif x_46_re <= 6.2e-204: tmp = t_5 elif x_46_re <= 7e-193: tmp = t_2 elif x_46_re <= 1.35e-188: tmp = t_5 elif x_46_re <= 7.6e-188: tmp = t_2 elif x_46_re <= 9.2e-176: tmp = t_5 elif x_46_re <= 6e-171: tmp = t_2 elif x_46_re <= 7.1e-122: tmp = t_5 elif x_46_re <= 5e-66: tmp = t_2 elif x_46_re <= 1.55e-61: tmp = t_5 elif x_46_re <= 1.2e-35: tmp = t_2 elif x_46_re <= 0.00035: tmp = t_5 elif x_46_re <= 6.4e+42: tmp = t_2 elif x_46_re <= 2.1e+43: tmp = t_5 elif x_46_re <= 2e+132: tmp = t_2 elif x_46_re <= 7.5e+132: tmp = t_5 elif x_46_re <= 1.2e+176: tmp = t_2 elif x_46_re <= 2.7e+177: tmp = t_3 elif (x_46_re <= 3.1e+227) or (not (x_46_re <= 3.2e+227) and ((x_46_re <= 2.6e+252) or (not (x_46_re <= 4e+253) and ((x_46_re <= 2.4e+284) or (not (x_46_re <= 2.5e+284) and (x_46_re <= 3.8e+293)))))): tmp = t_2 else: tmp = t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))) t_3 = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_1))) t_4 = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_1)) * t_0) t_5 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_1)) tmp = 0.0 if (x_46_re <= -1.45e+122) tmp = t_4; elseif (x_46_re <= -2.4e-47) tmp = t_5; elseif (x_46_re <= -3.4e-51) tmp = t_4; elseif (x_46_re <= -4.3e-94) tmp = t_5; elseif (x_46_re <= -5.3e-121) tmp = t_4; elseif (x_46_re <= -4.5e-154) tmp = t_3; elseif (x_46_re <= -2.9e-205) tmp = t_5; elseif (x_46_re <= -2.05e-231) tmp = t_4; elseif (x_46_re <= -1.95e-259) tmp = t_5; elseif (x_46_re <= -5e-310) tmp = t_4; elseif (x_46_re <= 3e-304) tmp = t_2; elseif (x_46_re <= 2.15e-299) tmp = t_5; elseif (x_46_re <= 1.8e-266) tmp = t_2; elseif (x_46_re <= 3.1e-261) tmp = t_5; elseif (x_46_re <= 1.85e-245) tmp = t_2; elseif (x_46_re <= 5.5e-238) tmp = t_5; elseif (x_46_re <= 2.95e-213) tmp = t_2; elseif (x_46_re <= 6.2e-204) tmp = t_5; elseif (x_46_re <= 7e-193) tmp = t_2; elseif (x_46_re <= 1.35e-188) tmp = t_5; elseif (x_46_re <= 7.6e-188) tmp = t_2; elseif (x_46_re <= 9.2e-176) tmp = t_5; elseif (x_46_re <= 6e-171) tmp = t_2; elseif (x_46_re <= 7.1e-122) tmp = t_5; elseif (x_46_re <= 5e-66) tmp = t_2; elseif (x_46_re <= 1.55e-61) tmp = t_5; elseif (x_46_re <= 1.2e-35) tmp = t_2; elseif (x_46_re <= 0.00035) tmp = t_5; elseif (x_46_re <= 6.4e+42) tmp = t_2; elseif (x_46_re <= 2.1e+43) tmp = t_5; elseif (x_46_re <= 2e+132) tmp = t_2; elseif (x_46_re <= 7.5e+132) tmp = t_5; elseif (x_46_re <= 1.2e+176) tmp = t_2; elseif (x_46_re <= 2.7e+177) tmp = t_3; elseif ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) tmp = t_2; else tmp = t_5; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos((y_46_re * atan2(x_46_im, x_46_re))); t_1 = atan2(x_46_im, x_46_re) * y_46_im; t_2 = t_0 * exp(((y_46_re * log(x_46_re)) - t_1)); t_3 = t_0 * exp(((y_46_re * log(x_46_im)) - t_1)); t_4 = exp(((y_46_re * log(-x_46_re)) - t_1)) * t_0; t_5 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)); tmp = 0.0; if (x_46_re <= -1.45e+122) tmp = t_4; elseif (x_46_re <= -2.4e-47) tmp = t_5; elseif (x_46_re <= -3.4e-51) tmp = t_4; elseif (x_46_re <= -4.3e-94) tmp = t_5; elseif (x_46_re <= -5.3e-121) tmp = t_4; elseif (x_46_re <= -4.5e-154) tmp = t_3; elseif (x_46_re <= -2.9e-205) tmp = t_5; elseif (x_46_re <= -2.05e-231) tmp = t_4; elseif (x_46_re <= -1.95e-259) tmp = t_5; elseif (x_46_re <= -5e-310) tmp = t_4; elseif (x_46_re <= 3e-304) tmp = t_2; elseif (x_46_re <= 2.15e-299) tmp = t_5; elseif (x_46_re <= 1.8e-266) tmp = t_2; elseif (x_46_re <= 3.1e-261) tmp = t_5; elseif (x_46_re <= 1.85e-245) tmp = t_2; elseif (x_46_re <= 5.5e-238) tmp = t_5; elseif (x_46_re <= 2.95e-213) tmp = t_2; elseif (x_46_re <= 6.2e-204) tmp = t_5; elseif (x_46_re <= 7e-193) tmp = t_2; elseif (x_46_re <= 1.35e-188) tmp = t_5; elseif (x_46_re <= 7.6e-188) tmp = t_2; elseif (x_46_re <= 9.2e-176) tmp = t_5; elseif (x_46_re <= 6e-171) tmp = t_2; elseif (x_46_re <= 7.1e-122) tmp = t_5; elseif (x_46_re <= 5e-66) tmp = t_2; elseif (x_46_re <= 1.55e-61) tmp = t_5; elseif (x_46_re <= 1.2e-35) tmp = t_2; elseif (x_46_re <= 0.00035) tmp = t_5; elseif (x_46_re <= 6.4e+42) tmp = t_2; elseif (x_46_re <= 2.1e+43) tmp = t_5; elseif (x_46_re <= 2e+132) tmp = t_2; elseif (x_46_re <= 7.5e+132) tmp = t_5; elseif (x_46_re <= 1.2e+176) tmp = t_2; elseif (x_46_re <= 2.7e+177) tmp = t_3; elseif ((x_46_re <= 3.1e+227) || (~((x_46_re <= 3.2e+227)) && ((x_46_re <= 2.6e+252) || (~((x_46_re <= 4e+253)) && ((x_46_re <= 2.4e+284) || (~((x_46_re <= 2.5e+284)) && (x_46_re <= 3.8e+293))))))) tmp = t_2; else tmp = t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.45e+122], t$95$4, If[LessEqual[x$46$re, -2.4e-47], t$95$5, If[LessEqual[x$46$re, -3.4e-51], t$95$4, If[LessEqual[x$46$re, -4.3e-94], t$95$5, If[LessEqual[x$46$re, -5.3e-121], t$95$4, If[LessEqual[x$46$re, -4.5e-154], t$95$3, If[LessEqual[x$46$re, -2.9e-205], t$95$5, If[LessEqual[x$46$re, -2.05e-231], t$95$4, If[LessEqual[x$46$re, -1.95e-259], t$95$5, If[LessEqual[x$46$re, -5e-310], t$95$4, If[LessEqual[x$46$re, 3e-304], t$95$2, If[LessEqual[x$46$re, 2.15e-299], t$95$5, If[LessEqual[x$46$re, 1.8e-266], t$95$2, If[LessEqual[x$46$re, 3.1e-261], t$95$5, If[LessEqual[x$46$re, 1.85e-245], t$95$2, If[LessEqual[x$46$re, 5.5e-238], t$95$5, If[LessEqual[x$46$re, 2.95e-213], t$95$2, If[LessEqual[x$46$re, 6.2e-204], t$95$5, If[LessEqual[x$46$re, 7e-193], t$95$2, If[LessEqual[x$46$re, 1.35e-188], t$95$5, If[LessEqual[x$46$re, 7.6e-188], t$95$2, If[LessEqual[x$46$re, 9.2e-176], t$95$5, If[LessEqual[x$46$re, 6e-171], t$95$2, If[LessEqual[x$46$re, 7.1e-122], t$95$5, If[LessEqual[x$46$re, 5e-66], t$95$2, If[LessEqual[x$46$re, 1.55e-61], t$95$5, If[LessEqual[x$46$re, 1.2e-35], t$95$2, If[LessEqual[x$46$re, 0.00035], t$95$5, If[LessEqual[x$46$re, 6.4e+42], t$95$2, If[LessEqual[x$46$re, 2.1e+43], t$95$5, If[LessEqual[x$46$re, 2e+132], t$95$2, If[LessEqual[x$46$re, 7.5e+132], t$95$5, If[LessEqual[x$46$re, 1.2e+176], t$95$2, If[LessEqual[x$46$re, 2.7e+177], t$95$3, If[Or[LessEqual[x$46$re, 3.1e+227], And[N[Not[LessEqual[x$46$re, 3.2e+227]], $MachinePrecision], Or[LessEqual[x$46$re, 2.6e+252], And[N[Not[LessEqual[x$46$re, 4e+253]], $MachinePrecision], Or[LessEqual[x$46$re, 2.4e+284], And[N[Not[LessEqual[x$46$re, 2.5e+284]], $MachinePrecision], LessEqual[x$46$re, 3.8e+293]]]]]]], t$95$2, t$95$5]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := t\_0 \cdot e^{y.re \cdot \log x.re - t\_1}\\
t_3 := t\_0 \cdot e^{y.re \cdot \log x.im - t\_1}\\
t_4 := e^{y.re \cdot \log \left(-x.re\right) - t\_1} \cdot t\_0\\
t_5 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1}\\
\mathbf{if}\;x.re \leq -1.45 \cdot 10^{+122}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -2.4 \cdot 10^{-47}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -3.4 \cdot 10^{-51}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -4.3 \cdot 10^{-94}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -5.3 \cdot 10^{-121}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -4.5 \cdot 10^{-154}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -2.9 \cdot 10^{-205}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -2.05 \cdot 10^{-231}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -1.95 \cdot 10^{-259}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-299}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.8 \cdot 10^{-266}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 3.1 \cdot 10^{-261}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.85 \cdot 10^{-245}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-238}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 2.95 \cdot 10^{-213}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{-204}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 7 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 1.35 \cdot 10^{-188}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 7.6 \cdot 10^{-188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 9.2 \cdot 10^{-176}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 6 \cdot 10^{-171}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 7.1 \cdot 10^{-122}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 1.55 \cdot 10^{-61}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.2 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 0.00035:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 6.4 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{+43}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{+132}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+132}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+176}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{+177}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 3.1 \cdot 10^{+227} \lor \neg \left(x.re \leq 3.2 \cdot 10^{+227}\right) \land \left(x.re \leq 2.6 \cdot 10^{+252} \lor \neg \left(x.re \leq 4 \cdot 10^{+253}\right) \land \left(x.re \leq 2.4 \cdot 10^{+284} \lor \neg \left(x.re \leq 2.5 \cdot 10^{+284}\right) \land x.re \leq 3.8 \cdot 10^{+293}\right)\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x.re < -1.45e122 or -2.3999999999999999e-47 < x.re < -3.40000000000000003e-51 or -4.2999999999999998e-94 < x.re < -5.2999999999999996e-121 or -2.90000000000000018e-205 < x.re < -2.0500000000000001e-231 or -1.95000000000000008e-259 < x.re < -4.999999999999985e-310Initial program 29.7%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -1.45e122 < x.re < -2.3999999999999999e-47 or -3.40000000000000003e-51 < x.re < -4.2999999999999998e-94 or -4.4999999999999997e-154 < x.re < -2.90000000000000018e-205 or -2.0500000000000001e-231 < x.re < -1.95000000000000008e-259 or 3.0000000000000001e-304 < x.re < 2.1499999999999999e-299 or 1.8e-266 < x.re < 3.0999999999999998e-261 or 1.8500000000000001e-245 < x.re < 5.49999999999999995e-238 or 2.9499999999999999e-213 < x.re < 6.1999999999999998e-204 or 7.00000000000000009e-193 < x.re < 1.35e-188 or 7.599999999999999e-188 < x.re < 9.2000000000000005e-176 or 5.9999999999999999e-171 < x.re < 7.09999999999999955e-122 or 4.99999999999999962e-66 < x.re < 1.54999999999999997e-61 or 1.2000000000000001e-35 < x.re < 3.49999999999999996e-4 or 6.40000000000000004e42 < x.re < 2.10000000000000002e43 or 1.99999999999999998e132 < x.re < 7.50000000000000017e132 or 3.0999999999999999e227 < x.re < 3.19999999999999988e227 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 51.0%
Taylor expanded in y.im around 0 68.9%
Taylor expanded in y.re around 0 79.3%
if -5.2999999999999996e-121 < x.re < -4.4999999999999997e-154 or 1.2000000000000001e176 < x.re < 2.69999999999999991e177Initial program 60.0%
Taylor expanded in y.im around 0 70.6%
Taylor expanded in x.re around 0 82.0%
*-commutative82.0%
Simplified82.0%
if -4.999999999999985e-310 < x.re < 3.0000000000000001e-304 or 2.1499999999999999e-299 < x.re < 1.8e-266 or 3.0999999999999998e-261 < x.re < 1.8500000000000001e-245 or 5.49999999999999995e-238 < x.re < 2.9499999999999999e-213 or 6.1999999999999998e-204 < x.re < 7.00000000000000009e-193 or 1.35e-188 < x.re < 7.599999999999999e-188 or 9.2000000000000005e-176 < x.re < 5.9999999999999999e-171 or 7.09999999999999955e-122 < x.re < 4.99999999999999962e-66 or 1.54999999999999997e-61 < x.re < 1.2000000000000001e-35 or 3.49999999999999996e-4 < x.re < 6.40000000000000004e42 or 2.10000000000000002e43 < x.re < 1.99999999999999998e132 or 7.50000000000000017e132 < x.re < 1.2000000000000001e176 or 2.69999999999999991e177 < x.re < 3.0999999999999999e227 or 3.19999999999999988e227 < x.re < 2.60000000000000018e252 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 45.3%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around inf 89.7%
Final simplification85.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (cos (* y.re (atan2 x.im x.re))))
(t_2
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0)))
(t_3 (* t_1 (exp (- (* y.re (log x.re)) t_0)))))
(if (<= x.re 6.5e-294)
t_2
(if (<= x.re 2.15e-246)
t_3
(if (<= x.re 7.5e-239)
t_2
(if (<= x.re 2.95e-213)
t_3
(if (<= x.re 5.4e-201)
t_2
(if (<= x.re 2.1e-195)
t_3
(if (<= x.re 1.4e-188)
t_2
(if (<= x.re 2e-188)
t_3
(if (<= x.re 9.6e-175)
t_2
(if (<= x.re 5e-171)
t_3
(if (<= x.re 9.5e-122)
t_2
(if (<= x.re 2.9e-65)
t_3
(if (<= x.re 1.6e-59)
t_2
(if (<= x.re 8e-38)
t_3
(if (<= x.re 0.1)
t_2
(if (<= x.re 6.4e+42)
t_3
(if (<= x.re 1.92e+43)
t_2
(if (<= x.re 7e+132)
t_3
(if (<= x.re 7.5e+132)
t_2
(if (<= x.re 1.2e+176)
t_3
(if (<= x.re 2.7e+177)
(*
t_1
(exp
(- (* y.re (log x.im)) t_0)))
(if (or (<= x.re 3.1e+227)
(and (not
(<= x.re 3.2e+227))
(or (<=
x.re
2.6e+252)
(and (not
(<=
x.re
4e+253))
(or (<=
x.re
2.4e+284)
(and (not
(<=
x.re
2.5e+284))
(<=
x.re
3.8e+293)))))))
t_3
t_2))))))))))))))))))))))))
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 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_3 = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= 6.5e-294) {
tmp = t_2;
} else if (x_46_re <= 2.15e-246) {
tmp = t_3;
} else if (x_46_re <= 7.5e-239) {
tmp = t_2;
} else if (x_46_re <= 2.95e-213) {
tmp = t_3;
} else if (x_46_re <= 5.4e-201) {
tmp = t_2;
} else if (x_46_re <= 2.1e-195) {
tmp = t_3;
} else if (x_46_re <= 1.4e-188) {
tmp = t_2;
} else if (x_46_re <= 2e-188) {
tmp = t_3;
} else if (x_46_re <= 9.6e-175) {
tmp = t_2;
} else if (x_46_re <= 5e-171) {
tmp = t_3;
} else if (x_46_re <= 9.5e-122) {
tmp = t_2;
} else if (x_46_re <= 2.9e-65) {
tmp = t_3;
} else if (x_46_re <= 1.6e-59) {
tmp = t_2;
} else if (x_46_re <= 8e-38) {
tmp = t_3;
} else if (x_46_re <= 0.1) {
tmp = t_2;
} else if (x_46_re <= 6.4e+42) {
tmp = t_3;
} else if (x_46_re <= 1.92e+43) {
tmp = t_2;
} else if (x_46_re <= 7e+132) {
tmp = t_3;
} else if (x_46_re <= 7.5e+132) {
tmp = t_2;
} else if (x_46_re <= 1.2e+176) {
tmp = t_3;
} else if (x_46_re <= 2.7e+177) {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
} else if ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = cos((y_46re * atan2(x_46im, x_46re)))
t_2 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0))
t_3 = t_1 * exp(((y_46re * log(x_46re)) - t_0))
if (x_46re <= 6.5d-294) then
tmp = t_2
else if (x_46re <= 2.15d-246) then
tmp = t_3
else if (x_46re <= 7.5d-239) then
tmp = t_2
else if (x_46re <= 2.95d-213) then
tmp = t_3
else if (x_46re <= 5.4d-201) then
tmp = t_2
else if (x_46re <= 2.1d-195) then
tmp = t_3
else if (x_46re <= 1.4d-188) then
tmp = t_2
else if (x_46re <= 2d-188) then
tmp = t_3
else if (x_46re <= 9.6d-175) then
tmp = t_2
else if (x_46re <= 5d-171) then
tmp = t_3
else if (x_46re <= 9.5d-122) then
tmp = t_2
else if (x_46re <= 2.9d-65) then
tmp = t_3
else if (x_46re <= 1.6d-59) then
tmp = t_2
else if (x_46re <= 8d-38) then
tmp = t_3
else if (x_46re <= 0.1d0) then
tmp = t_2
else if (x_46re <= 6.4d+42) then
tmp = t_3
else if (x_46re <= 1.92d+43) then
tmp = t_2
else if (x_46re <= 7d+132) then
tmp = t_3
else if (x_46re <= 7.5d+132) then
tmp = t_2
else if (x_46re <= 1.2d+176) then
tmp = t_3
else if (x_46re <= 2.7d+177) then
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
else if ((x_46re <= 3.1d+227) .or. (.not. (x_46re <= 3.2d+227)) .and. (x_46re <= 2.6d+252) .or. (.not. (x_46re <= 4d+253)) .and. (x_46re <= 2.4d+284) .or. (.not. (x_46re <= 2.5d+284)) .and. (x_46re <= 3.8d+293)) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_3 = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= 6.5e-294) {
tmp = t_2;
} else if (x_46_re <= 2.15e-246) {
tmp = t_3;
} else if (x_46_re <= 7.5e-239) {
tmp = t_2;
} else if (x_46_re <= 2.95e-213) {
tmp = t_3;
} else if (x_46_re <= 5.4e-201) {
tmp = t_2;
} else if (x_46_re <= 2.1e-195) {
tmp = t_3;
} else if (x_46_re <= 1.4e-188) {
tmp = t_2;
} else if (x_46_re <= 2e-188) {
tmp = t_3;
} else if (x_46_re <= 9.6e-175) {
tmp = t_2;
} else if (x_46_re <= 5e-171) {
tmp = t_3;
} else if (x_46_re <= 9.5e-122) {
tmp = t_2;
} else if (x_46_re <= 2.9e-65) {
tmp = t_3;
} else if (x_46_re <= 1.6e-59) {
tmp = t_2;
} else if (x_46_re <= 8e-38) {
tmp = t_3;
} else if (x_46_re <= 0.1) {
tmp = t_2;
} else if (x_46_re <= 6.4e+42) {
tmp = t_3;
} else if (x_46_re <= 1.92e+43) {
tmp = t_2;
} else if (x_46_re <= 7e+132) {
tmp = t_3;
} else if (x_46_re <= 7.5e+132) {
tmp = t_2;
} else if (x_46_re <= 1.2e+176) {
tmp = t_3;
} else if (x_46_re <= 2.7e+177) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else if ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) t_3 = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) tmp = 0 if x_46_re <= 6.5e-294: tmp = t_2 elif x_46_re <= 2.15e-246: tmp = t_3 elif x_46_re <= 7.5e-239: tmp = t_2 elif x_46_re <= 2.95e-213: tmp = t_3 elif x_46_re <= 5.4e-201: tmp = t_2 elif x_46_re <= 2.1e-195: tmp = t_3 elif x_46_re <= 1.4e-188: tmp = t_2 elif x_46_re <= 2e-188: tmp = t_3 elif x_46_re <= 9.6e-175: tmp = t_2 elif x_46_re <= 5e-171: tmp = t_3 elif x_46_re <= 9.5e-122: tmp = t_2 elif x_46_re <= 2.9e-65: tmp = t_3 elif x_46_re <= 1.6e-59: tmp = t_2 elif x_46_re <= 8e-38: tmp = t_3 elif x_46_re <= 0.1: tmp = t_2 elif x_46_re <= 6.4e+42: tmp = t_3 elif x_46_re <= 1.92e+43: tmp = t_2 elif x_46_re <= 7e+132: tmp = t_3 elif x_46_re <= 7.5e+132: tmp = t_2 elif x_46_re <= 1.2e+176: tmp = t_3 elif x_46_re <= 2.7e+177: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) elif (x_46_re <= 3.1e+227) or (not (x_46_re <= 3.2e+227) and ((x_46_re <= 2.6e+252) or (not (x_46_re <= 4e+253) and ((x_46_re <= 2.4e+284) or (not (x_46_re <= 2.5e+284) and (x_46_re <= 3.8e+293)))))): tmp = t_3 else: tmp = t_2 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 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) t_3 = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))) tmp = 0.0 if (x_46_re <= 6.5e-294) tmp = t_2; elseif (x_46_re <= 2.15e-246) tmp = t_3; elseif (x_46_re <= 7.5e-239) tmp = t_2; elseif (x_46_re <= 2.95e-213) tmp = t_3; elseif (x_46_re <= 5.4e-201) tmp = t_2; elseif (x_46_re <= 2.1e-195) tmp = t_3; elseif (x_46_re <= 1.4e-188) tmp = t_2; elseif (x_46_re <= 2e-188) tmp = t_3; elseif (x_46_re <= 9.6e-175) tmp = t_2; elseif (x_46_re <= 5e-171) tmp = t_3; elseif (x_46_re <= 9.5e-122) tmp = t_2; elseif (x_46_re <= 2.9e-65) tmp = t_3; elseif (x_46_re <= 1.6e-59) tmp = t_2; elseif (x_46_re <= 8e-38) tmp = t_3; elseif (x_46_re <= 0.1) tmp = t_2; elseif (x_46_re <= 6.4e+42) tmp = t_3; elseif (x_46_re <= 1.92e+43) tmp = t_2; elseif (x_46_re <= 7e+132) tmp = t_3; elseif (x_46_re <= 7.5e+132) tmp = t_2; elseif (x_46_re <= 1.2e+176) tmp = t_3; elseif (x_46_re <= 2.7e+177) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); elseif ((x_46_re <= 3.1e+227) || (!(x_46_re <= 3.2e+227) && ((x_46_re <= 2.6e+252) || (!(x_46_re <= 4e+253) && ((x_46_re <= 2.4e+284) || (!(x_46_re <= 2.5e+284) && (x_46_re <= 3.8e+293))))))) tmp = t_3; 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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = cos((y_46_re * atan2(x_46_im, x_46_re))); t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)); t_3 = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= 6.5e-294) tmp = t_2; elseif (x_46_re <= 2.15e-246) tmp = t_3; elseif (x_46_re <= 7.5e-239) tmp = t_2; elseif (x_46_re <= 2.95e-213) tmp = t_3; elseif (x_46_re <= 5.4e-201) tmp = t_2; elseif (x_46_re <= 2.1e-195) tmp = t_3; elseif (x_46_re <= 1.4e-188) tmp = t_2; elseif (x_46_re <= 2e-188) tmp = t_3; elseif (x_46_re <= 9.6e-175) tmp = t_2; elseif (x_46_re <= 5e-171) tmp = t_3; elseif (x_46_re <= 9.5e-122) tmp = t_2; elseif (x_46_re <= 2.9e-65) tmp = t_3; elseif (x_46_re <= 1.6e-59) tmp = t_2; elseif (x_46_re <= 8e-38) tmp = t_3; elseif (x_46_re <= 0.1) tmp = t_2; elseif (x_46_re <= 6.4e+42) tmp = t_3; elseif (x_46_re <= 1.92e+43) tmp = t_2; elseif (x_46_re <= 7e+132) tmp = t_3; elseif (x_46_re <= 7.5e+132) tmp = t_2; elseif (x_46_re <= 1.2e+176) tmp = t_3; elseif (x_46_re <= 2.7e+177) tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); elseif ((x_46_re <= 3.1e+227) || (~((x_46_re <= 3.2e+227)) && ((x_46_re <= 2.6e+252) || (~((x_46_re <= 4e+253)) && ((x_46_re <= 2.4e+284) || (~((x_46_re <= 2.5e+284)) && (x_46_re <= 3.8e+293))))))) tmp = t_3; 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 6.5e-294], t$95$2, If[LessEqual[x$46$re, 2.15e-246], t$95$3, If[LessEqual[x$46$re, 7.5e-239], t$95$2, If[LessEqual[x$46$re, 2.95e-213], t$95$3, If[LessEqual[x$46$re, 5.4e-201], t$95$2, If[LessEqual[x$46$re, 2.1e-195], t$95$3, If[LessEqual[x$46$re, 1.4e-188], t$95$2, If[LessEqual[x$46$re, 2e-188], t$95$3, If[LessEqual[x$46$re, 9.6e-175], t$95$2, If[LessEqual[x$46$re, 5e-171], t$95$3, If[LessEqual[x$46$re, 9.5e-122], t$95$2, If[LessEqual[x$46$re, 2.9e-65], t$95$3, If[LessEqual[x$46$re, 1.6e-59], t$95$2, If[LessEqual[x$46$re, 8e-38], t$95$3, If[LessEqual[x$46$re, 0.1], t$95$2, If[LessEqual[x$46$re, 6.4e+42], t$95$3, If[LessEqual[x$46$re, 1.92e+43], t$95$2, If[LessEqual[x$46$re, 7e+132], t$95$3, If[LessEqual[x$46$re, 7.5e+132], t$95$2, If[LessEqual[x$46$re, 1.2e+176], t$95$3, If[LessEqual[x$46$re, 2.7e+177], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 3.1e+227], And[N[Not[LessEqual[x$46$re, 3.2e+227]], $MachinePrecision], Or[LessEqual[x$46$re, 2.6e+252], And[N[Not[LessEqual[x$46$re, 4e+253]], $MachinePrecision], Or[LessEqual[x$46$re, 2.4e+284], And[N[Not[LessEqual[x$46$re, 2.5e+284]], $MachinePrecision], LessEqual[x$46$re, 3.8e+293]]]]]]], t$95$3, t$95$2]]]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
t_3 := t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{if}\;x.re \leq 6.5 \cdot 10^{-294}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-246}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{-239}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.95 \cdot 10^{-213}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 5.4 \cdot 10^{-201}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{-195}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 1.4 \cdot 10^{-188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{-188}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 9.6 \cdot 10^{-175}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{-171}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 9.5 \cdot 10^{-122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-65}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 8 \cdot 10^{-38}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 0.1:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 6.4 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 1.92 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 7 \cdot 10^{+132}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+132}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+176}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{+177}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\mathbf{elif}\;x.re \leq 3.1 \cdot 10^{+227} \lor \neg \left(x.re \leq 3.2 \cdot 10^{+227}\right) \land \left(x.re \leq 2.6 \cdot 10^{+252} \lor \neg \left(x.re \leq 4 \cdot 10^{+253}\right) \land \left(x.re \leq 2.4 \cdot 10^{+284} \lor \neg \left(x.re \leq 2.5 \cdot 10^{+284}\right) \land x.re \leq 3.8 \cdot 10^{+293}\right)\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x.re < 6.4999999999999995e-294 or 2.14999999999999996e-246 < x.re < 7.4999999999999999e-239 or 2.9499999999999999e-213 < x.re < 5.40000000000000011e-201 or 2.1e-195 < x.re < 1.4000000000000001e-188 or 1.9999999999999999e-188 < x.re < 9.6e-175 or 4.99999999999999992e-171 < x.re < 9.5000000000000002e-122 or 2.8999999999999998e-65 < x.re < 1.6e-59 or 7.9999999999999997e-38 < x.re < 0.10000000000000001 or 6.40000000000000004e42 < x.re < 1.9199999999999999e43 or 7.00000000000000041e132 < x.re < 7.50000000000000017e132 or 3.0999999999999999e227 < x.re < 3.19999999999999988e227 or 2.60000000000000018e252 < x.re < 3.9999999999999997e253 or 2.4000000000000001e284 < x.re < 2.5e284 or 3.80000000000000014e293 < x.re Initial program 43.8%
Taylor expanded in y.im around 0 64.4%
Taylor expanded in y.re around 0 69.7%
if 6.4999999999999995e-294 < x.re < 2.14999999999999996e-246 or 7.4999999999999999e-239 < x.re < 2.9499999999999999e-213 or 5.40000000000000011e-201 < x.re < 2.1e-195 or 1.4000000000000001e-188 < x.re < 1.9999999999999999e-188 or 9.6e-175 < x.re < 4.99999999999999992e-171 or 9.5000000000000002e-122 < x.re < 2.8999999999999998e-65 or 1.6e-59 < x.re < 7.9999999999999997e-38 or 0.10000000000000001 < x.re < 6.40000000000000004e42 or 1.9199999999999999e43 < x.re < 7.00000000000000041e132 or 7.50000000000000017e132 < x.re < 1.2000000000000001e176 or 2.69999999999999991e177 < x.re < 3.0999999999999999e227 or 3.19999999999999988e227 < x.re < 2.60000000000000018e252 or 3.9999999999999997e253 < x.re < 2.4000000000000001e284 or 2.5e284 < x.re < 3.80000000000000014e293Initial program 45.9%
Taylor expanded in y.im around 0 64.4%
Taylor expanded in x.re around inf 88.4%
if 1.2000000000000001e176 < x.re < 2.69999999999999991e177Initial program 0.0%
Taylor expanded in y.im around 0 51.6%
Taylor expanded in x.re around 0 60.0%
*-commutative60.0%
Simplified60.0%
Final simplification75.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 44.1%
Taylor expanded in y.im around 0 64.3%
Taylor expanded in y.re around 0 65.5%
Final simplification65.5%
herbie shell --seed 2024096
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))