
(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 19 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.im x.re)) y.im)) (t_1 (sin t_0)))
(if (or (<= y.re -3.5e-7) (not (<= y.re 2500.0)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1)
(*
(pow (exp (- y.im)) (atan2 x.im x.re))
(fma (* (atan2 x.im x.re) y.re) (cos t_0) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re)) * y_46_im;
double t_1 = sin(t_0);
double tmp;
if ((y_46_re <= -3.5e-7) || !(y_46_re <= 2500.0)) {
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))) * t_1;
} else {
tmp = pow(exp(-y_46_im), atan2(x_46_im, x_46_re)) * fma((atan2(x_46_im, x_46_re) * y_46_re), cos(t_0), t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im) t_1 = sin(t_0) tmp = 0.0 if ((y_46_re <= -3.5e-7) || !(y_46_re <= 2500.0)) 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))) * t_1); else tmp = Float64((exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)) * fma(Float64(atan(x_46_im, x_46_re) * y_46_re), cos(t_0), t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.5e-7], N[Not[LessEqual[y$46$re, 2500.0]], $MachinePrecision]], 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] * t$95$1), $MachinePrecision], N[(N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{-7} \lor \neg \left(y.re \leq 2500\right):\\
\;\;\;\;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 t\_1\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re, \cos t\_0, t\_1\right)\\
\end{array}
\end{array}
if y.re < -3.49999999999999984e-7 or 2500 < y.re Initial program 42.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6477.9
Applied rewrites77.9%
if -3.49999999999999984e-7 < y.re < 2500Initial program 37.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites45.3%
Taylor expanded in y.re around 0
distribute-lft-neg-inN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-atan2.f6482.4
Applied rewrites82.4%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (log (hypot x.im x.re))))
(if (or (<= y.im -1.6e-18) (not (<= y.im 3e-18)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* t_1 y.im)))
(* (pow (hypot x.im x.re) y.re) (fma (* (cos t_0) t_1) y.im (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -1.6e-18) || !(y_46_im <= 3e-18)) {
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((t_1 * y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * fma((cos(t_0) * t_1), y_46_im, sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.6e-18) || !(y_46_im <= 3e-18)) 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(Float64(t_1 * y_46_im))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * fma(Float64(cos(t_0) * t_1), y_46_im, 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.6e-18], N[Not[LessEqual[y$46$im, 3e-18]], $MachinePrecision]], 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[(t$95$1 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision] * y$46$im + N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -1.6 \cdot 10^{-18} \lor \neg \left(y.im \leq 3 \cdot 10^{-18}\right):\\
\;\;\;\;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(t\_1 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \mathsf{fma}\left(\cos t\_0 \cdot t\_1, y.im, \sin t\_0\right)\\
\end{array}
\end{array}
if y.im < -1.6e-18 or 2.99999999999999983e-18 < y.im Initial program 39.9%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6464.4
Applied rewrites64.4%
if -1.6e-18 < y.im < 2.99999999999999983e-18Initial program 40.5%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6440.5
Applied rewrites40.5%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6491.6
Applied rewrites91.6%
Taylor expanded in y.im around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.7%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.im -1.6e-18) (not (<= y.im 3e-18)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* t_0 y.im)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* (fma y.im (/ t_0 y.re) (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(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -1.6e-18) || !(y_46_im <= 3e-18)) {
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((t_0 * y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.6e-18) || !(y_46_im <= 3e-18)) 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(Float64(t_0 * y_46_im))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.6e-18], N[Not[LessEqual[y$46$im, 3e-18]], $MachinePrecision]], 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[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -1.6 \cdot 10^{-18} \lor \neg \left(y.im \leq 3 \cdot 10^{-18}\right):\\
\;\;\;\;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(t\_0 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\end{array}
\end{array}
if y.im < -1.6e-18 or 2.99999999999999983e-18 < y.im Initial program 39.9%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6464.4
Applied rewrites64.4%
if -1.6e-18 < y.im < 2.99999999999999983e-18Initial program 40.5%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6440.5
Applied rewrites40.5%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6491.6
Applied rewrites91.6%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -0.00066)
(* (sin (* t_0 y.im)) (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im 880.0)
(*
(pow (hypot x.im x.re) y.re)
(sin (* (fma y.im (/ t_0 y.re) (atan2 x.im x.re)) y.re)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* (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(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.00066) {
tmp = sin((t_0 * y_46_im)) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 880.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
} else {
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((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.00066) tmp = Float64(sin(Float64(t_0 * y_46_im)) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 880.0) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); else 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(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.00066], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 880.0], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -0.00066:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq 880:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.im < -6.6e-4Initial program 33.6%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites55.1%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
distribute-lft-neg-inN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-atan2.f6457.5
Applied rewrites57.5%
if -6.6e-4 < y.im < 880Initial program 41.2%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6440.6
Applied rewrites40.6%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6489.2
Applied rewrites89.2%
if 880 < y.im Initial program 46.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6461.3
Applied rewrites61.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (exp (- y.im)) (atan2 x.im x.re)))
(t_1 (sin (* (log (hypot x.im x.re)) y.im)))
(t_2 (* (pow (hypot x.im x.re) y.re) t_1)))
(if (<= y.re -5.8e+35)
t_2
(if (<= y.re 5e-129)
(* t_1 t_0)
(if (<= y.re 8.2e-11)
(* t_0 (sin (fma (atan2 x.im x.re) y.re (* (log x.im) y.im))))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
double t_1 = sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -5.8e+35) {
tmp = t_2;
} else if (y_46_re <= 5e-129) {
tmp = t_1 * t_0;
} else if (y_46_re <= 8.2e-11) {
tmp = t_0 * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (log(x_46_im) * y_46_im)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re) t_1 = sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) t_2 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -5.8e+35) tmp = t_2; elseif (y_46_re <= 5e-129) tmp = Float64(t_1 * t_0); elseif (y_46_re <= 8.2e-11) tmp = Float64(t_0 * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(log(x_46_im) * y_46_im)))); 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[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e+35], t$95$2, If[LessEqual[y$46$re, 5e-129], N[(t$95$1 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 8.2e-11], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{-129}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-11}:\\
\;\;\;\;t\_0 \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log x.im \cdot y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -5.79999999999999989e35 or 8.2000000000000001e-11 < y.re Initial program 40.5%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6438.8
Applied rewrites38.8%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6474.3
Applied rewrites74.3%
if -5.79999999999999989e35 < y.re < 5.00000000000000027e-129Initial program 44.7%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites50.4%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
distribute-lft-neg-inN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-atan2.f6467.6
Applied rewrites67.6%
if 5.00000000000000027e-129 < y.re < 8.2000000000000001e-11Initial program 17.6%
Taylor expanded in x.re around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-atan2.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6424.9
Applied rewrites24.9%
Taylor expanded in y.re around 0
distribute-lft-neg-inN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-atan2.f6456.2
Applied rewrites56.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (sin (* t_0 y.im)))
(t_2 (* (pow (hypot x.im x.re) y.re) t_1)))
(if (<= y.re -5.8e+35)
t_2
(if (<= y.re 2.2e-139)
(* t_1 (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.re 0.0006)
(* 1.0 (sin (* (fma y.im (/ t_0 y.re) (atan2 x.im x.re)) y.re)))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((t_0 * y_46_im));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -5.8e+35) {
tmp = t_2;
} else if (y_46_re <= 2.2e-139) {
tmp = t_1 * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 0.0006) {
tmp = 1.0 * sin((fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(t_0 * y_46_im)) t_2 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -5.8e+35) tmp = t_2; elseif (y_46_re <= 2.2e-139) tmp = Float64(t_1 * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 0.0006) tmp = Float64(1.0 * sin(Float64(fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re)) * y_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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e+35], t$95$2, If[LessEqual[y$46$re, 2.2e-139], N[(t$95$1 * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0006], N[(1.0 * N[Sin[N[(N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(t\_0 \cdot y.im\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-139}:\\
\;\;\;\;t\_1 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 0.0006:\\
\;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -5.79999999999999989e35 or 5.99999999999999947e-4 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6439.2
Applied rewrites39.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6474.9
Applied rewrites74.9%
if -5.79999999999999989e35 < y.re < 2.2000000000000001e-139Initial program 43.8%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites49.5%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
distribute-lft-neg-inN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-atan2.f6467.9
Applied rewrites67.9%
if 2.2000000000000001e-139 < y.re < 5.99999999999999947e-4Initial program 22.8%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6419.4
Applied rewrites19.4%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6455.4
Applied rewrites55.4%
Taylor expanded in y.re around 0
Applied rewrites53.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re)))
(t_1
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_2 (sin (* (log (hypot x.im x.re)) y.im)))))
(if (<= y.im -2.85e+125)
t_1
(if (<= y.im -4.1e-128)
t_3
(if (<= y.im 1.02e-202) (* t_0 t_2) (if (<= y.im 2750.0) 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 = sin((atan2(x_46_im, x_46_re) * y_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))) * t_0;
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.85e+125) {
tmp = t_1;
} else if (y_46_im <= -4.1e-128) {
tmp = t_3;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_2;
} else if (y_46_im <= 2750.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.85e+125) {
tmp = t_1;
} else if (y_46_im <= -4.1e-128) {
tmp = t_3;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_2;
} else if (y_46_im <= 2750.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_2 * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0 if y_46_im <= -2.85e+125: tmp = t_1 elif y_46_im <= -4.1e-128: tmp = t_3 elif y_46_im <= 1.02e-202: tmp = t_0 * t_2 elif y_46_im <= 2750.0: tmp = t_3 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = 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))) * t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_2 * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))) tmp = 0.0 if (y_46_im <= -2.85e+125) tmp = t_1; elseif (y_46_im <= -4.1e-128) tmp = t_3; elseif (y_46_im <= 1.02e-202) tmp = Float64(t_0 * t_2); elseif (y_46_im <= 2750.0) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); 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))) * t_0; t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); tmp = 0.0; if (y_46_im <= -2.85e+125) tmp = t_1; elseif (y_46_im <= -4.1e-128) tmp = t_3; elseif (y_46_im <= 1.02e-202) tmp = t_0 * t_2; elseif (y_46_im <= 2750.0) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.85e+125], t$95$1, If[LessEqual[y$46$im, -4.1e-128], t$95$3, If[LessEqual[y$46$im, 1.02e-202], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 2750.0], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
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} \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t\_2 \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{if}\;y.im \leq -2.85 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -4.1 \cdot 10^{-128}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{-202}:\\
\;\;\;\;t\_0 \cdot t\_2\\
\mathbf{elif}\;y.im \leq 2750:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -2.8499999999999998e125 or 2750 < y.im Initial program 42.2%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.0
Applied rewrites57.0%
if -2.8499999999999998e125 < y.im < -4.1e-128 or 1.01999999999999997e-202 < y.im < 2750Initial program 34.6%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6433.7
Applied rewrites33.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6475.6
Applied rewrites75.6%
if -4.1e-128 < y.im < 1.01999999999999997e-202Initial program 44.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites56.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6477.1
Applied rewrites77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re)))
(t_1
(*
(exp
(- (* (log (sqrt (* x.re x.re))) y.re) (* (atan2 x.im x.re) y.im)))
t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_2 (sin (* (log (hypot x.im x.re)) y.im)))))
(if (<= y.im -2.3e+120)
t_1
(if (<= y.im -4.1e-128)
t_3
(if (<= y.im 1.02e-202) (* t_0 t_2) (if (<= y.im 1.25e+40) 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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = exp(((log(sqrt((x_46_re * x_46_re))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.3e+120) {
tmp = t_1;
} else if (y_46_im <= -4.1e-128) {
tmp = t_3;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_2;
} else if (y_46_im <= 1.25e+40) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.exp(((Math.log(Math.sqrt((x_46_re * x_46_re))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.3e+120) {
tmp = t_1;
} else if (y_46_im <= -4.1e-128) {
tmp = t_3;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_2;
} else if (y_46_im <= 1.25e+40) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.exp(((math.log(math.sqrt((x_46_re * x_46_re))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_2 * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0 if y_46_im <= -2.3e+120: tmp = t_1 elif y_46_im <= -4.1e-128: tmp = t_3 elif y_46_im <= 1.02e-202: tmp = t_0 * t_2 elif y_46_im <= 1.25e+40: tmp = t_3 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = Float64(exp(Float64(Float64(log(sqrt(Float64(x_46_re * x_46_re))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_2 * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))) tmp = 0.0 if (y_46_im <= -2.3e+120) tmp = t_1; elseif (y_46_im <= -4.1e-128) tmp = t_3; elseif (y_46_im <= 1.02e-202) tmp = Float64(t_0 * t_2); elseif (y_46_im <= 1.25e+40) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_1 = exp(((log(sqrt((x_46_re * x_46_re))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0; t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); tmp = 0.0; if (y_46_im <= -2.3e+120) tmp = t_1; elseif (y_46_im <= -4.1e-128) tmp = t_3; elseif (y_46_im <= 1.02e-202) tmp = t_0 * t_2; elseif (y_46_im <= 1.25e+40) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e+120], t$95$1, If[LessEqual[y$46$im, -4.1e-128], t$95$3, If[LessEqual[y$46$im, 1.02e-202], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 1.25e+40], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t\_2 \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -4.1 \cdot 10^{-128}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{-202}:\\
\;\;\;\;t\_0 \cdot t\_2\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{+40}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -2.29999999999999993e120 or 1.25000000000000001e40 < y.im Initial program 41.0%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6455.7
Applied rewrites55.7%
Taylor expanded in x.re around inf
unpow2N/A
lower-*.f6451.5
Applied rewrites51.5%
if -2.29999999999999993e120 < y.im < -4.1e-128 or 1.01999999999999997e-202 < y.im < 1.25000000000000001e40Initial program 36.6%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6433.9
Applied rewrites33.9%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6473.9
Applied rewrites73.9%
if -4.1e-128 < y.im < 1.01999999999999997e-202Initial program 44.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites56.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6477.1
Applied rewrites77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_1 (sin (* (log (hypot x.im x.re)) y.im)))))
(if (<= y.im -2.1e+146)
(*
t_0
(* (* (/ (* x.im x.im) x.re) 0.5) (/ (* (pow x.re y.re) y.re) x.re)))
(if (<= y.im -4.1e-128)
t_2
(if (<= y.im 1.02e-202)
(* t_0 t_1)
(if (<= y.im 9.2e+38)
t_2
(*
(exp
(-
(* (log (sqrt (* x.im x.im))) y.re)
(* (atan2 x.im x.re) y.im)))
t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.1e+146) {
tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((pow(x_46_re, y_46_re) * y_46_re) / x_46_re));
} else if (y_46_im <= -4.1e-128) {
tmp = t_2;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_1;
} else if (y_46_im <= 9.2e+38) {
tmp = t_2;
} else {
tmp = exp(((log(sqrt((x_46_im * x_46_im))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_im <= -2.1e+146) {
tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((Math.pow(x_46_re, y_46_re) * y_46_re) / x_46_re));
} else if (y_46_im <= -4.1e-128) {
tmp = t_2;
} else if (y_46_im <= 1.02e-202) {
tmp = t_0 * t_1;
} else if (y_46_im <= 9.2e+38) {
tmp = t_2;
} else {
tmp = Math.exp(((Math.log(Math.sqrt((x_46_im * x_46_im))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = t_1 * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0 if y_46_im <= -2.1e+146: tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((math.pow(x_46_re, y_46_re) * y_46_re) / x_46_re)) elif y_46_im <= -4.1e-128: tmp = t_2 elif y_46_im <= 1.02e-202: tmp = t_0 * t_1 elif y_46_im <= 9.2e+38: tmp = t_2 else: tmp = math.exp(((math.log(math.sqrt((x_46_im * x_46_im))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_1 * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))) tmp = 0.0 if (y_46_im <= -2.1e+146) tmp = Float64(t_0 * Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) * Float64(Float64((x_46_re ^ y_46_re) * y_46_re) / x_46_re))); elseif (y_46_im <= -4.1e-128) tmp = t_2; elseif (y_46_im <= 1.02e-202) tmp = Float64(t_0 * t_1); elseif (y_46_im <= 9.2e+38) tmp = t_2; else tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(x_46_im * x_46_im))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_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 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = t_1 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); tmp = 0.0; if (y_46_im <= -2.1e+146) tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * (((x_46_re ^ y_46_re) * y_46_re) / x_46_re)); elseif (y_46_im <= -4.1e-128) tmp = t_2; elseif (y_46_im <= 1.02e-202) tmp = t_0 * t_1; elseif (y_46_im <= 9.2e+38) tmp = t_2; else tmp = exp(((log(sqrt((x_46_im * x_46_im))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.1e+146], N[(t$95$0 * N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.1e-128], t$95$2, If[LessEqual[y$46$im, 1.02e-202], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 9.2e+38], t$95$2, N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_1 \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{if}\;y.im \leq -2.1 \cdot 10^{+146}:\\
\;\;\;\;t\_0 \cdot \left(\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5\right) \cdot \frac{{x.re}^{y.re} \cdot y.re}{x.re}\right)\\
\mathbf{elif}\;y.im \leq -4.1 \cdot 10^{-128}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{-202}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.im \leq 9.2 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\
\end{array}
\end{array}
if y.im < -2.1000000000000001e146Initial program 35.0%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites53.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6436.8
Applied rewrites36.8%
Taylor expanded in x.im around 0
Applied rewrites31.1%
Taylor expanded in x.re around 0
Applied rewrites48.0%
if -2.1000000000000001e146 < y.im < -4.1e-128 or 1.01999999999999997e-202 < y.im < 9.2000000000000005e38Initial program 38.0%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6433.6
Applied rewrites33.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.7
Applied rewrites71.7%
if -4.1e-128 < y.im < 1.01999999999999997e-202Initial program 44.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites56.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6477.1
Applied rewrites77.1%
if 9.2000000000000005e38 < y.im Initial program 43.3%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6459.4
Applied rewrites59.4%
Taylor expanded in x.re around 0
unpow2N/A
lower-*.f6451.4
Applied rewrites51.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.re -3.5e-7) (not (<= y.re 0.0006)))
(* (pow (hypot x.im x.re) y.re) (sin (* t_0 y.im)))
(* 1.0 (sin (* (fma y.im (/ t_0 y.re) (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(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -3.5e-7) || !(y_46_re <= 0.0006)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((t_0 * y_46_im));
} else {
tmp = 1.0 * sin((fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -3.5e-7) || !(y_46_re <= 0.0006)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(t_0 * y_46_im))); else tmp = Float64(1.0 * sin(Float64(fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.5e-7], N[Not[LessEqual[y$46$re, 0.0006]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Sin[N[(N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{-7} \lor \neg \left(y.re \leq 0.0006\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -3.49999999999999984e-7 or 5.99999999999999947e-4 < y.re Initial program 42.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6439.6
Applied rewrites39.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6473.5
Applied rewrites73.5%
if -3.49999999999999984e-7 < y.re < 5.99999999999999947e-4Initial program 37.8%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6420.3
Applied rewrites20.3%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6451.5
Applied rewrites51.5%
Taylor expanded in y.re around 0
Applied rewrites50.9%
Final simplification61.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -2.8e-12) (not (<= y.re 7.1e-43)))
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.im x.re) y.re))
(*
1.0
(sin
(* (fma y.im (/ (log (hypot x.im x.re)) y.re) (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 tmp;
if ((y_46_re <= -2.8e-12) || !(y_46_re <= 7.1e-43)) {
tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = 1.0 * sin((fma(y_46_im, (log(hypot(x_46_im, x_46_re)) / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.8e-12) || !(y_46_re <= 7.1e-43)) tmp = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(1.0 * sin(Float64(fma(y_46_im, Float64(log(hypot(x_46_im, x_46_re)) / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.8e-12], N[Not[LessEqual[y$46$re, 7.1e-43]], $MachinePrecision]], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Sin[N[(N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 7.1 \cdot 10^{-43}\right):\\
\;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -2.8000000000000002e-12 or 7.10000000000000025e-43 < y.re Initial program 39.5%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites66.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6462.3
Applied rewrites62.3%
if -2.8000000000000002e-12 < y.re < 7.10000000000000025e-43Initial program 40.9%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6421.5
Applied rewrites21.5%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6452.0
Applied rewrites52.0%
Taylor expanded in y.re around 0
Applied rewrites52.0%
Final simplification57.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.im -1.75e+149)
(*
t_0
(* (* (/ (* x.im x.im) x.re) 0.5) (/ (* (pow x.re y.re) y.re) x.re)))
(* t_0 (pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= -1.75e+149) {
tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((pow(x_46_re, y_46_re) * y_46_re) / x_46_re));
} else {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= -1.75e+149) {
tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((Math.pow(x_46_re, y_46_re) * y_46_re) / x_46_re));
} else {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_im <= -1.75e+149: tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * ((math.pow(x_46_re, y_46_re) * y_46_re) / x_46_re)) else: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_im <= -1.75e+149) tmp = Float64(t_0 * Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) * Float64(Float64((x_46_re ^ y_46_re) * y_46_re) / x_46_re))); else tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_im <= -1.75e+149) tmp = t_0 * ((((x_46_im * x_46_im) / x_46_re) * 0.5) * (((x_46_re ^ y_46_re) * y_46_re) / x_46_re)); else tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.75e+149], N[(t$95$0 * N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{+149}:\\
\;\;\;\;t\_0 \cdot \left(\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5\right) \cdot \frac{{x.re}^{y.re} \cdot y.re}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.75000000000000006e149Initial program 33.4%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites51.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6435.2
Applied rewrites35.2%
Taylor expanded in x.im around 0
Applied rewrites29.3%
Taylor expanded in x.re around 0
Applied rewrites46.7%
if -1.75000000000000006e149 < y.im Initial program 41.4%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites59.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6446.9
Applied rewrites46.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -5.8e+35)
(* t_0 (pow (fma (/ (* x.im x.im) x.re) 0.5 x.re) y.re))
(if (<= y.re 95.0)
(* (* (fma (log (hypot x.im x.re)) y.re 1.0) (atan2 x.im x.re)) y.re)
(* t_0 (pow (fma (/ (* x.re x.re) x.im) 0.5 x.im) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -5.8e+35) {
tmp = t_0 * pow(fma(((x_46_im * x_46_im) / x_46_re), 0.5, x_46_re), y_46_re);
} else if (y_46_re <= 95.0) {
tmp = (fma(log(hypot(x_46_im, x_46_re)), y_46_re, 1.0) * atan2(x_46_im, x_46_re)) * y_46_re;
} else {
tmp = t_0 * pow(fma(((x_46_re * x_46_re) / x_46_im), 0.5, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_re <= -5.8e+35) tmp = Float64(t_0 * (fma(Float64(Float64(x_46_im * x_46_im) / x_46_re), 0.5, x_46_re) ^ y_46_re)); elseif (y_46_re <= 95.0) tmp = Float64(Float64(fma(log(hypot(x_46_im, x_46_re)), y_46_re, 1.0) * atan(x_46_im, x_46_re)) * y_46_re); else tmp = Float64(t_0 * (fma(Float64(Float64(x_46_re * x_46_re) / x_46_im), 0.5, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e+35], N[(t$95$0 * N[Power[N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5 + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 95.0], N[(N[(N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + 1.0), $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision], N[(t$95$0 * N[Power[N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5 + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+35}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(\frac{x.im \cdot x.im}{x.re}, 0.5, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 95:\\
\;\;\;\;\left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re, 1\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(\frac{x.re \cdot x.re}{x.im}, 0.5, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.79999999999999989e35Initial program 43.5%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites80.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6475.9
Applied rewrites75.9%
Taylor expanded in x.im around 0
Applied rewrites74.4%
if -5.79999999999999989e35 < y.re < 95Initial program 40.0%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites46.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6427.1
Applied rewrites27.1%
Taylor expanded in y.re around 0
Applied rewrites25.7%
if 95 < y.re Initial program 36.5%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites63.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6457.8
Applied rewrites57.8%
Taylor expanded in x.re around 0
Applied rewrites54.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -5.8e+35)
(* t_0 (pow (fma (/ (* x.im x.im) x.re) 0.5 x.re) y.re))
(if (<= y.re 4.3e-5)
(* (* (fma (log (hypot x.im x.re)) y.re 1.0) (atan2 x.im x.re)) y.re)
(* t_0 (pow (- 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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -5.8e+35) {
tmp = t_0 * pow(fma(((x_46_im * x_46_im) / x_46_re), 0.5, x_46_re), y_46_re);
} else if (y_46_re <= 4.3e-5) {
tmp = (fma(log(hypot(x_46_im, x_46_re)), y_46_re, 1.0) * atan2(x_46_im, x_46_re)) * y_46_re;
} else {
tmp = t_0 * pow(-x_46_re, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_re <= -5.8e+35) tmp = Float64(t_0 * (fma(Float64(Float64(x_46_im * x_46_im) / x_46_re), 0.5, x_46_re) ^ y_46_re)); elseif (y_46_re <= 4.3e-5) tmp = Float64(Float64(fma(log(hypot(x_46_im, x_46_re)), y_46_re, 1.0) * atan(x_46_im, x_46_re)) * y_46_re); else tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e+35], N[(t$95$0 * N[Power[N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5 + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.3e-5], N[(N[(N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + 1.0), $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+35}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(\frac{x.im \cdot x.im}{x.re}, 0.5, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re, 1\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.79999999999999989e35Initial program 43.5%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites80.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6475.9
Applied rewrites75.9%
Taylor expanded in x.im around 0
Applied rewrites74.4%
if -5.79999999999999989e35 < y.re < 4.3000000000000002e-5Initial program 39.6%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites45.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6426.6
Applied rewrites26.6%
Taylor expanded in y.re around 0
Applied rewrites25.9%
if 4.3000000000000002e-5 < y.re Initial program 37.7%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites64.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6458.6
Applied rewrites58.6%
Taylor expanded in x.re around -inf
Applied rewrites51.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.im -1.45e-38)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 1.92e-87)
(* t_0 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.45e-38) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.92e-87) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if (x_46im <= (-1.45d-38)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 1.92d-87) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.45e-38) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.92e-87) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if x_46_im <= -1.45e-38: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.92e-87: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_im <= -1.45e-38) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.92e-87) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (x_46_im <= -1.45e-38) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.92e-87) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.45e-38], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.92e-87], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -1.45 \cdot 10^{-38}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.92 \cdot 10^{-87}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.44999999999999997e-38Initial program 33.8%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites60.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6449.5
Applied rewrites49.5%
Taylor expanded in x.im around -inf
Applied rewrites49.5%
if -1.44999999999999997e-38 < x.im < 1.92e-87Initial program 46.2%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites61.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6445.5
Applied rewrites45.5%
Taylor expanded in x.re around -inf
Applied rewrites40.1%
if 1.92e-87 < x.im Initial program 35.2%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites49.4%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6440.4
Applied rewrites40.4%
Taylor expanded in x.re around 0
Applied rewrites40.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (or (<= y.re -5.8e+35) (not (<= y.re 3000.0)))
(* t_0 (pow x.re y.re))
(* t_0 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((y_46_re <= -5.8e+35) || !(y_46_re <= 3000.0)) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * 1.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) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if ((y_46re <= (-5.8d+35)) .or. (.not. (y_46re <= 3000.0d0))) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((y_46_re <= -5.8e+35) || !(y_46_re <= 3000.0)) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if (y_46_re <= -5.8e+35) or not (y_46_re <= 3000.0): tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if ((y_46_re <= -5.8e+35) || !(y_46_re <= 3000.0)) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if ((y_46_re <= -5.8e+35) || ~((y_46_re <= 3000.0))) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -5.8e+35], N[Not[LessEqual[y$46$re, 3000.0]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+35} \lor \neg \left(y.re \leq 3000\right):\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot 1\\
\end{array}
\end{array}
if y.re < -5.79999999999999989e35 or 3e3 < y.re Initial program 40.7%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites73.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.4
Applied rewrites67.4%
Taylor expanded in x.im around 0
Applied rewrites57.0%
if -5.79999999999999989e35 < y.re < 3e3Initial program 39.7%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites45.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6427.6
Applied rewrites27.6%
Taylor expanded in y.re around 0
Applied rewrites25.0%
Final simplification39.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (or (<= y.re -1.85e+37) (not (<= y.re 95.0)))
(* t_0 (pow x.im y.re))
(* t_0 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((y_46_re <= -1.85e+37) || !(y_46_re <= 95.0)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * 1.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) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if ((y_46re <= (-1.85d+37)) .or. (.not. (y_46re <= 95.0d0))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((y_46_re <= -1.85e+37) || !(y_46_re <= 95.0)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if (y_46_re <= -1.85e+37) or not (y_46_re <= 95.0): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if ((y_46_re <= -1.85e+37) || !(y_46_re <= 95.0)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if ((y_46_re <= -1.85e+37) || ~((y_46_re <= 95.0))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.85e+37], N[Not[LessEqual[y$46$re, 95.0]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.85 \cdot 10^{+37} \lor \neg \left(y.re \leq 95\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot 1\\
\end{array}
\end{array}
if y.re < -1.85e37 or 95 < y.re Initial program 39.8%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites72.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.4
Applied rewrites67.4%
Taylor expanded in x.re around 0
Applied rewrites44.7%
if -1.85e37 < y.re < 95Initial program 40.4%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites46.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6427.6
Applied rewrites27.6%
Taylor expanded in y.re around 0
Applied rewrites25.0%
Final simplification33.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.im -1.45e-33)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 1.75e-87) (* t_0 (pow x.re y.re)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.45e-33) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.75e-87) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if (x_46im <= (-1.45d-33)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 1.75d-87) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -1.45e-33) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.75e-87) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if x_46_im <= -1.45e-33: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.75e-87: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_im <= -1.45e-33) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.75e-87) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (x_46_im <= -1.45e-33) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.75e-87) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.45e-33], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.75e-87], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -1.45 \cdot 10^{-33}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.75 \cdot 10^{-87}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.45000000000000001e-33Initial program 34.4%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites61.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6450.3
Applied rewrites50.3%
Taylor expanded in x.im around -inf
Applied rewrites50.3%
if -1.45000000000000001e-33 < x.im < 1.75000000000000006e-87Initial program 45.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites61.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6445.1
Applied rewrites45.1%
Taylor expanded in x.im around 0
Applied rewrites37.3%
if 1.75000000000000006e-87 < x.im Initial program 35.2%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites49.4%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6440.4
Applied rewrites40.4%
Taylor expanded in x.re around 0
Applied rewrites40.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* (atan2 x.im x.re) y.re)) 1.0))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((atan2(x_46_im, x_46_re) * y_46_re)) * 1.0;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((atan2(x_46im, x_46re) * y_46re)) * 1.0d0
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((Math.atan2(x_46_im, x_46_re) * y_46_re)) * 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * 1.0) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot 1
\end{array}
Initial program 40.2%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites58.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6445.2
Applied rewrites45.2%
Taylor expanded in y.re around 0
Applied rewrites17.3%
herbie shell --seed 2024337
(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)))))