
(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 18 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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -8.5e-38)
(* (sin t_0) t_1)
(if (<= y.re 48.0)
(/
(/
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (exp y.im) (atan2 x.im x.re)))
(pow (hypot x.re x.im) (- y.re)))
(* (sin (* (log (hypot x.im x.re)) y.im)) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.5e-38) {
tmp = sin(t_0) * t_1;
} else if (y_46_re <= 48.0) {
tmp = (sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) / pow(hypot(x_46_re, x_46_im), -y_46_re);
} else {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -8.5e-38) tmp = Float64(sin(t_0) * t_1); elseif (y_46_re <= 48.0) tmp = Float64(Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) / (hypot(x_46_re, x_46_im) ^ Float64(-y_46_re))); else tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-38], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 48.0], N[(N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], (-y$46$re)], $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] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-38}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 48:\\
\;\;\;\;\frac{\frac{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(-y.re\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -8.50000000000000046e-38Initial program 32.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.3
Applied rewrites82.3%
if -8.50000000000000046e-38 < y.re < 48Initial program 49.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites85.4%
lift-/.f64N/A
lift-/.f64N/A
div-invN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites85.4%
if 48 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6466.2
Applied rewrites66.2%
Final simplification79.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_2 (log (hypot x.im x.re))))
(if (<= y.re -8.5e-38)
(* (sin t_0) t_1)
(if (<= y.re 48.0)
(/
(sin (fma y.im t_2 t_0))
(/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
(* (sin (* t_2 y.im)) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -8.5e-38) {
tmp = sin(t_0) * t_1;
} else if (y_46_re <= 48.0) {
tmp = sin(fma(y_46_im, t_2, t_0)) / (pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / pow(hypot(x_46_im, x_46_re), y_46_re));
} else {
tmp = sin((t_2 * y_46_im)) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -8.5e-38) tmp = Float64(sin(t_0) * t_1); elseif (y_46_re <= 48.0) tmp = Float64(sin(fma(y_46_im, t_2, t_0)) / Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / (hypot(x_46_im, x_46_re) ^ y_46_re))); else tmp = Float64(sin(Float64(t_2 * y_46_im)) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-38], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 48.0], N[(N[Sin[N[(y$46$im * t$95$2 + t$95$0), $MachinePrecision]], $MachinePrecision] / N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$2 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-38}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 48:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(y.im, t\_2, t\_0\right)\right)}{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_2 \cdot y.im\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -8.50000000000000046e-38Initial program 32.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.3
Applied rewrites82.3%
if -8.50000000000000046e-38 < y.re < 48Initial program 49.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites85.4%
if 48 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6466.2
Applied rewrites66.2%
Final simplification79.7%
(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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -8.5e-38)
(* (sin t_1) t_2)
(if (<= y.re 48.0)
(/
(* (pow (hypot x.im x.re) y.re) (sin (fma y.im t_0 t_1)))
(pow (exp y.im) (atan2 x.im x.re)))
(* (sin (* t_0 y.im)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.5e-38) {
tmp = sin(t_1) * t_2;
} else if (y_46_re <= 48.0) {
tmp = (pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_im, t_0, t_1))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = sin((t_0 * y_46_im)) * 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 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -8.5e-38) tmp = Float64(sin(t_1) * t_2); elseif (y_46_re <= 48.0) tmp = Float64(Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(y_46_im, t_0, t_1))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); else tmp = Float64(sin(Float64(t_0 * y_46_im)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-38], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 48.0], N[(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 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$2), $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 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-38}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 48:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot t\_2\\
\end{array}
\end{array}
if y.re < -8.50000000000000046e-38Initial program 32.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.3
Applied rewrites82.3%
if -8.50000000000000046e-38 < y.re < 48Initial program 49.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites85.4%
if 48 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6466.2
Applied rewrites66.2%
Final simplification79.7%
(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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -8.5e-38)
(* (sin t_1) t_2)
(if (<= y.re 48.0)
(*
(* (pow (exp (atan2 x.im x.re)) (- y.im)) (sin (fma y.im t_0 t_1)))
(pow (hypot x.im x.re) y.re))
(* (sin (* t_0 y.im)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.5e-38) {
tmp = sin(t_1) * t_2;
} else if (y_46_re <= 48.0) {
tmp = (pow(exp(atan2(x_46_im, x_46_re)), -y_46_im) * sin(fma(y_46_im, t_0, t_1))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((t_0 * y_46_im)) * 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 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -8.5e-38) tmp = Float64(sin(t_1) * t_2); elseif (y_46_re <= 48.0) tmp = Float64(Float64((exp(atan(x_46_im, x_46_re)) ^ Float64(-y_46_im)) * sin(fma(y_46_im, t_0, t_1))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(t_0 * y_46_im)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-38], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 48.0], N[(N[(N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], (-y$46$im)], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$2), $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 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-38}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 48:\\
\;\;\;\;\left({\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{\left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot t\_2\\
\end{array}
\end{array}
if y.re < -8.50000000000000046e-38Initial program 32.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.3
Applied rewrites82.3%
if -8.50000000000000046e-38 < y.re < 48Initial program 49.0%
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
sub-negN/A
exp-sumN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites85.3%
if 48 < y.re Initial program 29.2%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6466.2
Applied rewrites66.2%
Final simplification79.7%
(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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -8.5e-38)
(* (sin t_1) t_2)
(if (<= y.re 62.0)
(*
1.0
(* (pow (exp (atan2 x.im x.re)) (- y.im)) (sin (fma y.im t_0 t_1))))
(* (sin (* t_0 y.im)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.5e-38) {
tmp = sin(t_1) * t_2;
} else if (y_46_re <= 62.0) {
tmp = 1.0 * (pow(exp(atan2(x_46_im, x_46_re)), -y_46_im) * sin(fma(y_46_im, t_0, t_1)));
} else {
tmp = sin((t_0 * y_46_im)) * 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 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -8.5e-38) tmp = Float64(sin(t_1) * t_2); elseif (y_46_re <= 62.0) tmp = Float64(1.0 * Float64((exp(atan(x_46_im, x_46_re)) ^ Float64(-y_46_im)) * sin(fma(y_46_im, t_0, t_1)))); else tmp = Float64(sin(Float64(t_0 * y_46_im)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-38], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 62.0], N[(1.0 * N[(N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], (-y$46$im)], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$2), $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 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-38}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 62:\\
\;\;\;\;1 \cdot \left({\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{\left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot t\_2\\
\end{array}
\end{array}
if y.re < -8.50000000000000046e-38Initial program 32.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6482.3
Applied rewrites82.3%
if -8.50000000000000046e-38 < y.re < 62Initial program 48.6%
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
sub-negN/A
exp-sumN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites84.6%
Taylor expanded in y.re around 0
Applied rewrites82.3%
if 62 < y.re Initial program 29.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.2
Applied rewrites67.2%
Final simplification78.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1
(exp (- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0)))
(t_2 (sin (* (log (hypot x.im x.re)) y.im)))
(t_3 (* (atan2 x.im x.re) y.re))
(t_4 (log (/ -1.0 x.im))))
(if (<= y.re -1.1e-102)
(* (sin t_3) t_1)
(if (<= y.re 1.2e-18)
(* (exp (* (- y.im) (atan2 x.im x.re))) t_2)
(if (<= y.re 62.0)
(* (exp (- (fma t_4 y.re t_0))) (sin (fma (- y.im) t_4 t_3)))
(* t_2 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - t_0));
double t_2 = sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double t_3 = atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = log((-1.0 / x_46_im));
double tmp;
if (y_46_re <= -1.1e-102) {
tmp = sin(t_3) * t_1;
} else if (y_46_re <= 1.2e-18) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_2;
} else if (y_46_re <= 62.0) {
tmp = exp(-fma(t_4, y_46_re, t_0)) * sin(fma(-y_46_im, t_4, t_3));
} else {
tmp = t_2 * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - t_0)) t_2 = sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_4 = log(Float64(-1.0 / x_46_im)) tmp = 0.0 if (y_46_re <= -1.1e-102) tmp = Float64(sin(t_3) * t_1); elseif (y_46_re <= 1.2e-18) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_2); elseif (y_46_re <= 62.0) tmp = Float64(exp(Float64(-fma(t_4, y_46_re, t_0))) * sin(fma(Float64(-y_46_im), t_4, t_3))); else tmp = Float64(t_2 * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$4 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-102], N[(N[Sin[t$95$3], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.2e-18], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 62.0], N[(N[Exp[(-N[(t$95$4 * y$46$re + t$95$0), $MachinePrecision])], $MachinePrecision] * N[Sin[N[((-y$46$im) * t$95$4 + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\
t_2 := \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_4 := \log \left(\frac{-1}{x.im}\right)\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-102}:\\
\;\;\;\;\sin t\_3 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-18}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 62:\\
\;\;\;\;e^{-\mathsf{fma}\left(t\_4, y.re, t\_0\right)} \cdot \sin \left(\mathsf{fma}\left(-y.im, t\_4, t\_3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.10000000000000006e-102Initial program 32.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6477.6
Applied rewrites77.6%
if -1.10000000000000006e-102 < y.re < 1.19999999999999997e-18Initial program 49.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
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.9
Applied rewrites69.9%
if 1.19999999999999997e-18 < y.re < 62Initial program 60.7%
Taylor expanded in x.im 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 rewrites68.2%
if 62 < y.re Initial program 29.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.2
Applied rewrites67.2%
Final simplification71.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -1.9e-257)
(* (exp (- (fma t_2 y.re t_0))) (sin (fma (- y.im) t_2 t_1)))
(if (<= x.re 3e-150)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0)))
(*
(sin (fma y.im (log x.re) t_1))
(exp (- (* (log 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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -1.9e-257) {
tmp = exp(-fma(t_2, y_46_re, t_0)) * sin(fma(-y_46_im, t_2, t_1));
} else if (x_46_re <= 3e-150) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - t_0));
} else {
tmp = sin(fma(y_46_im, log(x_46_re), t_1)) * exp(((log(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 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -1.9e-257) tmp = Float64(exp(Float64(-fma(t_2, y_46_re, t_0))) * sin(fma(Float64(-y_46_im), t_2, t_1))); elseif (x_46_re <= 3e-150) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - t_0))); else tmp = Float64(sin(fma(y_46_im, log(x_46_re), t_1)) * exp(Float64(Float64(log(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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.9e-257], N[(N[Exp[(-N[(t$95$2 * y$46$re + t$95$0), $MachinePrecision])], $MachinePrecision] * N[Sin[N[((-y$46$im) * t$95$2 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3e-150], 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1.9 \cdot 10^{-257}:\\
\;\;\;\;e^{-\mathsf{fma}\left(t\_2, y.re, t\_0\right)} \cdot \sin \left(\mathsf{fma}\left(-y.im, t\_2, t\_1\right)\right)\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-150}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right) \cdot e^{\log x.re \cdot y.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.9000000000000002e-257Initial program 41.7%
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 rewrites73.3%
if -1.9000000000000002e-257 < x.re < 3.0000000000000002e-150Initial program 30.5%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6464.6
Applied rewrites64.6%
if 3.0000000000000002e-150 < x.re Initial program 41.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.6
Applied rewrites45.6%
Taylor expanded in x.im 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.f6471.7
Applied rewrites71.7%
Final simplification71.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (sin (* (log (hypot x.im x.re)) y.im))))
(if (<= y.re -1.1e-102)
(* (sin (* (atan2 x.im x.re) y.re)) t_0)
(if (<= y.re 62.0)
(* (exp (* (- y.im) (atan2 x.im x.re))) t_1)
(* t_1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_re <= -1.1e-102) {
tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * t_0;
} else if (y_46_re <= 62.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_1;
} else {
tmp = t_1 * 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.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double t_1 = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_re <= -1.1e-102) {
tmp = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * t_0;
} else if (y_46_re <= 62.0) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * t_1;
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) t_1 = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0 if y_46_re <= -1.1e-102: tmp = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * t_0 elif y_46_re <= 62.0: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * t_1 else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0.0 if (y_46_re <= -1.1e-102) tmp = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * t_0); elseif (y_46_re <= 62.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_1); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); t_1 = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); tmp = 0.0; if (y_46_re <= -1.1e-102) tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * t_0; elseif (y_46_re <= 62.0) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_1; else tmp = t_1 * 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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-102], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 62.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-102}:\\
\;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 62:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.10000000000000006e-102Initial program 32.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6477.6
Applied rewrites77.6%
if -1.10000000000000006e-102 < y.re < 62Initial program 50.2%
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.f6465.9
Applied rewrites65.9%
if 62 < y.re Initial program 29.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.2
Applied rewrites67.2%
Final simplification69.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* (atan2 x.im x.re) y.re))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))))
(if (<= y.re -1.1e-102)
t_0
(if (<= y.re 2.7e-8)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.1e-102) {
tmp = t_0;
} else if (y_46_re <= 2.7e-8) {
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 = 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)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.1e-102) {
tmp = t_0;
} else if (y_46_re <= 2.7e-8) {
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 = 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)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.1e-102: tmp = t_0 elif y_46_re <= 2.7e-8: 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 = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -1.1e-102) tmp = t_0; elseif (y_46_re <= 2.7e-8) 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 = 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)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.1e-102) tmp = t_0; elseif (y_46_re <= 2.7e-8) 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 = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-102], t$95$0, If[LessEqual[y$46$re, 2.7e-8], 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], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-8}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.10000000000000006e-102 or 2.70000000000000002e-8 < y.re Initial program 33.0%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6467.6
Applied rewrites67.6%
if -1.10000000000000006e-102 < y.re < 2.70000000000000002e-8Initial program 49.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
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.6
Applied rewrites69.6%
Final simplification68.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -2.7e-76)
t_0
(if (<= y.re 4e-8)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -2.7e-76) {
tmp = t_0;
} else if (y_46_re <= 4e-8) {
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 = 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.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -2.7e-76) {
tmp = t_0;
} else if (y_46_re <= 4e-8) {
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 = t_0;
}
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) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -2.7e-76: tmp = t_0 elif y_46_re <= 4e-8: 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 = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -2.7e-76) tmp = t_0; elseif (y_46_re <= 4e-8) 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 = 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_im, x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -2.7e-76) tmp = t_0; elseif (y_46_re <= 4e-8) 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 = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[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, -2.7e-76], t$95$0, If[LessEqual[y$46$re, 4e-8], 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], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\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{if}\;y.re \leq -2.7 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{-8}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -2.7e-76 or 4.0000000000000001e-8 < y.re Initial program 33.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.f6464.9
Applied rewrites64.9%
if -2.7e-76 < y.re < 4.0000000000000001e-8Initial program 48.9%
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.5
Applied rewrites69.5%
Final simplification66.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 -6400.0)
(*
(pow (* (+ (* (/ (* x.im x.im) (* x.re x.re)) 0.5) 1.0) x.re) y.re)
t_0)
(* (pow (hypot 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_im <= -6400.0) {
tmp = pow((((((x_46_im * x_46_im) / (x_46_re * x_46_re)) * 0.5) + 1.0) * x_46_re), y_46_re) * t_0;
} else {
tmp = pow(hypot(x_46_im, x_46_re), 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 <= -6400.0) {
tmp = Math.pow((((((x_46_im * x_46_im) / (x_46_re * x_46_re)) * 0.5) + 1.0) * x_46_re), y_46_re) * t_0;
} else {
tmp = Math.pow(Math.hypot(x_46_im, 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 y_46_im <= -6400.0: tmp = math.pow((((((x_46_im * x_46_im) / (x_46_re * x_46_re)) * 0.5) + 1.0) * x_46_re), y_46_re) * t_0 else: tmp = math.pow(math.hypot(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_im <= -6400.0) tmp = Float64((Float64(Float64(Float64(Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re)) * 0.5) + 1.0) * x_46_re) ^ y_46_re) * t_0); else tmp = Float64((hypot(x_46_im, 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 (y_46_im <= -6400.0) tmp = ((((((x_46_im * x_46_im) / (x_46_re * x_46_re)) * 0.5) + 1.0) * x_46_re) ^ y_46_re) * t_0; else tmp = (hypot(x_46_im, 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[y$46$im, -6400.0], N[(N[Power[N[(N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] + 1.0), $MachinePrecision] * x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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 -6400:\\
\;\;\;\;{\left(\left(\frac{x.im \cdot x.im}{x.re \cdot x.re} \cdot 0.5 + 1\right) \cdot x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if y.im < -6400Initial program 17.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.9
Applied rewrites30.9%
Taylor expanded in x.re around inf
Applied rewrites42.9%
if -6400 < y.im Initial program 46.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.f6451.0
Applied rewrites51.0%
Final simplification49.1%
(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 -5.8e-33)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 2.7e-88)
(* (pow (- x.re) y.re) t_0)
(* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) 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 <= -5.8e-33) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 2.7e-88) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + 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 <= (-5.8d-33)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 2.7d-88) then
tmp = (-x_46re ** y_46re) * t_0
else
tmp = (((((x_46re * x_46re) / x_46im) * 0.5d0) + 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 <= -5.8e-33) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 2.7e-88) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + 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 <= -5.8e-33: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 2.7e-88: tmp = math.pow(-x_46_re, y_46_re) * t_0 else: tmp = math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + 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 <= -5.8e-33) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 2.7e-88) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); else tmp = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + 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 <= -5.8e-33) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 2.7e-88) tmp = (-x_46_re ^ y_46_re) * t_0; else tmp = (((((x_46_re * x_46_re) / x_46_im) * 0.5) + 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, -5.8e-33], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 2.7e-88], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $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 -5.8 \cdot 10^{-33}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 2.7 \cdot 10^{-88}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -5.80000000000000005e-33Initial program 25.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.f6449.7
Applied rewrites49.7%
Taylor expanded in x.im around -inf
Applied rewrites49.7%
if -5.80000000000000005e-33 < x.im < 2.69999999999999995e-88Initial program 52.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.f6444.5
Applied rewrites44.5%
Taylor expanded in x.re around -inf
Applied rewrites41.3%
if 2.69999999999999995e-88 < x.im Initial program 32.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.f6446.5
Applied rewrites46.5%
Taylor expanded in x.re around 0
Applied rewrites49.9%
Final simplification46.0%
(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 -5.8e-33)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 1.5e-47)
(* (pow (- x.re) y.re) t_0)
(* (pow (* x.im x.im) (* 0.5 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 <= -5.8e-33) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.5e-47) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = pow((x_46_im * x_46_im), (0.5 * 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 <= (-5.8d-33)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 1.5d-47) then
tmp = (-x_46re ** y_46re) * t_0
else
tmp = ((x_46im * x_46im) ** (0.5d0 * 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 <= -5.8e-33) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.5e-47) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow((x_46_im * x_46_im), (0.5 * 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 <= -5.8e-33: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 1.5e-47: tmp = math.pow(-x_46_re, y_46_re) * t_0 else: tmp = math.pow((x_46_im * x_46_im), (0.5 * 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 <= -5.8e-33) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 1.5e-47) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); else tmp = Float64((Float64(x_46_im * x_46_im) ^ Float64(0.5 * 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 <= -5.8e-33) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 1.5e-47) tmp = (-x_46_re ^ y_46_re) * t_0; else tmp = ((x_46_im * x_46_im) ^ (0.5 * 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, -5.8e-33], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 1.5e-47], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(0.5 * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.im \leq -5.8 \cdot 10^{-33}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 1.5 \cdot 10^{-47}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(0.5 \cdot y.re\right)} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -5.80000000000000005e-33Initial program 25.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.f6449.7
Applied rewrites49.7%
Taylor expanded in x.im around -inf
Applied rewrites49.7%
if -5.80000000000000005e-33 < x.im < 1.50000000000000008e-47Initial program 51.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.f6443.9
Applied rewrites43.9%
Taylor expanded in x.re around -inf
Applied rewrites40.8%
if 1.50000000000000008e-47 < x.im Initial program 31.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.f6447.9
Applied rewrites47.9%
Taylor expanded in x.re around 0
Applied rewrites48.0%
Applied rewrites52.0%
Final simplification46.0%
(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 -1.55e-133)
(* (pow (- x.re) y.re) t_0)
(if (<= x.re 0.48) (* (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 <= -1.55e-133) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 0.48) {
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 <= (-1.55d-133)) then
tmp = (-x_46re ** y_46re) * t_0
else if (x_46re <= 0.48d0) 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 <= -1.55e-133) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 0.48) {
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 <= -1.55e-133: tmp = math.pow(-x_46_re, y_46_re) * t_0 elif x_46_re <= 0.48: 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 <= -1.55e-133) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); elseif (x_46_re <= 0.48) 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 <= -1.55e-133) tmp = (-x_46_re ^ y_46_re) * t_0; elseif (x_46_re <= 0.48) 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, -1.55e-133], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 0.48], 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 -1.55 \cdot 10^{-133}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.re \leq 0.48:\\
\;\;\;\;{\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 < -1.55000000000000008e-133Initial program 36.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.f6444.6
Applied rewrites44.6%
Taylor expanded in x.re around -inf
Applied rewrites44.6%
if -1.55000000000000008e-133 < x.re < 0.47999999999999998Initial program 46.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.f6450.5
Applied rewrites50.5%
Taylor expanded in x.im around -inf
Applied rewrites47.7%
if 0.47999999999999998 < x.re Initial program 34.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.f6443.0
Applied rewrites43.0%
Taylor expanded in x.im around 0
Applied rewrites42.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 -1.45e-22)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 1e-47) (* (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_im <= -1.45e-22) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1e-47) {
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_46im <= (-1.45d-22)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 1d-47) 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_im <= -1.45e-22) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1e-47) {
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_im <= -1.45e-22: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 1e-47: 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_im <= -1.45e-22) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 1e-47) 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_im <= -1.45e-22) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 1e-47) 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[LessEqual[x$46$im, -1.45e-22], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 1e-47], 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.im \leq -1.45 \cdot 10^{-22}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 10^{-47}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.4500000000000001e-22Initial program 24.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.9
Applied rewrites48.9%
Taylor expanded in x.im around -inf
Applied rewrites48.9%
if -1.4500000000000001e-22 < x.im < 9.9999999999999997e-48Initial program 51.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.f6444.3
Applied rewrites44.3%
Taylor expanded in x.im around 0
Applied rewrites35.9%
if 9.9999999999999997e-48 < x.im Initial program 31.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.f6447.9
Applied rewrites47.9%
Taylor expanded in x.re around 0
Applied rewrites48.0%
(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 x.im y.re) t_0))) (if (<= y.re -4.5e+15) t_1 (if (<= y.re 114000.0) (* 1.0 t_0) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -4.5e+15) {
tmp = t_1;
} else if (y_46_re <= 114000.0) {
tmp = 1.0 * t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
t_1 = (x_46im ** y_46re) * t_0
if (y_46re <= (-4.5d+15)) then
tmp = t_1
else if (y_46re <= 114000.0d0) then
tmp = 1.0d0 * t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -4.5e+15) {
tmp = t_1;
} else if (y_46_re <= 114000.0) {
tmp = 1.0 * t_0;
} 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(x_46_im, y_46_re) * t_0 tmp = 0 if y_46_re <= -4.5e+15: tmp = t_1 elif y_46_re <= 114000.0: tmp = 1.0 * t_0 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((x_46_im ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -4.5e+15) tmp = t_1; elseif (y_46_re <= 114000.0) tmp = Float64(1.0 * t_0); 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 = (x_46_im ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -4.5e+15) tmp = t_1; elseif (y_46_re <= 114000.0) tmp = 1.0 * t_0; 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[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e+15], t$95$1, If[LessEqual[y$46$re, 114000.0], N[(1.0 * t$95$0), $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 := {x.im}^{y.re} \cdot t\_0\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 114000:\\
\;\;\;\;1 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -4.5e15 or 114000 < y.re Initial program 30.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.f6468.4
Applied rewrites68.4%
Taylor expanded in x.re around 0
Applied rewrites52.5%
if -4.5e15 < y.re < 114000Initial 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.f6426.0
Applied rewrites26.0%
Taylor expanded in y.re around 0
Applied rewrites24.1%
(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 1e-47) (* (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_im <= 1e-47) {
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_46im <= 1d-47) 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_im <= 1e-47) {
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_im <= 1e-47: 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_im <= 1e-47) 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_im <= 1e-47) 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[LessEqual[x$46$im, 1e-47], 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.im \leq 10^{-47}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < 9.9999999999999997e-48Initial program 42.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.f6445.8
Applied rewrites45.8%
Taylor expanded in x.im around 0
Applied rewrites34.3%
if 9.9999999999999997e-48 < x.im Initial program 31.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.f6447.9
Applied rewrites47.9%
Taylor expanded in x.re around 0
Applied rewrites48.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* 1.0 (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 1.0 * 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 = 1.0d0 * 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 1.0 * 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 1.0 * 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(1.0 * 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 = 1.0 * 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[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
Initial program 39.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.f6446.4
Applied rewrites46.4%
Taylor expanded in y.re around 0
Applied rewrites14.9%
herbie shell --seed 2024288
(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)))))