
(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 (* (atan2 x.im x.re) y.re))
(t_1 (fma (* (cos t_0) (log (hypot x.im x.re))) y.im (sin t_0)))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1)))
(if (<= y.re -7.2e+22)
t_2
(if (<= y.re 3.0)
(*
(* (pow (hypot x.im x.re) y.re) (exp (* (- y.im) (atan2 x.im x.re))))
t_1)
(if (<= y.re 1e+127)
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(sin (* (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 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = fma((cos(t_0) * log(hypot(x_46_im, x_46_re))), y_46_im, sin(t_0));
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))) * t_1;
double tmp;
if (y_46_re <= -7.2e+22) {
tmp = t_2;
} else if (y_46_re <= 3.0) {
tmp = (pow(hypot(x_46_im, x_46_re), y_46_re) * exp((-y_46_im * atan2(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 1e+127) {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * sin((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 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = fma(Float64(cos(t_0) * log(hypot(x_46_im, x_46_re))), y_46_im, sin(t_0)) 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))) * t_1) tmp = 0.0 if (y_46_re <= -7.2e+22) tmp = t_2; elseif (y_46_re <= 3.0) tmp = Float64(Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 1e+127) tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Cos[t$95$0], $MachinePrecision] * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$46$im + N[Sin[t$95$0], $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] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -7.2e+22], t$95$2, If[LessEqual[y$46$re, 3.0], N[(N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1e+127], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \mathsf{fma}\left(\cos t\_0 \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.im, \sin t\_0\right)\\
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 t\_1\\
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 3:\\
\;\;\;\;\left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 10^{+127}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -7.2e22 or 9.99999999999999955e126 < y.re Initial program 38.1%
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 rewrites85.6%
if -7.2e22 < y.re < 3Initial program 41.2%
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 rewrites47.4%
lift-exp.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
exp-sumN/A
Applied rewrites80.8%
if 3 < y.re < 9.99999999999999955e126Initial program 29.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6418.8
Applied rewrites18.8%
Applied rewrites18.8%
Applied rewrites74.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (sin (+ (* t_2 y.im) t_1))))
(if (<= (* (exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im))) t_3) 1.0)
(* (exp (* (- (* y.re (/ t_0 y.im)) (atan2 x.im x.re)) y.im)) t_3)
(*
(exp (fma t_0 (log (exp y.re)) (* (- y.im) (atan2 x.im x.re))))
(fma (* (cos t_1) t_0) y.im (sin 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));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = sin(((t_2 * y_46_im) + t_1));
double tmp;
if ((exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3) <= 1.0) {
tmp = exp((((y_46_re * (t_0 / y_46_im)) - atan2(x_46_im, x_46_re)) * y_46_im)) * t_3;
} else {
tmp = exp(fma(t_0, log(exp(y_46_re)), (-y_46_im * atan2(x_46_im, x_46_re)))) * fma((cos(t_1) * t_0), y_46_im, sin(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = sin(Float64(Float64(t_2 * y_46_im) + t_1)) tmp = 0.0 if (Float64(exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3) <= 1.0) tmp = Float64(exp(Float64(Float64(Float64(y_46_re * Float64(t_0 / y_46_im)) - atan(x_46_im, x_46_re)) * y_46_im)) * t_3); else tmp = Float64(exp(fma(t_0, log(exp(y_46_re)), Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))) * fma(Float64(cos(t_1) * t_0), y_46_im, 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[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[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(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] * t$95$3), $MachinePrecision], 1.0], N[(N[Exp[N[(N[(N[(y$46$re * N[(t$95$0 / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], N[(N[Exp[N[(t$95$0 * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision] + N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Cos[t$95$1], $MachinePrecision] * t$95$0), $MachinePrecision] * y$46$im + N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := \sin \left(t\_2 \cdot y.im + t\_1\right)\\
\mathbf{if}\;e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3 \leq 1:\\
\;\;\;\;e^{\left(y.re \cdot \frac{t\_0}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, \log \left(e^{y.re}\right), \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \mathsf{fma}\left(\cos t\_1 \cdot t\_0, y.im, \sin t\_1\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)))) < 1Initial program 89.9%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6489.9
Applied rewrites89.9%
if 1 < (*.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 8.1%
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 rewrites47.2%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re)))))
(if (<= (* (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))) t_2) INFINITY)
(* (exp (* (- (* y.re (/ t_0 y.im)) (atan2 x.im x.re)) y.im)) t_2)
(*
(exp (fma t_0 (log (exp y.re)) (* (- y.im) (atan2 x.im x.re))))
(* y.im (log (hypot x.re x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double tmp;
if ((exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_2) <= ((double) INFINITY)) {
tmp = exp((((y_46_re * (t_0 / y_46_im)) - atan2(x_46_im, x_46_re)) * y_46_im)) * t_2;
} else {
tmp = exp(fma(t_0, log(exp(y_46_re)), (-y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_re, x_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (Float64(exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_2) <= Inf) tmp = Float64(exp(Float64(Float64(Float64(y_46_re * Float64(t_0 / y_46_im)) - atan(x_46_im, x_46_re)) * y_46_im)) * t_2); else tmp = Float64(exp(fma(t_0, log(exp(y_46_re)), Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); 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[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], Infinity], N[(N[Exp[N[(N[(N[(y$46$re * N[(t$95$0 / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[Exp[N[(t$95$0 * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision] + N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_2 \leq \infty:\\
\;\;\;\;e^{\left(y.re \cdot \frac{t\_0}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, \log \left(e^{y.re}\right), \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\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 80.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6480.8
Applied rewrites80.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (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%
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 rewrites44.0%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites76.9%
Taylor expanded in y.re around 0
Applied rewrites70.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re)))))
(if (<= (* (exp (- (* t_1 y.re) t_0)) t_2) INFINITY)
(*
(exp
(*
(- (* y.re (/ (log (hypot x.im x.re)) y.im)) (atan2 x.im x.re))
y.im))
t_2)
(*
(/ (pow (hypot x.re x.im) y.re) (exp t_0))
(* y.im (log (hypot x.re x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double tmp;
if ((exp(((t_1 * y_46_re) - t_0)) * t_2) <= ((double) INFINITY)) {
tmp = exp((((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re)) * y_46_im)) * t_2;
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / exp(t_0)) * (y_46_im * log(hypot(x_46_re, x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = Math.sin(((t_1 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
double tmp;
if ((Math.exp(((t_1 * y_46_re) - t_0)) * t_2) <= Double.POSITIVE_INFINITY) {
tmp = Math.exp((((y_46_re * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_im)) - Math.atan2(x_46_im, x_46_re)) * y_46_im)) * t_2;
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.exp(t_0)) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_2 = math.sin(((t_1 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re))) tmp = 0 if (math.exp(((t_1 * y_46_re) - t_0)) * t_2) <= math.inf: tmp = math.exp((((y_46_re * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_im)) - math.atan2(x_46_im, x_46_re)) * y_46_im)) * t_2 else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.exp(t_0)) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (Float64(exp(Float64(Float64(t_1 * y_46_re) - t_0)) * t_2) <= Inf) tmp = Float64(exp(Float64(Float64(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan(x_46_im, x_46_re)) * y_46_im)) * t_2); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_0)) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_2 = sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); tmp = 0.0; if ((exp(((t_1 * y_46_re) - t_0)) * t_2) <= Inf) tmp = exp((((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re)) * y_46_im)) * t_2; else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_0)) * (y_46_im * log(hypot(x_46_re, x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], Infinity], N[(N[Exp[N[(N[(N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;e^{t\_1 \cdot y.re - t\_0} \cdot t\_2 \leq \infty:\\
\;\;\;\;e^{\left(y.re \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{t\_0}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\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 80.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6480.8
Applied rewrites80.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (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%
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 rewrites44.0%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites76.9%
Taylor expanded in y.re around 0
Applied rewrites70.3%
Applied rewrites67.2%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2
(*
(exp (- (* t_1 y.re) t_0))
(sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re))))))
(if (<= t_2 INFINITY)
t_2
(*
(/ (pow (hypot x.re x.im) y.re) (exp t_0))
(* y.im (log (hypot x.re x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - t_0)) * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / exp(t_0)) * (y_46_im * log(hypot(x_46_re, x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = Math.exp(((t_1 * y_46_re) - t_0)) * Math.sin(((t_1 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.exp(t_0)) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_2 = math.exp(((t_1 * y_46_re) - t_0)) * math.sin(((t_1 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re))) tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.exp(t_0)) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_0)) * sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_0)) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_2 = exp(((t_1 * y_46_re) - t_0)) * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_0)) * (y_46_im * log(hypot(x_46_re, x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - t\_0} \cdot \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{t\_0}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\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 80.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (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%
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 rewrites44.0%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites76.9%
Taylor expanded in y.re around 0
Applied rewrites70.3%
Applied rewrites67.2%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (fma (* (cos t_0) (log (hypot x.im x.re))) y.im (sin t_0)))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1)))
(if (<= y.re -6.5e-10)
t_2
(if (<= y.re 7.6e+28)
(* (exp (* (- y.im) (atan2 x.im x.re))) t_1)
(if (<= y.re 1e+127)
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(sin (* (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 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = fma((cos(t_0) * log(hypot(x_46_im, x_46_re))), y_46_im, sin(t_0));
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))) * t_1;
double tmp;
if (y_46_re <= -6.5e-10) {
tmp = t_2;
} else if (y_46_re <= 7.6e+28) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_re <= 1e+127) {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * sin((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 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = fma(Float64(cos(t_0) * log(hypot(x_46_im, x_46_re))), y_46_im, sin(t_0)) 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))) * t_1) tmp = 0.0 if (y_46_re <= -6.5e-10) tmp = t_2; elseif (y_46_re <= 7.6e+28) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_1); elseif (y_46_re <= 1e+127) tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Cos[t$95$0], $MachinePrecision] * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$46$im + N[Sin[t$95$0], $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] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -6.5e-10], t$95$2, If[LessEqual[y$46$re, 7.6e+28], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1e+127], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \mathsf{fma}\left(\cos t\_0 \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.im, \sin t\_0\right)\\
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 t\_1\\
\mathbf{if}\;y.re \leq -6.5 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 7.6 \cdot 10^{+28}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 10^{+127}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -6.5000000000000003e-10 or 9.99999999999999955e126 < y.re Initial program 38.4%
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 rewrites83.7%
if -6.5000000000000003e-10 < y.re < 7.5999999999999998e28Initial program 39.2%
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 rewrites46.2%
Taylor expanded in y.re around 0
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6479.6
Applied rewrites79.6%
if 7.5999999999999998e28 < y.re < 9.99999999999999955e126Initial program 38.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6424.0
Applied rewrites24.0%
Applied rewrites24.0%
Applied rewrites81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (sin t_1))
(t_3
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -6.5e-10)
(* t_3 t_2)
(if (<= y.re 4.8e+28)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(fma (* (cos t_1) t_0) y.im t_2))
(if (<= y.re 2.15e+223)
(* t_3 (sin (* t_0 y.im)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* (atan2 x.im (fabs x.re)) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = sin(t_1);
double t_3 = 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 tmp;
if (y_46_re <= -6.5e-10) {
tmp = t_3 * t_2;
} else if (y_46_re <= 4.8e+28) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * fma((cos(t_1) * t_0), y_46_im, t_2);
} else if (y_46_re <= 2.15e+223) {
tmp = t_3 * sin((t_0 * y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, fabs(x_46_re)) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = sin(t_1) t_3 = 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))) tmp = 0.0 if (y_46_re <= -6.5e-10) tmp = Float64(t_3 * t_2); elseif (y_46_re <= 4.8e+28) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * fma(Float64(cos(t_1) * t_0), y_46_im, t_2)); elseif (y_46_re <= 2.15e+223) tmp = Float64(t_3 * sin(Float64(t_0 * y_46_im))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, abs(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]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = 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]}, If[LessEqual[y$46$re, -6.5e-10], N[(t$95$3 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 4.8e+28], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Cos[t$95$1], $MachinePrecision] * t$95$0), $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.15e+223], N[(t$95$3 * 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[ArcTan[x$46$im / N[Abs[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)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \sin t\_1\\
t_3 := 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}\\
\mathbf{if}\;y.re \leq -6.5 \cdot 10^{-10}:\\
\;\;\;\;t\_3 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \mathsf{fma}\left(\cos t\_1 \cdot t\_0, y.im, t\_2\right)\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+223}:\\
\;\;\;\;t\_3 \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(\tan^{-1}_* \frac{x.im}{\left|x.re\right|} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -6.5000000000000003e-10Initial program 43.0%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6484.8
Applied rewrites84.8%
if -6.5000000000000003e-10 < y.re < 4.79999999999999962e28Initial program 39.2%
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 rewrites46.2%
Taylor expanded in y.re around 0
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6479.6
Applied rewrites79.6%
if 4.79999999999999962e28 < y.re < 2.15e223Initial program 34.3%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6477.2
Applied rewrites77.2%
if 2.15e223 < y.re Initial program 27.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6466.7
Applied rewrites66.7%
Applied rewrites72.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -1.75)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))
(sin (* (log (hypot x.im x.re)) y.im)))
(if (<= y.im 4.2e-206)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (fma y.im (/ t_0 y.re) (atan2 x.im x.re)))))
(* (/ (pow (hypot x.re x.im) y.re) (exp t_1)) (* y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -1.75) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else if (y_46_im <= 4.2e-206) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re))));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / exp(t_1)) * (y_46_im * t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -1.75) 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(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); elseif (y_46_im <= 4.2e-206) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re))))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_1)) * Float64(y_46_im * t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.75], 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[(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, 4.2e-206], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -1.75:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-206}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{t\_1}} \cdot \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.im < -1.75Initial program 37.5%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6457.2
Applied rewrites57.2%
if -1.75 < y.im < 4.2000000000000002e-206Initial program 38.0%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6438.0
Applied rewrites38.0%
Taylor expanded in y.re around inf
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6490.4
Applied rewrites90.4%
if 4.2000000000000002e-206 < y.im Initial program 40.4%
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 rewrites59.9%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites75.9%
Taylor expanded in y.re around 0
Applied rewrites78.1%
Applied rewrites76.0%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.im -2.8e+104)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im 4.2e-206)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (fma y.im (/ t_0 y.re) (atan2 x.im x.re)))))
(*
(/ (pow (hypot x.re x.im) y.re) (exp (* (atan2 x.im x.re) y.im)))
(* 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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -2.8e+104) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 4.2e-206) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * fma(y_46_im, (t_0 / y_46_re), atan2(x_46_im, x_46_re))));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / exp((atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * t_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)) tmp = 0.0 if (y_46_im <= -2.8e+104) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 4.2e-206) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * fma(y_46_im, Float64(t_0 / y_46_re), atan(x_46_im, x_46_re))))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e+104], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * 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, 4.2e-206], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+104}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-206}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \mathsf{fma}\left(y.im, \frac{t\_0}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.im < -2.8e104Initial program 42.3%
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.f6460.3
Applied rewrites60.3%
if -2.8e104 < y.im < 4.2000000000000002e-206Initial program 35.6%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6435.6
Applied rewrites35.6%
Taylor expanded in y.re around inf
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6478.1
Applied rewrites78.1%
if 4.2000000000000002e-206 < y.im Initial program 40.4%
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 rewrites59.9%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites75.9%
Taylor expanded in y.re around 0
Applied rewrites78.1%
Applied rewrites76.0%
Final simplification73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.55e+23)
(*
(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)))
(if (<= y.re -8.5e-47)
(*
(pow (hypot x.im x.re) y.re)
(sin
(* y.im (fma y.re (/ (atan2 x.im x.re) y.im) (log (hypot x.re x.im))))))
(if (<= y.re 0.0003)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(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 tmp;
if (y_46_re <= -1.55e+23) {
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));
} else if (y_46_re <= -8.5e-47) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_re, x_46_im)))));
} else if (y_46_re <= 0.0003) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * 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) tmp = 0.0 if (y_46_re <= -1.55e+23) 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))); elseif (y_46_re <= -8.5e-47) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_re, x_46_im)))))); elseif (y_46_re <= 0.0003) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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[LessEqual[y$46$re, -1.55e+23], 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], If[LessEqual[y$46$re, -8.5e-47], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0003], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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}
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{+23}:\\
\;\;\;\;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)\\
\mathbf{elif}\;y.re \leq -8.5 \cdot 10^{-47}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 0.0003:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -1.54999999999999985e23Initial program 43.1%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6487.8
Applied rewrites87.8%
if -1.54999999999999985e23 < y.re < -8.4999999999999999e-47Initial program 35.6%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6435.6
Applied rewrites35.6%
Taylor expanded in y.im around inf
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6478.6
Applied rewrites78.6%
if -8.4999999999999999e-47 < y.re < 2.99999999999999974e-4Initial program 42.4%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6448.6
Applied rewrites48.6%
Taylor expanded in y.re around 0
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6474.4
Applied rewrites74.4%
if 2.99999999999999974e-4 < y.re Initial program 28.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.8
Applied rewrites39.8%
Applied rewrites39.8%
Applied rewrites62.1%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -0.24)
(*
(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)))
(if (<= y.re -1.75e-46)
(*
(pow (hypot x.im x.re) y.re)
(sin (fma (- y.im) (log (/ -1.0 x.re)) (* y.re (atan2 x.im x.re)))))
(if (<= y.re 0.0003)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(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 tmp;
if (y_46_re <= -0.24) {
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));
} else if (y_46_re <= -1.75e-46) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(-y_46_im, log((-1.0 / x_46_re)), (y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 0.0003) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * 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) tmp = 0.0 if (y_46_re <= -0.24) 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))); elseif (y_46_re <= -1.75e-46) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(Float64(-y_46_im), log(Float64(-1.0 / x_46_re)), Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 0.0003) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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[LessEqual[y$46$re, -0.24], 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], If[LessEqual[y$46$re, -1.75e-46], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[((-y$46$im) * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0003], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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}
\mathbf{if}\;y.re \leq -0.24:\\
\;\;\;\;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)\\
\mathbf{elif}\;y.re \leq -1.75 \cdot 10^{-46}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 0.0003:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -0.23999999999999999Initial program 43.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6487.0
Applied rewrites87.0%
if -0.23999999999999999 < y.re < -1.7500000000000001e-46Initial program 29.8%
Taylor expanded in y.im around 0
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6429.8
Applied rewrites29.8%
Taylor expanded in x.re around -inf
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-log.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan2.f6471.9
Applied rewrites71.9%
if -1.7500000000000001e-46 < y.re < 2.99999999999999974e-4Initial program 42.4%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6448.6
Applied rewrites48.6%
Taylor expanded in y.re around 0
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6474.4
Applied rewrites74.4%
if 2.99999999999999974e-4 < y.re Initial program 28.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.8
Applied rewrites39.8%
Applied rewrites39.8%
Applied rewrites62.1%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.15e-22)
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 0.0003)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(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 tmp;
if (y_46_re <= -1.15e-22) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 0.0003) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * sin((atan2(-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 tmp;
if (y_46_re <= -1.15e-22) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 0.0003) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = Math.pow(Math.hypot(Math.sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * Math.sin((Math.atan2(-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): tmp = 0 if y_46_re <= -1.15e-22: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 0.0003: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) else: tmp = math.pow(math.hypot(math.sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * math.sin((math.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 <= -1.15e-22) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 0.0003) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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) tmp = 0.0; if (y_46_re <= -1.15e-22) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 0.0003) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); else tmp = (hypot(sqrt((x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin((atan2(-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_] := If[LessEqual[y$46$re, -1.15e-22], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0003], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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}
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-22}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 0.0003:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -1.1499999999999999e-22Initial program 41.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6481.4
Applied rewrites81.4%
if -1.1499999999999999e-22 < y.re < 2.99999999999999974e-4Initial program 42.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6448.2
Applied rewrites48.2%
Taylor expanded in y.re around 0
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6473.3
Applied rewrites73.3%
if 2.99999999999999974e-4 < y.re Initial program 28.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.8
Applied rewrites39.8%
Applied rewrites39.8%
Applied rewrites62.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -8.5e-23)
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 3.0)
(* (exp (* (- y.im) (atan2 x.im x.re))) (* y.im (log (hypot x.re x.im))))
(*
(pow (hypot (sqrt (* x.im x.im)) x.re) y.re)
(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 tmp;
if (y_46_re <= -8.5e-23) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 3.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else {
tmp = pow(hypot(sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * sin((atan2(-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 tmp;
if (y_46_re <= -8.5e-23) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 3.0) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else {
tmp = Math.pow(Math.hypot(Math.sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * Math.sin((Math.atan2(-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): tmp = 0 if y_46_re <= -8.5e-23: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 3.0: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) else: tmp = math.pow(math.hypot(math.sqrt((x_46_im * x_46_im)), x_46_re), y_46_re) * math.sin((math.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 <= -8.5e-23) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 3.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); else tmp = Float64((hypot(sqrt(Float64(x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin(Float64(atan(Float64(-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) tmp = 0.0; if (y_46_re <= -8.5e-23) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 3.0) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(hypot(x_46_re, x_46_im))); else tmp = (hypot(sqrt((x_46_im * x_46_im)), x_46_re) ^ y_46_re) * sin((atan2(-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_] := If[LessEqual[y$46$re, -8.5e-23], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision] ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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}
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-23}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 3:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(\sqrt{x.im \cdot x.im}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -8.4999999999999996e-23Initial program 41.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6481.4
Applied rewrites81.4%
if -8.4999999999999996e-23 < y.re < 3Initial program 42.1%
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 rewrites47.9%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites80.9%
Taylor expanded in y.re around 0
Applied rewrites71.1%
Taylor expanded in y.re around 0
lower-exp.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6471.1
Applied rewrites71.1%
if 3 < y.re Initial program 28.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6440.8
Applied rewrites40.8%
Applied rewrites40.8%
Applied rewrites64.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -8.5e-23)
(* t_0 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 2.7e+16)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(* y.im (log (hypot x.re x.im))))
(if (<= y.re 2e+223)
(* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re)))
(* t_0 (sin (* (atan2 x.im (fabs 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -8.5e-23) {
tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 2.7e+16) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (y_46_re <= 2e+223) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * sin((atan2(x_46_im, fabs(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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -8.5e-23) {
tmp = t_0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 2.7e+16) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (y_46_re <= 2e+223) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * Math.sin((Math.atan2(x_46_im, Math.abs(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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -8.5e-23: tmp = t_0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 2.7e+16: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif y_46_re <= 2e+223: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) else: tmp = t_0 * math.sin((math.atan2(x_46_im, math.fabs(x_46_re)) * y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -8.5e-23) tmp = Float64(t_0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 2.7e+16) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (y_46_re <= 2e+223) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, abs(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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -8.5e-23) tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 2.7e+16) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (y_46_re <= 2e+223) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); else tmp = t_0 * sin((atan2(x_46_im, abs(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-23], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+16], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+223], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-23}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+16}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+223}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{\left|x.re\right|} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -8.4999999999999996e-23Initial program 41.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6481.4
Applied rewrites81.4%
if -8.4999999999999996e-23 < y.re < 2.7e16Initial program 40.8%
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 rewrites47.2%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
Applied rewrites79.1%
Taylor expanded in y.re around 0
Applied rewrites68.8%
Taylor expanded in y.re around 0
lower-exp.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6470.4
Applied rewrites70.4%
if 2.7e16 < y.re < 2.00000000000000009e223Initial program 32.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6432.5
Applied rewrites32.5%
Taylor expanded in x.re around 0
Applied rewrites22.0%
Applied rewrites67.9%
if 2.00000000000000009e223 < y.re Initial program 27.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6466.7
Applied rewrites66.7%
Applied rewrites72.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.7e-48)
(* t_0 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 3700000000000.0)
(* (exp (* (- y.im) (atan2 x.im x.re))) (sin (* y.im (log x.im))))
(if (<= y.re 2e+223)
(* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re)))
(* t_0 (sin (* (atan2 x.im (fabs 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.7e-48) {
tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 3700000000000.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im)));
} else if (y_46_re <= 2e+223) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * sin((atan2(x_46_im, fabs(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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.7e-48) {
tmp = t_0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 3700000000000.0) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(x_46_im)));
} else if (y_46_re <= 2e+223) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * Math.sin((Math.atan2(x_46_im, Math.abs(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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1.7e-48: tmp = t_0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 3700000000000.0: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(x_46_im))) elif y_46_re <= 2e+223: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) else: tmp = t_0 * math.sin((math.atan2(x_46_im, math.fabs(x_46_re)) * y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.7e-48) tmp = Float64(t_0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 3700000000000.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * log(x_46_im)))); elseif (y_46_re <= 2e+223) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, abs(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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -1.7e-48) tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 3700000000000.0) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im))); elseif (y_46_re <= 2e+223) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); else tmp = t_0 * sin((atan2(x_46_im, abs(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.7e-48], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3700000000000.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+223], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.7 \cdot 10^{-48}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 3700000000000:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+223}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{\left|x.re\right|} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -1.70000000000000014e-48Initial program 41.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6478.9
Applied rewrites78.9%
if -1.70000000000000014e-48 < y.re < 3.7e12Initial program 40.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6413.0
Applied rewrites13.0%
Taylor expanded in x.re around 0
Applied rewrites7.6%
Taylor expanded in x.re around 0
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
lower-exp.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-atan2.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sin.f64N/A
Applied rewrites38.3%
Taylor expanded in y.re around 0
Applied rewrites34.8%
if 3.7e12 < y.re < 2.00000000000000009e223Initial program 31.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6431.7
Applied rewrites31.7%
Taylor expanded in x.re around 0
Applied rewrites21.5%
Applied rewrites66.2%
if 2.00000000000000009e223 < y.re Initial program 27.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6466.7
Applied rewrites66.7%
Applied rewrites72.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -1.7e-24)
(* t_0 t_1)
(if (<= y.re 5.6e+17)
(* (pow (sqrt (* x.re x.re)) y.re) t_1)
(if (<= y.re 2e+223)
(* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re)))
(* t_0 (sin (* (atan2 x.im (fabs 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.7e-24) {
tmp = t_0 * t_1;
} else if (y_46_re <= 5.6e+17) {
tmp = pow(sqrt((x_46_re * x_46_re)), y_46_re) * t_1;
} else if (y_46_re <= 2e+223) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * sin((atan2(x_46_im, fabs(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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.7e-24) {
tmp = t_0 * t_1;
} else if (y_46_re <= 5.6e+17) {
tmp = Math.pow(Math.sqrt((x_46_re * x_46_re)), y_46_re) * t_1;
} else if (y_46_re <= 2e+223) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_0 * Math.sin((Math.atan2(x_46_im, Math.abs(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.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.7e-24: tmp = t_0 * t_1 elif y_46_re <= 5.6e+17: tmp = math.pow(math.sqrt((x_46_re * x_46_re)), y_46_re) * t_1 elif y_46_re <= 2e+223: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) else: tmp = t_0 * math.sin((math.atan2(x_46_im, math.fabs(x_46_re)) * y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_re <= -1.7e-24) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 5.6e+17) tmp = Float64((sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re) * t_1); elseif (y_46_re <= 2e+223) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, abs(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 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.7e-24) tmp = t_0 * t_1; elseif (y_46_re <= 5.6e+17) tmp = (sqrt((x_46_re * x_46_re)) ^ y_46_re) * t_1; elseif (y_46_re <= 2e+223) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); else tmp = t_0 * sin((atan2(x_46_im, abs(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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.7e-24], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 5.6e+17], N[(N[Power[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2e+223], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.7 \cdot 10^{-24}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{+17}:\\
\;\;\;\;{\left(\sqrt{x.re \cdot x.re}\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+223}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{\left|x.re\right|} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -1.69999999999999996e-24Initial program 41.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6481.4
Applied rewrites81.4%
if -1.69999999999999996e-24 < y.re < 5.6e17Initial program 40.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6413.5
Applied rewrites13.5%
Taylor expanded in x.im around 0
Applied rewrites6.6%
Applied rewrites19.3%
if 5.6e17 < y.re < 2.00000000000000009e223Initial program 32.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6432.5
Applied rewrites32.5%
Taylor expanded in x.re around 0
Applied rewrites22.0%
Applied rewrites67.9%
if 2.00000000000000009e223 < y.re Initial program 27.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6466.7
Applied rewrites66.7%
Applied rewrites72.2%
(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_0)))
(if (<= y.re -1.7e-24)
t_1
(if (<= y.re 5.6e+17)
(* (pow (sqrt (* x.re x.re)) y.re) t_0)
(if (<= y.re 7.5e+223)
(* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re)))
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 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -1.7e-24) {
tmp = t_1;
} else if (y_46_re <= 5.6e+17) {
tmp = pow(sqrt((x_46_re * x_46_re)), y_46_re) * t_0;
} else if (y_46_re <= 7.5e+223) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -1.7e-24) {
tmp = t_1;
} else if (y_46_re <= 5.6e+17) {
tmp = Math.pow(Math.sqrt((x_46_re * x_46_re)), y_46_re) * t_0;
} else if (y_46_re <= 7.5e+223) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} 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.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 tmp = 0 if y_46_re <= -1.7e-24: tmp = t_1 elif y_46_re <= 5.6e+17: tmp = math.pow(math.sqrt((x_46_re * x_46_re)), y_46_re) * t_0 elif y_46_re <= 7.5e+223: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) 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((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -1.7e-24) tmp = t_1; elseif (y_46_re <= 5.6e+17) tmp = Float64((sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re) * t_0); elseif (y_46_re <= 7.5e+223) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); 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 = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -1.7e-24) tmp = t_1; elseif (y_46_re <= 5.6e+17) tmp = (sqrt((x_46_re * x_46_re)) ^ y_46_re) * t_0; elseif (y_46_re <= 7.5e+223) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -1.7e-24], t$95$1, If[LessEqual[y$46$re, 5.6e+17], N[(N[Power[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+223], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{if}\;y.re \leq -1.7 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{+17}:\\
\;\;\;\;{\left(\sqrt{x.re \cdot x.re}\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+223}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.69999999999999996e-24 or 7.5000000000000003e223 < y.re Initial program 38.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6478.6
Applied rewrites78.6%
if -1.69999999999999996e-24 < y.re < 5.6e17Initial program 40.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6413.5
Applied rewrites13.5%
Taylor expanded in x.im around 0
Applied rewrites6.6%
Applied rewrites19.3%
if 5.6e17 < y.re < 7.5000000000000003e223Initial program 32.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6432.5
Applied rewrites32.5%
Taylor expanded in x.re around 0
Applied rewrites22.0%
Applied rewrites67.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= x.im -5.6e+34) (not (<= x.im 5.2e-9))) (* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re))) (* (pow (fabs x.re) y.re) (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 tmp;
if ((x_46_im <= -5.6e+34) || !(x_46_im <= 5.2e-9)) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = pow(fabs(x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * 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) :: tmp
if ((x_46im <= (-5.6d+34)) .or. (.not. (x_46im <= 5.2d-9))) then
tmp = (x_46im ** y_46re) * sin((atan2(-x_46im, x_46re) * y_46re))
else
tmp = (abs(x_46re) ** y_46re) * sin((atan2(x_46im, x_46re) * 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 tmp;
if ((x_46_im <= -5.6e+34) || !(x_46_im <= 5.2e-9)) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = Math.pow(Math.abs(x_46_re), y_46_re) * Math.sin((Math.atan2(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): tmp = 0 if (x_46_im <= -5.6e+34) or not (x_46_im <= 5.2e-9): tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) else: tmp = math.pow(math.fabs(x_46_re), y_46_re) * math.sin((math.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 ((x_46_im <= -5.6e+34) || !(x_46_im <= 5.2e-9)) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); else tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(Float64(atan(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) tmp = 0.0; if ((x_46_im <= -5.6e+34) || ~((x_46_im <= 5.2e-9))) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); else tmp = (abs(x_46_re) ^ y_46_re) * sin((atan2(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_] := If[Or[LessEqual[x$46$im, -5.6e+34], N[Not[LessEqual[x$46$im, 5.2e-9]], $MachinePrecision]], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $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}
\mathbf{if}\;x.im \leq -5.6 \cdot 10^{+34} \lor \neg \left(x.im \leq 5.2 \cdot 10^{-9}\right):\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if x.im < -5.60000000000000016e34 or 5.2000000000000002e-9 < x.im Initial program 25.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6432.8
Applied rewrites32.8%
Taylor expanded in x.re around 0
Applied rewrites28.8%
Applied rewrites40.3%
if -5.60000000000000016e34 < x.im < 5.2000000000000002e-9Initial program 54.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6448.2
Applied rewrites48.2%
Taylor expanded in x.im around 0
Applied rewrites40.8%
Applied rewrites46.8%
Final simplification43.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= x.im -2.2e+34) (not (<= x.im 5.2e-9))) (* (pow x.im y.re) (sin (* (atan2 (- x.im) x.re) y.re))) (* (pow x.re y.re) (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 tmp;
if ((x_46_im <= -2.2e+34) || !(x_46_im <= 5.2e-9)) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = pow(x_46_re, y_46_re) * sin((atan2(x_46_im, x_46_re) * 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) :: tmp
if ((x_46im <= (-2.2d+34)) .or. (.not. (x_46im <= 5.2d-9))) then
tmp = (x_46im ** y_46re) * sin((atan2(-x_46im, x_46re) * y_46re))
else
tmp = (x_46re ** y_46re) * sin((atan2(x_46im, x_46re) * 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 tmp;
if ((x_46_im <= -2.2e+34) || !(x_46_im <= 5.2e-9)) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-x_46_im, x_46_re) * y_46_re));
} else {
tmp = Math.pow(x_46_re, y_46_re) * Math.sin((Math.atan2(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): tmp = 0 if (x_46_im <= -2.2e+34) or not (x_46_im <= 5.2e-9): tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(-x_46_im, x_46_re) * y_46_re)) else: tmp = math.pow(x_46_re, y_46_re) * math.sin((math.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 ((x_46_im <= -2.2e+34) || !(x_46_im <= 5.2e-9)) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-x_46_im), x_46_re) * y_46_re))); else tmp = Float64((x_46_re ^ y_46_re) * sin(Float64(atan(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) tmp = 0.0; if ((x_46_im <= -2.2e+34) || ~((x_46_im <= 5.2e-9))) tmp = (x_46_im ^ y_46_re) * sin((atan2(-x_46_im, x_46_re) * y_46_re)); else tmp = (x_46_re ^ y_46_re) * sin((atan2(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_] := If[Or[LessEqual[x$46$im, -2.2e+34], N[Not[LessEqual[x$46$im, 5.2e-9]], $MachinePrecision]], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[(-x$46$im) / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $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}
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+34} \lor \neg \left(x.im \leq 5.2 \cdot 10^{-9}\right):\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if x.im < -2.2000000000000002e34 or 5.2000000000000002e-9 < x.im Initial program 25.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6432.8
Applied rewrites32.8%
Taylor expanded in x.re around 0
Applied rewrites28.8%
Applied rewrites40.3%
if -2.2000000000000002e34 < x.im < 5.2000000000000002e-9Initial program 54.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6448.2
Applied rewrites48.2%
Taylor expanded in x.im around 0
Applied rewrites40.8%
Final simplification40.5%
(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 -2.8e+32)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 5.2e-9)
(* (pow (fabs x.re) y.re) t_0)
(* (pow x.im y.re) (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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_im <= -2.8e+32) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 5.2e-9) {
tmp = pow(fabs(x_46_re), y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_46_re) * sin((atan2(-x_46_im, x_46_re) * 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 <= (-2.8d+32)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 5.2d-9) then
tmp = (abs(x_46re) ** y_46re) * t_0
else
tmp = (x_46im ** y_46re) * sin((atan2(-x_46im, x_46re) * 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 <= -2.8e+32) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 5.2e-9) {
tmp = Math.pow(Math.abs(x_46_re), y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(-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 x_46_im <= -2.8e+32: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 5.2e-9: tmp = math.pow(math.fabs(x_46_re), y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.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 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_im <= -2.8e+32) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 5.2e-9) tmp = Float64((abs(x_46_re) ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(Float64(-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 (x_46_im <= -2.8e+32) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 5.2e-9) tmp = (abs(x_46_re) ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_46_re) * sin((atan2(-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[x$46$im, -2.8e+32], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 5.2e-9], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $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 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{-9}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{-x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if x.im < -2.8e32Initial program 26.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6440.9
Applied rewrites40.9%
Taylor expanded in x.re around 0
Applied rewrites30.1%
Applied rewrites40.9%
if -2.8e32 < x.im < 5.2000000000000002e-9Initial program 54.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6447.8
Applied rewrites47.8%
Taylor expanded in x.im around 0
Applied rewrites41.1%
Applied rewrites47.1%
if 5.2000000000000002e-9 < x.im Initial program 25.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6427.4
Applied rewrites27.4%
Taylor expanded in x.re around 0
Applied rewrites27.4%
Applied rewrites39.9%
(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 -8.6e+33)
(* (pow x.im y.re) t_0)
(if (<= x.im 3e-27)
(* (pow x.re y.re) t_0)
(* (pow x.im y.re) (sin (* (atan2 x.im (fabs 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 (x_46_im <= -8.6e+33) {
tmp = pow(x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 3e-27) {
tmp = pow(x_46_re, y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_46_re) * sin((atan2(x_46_im, fabs(x_46_re)) * 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 <= (-8.6d+33)) then
tmp = (x_46im ** y_46re) * t_0
else if (x_46im <= 3d-27) then
tmp = (x_46re ** y_46re) * t_0
else
tmp = (x_46im ** y_46re) * sin((atan2(x_46im, abs(x_46re)) * 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 <= -8.6e+33) {
tmp = Math.pow(x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 3e-27) {
tmp = Math.pow(x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, Math.abs(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 x_46_im <= -8.6e+33: tmp = math.pow(x_46_im, y_46_re) * t_0 elif x_46_im <= 3e-27: tmp = math.pow(x_46_re, y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, math.fabs(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 (x_46_im <= -8.6e+33) tmp = Float64((x_46_im ^ y_46_re) * t_0); elseif (x_46_im <= 3e-27) tmp = Float64((x_46_re ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, abs(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 (x_46_im <= -8.6e+33) tmp = (x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 3e-27) tmp = (x_46_re ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, abs(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[x$46$im, -8.6e+33], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 3e-27], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]], $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 -8.6 \cdot 10^{+33}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 3 \cdot 10^{-27}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{\left|x.re\right|} \cdot y.re\right)\\
\end{array}
\end{array}
if x.im < -8.60000000000000057e33Initial program 25.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.9
Applied rewrites39.9%
Taylor expanded in x.re around 0
Applied rewrites30.6%
if -8.60000000000000057e33 < x.im < 3.0000000000000001e-27Initial program 52.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6447.5
Applied rewrites47.5%
Taylor expanded in x.im around 0
Applied rewrites40.6%
if 3.0000000000000001e-27 < x.im Initial program 30.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6430.0
Applied rewrites30.0%
Taylor expanded in x.re around 0
Applied rewrites28.8%
Applied rewrites32.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 (<= x.re -2.9e-18) (not (<= x.re 9.2e-57)))
(* (pow x.re y.re) t_0)
(* (pow x.im y.re) 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 tmp;
if ((x_46_re <= -2.9e-18) || !(x_46_re <= 9.2e-57)) {
tmp = pow(x_46_re, y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_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) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if ((x_46re <= (-2.9d-18)) .or. (.not. (x_46re <= 9.2d-57))) then
tmp = (x_46re ** y_46re) * t_0
else
tmp = (x_46im ** y_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.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((x_46_re <= -2.9e-18) || !(x_46_re <= 9.2e-57)) {
tmp = Math.pow(x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * 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)) tmp = 0 if (x_46_re <= -2.9e-18) or not (x_46_re <= 9.2e-57): tmp = math.pow(x_46_re, y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * 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)) tmp = 0.0 if ((x_46_re <= -2.9e-18) || !(x_46_re <= 9.2e-57)) tmp = Float64((x_46_re ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_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 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if ((x_46_re <= -2.9e-18) || ~((x_46_re <= 9.2e-57))) tmp = (x_46_re ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$re, -2.9e-18], N[Not[LessEqual[x$46$re, 9.2e-57]], $MachinePrecision]], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $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)\\
\mathbf{if}\;x.re \leq -2.9 \cdot 10^{-18} \lor \neg \left(x.re \leq 9.2 \cdot 10^{-57}\right):\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.re < -2.9e-18 or 9.2000000000000001e-57 < x.re Initial program 31.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6435.8
Applied rewrites35.8%
Taylor expanded in x.im around 0
Applied rewrites32.6%
if -2.9e-18 < x.re < 9.2000000000000001e-57Initial program 49.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6445.3
Applied rewrites45.3%
Taylor expanded in x.re around 0
Applied rewrites37.8%
Final simplification34.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow x.im y.re) (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) {
return pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = (x_46im ** y_46re) * sin((atan2(x_46im, x_46re) * y_46re))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
Initial program 38.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6439.9
Applied rewrites39.9%
Taylor expanded in x.re around 0
Applied rewrites26.2%
herbie shell --seed 2024339
(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)))))