
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_3))
(+ t_1 (sin t_2))))
(t_5 (* (atan2 x.im x.re) (- y.im)))
(t_6 (* (exp (fma t_0 y.re t_5)) (sin t_1))))
(if (<= y.im -9e+119)
t_4
(if (<= y.im -1.85e+85)
t_6
(if (<= y.im -6.2e+44)
(* y.re (* (atan2 x.im x.re) (exp t_5)))
(if (<= y.im 2.5e-127)
(*
(sin (fma t_0 y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (+ t_3 1.0)))
(if (or (<= y.im 3.5e+175) (not (<= y.im 8.5e+239))) t_6 t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_3)) * (t_1 + sin(t_2));
double t_5 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_6 = exp(fma(t_0, y_46_re, t_5)) * sin(t_1);
double tmp;
if (y_46_im <= -9e+119) {
tmp = t_4;
} else if (y_46_im <= -1.85e+85) {
tmp = t_6;
} else if (y_46_im <= -6.2e+44) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp(t_5));
} else if (y_46_im <= 2.5e-127) {
tmp = sin(fma(t_0, y_46_im, t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_3 + 1.0));
} else if ((y_46_im <= 3.5e+175) || !(y_46_im <= 8.5e+239)) {
tmp = t_6;
} else {
tmp = t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_3)) * Float64(t_1 + sin(t_2))) t_5 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_6 = Float64(exp(fma(t_0, y_46_re, t_5)) * sin(t_1)) tmp = 0.0 if (y_46_im <= -9e+119) tmp = t_4; elseif (y_46_im <= -1.85e+85) tmp = t_6; elseif (y_46_im <= -6.2e+44) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(t_5))); elseif (y_46_im <= 2.5e-127) tmp = Float64(sin(fma(t_0, y_46_im, t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_3 + 1.0))); elseif ((y_46_im <= 3.5e+175) || !(y_46_im <= 8.5e+239)) tmp = t_6; 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[(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$3), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 + N[Sin[t$95$2], $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[(t$95$0 * y$46$re + t$95$5), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -9e+119], t$95$4, If[LessEqual[y$46$im, -1.85e+85], t$95$6, If[LessEqual[y$46$im, -6.2e+44], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[t$95$5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.5e-127], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, 3.5e+175], N[Not[LessEqual[y$46$im, 8.5e+239]], $MachinePrecision]], t$95$6, t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_3} \cdot \left(t\_1 + \sin t\_2\right)\\
t_5 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_6 := e^{\mathsf{fma}\left(t\_0, y.re, t\_5\right)} \cdot \sin t\_1\\
\mathbf{if}\;y.im \leq -9 \cdot 10^{+119}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq -1.85 \cdot 10^{+85}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y.im \leq -6.2 \cdot 10^{+44}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{t\_5}\right)\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{-127}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_3 + 1}\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{+175} \lor \neg \left(y.im \leq 8.5 \cdot 10^{+239}\right):\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.im < -9.00000000000000039e119 or 3.5000000000000003e175 < y.im < 8.50000000000000021e239Initial program 30.4%
Taylor expanded in y.im around 0 55.6%
+-commutative55.6%
*-commutative55.6%
*-commutative55.6%
associate-*r*55.6%
unpow255.6%
unpow255.6%
hypot-undefine71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in y.re around 0 77.2%
if -9.00000000000000039e119 < y.im < -1.8500000000000001e85 or 2.4999999999999999e-127 < y.im < 3.5000000000000003e175 or 8.50000000000000021e239 < y.im Initial program 30.7%
cancel-sign-sub-inv30.7%
fma-define30.7%
hypot-define30.7%
distribute-lft-neg-in30.7%
distribute-rgt-neg-out30.7%
fma-define30.7%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around inf 35.8%
unpow235.8%
unpow235.8%
hypot-undefine77.6%
Simplified77.6%
if -1.8500000000000001e85 < y.im < -6.19999999999999991e44Initial program 44.4%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in x.re around inf 22.4%
Taylor expanded in y.re around 0 77.9%
*-commutative77.9%
distribute-lft-neg-in77.9%
*-commutative77.9%
Simplified77.9%
if -6.19999999999999991e44 < y.im < 2.4999999999999999e-127Initial program 45.0%
exp-diff45.0%
exp-to-pow45.0%
hypot-define45.0%
*-commutative45.0%
exp-prod43.8%
fma-define43.8%
hypot-define88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y.im around 0 89.7%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) INFINITY)
(* t_3 (+ (* y.im (log (hypot x.im x.re))) (sin t_1)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (pow (cbrt (fma t_0 y.im t_1)) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = 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 tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= ((double) INFINITY)) {
tmp = t_3 * ((y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1));
} else {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(pow(cbrt(fma(t_0, y_46_im, t_1)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = 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))) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Inf) tmp = Float64(t_3 * Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin((cbrt(fma(t_0, y_46_im, t_1)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[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]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 * N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \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}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq \infty:\\
\;\;\;\;t\_3 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + \sin t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(t\_0, y.im, t\_1\right)}\right)}^{3}\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))) (sin.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 71.5%
Taylor expanded in y.im around 0 76.3%
+-commutative76.3%
*-commutative76.3%
*-commutative76.3%
associate-*r*76.3%
unpow276.3%
unpow276.3%
hypot-undefine76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in y.re around 0 80.1%
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))) (sin.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-define78.6%
*-commutative78.6%
Simplified78.6%
fma-undefine78.6%
hypot-define0.0%
*-commutative0.0%
add-cube-cbrt0.0%
pow30.0%
fma-define0.0%
hypot-define83.3%
Applied egg-rr83.3%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(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)))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) INFINITY)
(* t_3 (+ (* y.im (log (hypot x.im x.re))) (sin t_1)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = 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 tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= ((double) INFINITY)) {
tmp = t_3 * ((y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1));
} else {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = 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))) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Inf) tmp = Float64(t_3 * Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[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]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 * N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \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}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq \infty:\\
\;\;\;\;t\_3 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + \sin t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\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))) (sin.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 71.5%
Taylor expanded in y.im around 0 76.3%
+-commutative76.3%
*-commutative76.3%
*-commutative76.3%
associate-*r*76.3%
unpow276.3%
unpow276.3%
hypot-undefine76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in y.re around 0 80.1%
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))) (sin.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-define78.6%
*-commutative78.6%
Simplified78.6%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (fma y.im (log (hypot x.im x.re)) t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -1.4e-7)
(* t_3 (sin (fabs t_1)))
(if (<= y.im 7.5e-50)
(*
(sin (pow (cbrt (fma t_2 y.im t_0)) 3.0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_3 (fabs (sin t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.4e-7) {
tmp = t_3 * sin(fabs(t_1));
} else if (y_46_im <= 7.5e-50) {
tmp = sin(pow(cbrt(fma(t_2, y_46_im, t_0)), 3.0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_3 * fabs(sin(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -1.4e-7) tmp = Float64(t_3 * sin(abs(t_1))); elseif (y_46_im <= 7.5e-50) tmp = Float64(sin((cbrt(fma(t_2, y_46_im, t_0)) ^ 3.0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_3 * abs(sin(t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.4e-7], N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e-50], N[(N[Sin[N[Power[N[Power[N[(t$95$2 * y$46$im + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{-7}:\\
\;\;\;\;t\_3 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-50}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(t\_2, y.im, t\_0\right)}\right)}^{3}\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left|\sin t\_1\right|\\
\end{array}
\end{array}
if y.im < -1.4000000000000001e-7Initial program 32.3%
cancel-sign-sub-inv32.3%
fma-define32.3%
hypot-define32.3%
distribute-lft-neg-in32.3%
distribute-rgt-neg-out32.3%
fma-define32.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
fma-undefine58.0%
hypot-define32.3%
*-commutative32.3%
add-sqr-sqrt22.2%
sqrt-unprod10.9%
pow210.9%
fma-define10.9%
hypot-define24.0%
Applied egg-rr24.0%
unpow224.0%
rem-sqrt-square70.0%
fma-undefine70.0%
hypot-undefine36.9%
unpow236.9%
unpow236.9%
+-commutative36.9%
*-commutative36.9%
*-commutative36.9%
fma-define36.9%
unpow236.9%
unpow236.9%
hypot-undefine70.0%
Simplified70.0%
if -1.4000000000000001e-7 < y.im < 7.5e-50Initial program 44.7%
exp-diff44.7%
exp-to-pow44.7%
hypot-define44.7%
*-commutative44.7%
exp-prod44.7%
fma-define44.7%
hypot-define88.6%
*-commutative88.6%
Simplified88.6%
fma-undefine88.6%
hypot-define44.7%
*-commutative44.7%
add-cube-cbrt46.1%
pow346.1%
fma-define46.1%
hypot-define92.1%
Applied egg-rr92.1%
if 7.5e-50 < y.im Initial program 30.4%
cancel-sign-sub-inv30.4%
fma-define30.4%
hypot-define30.4%
distribute-lft-neg-in30.4%
distribute-rgt-neg-out30.4%
fma-define30.4%
hypot-define69.0%
*-commutative69.0%
Simplified69.0%
fma-undefine69.0%
hypot-define30.4%
*-commutative30.4%
add-cube-cbrt32.9%
pow330.0%
fma-define30.0%
hypot-define70.3%
Applied egg-rr70.3%
rem-square-sqrt38.8%
sqrt-unprod79.5%
pow279.5%
rem-cube-cbrt79.6%
Applied egg-rr79.6%
unpow279.6%
rem-sqrt-square79.6%
hypot-undefine36.1%
unpow236.1%
unpow236.1%
+-commutative36.1%
*-commutative36.1%
fma-undefine36.1%
*-commutative36.1%
fma-define36.1%
Simplified79.6%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (or (<= y.im -145000000000.0) (not (<= y.im 1.05e-91)))
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(fabs (sin (fma y.im (log (hypot x.im x.re)) t_0))))
(*
(sin (fma t_1 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ (* (atan2 x.im x.re) y.im) 1.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 tmp;
if ((y_46_im <= -145000000000.0) || !(y_46_im <= 1.05e-91)) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else {
tmp = sin(fma(t_1, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -145000000000.0) || !(y_46_im <= 1.05e-91)) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); else tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -145000000000.0], N[Not[LessEqual[y$46$im, 1.05e-91]], $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[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * 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[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.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)\\
\mathbf{if}\;y.im \leq -145000000000 \lor \neg \left(y.im \leq 1.05 \cdot 10^{-91}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}\\
\end{array}
\end{array}
if y.im < -1.45e11 or 1.05e-91 < y.im Initial program 31.4%
cancel-sign-sub-inv31.4%
fma-define31.4%
hypot-define31.4%
distribute-lft-neg-in31.4%
distribute-rgt-neg-out31.4%
fma-define31.4%
hypot-define63.2%
*-commutative63.2%
Simplified63.2%
fma-undefine63.2%
hypot-define31.4%
*-commutative31.4%
add-cube-cbrt35.5%
pow334.1%
fma-define34.1%
hypot-define68.7%
Applied egg-rr68.7%
rem-square-sqrt39.6%
sqrt-unprod75.2%
pow275.2%
rem-cube-cbrt75.2%
Applied egg-rr75.2%
unpow275.2%
rem-sqrt-square75.2%
hypot-undefine39.7%
unpow239.7%
unpow239.7%
+-commutative39.7%
*-commutative39.7%
fma-undefine39.7%
*-commutative39.7%
fma-define39.7%
Simplified75.2%
if -1.45e11 < y.im < 1.05e-91Initial program 45.2%
exp-diff45.2%
exp-to-pow45.2%
hypot-define45.2%
*-commutative45.2%
exp-prod44.0%
fma-define44.0%
hypot-define89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y.im around 0 90.2%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (fma y.im (log (hypot x.im x.re)) t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -500000000.0)
(* t_3 (sin (fabs t_1)))
(if (<= y.im 4e-97)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (fma t_2 y.im t_0)))
(* t_3 (fabs (sin t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -500000000.0) {
tmp = t_3 * sin(fabs(t_1));
} else if (y_46_im <= 4e-97) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin(fma(t_2, y_46_im, t_0));
} else {
tmp = t_3 * fabs(sin(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -500000000.0) tmp = Float64(t_3 * sin(abs(t_1))); elseif (y_46_im <= 4e-97) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(fma(t_2, y_46_im, t_0))); else tmp = Float64(t_3 * abs(sin(t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -500000000.0], N[(t$95$3 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4e-97], 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[Sin[N[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -500000000:\\
\;\;\;\;t\_3 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{-97}:\\
\;\;\;\;\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 \sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left|\sin t\_1\right|\\
\end{array}
\end{array}
if y.im < -5e8Initial program 31.9%
cancel-sign-sub-inv31.9%
fma-define31.9%
hypot-define31.9%
distribute-lft-neg-in31.9%
distribute-rgt-neg-out31.9%
fma-define31.9%
hypot-define56.9%
*-commutative56.9%
Simplified56.9%
fma-undefine56.9%
hypot-define31.9%
*-commutative31.9%
add-sqr-sqrt22.9%
sqrt-unprod11.2%
pow211.2%
fma-define11.2%
hypot-define24.7%
Applied egg-rr24.7%
unpow224.7%
rem-sqrt-square70.6%
fma-undefine70.6%
hypot-undefine38.0%
unpow238.0%
unpow238.0%
+-commutative38.0%
*-commutative38.0%
*-commutative38.0%
fma-define38.0%
unpow238.0%
unpow238.0%
hypot-undefine70.6%
Simplified70.6%
if -5e8 < y.im < 4.00000000000000014e-97Initial program 44.8%
exp-diff44.8%
exp-to-pow44.8%
hypot-define44.8%
*-commutative44.8%
exp-prod44.8%
fma-define44.8%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
if 4.00000000000000014e-97 < y.im Initial program 32.0%
cancel-sign-sub-inv32.0%
fma-define32.0%
hypot-define32.0%
distribute-lft-neg-in32.0%
distribute-rgt-neg-out32.0%
fma-define32.0%
hypot-define68.7%
*-commutative68.7%
Simplified68.7%
fma-undefine68.7%
hypot-define32.0%
*-commutative32.0%
add-cube-cbrt38.0%
pow335.5%
fma-define35.5%
hypot-define73.6%
Applied egg-rr73.6%
rem-square-sqrt43.2%
sqrt-unprod80.5%
pow280.5%
rem-cube-cbrt80.7%
Applied egg-rr80.7%
unpow280.7%
rem-sqrt-square80.7%
hypot-undefine39.6%
unpow239.6%
unpow239.6%
+-commutative39.6%
*-commutative39.6%
fma-undefine39.6%
*-commutative39.6%
fma-define39.6%
Simplified80.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (log (- x.re)))
(t_3 (log (hypot x.re x.im))))
(if (<= x.re -2.8e+66)
(* (exp (- (* y.re t_2) t_1)) (sin (+ t_0 (* y.im t_2))))
(if (<= x.re 2.9e-134)
(*
(exp (fma t_3 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (pow (cbrt t_0) 3.0)))
(if (<= x.re 1.45e-25)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))
(sin (fabs t_0)))
(* (sin (fma t_3 y.im t_0)) (exp (- (* y.re (log x.re)) t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = log(-x_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double tmp;
if (x_46_re <= -2.8e+66) {
tmp = exp(((y_46_re * t_2) - t_1)) * sin((t_0 + (y_46_im * t_2)));
} else if (x_46_re <= 2.9e-134) {
tmp = exp(fma(t_3, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(pow(cbrt(t_0), 3.0));
} else if (x_46_re <= 1.45e-25) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * sin(fabs(t_0));
} else {
tmp = sin(fma(t_3, y_46_im, t_0)) * exp(((y_46_re * log(x_46_re)) - t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = log(Float64(-x_46_re)) t_3 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_re <= -2.8e+66) tmp = Float64(exp(Float64(Float64(y_46_re * t_2) - t_1)) * sin(Float64(t_0 + Float64(y_46_im * t_2)))); elseif (x_46_re <= 2.9e-134) tmp = Float64(exp(fma(t_3, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin((cbrt(t_0) ^ 3.0))); elseif (x_46_re <= 1.45e-25) tmp = Float64(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)) * sin(abs(t_0))); else tmp = Float64(sin(fma(t_3, y_46_im, t_0)) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.8e+66], N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.9e-134], 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[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.45e-25], N[(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] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$3 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \log \left(-x.re\right)\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;x.re \leq -2.8 \cdot 10^{+66}:\\
\;\;\;\;e^{y.re \cdot t\_2 - t\_1} \cdot \sin \left(t\_0 + y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-134}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_3, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq 1.45 \cdot 10^{-25}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1} \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_3, y.im, t\_0\right)\right) \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -2.8000000000000001e66Initial program 20.9%
Taylor expanded in x.re around -inf 54.3%
mul-1-neg54.3%
Simplified54.3%
Taylor expanded in x.re around -inf 83.6%
mul-1-neg54.3%
Simplified83.6%
if -2.8000000000000001e66 < x.re < 2.89999999999999993e-134Initial program 45.0%
cancel-sign-sub-inv45.0%
fma-define45.0%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define71.0%
*-commutative71.0%
Simplified71.0%
fma-undefine71.0%
hypot-define45.0%
*-commutative45.0%
add-cube-cbrt48.4%
pow346.6%
fma-define46.6%
hypot-define78.9%
Applied egg-rr78.9%
Taylor expanded in y.im around 0 80.2%
if 2.89999999999999993e-134 < x.re < 1.45e-25Initial program 44.4%
Taylor expanded in y.im around 0 52.4%
*-commutative52.4%
add-sqr-sqrt30.2%
sqrt-unprod56.2%
pow256.2%
Applied egg-rr56.2%
*-commutative56.2%
unpow256.2%
rem-sqrt-square82.1%
Simplified82.1%
if 1.45e-25 < x.re Initial program 33.1%
cancel-sign-sub-inv33.1%
fma-define33.1%
hypot-define33.1%
distribute-lft-neg-in33.1%
distribute-rgt-neg-out33.1%
fma-define33.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x.im around 0 81.9%
+-commutative81.9%
neg-mul-181.9%
unsub-neg81.9%
Simplified81.9%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* (atan2 x.im x.re) (- y.im))))
(if (<= y.im -3.5e+115)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(sin (fabs t_2)))
(if (<= y.im -7.5e+44)
(* y.re (* (atan2 x.im x.re) (exp t_3)))
(if (<= y.im 7e-128)
(*
(sin (fma t_1 y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(*
(exp (fma t_1 y.re t_3))
(sin (* y.im (log (hypot x.im x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = atan2(x_46_im, x_46_re) * -y_46_im;
double tmp;
if (y_46_im <= -3.5e+115) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(fabs(t_2));
} else if (y_46_im <= -7.5e+44) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp(t_3));
} else if (y_46_im <= 7e-128) {
tmp = sin(fma(t_1, y_46_im, t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else {
tmp = exp(fma(t_1, y_46_re, t_3)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) tmp = 0.0 if (y_46_im <= -3.5e+115) tmp = Float64(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)) * sin(abs(t_2))); elseif (y_46_im <= -7.5e+44) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(t_3))); elseif (y_46_im <= 7e-128) tmp = Float64(sin(fma(t_1, y_46_im, t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); else tmp = Float64(exp(fma(t_1, y_46_re, t_3)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$im, -3.5e+115], N[(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] * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -7.5e+44], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7e-128], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
\mathbf{if}\;y.im \leq -3.5 \cdot 10^{+115}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(\left|t\_2\right|\right)\\
\mathbf{elif}\;y.im \leq -7.5 \cdot 10^{+44}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{t\_3}\right)\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{-128}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_2\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_3\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.50000000000000005e115Initial program 29.0%
Taylor expanded in y.im around 0 53.8%
*-commutative53.8%
add-sqr-sqrt29.2%
sqrt-unprod49.3%
pow249.3%
Applied egg-rr49.3%
*-commutative49.3%
unpow249.3%
rem-sqrt-square69.3%
Simplified69.3%
if -3.50000000000000005e115 < y.im < -7.50000000000000027e44Initial program 41.2%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in x.re around inf 29.5%
Taylor expanded in y.re around 0 76.6%
*-commutative76.6%
distribute-lft-neg-in76.6%
*-commutative76.6%
Simplified76.6%
if -7.50000000000000027e44 < y.im < 6.99999999999999999e-128Initial program 45.0%
exp-diff45.0%
exp-to-pow45.0%
hypot-define45.0%
*-commutative45.0%
exp-prod43.8%
fma-define43.8%
hypot-define88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y.im around 0 89.7%
if 6.99999999999999999e-128 < y.im Initial program 30.8%
cancel-sign-sub-inv30.8%
fma-define30.8%
hypot-define30.8%
distribute-lft-neg-in30.8%
distribute-rgt-neg-out30.8%
fma-define30.8%
hypot-define67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around inf 34.5%
unpow234.5%
unpow234.5%
hypot-undefine73.5%
Simplified73.5%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -2.8e+113)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (fabs t_1)))
(if (<= y.im -1.8e+36)
t_2
(if (<= y.im 7.5e-127)
(* t_0 (sin (fma (log (hypot x.re x.im)) y.im t_1)))
(if (<= y.im 6.2e+92)
(*
(/ t_0 (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (log (hypot x.im x.re)))))
t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2.8e+113) {
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))) * sin(fabs(t_1));
} else if (y_46_im <= -1.8e+36) {
tmp = t_2;
} else if (y_46_im <= 7.5e-127) {
tmp = t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else if (y_46_im <= 6.2e+92) {
tmp = (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -2.8e+113) tmp = Float64(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))) * sin(abs(t_1))); elseif (y_46_im <= -1.8e+36) tmp = t_2; elseif (y_46_im <= 7.5e-127) tmp = Float64(t_0 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); elseif (y_46_im <= 6.2e+92) tmp = Float64(Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e+113], N[(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] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.8e+36], t$95$2, If[LessEqual[y$46$im, 7.5e-127], N[(t$95$0 * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.2e+92], N[(N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+113}:\\
\;\;\;\;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} \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.im \leq -1.8 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-127}:\\
\;\;\;\;t\_0 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{+92}:\\
\;\;\;\;\frac{t\_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -2.79999999999999998e113Initial program 29.0%
Taylor expanded in y.im around 0 53.8%
*-commutative53.8%
add-sqr-sqrt29.2%
sqrt-unprod49.3%
pow249.3%
Applied egg-rr49.3%
*-commutative49.3%
unpow249.3%
rem-sqrt-square69.3%
Simplified69.3%
if -2.79999999999999998e113 < y.im < -1.7999999999999999e36 or 6.2000000000000004e92 < y.im Initial program 32.2%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in x.re around inf 30.3%
Taylor expanded in y.re around 0 67.2%
*-commutative67.2%
distribute-lft-neg-in67.2%
*-commutative67.2%
Simplified67.2%
if -1.7999999999999999e36 < y.im < 7.5000000000000004e-127Initial program 45.9%
exp-diff45.9%
exp-to-pow45.9%
hypot-define45.9%
*-commutative45.9%
exp-prod44.6%
fma-define44.6%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 90.3%
if 7.5000000000000004e-127 < y.im < 6.2000000000000004e92Initial program 31.6%
exp-diff23.7%
exp-to-pow23.7%
hypot-define23.7%
*-commutative23.7%
exp-prod23.7%
fma-define23.7%
hypot-define55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in y.im around inf 31.6%
unpow236.8%
unpow236.8%
hypot-undefine76.3%
Simplified68.3%
Final simplification77.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (* (atan2 x.im x.re) (- y.im))))
(if (<= y.im -1e+117)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (fabs t_0)))
(if (<= y.im -3.2e+35)
(* y.re (* (atan2 x.im x.re) (exp t_2)))
(if (<= y.im 8e-127)
(* (pow (hypot x.re x.im) y.re) (sin (fma t_1 y.im t_0)))
(*
(exp (fma t_1 y.re t_2))
(sin (* y.im (log (hypot x.im x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = atan2(x_46_im, x_46_re) * -y_46_im;
double tmp;
if (y_46_im <= -1e+117) {
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))) * sin(fabs(t_0));
} else if (y_46_im <= -3.2e+35) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp(t_2));
} else if (y_46_im <= 8e-127) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = exp(fma(t_1, y_46_re, t_2)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) tmp = 0.0 if (y_46_im <= -1e+117) tmp = Float64(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))) * sin(abs(t_0))); elseif (y_46_im <= -3.2e+35) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(t_2))); elseif (y_46_im <= 8e-127) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(exp(fma(t_1, y_46_re, t_2)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$im, -1e+117], N[(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] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.2e+35], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e-127], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{+117}:\\
\;\;\;\;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} \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{elif}\;y.im \leq -3.2 \cdot 10^{+35}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{t\_2}\right)\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-127}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_2\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -1.00000000000000005e117Initial program 29.0%
Taylor expanded in y.im around 0 53.8%
*-commutative53.8%
add-sqr-sqrt29.2%
sqrt-unprod49.3%
pow249.3%
Applied egg-rr49.3%
*-commutative49.3%
unpow249.3%
rem-sqrt-square69.3%
Simplified69.3%
if -1.00000000000000005e117 < y.im < -3.19999999999999983e35Initial program 36.8%
Taylor expanded in y.im around 0 58.3%
Taylor expanded in x.re around inf 36.9%
Taylor expanded in y.re around 0 74.0%
*-commutative74.0%
distribute-lft-neg-in74.0%
*-commutative74.0%
Simplified74.0%
if -3.19999999999999983e35 < y.im < 8.0000000000000002e-127Initial program 45.9%
exp-diff45.9%
exp-to-pow45.9%
hypot-define45.9%
*-commutative45.9%
exp-prod44.6%
fma-define44.6%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 90.3%
if 8.0000000000000002e-127 < y.im Initial program 30.8%
cancel-sign-sub-inv30.8%
fma-define30.8%
hypot-define30.8%
distribute-lft-neg-in30.8%
distribute-rgt-neg-out30.8%
fma-define30.8%
hypot-define67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around inf 34.5%
unpow234.5%
unpow234.5%
hypot-undefine73.5%
Simplified73.5%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -1.4e+116)
(* t_1 (sin (fabs t_0)))
(if (<= y.im -1.35e+35)
t_2
(if (<= y.im 1.05e-126)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma (log (hypot x.re x.im)) y.im t_0)))
(if (<= y.im 3.3e+99)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(if (or (<= y.im 1.85e+185) (not (<= y.im 9.5e+253)))
t_2
(* t_1 (fabs (sin t_0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((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)));
double t_2 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.4e+116) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_im <= -1.35e+35) {
tmp = t_2;
} else if (y_46_im <= 1.05e-126) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
} else if (y_46_im <= 3.3e+99) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if ((y_46_im <= 1.85e+185) || !(y_46_im <= 9.5e+253)) {
tmp = t_2;
} else {
tmp = t_1 * fabs(sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(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))) t_2 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -1.4e+116) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_im <= -1.35e+35) tmp = t_2; elseif (y_46_im <= 1.05e-126) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0))); elseif (y_46_im <= 3.3e+99) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif ((y_46_im <= 1.85e+185) || !(y_46_im <= 9.5e+253)) tmp = t_2; else tmp = Float64(t_1 * abs(sin(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(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]}, Block[{t$95$2 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.4e+116], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.35e+35], t$95$2, If[LessEqual[y$46$im, 1.05e-126], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.3e+99], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, 1.85e+185], N[Not[LessEqual[y$46$im, 9.5e+253]], $MachinePrecision]], t$95$2, N[(t$95$1 * N[Abs[N[Sin[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 := 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}\\
t_2 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{+116}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{elif}\;y.im \leq -1.35 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-126}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
\mathbf{elif}\;y.im \leq 3.3 \cdot 10^{+99}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 1.85 \cdot 10^{+185} \lor \neg \left(y.im \leq 9.5 \cdot 10^{+253}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left|\sin t\_0\right|\\
\end{array}
\end{array}
if y.im < -1.40000000000000002e116Initial program 29.0%
Taylor expanded in y.im around 0 53.8%
*-commutative53.8%
add-sqr-sqrt29.2%
sqrt-unprod49.3%
pow249.3%
Applied egg-rr49.3%
*-commutative49.3%
unpow249.3%
rem-sqrt-square69.3%
Simplified69.3%
if -1.40000000000000002e116 < y.im < -1.35000000000000001e35 or 3.2999999999999999e99 < y.im < 1.8499999999999999e185 or 9.50000000000000005e253 < y.im Initial program 28.2%
Taylor expanded in y.im around 0 53.8%
Taylor expanded in x.re around inf 30.0%
Taylor expanded in y.re around 0 72.9%
*-commutative72.9%
distribute-lft-neg-in72.9%
*-commutative72.9%
Simplified72.9%
if -1.35000000000000001e35 < y.im < 1.0499999999999999e-126Initial program 45.9%
exp-diff45.9%
exp-to-pow45.9%
hypot-define45.9%
*-commutative45.9%
exp-prod44.6%
fma-define44.6%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 90.3%
if 1.0499999999999999e-126 < y.im < 3.2999999999999999e99Initial program 32.5%
Taylor expanded in y.re around 0 37.5%
unpow237.5%
unpow237.5%
hypot-undefine58.1%
Simplified58.1%
if 1.8499999999999999e185 < y.im < 9.50000000000000005e253Initial program 42.9%
Taylor expanded in y.im around 0 64.4%
add-sqr-sqrt50.0%
sqrt-unprod85.8%
pow285.8%
*-commutative85.8%
Applied egg-rr85.8%
unpow285.8%
rem-sqrt-square85.8%
*-commutative85.8%
Simplified85.8%
Final simplification78.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(fabs (sin t_1)))))
(if (<= y.im -3.8e+114)
t_2
(if (<= y.im -1.5e+48)
t_0
(if (<= y.im -6.5e+32)
t_2
(if (<= y.im 1.08e-91)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma (log (hypot x.re x.im)) y.im t_1)))
(if (<= y.im 2.3e+254) t_2 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) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((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))) * fabs(sin(t_1));
double tmp;
if (y_46_im <= -3.8e+114) {
tmp = t_2;
} else if (y_46_im <= -1.5e+48) {
tmp = t_0;
} else if (y_46_im <= -6.5e+32) {
tmp = t_2;
} else if (y_46_im <= 1.08e-91) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else if (y_46_im <= 2.3e+254) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(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))) * abs(sin(t_1))) tmp = 0.0 if (y_46_im <= -3.8e+114) tmp = t_2; elseif (y_46_im <= -1.5e+48) tmp = t_0; elseif (y_46_im <= -6.5e+32) tmp = t_2; elseif (y_46_im <= 1.08e-91) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); elseif (y_46_im <= 2.3e+254) tmp = t_2; else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(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] * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.8e+114], t$95$2, If[LessEqual[y$46$im, -1.5e+48], t$95$0, If[LessEqual[y$46$im, -6.5e+32], t$95$2, If[LessEqual[y$46$im, 1.08e-91], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.3e+254], t$95$2, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := 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} \cdot \left|\sin t\_1\right|\\
\mathbf{if}\;y.im \leq -3.8 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -1.5 \cdot 10^{+48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -6.5 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.08 \cdot 10^{-91}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 2.3 \cdot 10^{+254}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -3.8000000000000001e114 or -1.5e48 < y.im < -6.4999999999999994e32 or 1.07999999999999998e-91 < y.im < 2.29999999999999998e254Initial program 30.0%
Taylor expanded in y.im around 0 52.7%
add-sqr-sqrt26.4%
sqrt-unprod59.8%
pow259.8%
*-commutative59.8%
Applied egg-rr59.8%
unpow259.8%
rem-sqrt-square62.6%
*-commutative62.6%
Simplified62.6%
if -3.8000000000000001e114 < y.im < -1.5e48 or 2.29999999999999998e254 < y.im Initial program 37.5%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in x.re around inf 34.5%
Taylor expanded in y.re around 0 75.5%
*-commutative75.5%
distribute-lft-neg-in75.5%
*-commutative75.5%
Simplified75.5%
if -6.4999999999999994e32 < y.im < 1.07999999999999998e-91Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-define44.6%
*-commutative44.6%
exp-prod43.5%
fma-define43.5%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 88.8%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -5e+113)
(* t_1 (sin (fabs t_0)))
(if (<= y.im -9.4e+33)
t_2
(if (<= y.im 1.08e-91)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma (log (hypot x.re x.im)) y.im t_0)))
(if (<= y.im 1.15e+254) (* t_1 (fabs (sin t_0))) t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = 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)));
double t_2 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -5e+113) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_im <= -9.4e+33) {
tmp = t_2;
} else if (y_46_im <= 1.08e-91) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
} else if (y_46_im <= 1.15e+254) {
tmp = t_1 * fabs(sin(t_0));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = 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))) t_2 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -5e+113) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_im <= -9.4e+33) tmp = t_2; elseif (y_46_im <= 1.08e-91) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0))); elseif (y_46_im <= 1.15e+254) tmp = Float64(t_1 * abs(sin(t_0))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[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]}, Block[{t$95$2 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+113], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -9.4e+33], t$95$2, If[LessEqual[y$46$im, 1.08e-91], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+254], N[(t$95$1 * N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := 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}\\
t_2 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+113}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{elif}\;y.im \leq -9.4 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.08 \cdot 10^{-91}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+254}:\\
\;\;\;\;t\_1 \cdot \left|\sin t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -5e113Initial program 29.0%
Taylor expanded in y.im around 0 53.8%
*-commutative53.8%
add-sqr-sqrt29.2%
sqrt-unprod49.3%
pow249.3%
Applied egg-rr49.3%
*-commutative49.3%
unpow249.3%
rem-sqrt-square69.3%
Simplified69.3%
if -5e113 < y.im < -9.3999999999999996e33 or 1.14999999999999999e254 < y.im Initial program 35.3%
Taylor expanded in y.im around 0 56.4%
Taylor expanded in x.re around inf 38.4%
Taylor expanded in y.re around 0 74.1%
*-commutative74.1%
distribute-lft-neg-in74.1%
*-commutative74.1%
Simplified74.1%
if -9.3999999999999996e33 < y.im < 1.07999999999999998e-91Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-define44.6%
*-commutative44.6%
exp-prod43.5%
fma-define43.5%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 88.8%
if 1.07999999999999998e-91 < y.im < 1.14999999999999999e254Initial program 31.7%
Taylor expanded in y.im around 0 50.4%
add-sqr-sqrt23.7%
sqrt-unprod59.6%
pow259.6%
*-commutative59.6%
Applied egg-rr59.6%
unpow259.6%
rem-sqrt-square61.4%
*-commutative61.4%
Simplified61.4%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -8.2e+39) (not (<= y.im 1.45e+94)))
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(*
(pow (hypot x.re x.im) y.re)
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -8.2e+39) || !(y_46_im <= 1.45e+94)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -8.2e+39) || !(y_46_im <= 1.45e+94)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -8.2e+39], N[Not[LessEqual[y$46$im, 1.45e+94]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+39} \lor \neg \left(y.im \leq 1.45 \cdot 10^{+94}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -8.20000000000000008e39 or 1.4499999999999999e94 < y.im Initial program 31.1%
Taylor expanded in y.im around 0 55.6%
Taylor expanded in x.re around inf 32.9%
Taylor expanded in y.re around 0 61.2%
*-commutative61.2%
distribute-lft-neg-in61.2%
*-commutative61.2%
Simplified61.2%
if -8.20000000000000008e39 < y.im < 1.4499999999999999e94Initial program 41.9%
exp-diff39.9%
exp-to-pow39.9%
hypot-define39.9%
*-commutative39.9%
exp-prod39.0%
fma-define39.0%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in y.im around 0 78.2%
Final simplification71.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (sin (fabs t_0)))
(t_3 (log (- x.re)))
(t_4 (* (atan2 x.im x.re) y.im))
(t_5 (exp (- (* y.re t_3) t_4)))
(t_6 (exp (- (* y.re (log x.re)) t_4))))
(if (<= x.re -1.25e+213)
(* t_5 (sin (+ t_0 (* y.im t_3))))
(if (<= x.re -3.9)
(* t_5 t_2)
(if (<= x.re -1e-309)
(* t_1 t_5)
(if (or (<= x.re 5.8e-177) (not (<= x.re 1.25e-5)))
(* t_1 t_6)
(* t_2 t_6)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = sin(fabs(t_0));
double t_3 = log(-x_46_re);
double t_4 = atan2(x_46_im, x_46_re) * y_46_im;
double t_5 = exp(((y_46_re * t_3) - t_4));
double t_6 = exp(((y_46_re * log(x_46_re)) - t_4));
double tmp;
if (x_46_re <= -1.25e+213) {
tmp = t_5 * sin((t_0 + (y_46_im * t_3)));
} else if (x_46_re <= -3.9) {
tmp = t_5 * t_2;
} else if (x_46_re <= -1e-309) {
tmp = t_1 * t_5;
} else if ((x_46_re <= 5.8e-177) || !(x_46_re <= 1.25e-5)) {
tmp = t_1 * t_6;
} else {
tmp = t_2 * t_6;
}
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) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = sin(abs(t_0))
t_3 = log(-x_46re)
t_4 = atan2(x_46im, x_46re) * y_46im
t_5 = exp(((y_46re * t_3) - t_4))
t_6 = exp(((y_46re * log(x_46re)) - t_4))
if (x_46re <= (-1.25d+213)) then
tmp = t_5 * sin((t_0 + (y_46im * t_3)))
else if (x_46re <= (-3.9d0)) then
tmp = t_5 * t_2
else if (x_46re <= (-1d-309)) then
tmp = t_1 * t_5
else if ((x_46re <= 5.8d-177) .or. (.not. (x_46re <= 1.25d-5))) then
tmp = t_1 * t_6
else
tmp = t_2 * t_6
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.sin(t_0);
double t_2 = Math.sin(Math.abs(t_0));
double t_3 = Math.log(-x_46_re);
double t_4 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_5 = Math.exp(((y_46_re * t_3) - t_4));
double t_6 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_4));
double tmp;
if (x_46_re <= -1.25e+213) {
tmp = t_5 * Math.sin((t_0 + (y_46_im * t_3)));
} else if (x_46_re <= -3.9) {
tmp = t_5 * t_2;
} else if (x_46_re <= -1e-309) {
tmp = t_1 * t_5;
} else if ((x_46_re <= 5.8e-177) || !(x_46_re <= 1.25e-5)) {
tmp = t_1 * t_6;
} else {
tmp = t_2 * t_6;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.sin(math.fabs(t_0)) t_3 = math.log(-x_46_re) t_4 = math.atan2(x_46_im, x_46_re) * y_46_im t_5 = math.exp(((y_46_re * t_3) - t_4)) t_6 = math.exp(((y_46_re * math.log(x_46_re)) - t_4)) tmp = 0 if x_46_re <= -1.25e+213: tmp = t_5 * math.sin((t_0 + (y_46_im * t_3))) elif x_46_re <= -3.9: tmp = t_5 * t_2 elif x_46_re <= -1e-309: tmp = t_1 * t_5 elif (x_46_re <= 5.8e-177) or not (x_46_re <= 1.25e-5): tmp = t_1 * t_6 else: tmp = t_2 * t_6 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = sin(abs(t_0)) t_3 = log(Float64(-x_46_re)) t_4 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_5 = exp(Float64(Float64(y_46_re * t_3) - t_4)) t_6 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_4)) tmp = 0.0 if (x_46_re <= -1.25e+213) tmp = Float64(t_5 * sin(Float64(t_0 + Float64(y_46_im * t_3)))); elseif (x_46_re <= -3.9) tmp = Float64(t_5 * t_2); elseif (x_46_re <= -1e-309) tmp = Float64(t_1 * t_5); elseif ((x_46_re <= 5.8e-177) || !(x_46_re <= 1.25e-5)) tmp = Float64(t_1 * t_6); else tmp = Float64(t_2 * t_6); 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 = sin(t_0); t_2 = sin(abs(t_0)); t_3 = log(-x_46_re); t_4 = atan2(x_46_im, x_46_re) * y_46_im; t_5 = exp(((y_46_re * t_3) - t_4)); t_6 = exp(((y_46_re * log(x_46_re)) - t_4)); tmp = 0.0; if (x_46_re <= -1.25e+213) tmp = t_5 * sin((t_0 + (y_46_im * t_3))); elseif (x_46_re <= -3.9) tmp = t_5 * t_2; elseif (x_46_re <= -1e-309) tmp = t_1 * t_5; elseif ((x_46_re <= 5.8e-177) || ~((x_46_re <= 1.25e-5))) tmp = t_1 * t_6; else tmp = t_2 * t_6; 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$4 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$4), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.25e+213], N[(t$95$5 * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3.9], N[(t$95$5 * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -1e-309], N[(t$95$1 * t$95$5), $MachinePrecision], If[Or[LessEqual[x$46$re, 5.8e-177], N[Not[LessEqual[x$46$re, 1.25e-5]], $MachinePrecision]], N[(t$95$1 * t$95$6), $MachinePrecision], N[(t$95$2 * t$95$6), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := \sin \left(\left|t\_0\right|\right)\\
t_3 := \log \left(-x.re\right)\\
t_4 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_5 := e^{y.re \cdot t\_3 - t\_4}\\
t_6 := e^{y.re \cdot \log x.re - t\_4}\\
\mathbf{if}\;x.re \leq -1.25 \cdot 10^{+213}:\\
\;\;\;\;t\_5 \cdot \sin \left(t\_0 + y.im \cdot t\_3\right)\\
\mathbf{elif}\;x.re \leq -3.9:\\
\;\;\;\;t\_5 \cdot t\_2\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_1 \cdot t\_5\\
\mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-177} \lor \neg \left(x.re \leq 1.25 \cdot 10^{-5}\right):\\
\;\;\;\;t\_1 \cdot t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_6\\
\end{array}
\end{array}
if x.re < -1.2499999999999999e213Initial program 0.0%
Taylor expanded in x.re around -inf 56.0%
mul-1-neg56.0%
Simplified56.0%
Taylor expanded in x.re around -inf 94.7%
mul-1-neg56.0%
Simplified94.7%
if -1.2499999999999999e213 < x.re < -3.89999999999999991Initial program 40.6%
Taylor expanded in y.im around 0 53.5%
*-commutative53.5%
add-sqr-sqrt43.9%
sqrt-unprod37.8%
pow237.8%
Applied egg-rr37.8%
*-commutative37.8%
unpow237.8%
rem-sqrt-square59.9%
Simplified59.9%
Taylor expanded in x.re around -inf 78.5%
mul-1-neg50.5%
Simplified78.5%
if -3.89999999999999991 < x.re < -1.000000000000002e-309Initial program 49.1%
Taylor expanded in y.im around 0 64.0%
Taylor expanded in x.re around -inf 66.4%
mul-1-neg56.2%
Simplified66.4%
if -1.000000000000002e-309 < x.re < 5.79999999999999994e-177 or 1.25000000000000006e-5 < x.re Initial program 34.4%
Taylor expanded in y.im around 0 46.0%
Taylor expanded in x.re around inf 56.4%
if 5.79999999999999994e-177 < x.re < 1.25000000000000006e-5Initial program 43.1%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in x.re around inf 45.6%
*-commutative48.1%
add-sqr-sqrt21.6%
sqrt-unprod45.4%
pow245.4%
Applied egg-rr45.5%
*-commutative45.4%
unpow245.4%
rem-sqrt-square69.1%
Simplified64.1%
Final simplification65.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (- (* y.re (log x.im)) t_0)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4 (sin (fabs t_2))))
(if (<= x.im -7.5e+148)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.85e-247)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_3)
(if (<= x.im 7.4e+18) (* t_4 t_1) (* t_3 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = sin(fabs(t_2));
double tmp;
if (x_46_im <= -7.5e+148) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.85e-247) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_3;
} else if (x_46_im <= 7.4e+18) {
tmp = t_4 * t_1;
} else {
tmp = t_3 * t_1;
}
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) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = exp(((y_46re * log(x_46im)) - t_0))
t_2 = y_46re * atan2(x_46im, x_46re)
t_3 = sin(t_2)
t_4 = sin(abs(t_2))
if (x_46im <= (-7.5d+148)) then
tmp = t_4 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 1.85d-247) then
tmp = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0)) * t_3
else if (x_46im <= 7.4d+18) then
tmp = t_4 * t_1
else
tmp = t_3 * t_1
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.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.sin(t_2);
double t_4 = Math.sin(Math.abs(t_2));
double tmp;
if (x_46_im <= -7.5e+148) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.85e-247) {
tmp = 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;
} else if (x_46_im <= 7.4e+18) {
tmp = t_4 * t_1;
} else {
tmp = t_3 * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.sin(t_2) t_4 = math.sin(math.fabs(t_2)) tmp = 0 if x_46_im <= -7.5e+148: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.85e-247: tmp = 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 elif x_46_im <= 7.4e+18: tmp = t_4 * t_1 else: tmp = t_3 * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = sin(abs(t_2)) tmp = 0.0 if (x_46_im <= -7.5e+148) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.85e-247) tmp = Float64(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); elseif (x_46_im <= 7.4e+18) tmp = Float64(t_4 * t_1); else tmp = Float64(t_3 * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = sin(t_2); t_4 = sin(abs(t_2)); tmp = 0.0; if (x_46_im <= -7.5e+148) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.85e-247) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_3; elseif (x_46_im <= 7.4e+18) tmp = t_4 * t_1; else tmp = t_3 * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $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[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -7.5e+148], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.85e-247], N[(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] * t$95$3), $MachinePrecision], If[LessEqual[x$46$im, 7.4e+18], N[(t$95$4 * t$95$1), $MachinePrecision], N[(t$95$3 * t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log x.im - t\_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
t_4 := \sin \left(\left|t\_2\right|\right)\\
\mathbf{if}\;x.im \leq -7.5 \cdot 10^{+148}:\\
\;\;\;\;t\_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 1.85 \cdot 10^{-247}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_3\\
\mathbf{elif}\;x.im \leq 7.4 \cdot 10^{+18}:\\
\;\;\;\;t\_4 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot t\_1\\
\end{array}
\end{array}
if x.im < -7.50000000000000008e148Initial program 0.0%
Taylor expanded in y.im around 0 35.4%
*-commutative35.4%
add-sqr-sqrt28.7%
sqrt-unprod28.9%
pow228.9%
Applied egg-rr28.9%
*-commutative28.9%
unpow228.9%
rem-sqrt-square50.8%
Simplified50.8%
Taylor expanded in x.im around -inf 75.6%
mul-1-neg75.6%
Simplified75.6%
if -7.50000000000000008e148 < x.im < 1.85000000000000005e-247Initial program 52.2%
Taylor expanded in y.im around 0 63.9%
if 1.85000000000000005e-247 < x.im < 7.4e18Initial program 44.4%
Taylor expanded in y.im around 0 50.3%
*-commutative50.3%
add-sqr-sqrt32.7%
sqrt-unprod44.4%
pow244.4%
Applied egg-rr44.4%
*-commutative44.4%
unpow244.4%
rem-sqrt-square60.4%
Simplified60.4%
Taylor expanded in x.re around 0 58.5%
if 7.4e18 < x.im Initial program 24.5%
Taylor expanded in y.im around 0 43.1%
Taylor expanded in x.re around 0 70.7%
Final simplification65.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (exp (- (* y.re (log x.re)) t_0))))
(if (<= x.re -1e-309)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 6.4e-176) (not (<= x.re 1e-5)))
(* t_2 t_3)
(* (sin (fabs t_1)) t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 6.4e-176) || !(x_46_re <= 1e-5)) {
tmp = t_2 * t_3;
} else {
tmp = sin(fabs(t_1)) * t_3;
}
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 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
t_3 = exp(((y_46re * log(x_46re)) - t_0))
if (x_46re <= (-1d-309)) then
tmp = t_2 * exp(((y_46re * log(-x_46re)) - t_0))
else if ((x_46re <= 6.4d-176) .or. (.not. (x_46re <= 1d-5))) then
tmp = t_2 * t_3
else
tmp = sin(abs(t_1)) * t_3
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.sin(t_1);
double t_3 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 6.4e-176) || !(x_46_re <= 1e-5)) {
tmp = t_2 * t_3;
} else {
tmp = Math.sin(Math.abs(t_1)) * t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) tmp = 0 if x_46_re <= -1e-309: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 6.4e-176) or not (x_46_re <= 1e-5): tmp = t_2 * t_3 else: tmp = math.sin(math.fabs(t_1)) * t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) tmp = 0.0 if (x_46_re <= -1e-309) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 6.4e-176) || !(x_46_re <= 1e-5)) tmp = Float64(t_2 * t_3); else tmp = Float64(sin(abs(t_1)) * t_3); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = exp(((y_46_re * log(x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -1e-309) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 6.4e-176) || ~((x_46_re <= 1e-5))) tmp = t_2 * t_3; else tmp = sin(abs(t_1)) * t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1e-309], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 6.4e-176], N[Not[LessEqual[x$46$re, 1e-5]], $MachinePrecision]], N[(t$95$2 * t$95$3), $MachinePrecision], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 6.4 \cdot 10^{-176} \lor \neg \left(x.re \leq 10^{-5}\right):\\
\;\;\;\;t\_2 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|t\_1\right|\right) \cdot t\_3\\
\end{array}
\end{array}
if x.re < -1.000000000000002e-309Initial program 38.2%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.re around -inf 68.7%
mul-1-neg54.6%
Simplified68.7%
if -1.000000000000002e-309 < x.re < 6.39999999999999969e-176 or 1.00000000000000008e-5 < x.re Initial program 34.4%
Taylor expanded in y.im around 0 46.0%
Taylor expanded in x.re around inf 56.4%
if 6.39999999999999969e-176 < x.re < 1.00000000000000008e-5Initial program 43.1%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in x.re around inf 45.6%
*-commutative48.1%
add-sqr-sqrt21.6%
sqrt-unprod45.4%
pow245.4%
Applied egg-rr45.5%
*-commutative45.4%
unpow245.4%
rem-sqrt-square69.1%
Simplified64.1%
Final simplification63.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (exp (- (* y.re (log x.re)) t_0))))
(if (<= x.re -1e-309)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 2.3e-189) (not (<= x.re 3.8e+54)))
(* t_1 t_2)
(* (fabs t_1) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 2.3e-189) || !(x_46_re <= 3.8e+54)) {
tmp = t_1 * t_2;
} else {
tmp = fabs(t_1) * 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) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
t_2 = exp(((y_46re * log(x_46re)) - t_0))
if (x_46re <= (-1d-309)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else if ((x_46re <= 2.3d-189) .or. (.not. (x_46re <= 3.8d+54))) then
tmp = t_1 * t_2
else
tmp = abs(t_1) * 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 2.3e-189) || !(x_46_re <= 3.8e+54)) {
tmp = t_1 * t_2;
} else {
tmp = Math.abs(t_1) * 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.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) tmp = 0 if x_46_re <= -1e-309: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 2.3e-189) or not (x_46_re <= 3.8e+54): tmp = t_1 * t_2 else: tmp = math.fabs(t_1) * 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) tmp = 0.0 if (x_46_re <= -1e-309) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 2.3e-189) || !(x_46_re <= 3.8e+54)) tmp = Float64(t_1 * t_2); else tmp = Float64(abs(t_1) * 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = exp(((y_46_re * log(x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -1e-309) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 2.3e-189) || ~((x_46_re <= 3.8e+54))) tmp = t_1 * t_2; else tmp = abs(t_1) * 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1e-309], 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[Or[LessEqual[x$46$re, 2.3e-189], N[Not[LessEqual[x$46$re, 3.8e+54]], $MachinePrecision]], N[(t$95$1 * t$95$2), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-189} \lor \neg \left(x.re \leq 3.8 \cdot 10^{+54}\right):\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right| \cdot t\_2\\
\end{array}
\end{array}
if x.re < -1.000000000000002e-309Initial program 38.2%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.re around -inf 68.7%
mul-1-neg54.6%
Simplified68.7%
if -1.000000000000002e-309 < x.re < 2.2999999999999998e-189 or 3.8000000000000002e54 < x.re Initial program 29.6%
Taylor expanded in y.im around 0 44.9%
Taylor expanded in x.re around inf 55.2%
if 2.2999999999999998e-189 < x.re < 3.8000000000000002e54Initial program 47.6%
Taylor expanded in y.im around 0 49.1%
Taylor expanded in x.re around inf 50.9%
add-sqr-sqrt27.5%
sqrt-unprod59.8%
pow259.8%
*-commutative59.8%
Applied egg-rr56.3%
unpow259.8%
rem-sqrt-square65.1%
*-commutative65.1%
Simplified61.7%
Final simplification62.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.re -1e-309)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 1.25e-145) (not (<= x.re 4.45e-26)))
(* t_2 (exp (- (* y.re (log x.re)) t_0)))
(* (sin (fabs t_1)) (exp (- (* y.re (log x.im)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 1.25e-145) || !(x_46_re <= 4.45e-26)) {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = sin(fabs(t_1)) * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46re <= (-1d-309)) then
tmp = t_2 * exp(((y_46re * log(-x_46re)) - t_0))
else if ((x_46re <= 1.25d-145) .or. (.not. (x_46re <= 4.45d-26))) then
tmp = t_2 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = sin(abs(t_1)) * exp(((y_46re * log(x_46im)) - t_0))
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.sin(t_1);
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 1.25e-145) || !(x_46_re <= 4.45e-26)) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = Math.sin(Math.abs(t_1)) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_re <= -1e-309: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 1.25e-145) or not (x_46_re <= 4.45e-26): tmp = t_2 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = math.sin(math.fabs(t_1)) * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_re <= -1e-309) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 1.25e-145) || !(x_46_re <= 4.45e-26)) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(sin(abs(t_1)) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_re <= -1e-309) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 1.25e-145) || ~((x_46_re <= 4.45e-26))) tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = sin(abs(t_1)) * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -1e-309], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 1.25e-145], N[Not[LessEqual[x$46$re, 4.45e-26]], $MachinePrecision]], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-145} \lor \neg \left(x.re \leq 4.45 \cdot 10^{-26}\right):\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|t\_1\right|\right) \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.re < -1.000000000000002e-309Initial program 38.2%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.re around -inf 68.7%
mul-1-neg54.6%
Simplified68.7%
if -1.000000000000002e-309 < x.re < 1.2499999999999999e-145 or 4.45e-26 < x.re Initial program 34.7%
Taylor expanded in y.im around 0 45.0%
Taylor expanded in x.re around inf 56.4%
if 1.2499999999999999e-145 < x.re < 4.45e-26Initial program 44.8%
Taylor expanded in y.im around 0 52.3%
*-commutative52.3%
add-sqr-sqrt28.1%
sqrt-unprod52.3%
pow252.3%
Applied egg-rr52.3%
*-commutative52.3%
unpow252.3%
rem-sqrt-square79.9%
Simplified79.9%
Taylor expanded in x.re around 0 62.4%
Final simplification62.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -1e-309)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(* t_1 (exp (- (* y.re (log x.re)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-1d-309)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1e-309) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -1e-309: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -1e-309) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -1e-309) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1e-309], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.000000000000002e-309Initial program 38.2%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.re around -inf 68.7%
mul-1-neg54.6%
Simplified68.7%
if -1.000000000000002e-309 < x.re Initial program 36.8%
Taylor expanded in y.im around 0 46.5%
Taylor expanded in x.re around inf 53.5%
Final simplification60.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -5e-311)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-311) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5d-311)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-311) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-311: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-311) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-311) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-311], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-311}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -5.00000000000023e-311Initial program 38.7%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in x.im around -inf 61.3%
mul-1-neg53.9%
Simplified61.3%
if -5.00000000000023e-311 < x.im Initial program 36.3%
Taylor expanded in y.im around 0 47.0%
Taylor expanded in x.re around 0 56.1%
Final simplification58.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -2.9e+16) (not (<= y.re 2.95e+23))) (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.9e+16) || !(y_46_re <= 2.95e+23)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-2.9d+16)) .or. (.not. (y_46re <= 2.95d+23))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.9e+16) || !(y_46_re <= 2.95e+23)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.9e+16) or not (y_46_re <= 2.95e+23): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.9e+16) || !(y_46_re <= 2.95e+23)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.9e+16) || ~((y_46_re <= 2.95e+23))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.9e+16], N[Not[LessEqual[y$46$re, 2.95e+23]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.9 \cdot 10^{+16} \lor \neg \left(y.re \leq 2.95 \cdot 10^{+23}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.9e16 or 2.94999999999999994e23 < y.re Initial program 42.2%
Taylor expanded in y.im around 0 71.1%
Taylor expanded in x.re around inf 36.1%
Taylor expanded in y.im around 0 55.1%
if -2.9e16 < y.re < 2.94999999999999994e23Initial program 32.6%
Taylor expanded in y.im around 0 33.0%
Taylor expanded in x.re around inf 22.8%
Taylor expanded in y.re around 0 55.3%
*-commutative55.3%
distribute-lft-neg-in55.3%
*-commutative55.3%
Simplified55.3%
Final simplification55.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}
\end{array}
Initial program 37.4%
Taylor expanded in y.im around 0 52.1%
Taylor expanded in x.re around inf 29.5%
Taylor expanded in y.im around 0 33.6%
herbie shell --seed 2024103
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))