
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (log (hypot x.im x.re)) y.im))
(t_1 (sin t_0))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -3.2)
(* t_2 t_1)
(if (<= y.re 0.0004)
(/
(pow (exp y.im) (- (atan2 x.im x.re)))
(/
(pow (hypot x.re x.im) (- y.re))
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))))
(* t_2 (fma (* (cos t_0) (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 = log(hypot(x_46_im, x_46_re)) * y_46_im;
double t_1 = 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)));
double tmp;
if (y_46_re <= -3.2) {
tmp = t_2 * t_1;
} else if (y_46_re <= 0.0004) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) / (pow(hypot(x_46_re, x_46_im), -y_46_re) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))));
} else {
tmp = t_2 * fma((cos(t_0) * atan2(x_46_im, x_46_re)), y_46_re, t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im) t_1 = sin(t_0) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -3.2) tmp = Float64(t_2 * t_1); elseif (y_46_re <= 0.0004) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) / Float64((hypot(x_46_re, x_46_im) ^ Float64(-y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))); else tmp = Float64(t_2 * fma(Float64(cos(t_0) * atan(x_46_im, x_46_re)), y_46_re, t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.2], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.0004], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] / N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(N[Cos[t$95$0], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
t_1 := \sin t\_0\\
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}\\
\mathbf{if}\;y.re \leq -3.2:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 0.0004:\\
\;\;\;\;\frac{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \mathsf{fma}\left(\cos t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}, y.re, t\_1\right)\\
\end{array}
\end{array}
if y.re < -3.2000000000000002Initial program 45.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6478.1
Applied rewrites78.1%
if -3.2000000000000002 < y.re < 4.00000000000000019e-4Initial program 45.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites87.7%
lift-/.f64N/A
lift-/.f64N/A
div-invN/A
associate-/r*N/A
lower-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
associate-/r*N/A
Applied rewrites87.7%
if 4.00000000000000019e-4 < y.re Initial program 33.9%
Taylor expanded in y.re around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites68.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (* (atan2 x.im x.re) y.re)))
(if (<= y.re -3.2)
(* t_1 (sin (* t_0 y.im)))
(if (<= y.re 3.4)
(/
(pow (exp y.im) (- (atan2 x.im x.re)))
(/
(pow (hypot x.re x.im) (- y.re))
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))))
(* t_1 (fma (* (cos t_2) t_0) y.im (sin t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = atan2(x_46_im, x_46_re) * y_46_re;
double tmp;
if (y_46_re <= -3.2) {
tmp = t_1 * sin((t_0 * y_46_im));
} else if (y_46_re <= 3.4) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) / (pow(hypot(x_46_re, x_46_im), -y_46_re) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))));
} else {
tmp = t_1 * fma((cos(t_2) * t_0), y_46_im, sin(t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_re) tmp = 0.0 if (y_46_re <= -3.2) tmp = Float64(t_1 * sin(Float64(t_0 * y_46_im))); elseif (y_46_re <= 3.4) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) / Float64((hypot(x_46_re, x_46_im) ^ Float64(-y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))); else tmp = Float64(t_1 * fma(Float64(cos(t_2) * t_0), y_46_im, sin(t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -3.2], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.4], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] / N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(N[Cos[t$95$2], $MachinePrecision] * t$95$0), $MachinePrecision] * y$46$im + N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{if}\;y.re \leq -3.2:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 3.4:\\
\;\;\;\;\frac{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(\cos t\_2 \cdot t\_0, y.im, \sin t\_2\right)\\
\end{array}
\end{array}
if y.re < -3.2000000000000002Initial program 45.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6478.1
Applied rewrites78.1%
if -3.2000000000000002 < y.re < 3.39999999999999991Initial program 45.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites88.0%
lift-/.f64N/A
lift-/.f64N/A
div-invN/A
associate-/r*N/A
lower-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
associate-/r*N/A
Applied rewrites88.0%
if 3.39999999999999991 < y.re Initial program 32.7%
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 rewrites61.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -3.9e+15)
(*
(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.im 660.0)
(/
(pow (exp y.im) (- (atan2 x.im x.re)))
(/
(pow (hypot x.re x.im) (- y.re))
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))))
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -3.9e+15) {
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_im <= 660.0) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) / (pow(hypot(x_46_re, x_46_im), -y_46_re) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))));
} else {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -3.9e+15) 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_im <= 660.0) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) / Float64((hypot(x_46_re, x_46_im) ^ Float64(-y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))); else tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -3.9e+15], 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$im, 660.0], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] / N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.9 \cdot 10^{+15}:\\
\;\;\;\;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.im \leq 660:\\
\;\;\;\;\frac{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.im < -3.9e15Initial program 34.6%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6469.5
Applied rewrites69.5%
if -3.9e15 < y.im < 660Initial program 48.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites90.1%
lift-/.f64N/A
lift-/.f64N/A
div-invN/A
associate-/r*N/A
lower-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
associate-/r*N/A
Applied rewrites90.1%
if 660 < y.im Initial program 39.7%
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
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6469.0
Applied rewrites69.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -5.8e+27)
(*
(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.im 290.0)
(pow
(/
(+ 1.0 (* y.im (atan2 x.im x.re)))
(*
(pow (hypot x.im x.re) y.re)
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re))))))
-1.0)
(* (sin (* t_0 y.im)) (exp (* (- y.im) (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -5.8e+27) {
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_im <= 290.0) {
tmp = pow(((1.0 + (y_46_im * atan2(x_46_im, x_46_re))) / (pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))))), -1.0);
} else {
tmp = sin((t_0 * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -5.8e+27) 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_im <= 290.0) tmp = Float64(Float64(1.0 + Float64(y_46_im * atan(x_46_im, x_46_re))) / Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))))) ^ -1.0; else tmp = Float64(sin(Float64(t_0 * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -5.8e+27], 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$im, 290.0], N[Power[N[(N[(1.0 + N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;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.im \leq 290:\\
\;\;\;\;{\left(\frac{1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.im < -5.8000000000000002e27Initial program 37.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6471.1
Applied rewrites71.1%
if -5.8000000000000002e27 < y.im < 290Initial program 47.2%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites88.1%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-*.f64N/A
lower-atan2.f6488.1
Applied rewrites88.1%
if 290 < y.im Initial program 39.7%
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
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6469.0
Applied rewrites69.0%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -3.4e+42)
(* t_1 (sin (* t_0 y.im)))
(if (<= y.re 3.3e-9)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (fma y.re (/ (atan2 x.im x.re) y.im) t_0) y.im)))
(* t_1 (sin (* (atan2 x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -3.4e+42) {
tmp = t_1 * sin((t_0 * y_46_im));
} else if (y_46_re <= 3.3e-9) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), t_0) * y_46_im));
} else {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -3.4e+42) tmp = Float64(t_1 * sin(Float64(t_0 * y_46_im))); elseif (y_46_re <= 3.3e-9) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), t_0) * y_46_im))); else tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e+42], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3e-9], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{-9}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, t\_0\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -3.39999999999999975e42Initial program 44.8%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6479.4
Applied rewrites79.4%
if -3.39999999999999975e42 < y.re < 3.30000000000000018e-9Initial program 44.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6457.2
Applied rewrites57.2%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6485.8
Applied rewrites85.8%
if 3.30000000000000018e-9 < y.re Initial program 37.2%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6461.1
Applied rewrites61.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -3.4e+42) (not (<= y.re 3.3e-9)))
(*
(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)))
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin
(* (fma y.re (/ (atan2 x.im x.re) y.im) (log (hypot x.im x.re))) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.4e+42) || !(y_46_re <= 3.3e-9)) {
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 {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_im, x_46_re))) * y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.4e+42) || !(y_46_re <= 3.3e-9)) 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))); else tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_im, x_46_re))) * y_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.4e+42], N[Not[LessEqual[y$46$re, 3.3e-9]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{+42} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-9}\right):\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -3.39999999999999975e42 or 3.30000000000000018e-9 < y.re Initial program 41.0%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6469.3
Applied rewrites69.3%
if -3.39999999999999975e42 < y.re < 3.30000000000000018e-9Initial program 44.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6457.2
Applied rewrites57.2%
Taylor expanded in y.re around 0
neg-mul-1N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6485.8
Applied rewrites85.8%
Final simplification78.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -7.5e-88) (not (<= y.re 3.2e-21)))
(*
(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)))
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -7.5e-88) || !(y_46_re <= 3.2e-21)) {
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 {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -7.5e-88) || !(y_46_re <= 3.2e-21)) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -7.5e-88) or not (y_46_re <= 3.2e-21): tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -7.5e-88) || !(y_46_re <= 3.2e-21)) 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))); else tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -7.5e-88) || ~((y_46_re <= 3.2e-21))) 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 tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -7.5e-88], N[Not[LessEqual[y$46$re, 3.2e-21]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-88} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-21}\right):\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.re < -7.50000000000000041e-88 or 3.2000000000000002e-21 < y.re Initial program 43.6%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6467.0
Applied rewrites67.0%
if -7.50000000000000041e-88 < y.re < 3.2000000000000002e-21Initial program 42.1%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6469.8
Applied rewrites69.8%
Final simplification68.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1.2e-29)
(pow (/ (pow (hypot x.re x.im) (- y.re)) t_1) -1.0)
(if (<= y.re 4.4e-35)
(* (sin (* t_0 y.im)) (exp (* (- y.im) (atan2 x.im x.re))))
(/ t_1 (exp (* (- 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 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.2e-29) {
tmp = pow((pow(hypot(x_46_re, x_46_im), -y_46_re) / t_1), -1.0);
} else if (y_46_re <= 4.4e-35) {
tmp = sin((t_0 * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 / exp((-y_46_re * t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.2e-29) {
tmp = Math.pow((Math.pow(Math.hypot(x_46_re, x_46_im), -y_46_re) / t_1), -1.0);
} else if (y_46_re <= 4.4e-35) {
tmp = Math.sin((t_0 * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 / Math.exp((-y_46_re * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -1.2e-29: tmp = math.pow((math.pow(math.hypot(x_46_re, x_46_im), -y_46_re) / t_1), -1.0) elif y_46_re <= 4.4e-35: tmp = math.sin((t_0 * y_46_im)) * math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) else: tmp = t_1 / math.exp((-y_46_re * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -1.2e-29) tmp = Float64((hypot(x_46_re, x_46_im) ^ Float64(-y_46_re)) / t_1) ^ -1.0; elseif (y_46_re <= 4.4e-35) tmp = Float64(sin(Float64(t_0 * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 / exp(Float64(Float64(-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 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -1.2e-29) tmp = ((hypot(x_46_re, x_46_im) ^ -y_46_re) / t_1) ^ -1.0; elseif (y_46_re <= 4.4e-35) tmp = sin((t_0 * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); else tmp = t_1 / exp((-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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e-29], N[Power[N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision] / t$95$1), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[y$46$re, 4.4e-35], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[Exp[N[((-y$46$re) * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{-29}:\\
\;\;\;\;{\left(\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}{t\_1}\right)}^{-1}\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{e^{\left(-y.re\right) \cdot t\_0}}\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e-29Initial program 47.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites65.8%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6468.3
Applied rewrites68.3%
Applied rewrites70.7%
if -1.19999999999999996e-29 < y.re < 4.39999999999999987e-35Initial program 44.6%
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
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6467.5
Applied rewrites67.5%
if 4.39999999999999987e-35 < y.re Initial program 34.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites53.0%
lift-/.f64N/A
lift-/.f64N/A
div-invN/A
associate-/r*N/A
lower-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
associate-/r*N/A
Applied rewrites53.0%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6451.9
Applied rewrites51.9%
Final simplification63.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(pow
(/ (pow (hypot x.re x.im) (- y.re)) (sin (* y.re (atan2 x.im x.re))))
-1.0)))
(if (<= y.re -1.2e-29)
t_0
(if (<= y.re 4.4e-35)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow((pow(hypot(x_46_re, x_46_im), -y_46_re) / sin((y_46_re * atan2(x_46_im, x_46_re)))), -1.0);
double tmp;
if (y_46_re <= -1.2e-29) {
tmp = t_0;
} else if (y_46_re <= 4.4e-35) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow((Math.pow(Math.hypot(x_46_re, x_46_im), -y_46_re) / Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)))), -1.0);
double tmp;
if (y_46_re <= -1.2e-29) {
tmp = t_0;
} else if (y_46_re <= 4.4e-35) {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow((math.pow(math.hypot(x_46_re, x_46_im), -y_46_re) / math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))), -1.0) tmp = 0 if y_46_re <= -1.2e-29: tmp = t_0 elif y_46_re <= 4.4e-35: tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_re, x_46_im) ^ Float64(-y_46_re)) / sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ -1.0 tmp = 0.0 if (y_46_re <= -1.2e-29) tmp = t_0; elseif (y_46_re <= 4.4e-35) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((hypot(x_46_re, x_46_im) ^ -y_46_re) / sin((y_46_re * atan2(x_46_im, x_46_re)))) ^ -1.0; tmp = 0.0; if (y_46_re <= -1.2e-29) tmp = t_0; elseif (y_46_re <= 4.4e-35) tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); else tmp = 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[Power[N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $MachinePrecision] / N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e-29], t$95$0, If[LessEqual[y$46$re, 4.4e-35], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{-1}\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{-29}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e-29Initial program 47.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites65.8%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6468.3
Applied rewrites68.3%
Applied rewrites70.7%
if -1.19999999999999996e-29 < y.re < 4.39999999999999987e-35Initial program 44.6%
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
lower-exp.f64N/A
neg-mul-1N/A
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-atan2.f6467.5
Applied rewrites67.5%
if 4.39999999999999987e-35 < y.re Initial program 34.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites53.0%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6451.8
Applied rewrites51.8%
Applied rewrites51.8%
Final simplification63.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.re -0.00026)
(* (pow (- x.re) y.re) t_0)
(if (<= x.re 9.5e-266)
(* (pow (- x.im) y.re) t_0)
(pow
(pow (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)) -1.0)
-1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_re <= -0.00026) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 9.5e-266) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else {
tmp = pow(pow((sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re)), -1.0), -1.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if (x_46re <= (-0.00026d0)) then
tmp = (-x_46re ** y_46re) * t_0
else if (x_46re <= 9.5d-266) then
tmp = (-x_46im ** y_46re) * t_0
else
tmp = ((sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)) ** (-1.0d0)) ** (-1.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (x_46_re <= -0.00026) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 9.5e-266) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else {
tmp = Math.pow(Math.pow((Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re)), -1.0), -1.0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if x_46_re <= -0.00026: tmp = math.pow(-x_46_re, y_46_re) * t_0 elif x_46_re <= 9.5e-266: tmp = math.pow(-x_46_im, y_46_re) * t_0 else: tmp = math.pow(math.pow((math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re)), -1.0), -1.0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (x_46_re <= -0.00026) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); elseif (x_46_re <= 9.5e-266) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); else tmp = (Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) ^ -1.0) ^ -1.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (x_46_re <= -0.00026) tmp = (-x_46_re ^ y_46_re) * t_0; elseif (x_46_re <= 9.5e-266) tmp = (-x_46_im ^ y_46_re) * t_0; else tmp = ((sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) ^ -1.0) ^ -1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -0.00026], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 9.5e-266], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[Power[N[Power[N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], -1.0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.re \leq -0.00026:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.re \leq 9.5 \cdot 10^{-266}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\right)}^{-1}\right)}^{-1}\\
\end{array}
\end{array}
if x.re < -2.59999999999999977e-4Initial program 34.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.f6443.0
Applied rewrites43.0%
Taylor expanded in x.re around -inf
Applied rewrites43.0%
if -2.59999999999999977e-4 < x.re < 9.49999999999999951e-266Initial program 55.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.f6444.0
Applied rewrites44.0%
Taylor expanded in x.im around -inf
Applied rewrites38.4%
if 9.49999999999999951e-266 < x.re Initial program 41.5%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites71.1%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6447.4
Applied rewrites47.4%
Taylor expanded in x.im around 0
Applied rewrites46.1%
Final simplification43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (- y.im) (atan2 x.im x.re)))))
(if (<= y.im 3.4e+59)
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.im 3.7e+242)
(* t_0 (sin (* y.im (log x.im))))
(* t_0 (sin (* (- y.im) (log (/ -1.0 x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 3.4e+59) {
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_im <= 3.7e+242) {
tmp = t_0 * sin((y_46_im * log(x_46_im)));
} else {
tmp = t_0 * sin((-y_46_im * log((-1.0 / x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 3.4e+59) {
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_im <= 3.7e+242) {
tmp = t_0 * Math.sin((y_46_im * Math.log(x_46_im)));
} else {
tmp = t_0 * Math.sin((-y_46_im * Math.log((-1.0 / x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= 3.4e+59: 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_im <= 3.7e+242: tmp = t_0 * math.sin((y_46_im * math.log(x_46_im))) else: tmp = t_0 * math.sin((-y_46_im * math.log((-1.0 / x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= 3.4e+59) 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_im <= 3.7e+242) tmp = Float64(t_0 * sin(Float64(y_46_im * log(x_46_im)))); else tmp = Float64(t_0 * sin(Float64(Float64(-y_46_im) * log(Float64(-1.0 / x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((-y_46_im * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= 3.4e+59) 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_im <= 3.7e+242) tmp = t_0 * sin((y_46_im * log(x_46_im))); else tmp = t_0 * sin((-y_46_im * log((-1.0 / x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 3.4e+59], 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$im, 3.7e+242], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[((-y$46$im) * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq 3.4 \cdot 10^{+59}:\\
\;\;\;\;{\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.im \leq 3.7 \cdot 10^{+242}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(-y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < 3.40000000000000006e59Initial program 44.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.f6453.4
Applied rewrites53.4%
if 3.40000000000000006e59 < y.im < 3.7e242Initial program 39.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.f6421.4
Applied rewrites21.4%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6454.9
Applied rewrites54.9%
Taylor expanded in y.re around 0
Applied rewrites57.1%
if 3.7e242 < y.im Initial program 36.4%
Taylor expanded in x.re around -inf
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-log.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
sub-negN/A
Applied rewrites50.0%
Taylor expanded in y.re around 0
Applied rewrites50.0%
Final simplification53.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 3.4e+59) (* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re))) (* (exp (* (- y.im) (atan2 x.im x.re))) (sin (* y.im (log x.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 3.4e+59) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(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 tmp;
if (y_46_im <= 3.4e+59) {
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 {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 3.4e+59: 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: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 3.4e+59) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 3.4e+59) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); else tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 3.4e+59], 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], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 3.4 \cdot 10^{+59}:\\
\;\;\;\;{\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{else}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if y.im < 3.40000000000000006e59Initial program 44.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.f6453.4
Applied rewrites53.4%
if 3.40000000000000006e59 < y.im Initial program 38.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.f6422.6
Applied rewrites22.6%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
Applied rewrites48.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.im 4.3e+30)
(* (pow (hypot x.im x.re) y.re) t_0)
(* (pow (+ x.im (* 0.5 (/ (* x.re x.re) 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 (y_46_im <= 4.3e+30) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else {
tmp = pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / x_46_im))), y_46_re) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= 4.3e+30) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
} else {
tmp = Math.pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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 y_46_im <= 4.3e+30: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 else: tmp = math.pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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 (y_46_im <= 4.3e+30) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0); else tmp = Float64((Float64(x_46_im + Float64(0.5 * Float64(Float64(x_46_re * x_46_re) / 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 (y_46_im <= 4.3e+30) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; else tmp = ((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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[LessEqual[y$46$im, 4.3e+30], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(x$46$im + N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}\;y.im \leq 4.3 \cdot 10^{+30}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(x.im + 0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if y.im < 4.3e30Initial program 44.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.f6454.3
Applied rewrites54.3%
if 4.3e30 < y.im Initial program 39.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.f6423.3
Applied rewrites23.3%
Taylor expanded in x.re around 0
Applied rewrites38.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -1.6e-19)
(* (pow (+ x.im (* 0.5 (/ (* x.re x.re) x.im))) y.re) t_0)
(if (<= y.re 0.16)
(*
1.0
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.re))))
(* (pow (+ x.re (* 0.5 (/ (* x.im x.im) x.re))) 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 (y_46_re <= -1.6e-19) {
tmp = pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / x_46_im))), y_46_re) * t_0;
} else if (y_46_re <= 0.16) {
tmp = 1.0 * (y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re)));
} else {
tmp = pow((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))), 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 (y_46_re <= -1.6e-19) tmp = Float64((Float64(x_46_im + Float64(0.5 * Float64(Float64(x_46_re * x_46_re) / x_46_im))) ^ y_46_re) * t_0); elseif (y_46_re <= 0.16) tmp = Float64(1.0 * Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re)))); else tmp = Float64((Float64(x_46_re + Float64(0.5 * Float64(Float64(x_46_im * x_46_im) / x_46_re))) ^ y_46_re) * t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.6e-19], N[(N[Power[N[(x$46$im + N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.16], N[(1.0 * N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(x$46$re + N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}\;y.re \leq -1.6 \cdot 10^{-19}:\\
\;\;\;\;{\left(x.im + 0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 0.16:\\
\;\;\;\;1 \cdot \left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right)}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.59999999999999991e-19Initial program 47.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.f6467.1
Applied rewrites67.1%
Taylor expanded in x.re around 0
Applied rewrites67.4%
if -1.59999999999999991e-19 < y.re < 0.160000000000000003Initial program 45.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.f6429.6
Applied rewrites29.6%
Taylor expanded in y.re around 0
Applied rewrites28.4%
Taylor expanded in y.re around 0
Applied rewrites28.4%
if 0.160000000000000003 < y.re Initial program 32.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.f6451.2
Applied rewrites51.2%
Taylor expanded in x.im around 0
Applied rewrites51.2%
(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 -17000000000.0)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 1.45e-253)
(* (pow (- x.re) y.re) t_0)
(* (pow (+ x.im (* 0.5 (/ (* x.re x.re) 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_im <= -17000000000.0) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.45e-253) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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_46im <= (-17000000000.0d0)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 1.45d-253) then
tmp = (-x_46re ** y_46re) * t_0
else
tmp = ((x_46im + (0.5d0 * ((x_46re * x_46re) / 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_im <= -17000000000.0) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.45e-253) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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_im <= -17000000000.0: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 1.45e-253: tmp = math.pow(-x_46_re, y_46_re) * t_0 else: tmp = math.pow((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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_im <= -17000000000.0) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 1.45e-253) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); else tmp = Float64((Float64(x_46_im + Float64(0.5 * Float64(Float64(x_46_re * x_46_re) / 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_im <= -17000000000.0) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 1.45e-253) tmp = (-x_46_re ^ y_46_re) * t_0; else tmp = ((x_46_im + (0.5 * ((x_46_re * x_46_re) / 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[LessEqual[x$46$im, -17000000000.0], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 1.45e-253], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(x$46$im + N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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.im \leq -17000000000:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 1.45 \cdot 10^{-253}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(x.im + 0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.7e10Initial program 33.9%
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.f6451.9
Applied rewrites51.9%
Taylor expanded in x.im around -inf
Applied rewrites49.6%
if -1.7e10 < x.im < 1.4499999999999999e-253Initial program 47.9%
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.f6444.0
Applied rewrites44.0%
Taylor expanded in x.re around -inf
Applied rewrites38.4%
if 1.4499999999999999e-253 < x.im Initial program 44.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.f6442.6
Applied rewrites42.6%
Taylor expanded in x.re around 0
Applied rewrites46.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.re -0.00026)
(* (pow (- x.re) y.re) t_0)
(if (<= x.re 9.5e-266)
(* (pow (- x.im) y.re) t_0)
(* (pow x.re 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 <= -0.00026) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 9.5e-266) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else {
tmp = pow(x_46_re, 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 <= (-0.00026d0)) then
tmp = (-x_46re ** y_46re) * t_0
else if (x_46re <= 9.5d-266) then
tmp = (-x_46im ** y_46re) * t_0
else
tmp = (x_46re ** 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 <= -0.00026) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 9.5e-266) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_re, 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 <= -0.00026: tmp = math.pow(-x_46_re, y_46_re) * t_0 elif x_46_re <= 9.5e-266: tmp = math.pow(-x_46_im, y_46_re) * t_0 else: tmp = math.pow(x_46_re, 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 <= -0.00026) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); elseif (x_46_re <= 9.5e-266) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); else tmp = Float64((x_46_re ^ 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 <= -0.00026) tmp = (-x_46_re ^ y_46_re) * t_0; elseif (x_46_re <= 9.5e-266) tmp = (-x_46_im ^ y_46_re) * t_0; else tmp = (x_46_re ^ 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[LessEqual[x$46$re, -0.00026], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 9.5e-266], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$re, 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 -0.00026:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.re \leq 9.5 \cdot 10^{-266}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.re < -2.59999999999999977e-4Initial program 34.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.f6443.0
Applied rewrites43.0%
Taylor expanded in x.re around -inf
Applied rewrites43.0%
if -2.59999999999999977e-4 < x.re < 9.49999999999999951e-266Initial program 55.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.f6444.0
Applied rewrites44.0%
Taylor expanded in x.im around -inf
Applied rewrites38.4%
if 9.49999999999999951e-266 < x.re Initial program 41.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.f6447.4
Applied rewrites47.4%
Taylor expanded in x.im around 0
Applied rewrites46.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -0.0185) (not (<= y.re 0.066))) (* (pow x.re y.re) (sin (* (atan2 x.im x.re) y.re))) (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.0185) || !(y_46_re <= 0.066)) {
tmp = pow(x_46_re, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = y_46_re * atan2(x_46_im, x_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 ((y_46re <= (-0.0185d0)) .or. (.not. (y_46re <= 0.066d0))) then
tmp = (x_46re ** y_46re) * sin((atan2(x_46im, x_46re) * y_46re))
else
tmp = y_46re * atan2(x_46im, x_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 ((y_46_re <= -0.0185) || !(y_46_re <= 0.066)) {
tmp = Math.pow(x_46_re, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -0.0185) or not (y_46_re <= 0.066): tmp = math.pow(x_46_re, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = y_46_re * math.atan2(x_46_im, x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -0.0185) || !(y_46_re <= 0.066)) tmp = Float64((x_46_re ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -0.0185) || ~((y_46_re <= 0.066))) tmp = (x_46_re ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); else tmp = y_46_re * atan2(x_46_im, x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -0.0185], N[Not[LessEqual[y$46$re, 0.066]], $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], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.0185 \lor \neg \left(y.re \leq 0.066\right):\\
\;\;\;\;{x.re}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\end{array}
\end{array}
if y.re < -0.0184999999999999991 or 0.066000000000000003 < y.re Initial program 40.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.f6461.3
Applied rewrites61.3%
Taylor expanded in x.im around 0
Applied rewrites54.1%
if -0.0184999999999999991 < y.re < 0.066000000000000003Initial program 45.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.f6430.4
Applied rewrites30.4%
Taylor expanded in y.re around 0
Applied rewrites29.3%
Taylor expanded in y.re around 0
Applied rewrites28.4%
Final simplification40.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -27.5) (not (<= y.re 1.72e+19))) (* (pow x.im y.re) (sin (* (atan2 x.im x.re) y.re))) (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -27.5) || !(y_46_re <= 1.72e+19)) {
tmp = pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = y_46_re * atan2(x_46_im, x_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 ((y_46re <= (-27.5d0)) .or. (.not. (y_46re <= 1.72d+19))) then
tmp = (x_46im ** y_46re) * sin((atan2(x_46im, x_46re) * y_46re))
else
tmp = y_46re * atan2(x_46im, x_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 ((y_46_re <= -27.5) || !(y_46_re <= 1.72e+19)) {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -27.5) or not (y_46_re <= 1.72e+19): tmp = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = y_46_re * math.atan2(x_46_im, x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -27.5) || !(y_46_re <= 1.72e+19)) tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -27.5) || ~((y_46_re <= 1.72e+19))) tmp = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); else tmp = y_46_re * atan2(x_46_im, x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -27.5], N[Not[LessEqual[y$46$re, 1.72e+19]], $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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -27.5 \lor \neg \left(y.re \leq 1.72 \cdot 10^{+19}\right):\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\end{array}
\end{array}
if y.re < -27.5 or 1.72e19 < y.re Initial program 40.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.f6462.3
Applied rewrites62.3%
Taylor expanded in x.re around 0
Applied rewrites40.3%
if -27.5 < y.re < 1.72e19Initial program 45.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.f6431.1
Applied rewrites31.1%
Taylor expanded in y.re around 0
Applied rewrites28.0%
Taylor expanded in y.re around 0
Applied rewrites27.1%
Final simplification33.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (pow (/ (pow (atan2 x.im x.re) -1.0) y.re) -1.0))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return pow((pow(atan2(x_46_im, x_46_re), -1.0) / y_46_re), -1.0);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((atan2(x_46im, x_46re) ** (-1.0d0)) / y_46re) ** (-1.0d0)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow((Math.pow(Math.atan2(x_46_im, x_46_re), -1.0) / y_46_re), -1.0);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow((math.pow(math.atan2(x_46_im, x_46_re), -1.0) / y_46_re), -1.0)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((atan(x_46_im, x_46_re) ^ -1.0) / y_46_re) ^ -1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((atan2(x_46_im, x_46_re) ^ -1.0) / y_46_re) ^ -1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Power[N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], -1.0], $MachinePrecision] / y$46$re), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{{\tan^{-1}_* \frac{x.im}{x.re}}^{-1}}{y.re}\right)}^{-1}
\end{array}
Initial program 43.1%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites71.4%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6445.2
Applied rewrites45.2%
Taylor expanded in y.re around 0
Applied rewrites18.4%
Applied rewrites18.8%
Final simplification18.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 43.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.f6445.2
Applied rewrites45.2%
Taylor expanded in y.re around 0
Applied rewrites23.2%
Taylor expanded in y.re around 0
Applied rewrites18.4%
herbie shell --seed 2024299
(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)))))