
(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 15 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))))
(if (or (<= y.re -7.8e+15) (not (<= y.re 136000.0)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* t_0 y.im)))
(/
(*
(pow (hypot x.im x.re) y.re)
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
(pow (pow (exp y.im) 2.0) (* (atan2 x.im x.re) 0.5))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -7.8e+15) || !(y_46_re <= 136000.0)) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 * y_46_im));
} else {
tmp = (pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))))) / pow(pow(exp(y_46_im), 2.0), (atan2(x_46_im, x_46_re) * 0.5));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -7.8e+15) || !(y_46_re <= 136000.0)) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 * y_46_im))); else tmp = Float64(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))))) / ((exp(y_46_im) ^ 2.0) ^ Float64(atan(x_46_im, x_46_re) * 0.5))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -7.8e+15], N[Not[LessEqual[y$46$re, 136000.0]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[N[Exp[y$46$im], $MachinePrecision], 2.0], $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -7.8 \cdot 10^{+15} \lor \neg \left(y.re \leq 136000\right):\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\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)}{{\left({\left(e^{y.im}\right)}^{2}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot 0.5\right)}}\\
\end{array}
\end{array}
if y.re < -7.8e15 or 136000 < y.re Initial program 39.1%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6479.0
Applied rewrites79.0%
if -7.8e15 < y.re < 136000Initial program 46.5%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites86.0%
lift-pow.f64N/A
sqr-powN/A
pow-prod-downN/A
lower-pow.f64N/A
pow2N/A
lower-pow.f64N/A
div-invN/A
metadata-evalN/A
lower-*.f6486.0
Applied rewrites86.0%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.re -7.8e+15) (not (<= y.re 136000.0)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* t_0 y.im)))
(/
(*
(pow (hypot x.im x.re) y.re)
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
(pow (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_re <= -7.8e+15) || !(y_46_re <= 136000.0)) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 * y_46_im));
} else {
tmp = (pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))))) / pow(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_re <= -7.8e+15) || !(y_46_re <= 136000.0)) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 * y_46_im))); else tmp = Float64(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))))) / (exp(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[Or[LessEqual[y$46$re, -7.8e+15], N[Not[LessEqual[y$46$re, 136000.0]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -7.8 \cdot 10^{+15} \lor \neg \left(y.re \leq 136000\right):\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\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)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -7.8e15 or 136000 < y.re Initial program 39.1%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6479.0
Applied rewrites79.0%
if -7.8e15 < y.re < 136000Initial program 46.5%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites86.0%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (- y.im) (atan2 x.im x.re))))
(t_1
(*
t_0
(sin
(*
y.re
(fma y.im (/ (log (hypot x.re x.im)) y.re) (atan2 x.im x.re))))))
(t_2
(/
(pow (hypot x.re x.im) y.re)
(pow (* y.re (atan2 x.im x.re)) -1.0))))
(if (<= y.re -1.3)
t_2
(if (<= y.re -4.7e-176)
t_1
(if (<= y.re 5.2e-158)
(* (sin (* (log (hypot x.im x.re)) y.im)) t_0)
(if (<= y.re 3300000000000.0)
t_1
(if (<= y.re 2e+192)
(*
(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)))
t_2)))))))
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 t_1 = t_0 * sin((y_46_re * fma(y_46_im, (log(hypot(x_46_re, x_46_im)) / y_46_re), atan2(x_46_im, x_46_re))));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -1.3) {
tmp = t_2;
} else if (y_46_re <= -4.7e-176) {
tmp = t_1;
} else if (y_46_re <= 5.2e-158) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_0;
} else if (y_46_re <= 3300000000000.0) {
tmp = t_1;
} else if (y_46_re <= 2e+192) {
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 = t_2;
}
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))) t_1 = Float64(t_0 * sin(Float64(y_46_re * fma(y_46_im, Float64(log(hypot(x_46_re, x_46_im)) / y_46_re), atan(x_46_im, x_46_re))))) t_2 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)) tmp = 0.0 if (y_46_re <= -1.3) tmp = t_2; elseif (y_46_re <= -4.7e-176) tmp = t_1; elseif (y_46_re <= 5.2e-158) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_0); elseif (y_46_re <= 3300000000000.0) tmp = t_1; elseif (y_46_re <= 2e+192) 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 = t_2; end return 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]}, Block[{t$95$1 = N[(t$95$0 * N[Sin[N[(y$46$re * N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.3], t$95$2, If[LessEqual[y$46$re, -4.7e-176], t$95$1, If[LessEqual[y$46$re, 5.2e-158], 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$0), $MachinePrecision], If[LessEqual[y$46$re, 3300000000000.0], t$95$1, If[LessEqual[y$46$re, 2e+192], 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], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := t\_0 \cdot \sin \left(y.re \cdot \mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_2 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{if}\;y.re \leq -1.3:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -4.7 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 3300000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+192}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.30000000000000004 or 2.00000000000000008e192 < y.re Initial program 41.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites68.1%
Applied rewrites68.1%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6467.1
Applied rewrites67.1%
Taylor expanded in y.re around 0
Applied rewrites76.7%
if -1.30000000000000004 < y.re < -4.69999999999999984e-176 or 5.2000000000000001e-158 < y.re < 3.3e12Initial program 45.1%
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.f6452.1
Applied rewrites52.1%
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.f6482.5
Applied rewrites82.5%
Taylor expanded in y.re around inf
Applied rewrites76.2%
if -4.69999999999999984e-176 < y.re < 5.2000000000000001e-158Initial program 49.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.f6482.1
Applied rewrites82.1%
if 3.3e12 < y.re < 2.00000000000000008e192Initial program 32.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.7
Applied rewrites57.7%
Final simplification74.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -0.68) (not (<= y.re 9.5e+32)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* (log (hypot x.im x.re)) y.im)))
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin
(fma
(* (/ (atan2 x.im x.re) y.im) y.re)
y.im
(* (log (hypot x.re x.im)) 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 <= -0.68) || !(y_46_re <= 9.5e+32)) {
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((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin(fma(((atan2(x_46_im, x_46_re) / y_46_im) * y_46_re), y_46_im, (log(hypot(x_46_re, x_46_im)) * 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 <= -0.68) || !(y_46_re <= 9.5e+32)) 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(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(fma(Float64(Float64(atan(x_46_im, x_46_re) / y_46_im) * y_46_re), y_46_im, Float64(log(hypot(x_46_re, x_46_im)) * 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, -0.68], N[Not[LessEqual[y$46$re, 9.5e+32]], $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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] * y$46$re), $MachinePrecision] * y$46$im + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.68 \lor \neg \left(y.re \leq 9.5 \cdot 10^{+32}\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(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im} \cdot y.re, y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\end{array}
\end{array}
if y.re < -0.680000000000000049 or 9.50000000000000006e32 < y.re Initial program 38.1%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6479.5
Applied rewrites79.5%
if -0.680000000000000049 < y.re < 9.50000000000000006e32Initial program 47.4%
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.f6456.4
Applied rewrites56.4%
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.f6483.5
Applied rewrites83.5%
Applied rewrites83.5%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(pow (hypot x.re x.im) y.re)
(pow (* y.re (atan2 x.im x.re)) -1.0))))
(if (<= y.re -0.76)
t_0
(if (<= y.re 3300000000000.0)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin
(fma
(* (/ (atan2 x.im x.re) y.im) y.re)
y.im
(* (log (hypot x.re x.im)) y.im))))
(if (<= y.re 2e+192)
(*
(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)))
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_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -0.76) {
tmp = t_0;
} else if (y_46_re <= 3300000000000.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin(fma(((atan2(x_46_im, x_46_re) / y_46_im) * y_46_re), y_46_im, (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else if (y_46_re <= 2e+192) {
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 = 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) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)) tmp = 0.0 if (y_46_re <= -0.76) tmp = t_0; elseif (y_46_re <= 3300000000000.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(fma(Float64(Float64(atan(x_46_im, x_46_re) / y_46_im) * y_46_re), y_46_im, Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); elseif (y_46_re <= 2e+192) 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 = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.76], t$95$0, If[LessEqual[y$46$re, 3300000000000.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] * y$46$re), $MachinePrecision] * y$46$im + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+192], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{if}\;y.re \leq -0.76:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3300000000000:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im} \cdot y.re, y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+192}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.76000000000000001 or 2.00000000000000008e192 < y.re Initial program 41.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites67.4%
Applied rewrites67.4%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6466.4
Applied rewrites66.4%
Taylor expanded in y.re around 0
Applied rewrites75.9%
if -0.76000000000000001 < y.re < 3.3e12Initial program 47.3%
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.f6456.6
Applied rewrites56.6%
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.f6484.6
Applied rewrites84.6%
Applied rewrites84.6%
if 3.3e12 < y.re < 2.00000000000000008e192Initial program 32.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.7
Applied rewrites57.7%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(pow (hypot x.re x.im) y.re)
(pow (* y.re (atan2 x.im x.re)) -1.0))))
(if (<= y.re -0.76)
t_0
(if (<= y.re 3300000000000.0)
(*
(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)))
(if (<= y.re 2e+192)
(*
(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)))
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_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -0.76) {
tmp = t_0;
} else if (y_46_re <= 3300000000000.0) {
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));
} else if (y_46_re <= 2e+192) {
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 = 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) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)) tmp = 0.0 if (y_46_re <= -0.76) tmp = t_0; elseif (y_46_re <= 3300000000000.0) 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))); elseif (y_46_re <= 2e+192) 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 = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.76], t$95$0, If[LessEqual[y$46$re, 3300000000000.0], 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], If[LessEqual[y$46$re, 2e+192], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{if}\;y.re \leq -0.76:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3300000000000:\\
\;\;\;\;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)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+192}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.76000000000000001 or 2.00000000000000008e192 < y.re Initial program 41.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites67.4%
Applied rewrites67.4%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6466.4
Applied rewrites66.4%
Taylor expanded in y.re around 0
Applied rewrites75.9%
if -0.76000000000000001 < y.re < 3.3e12Initial program 47.3%
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.f6456.6
Applied rewrites56.6%
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.f6484.6
Applied rewrites84.6%
if 3.3e12 < y.re < 2.00000000000000008e192Initial program 32.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.7
Applied rewrites57.7%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(pow (hypot x.re x.im) y.re)
(pow (* y.re (atan2 x.im x.re)) -1.0))))
(if (<= y.re -0.76)
t_0
(if (<= y.re 3300000000000.0)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(if (<= y.re 2e+192)
(*
(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)))
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_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -0.76) {
tmp = t_0;
} else if (y_46_re <= 3300000000000.0) {
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 if (y_46_re <= 2e+192) {
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 = 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_re, x_46_im), y_46_re) / Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -0.76) {
tmp = t_0;
} else if (y_46_re <= 3300000000000.0) {
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 if (y_46_re <= 2e+192) {
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 = 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_re, x_46_im), y_46_re) / math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), -1.0) tmp = 0 if y_46_re <= -0.76: tmp = t_0 elif y_46_re <= 3300000000000.0: 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))) elif y_46_re <= 2e+192: 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 = 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) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)) tmp = 0.0 if (y_46_re <= -0.76) tmp = t_0; elseif (y_46_re <= 3300000000000.0) 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)))); elseif (y_46_re <= 2e+192) 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 = 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) / ((y_46_re * atan2(x_46_im, x_46_re)) ^ -1.0); tmp = 0.0; if (y_46_re <= -0.76) tmp = t_0; elseif (y_46_re <= 3300000000000.0) tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2e+192) 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 = 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$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.76], t$95$0, If[LessEqual[y$46$re, 3300000000000.0], 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], If[LessEqual[y$46$re, 2e+192], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{if}\;y.re \leq -0.76:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3300000000000:\\
\;\;\;\;\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{elif}\;y.re \leq 2 \cdot 10^{+192}:\\
\;\;\;\;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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.76000000000000001 or 2.00000000000000008e192 < y.re Initial program 41.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites67.4%
Applied rewrites67.4%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6466.4
Applied rewrites66.4%
Taylor expanded in y.re around 0
Applied rewrites75.9%
if -0.76000000000000001 < y.re < 3.3e12Initial program 47.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.0
Applied rewrites69.0%
if 3.3e12 < y.re < 2.00000000000000008e192Initial program 32.5%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.7
Applied rewrites57.7%
Final simplification69.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(pow (hypot x.re x.im) y.re)
(pow (* y.re (atan2 x.im x.re)) -1.0))))
(if (<= y.re -0.76)
t_0
(if (<= y.re 6.2e+45)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(if (<= y.re 2.4e+72)
(*
(pow x.im y.re)
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(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(hypot(x_46_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
double tmp;
if (y_46_re <= -0.76) {
tmp = t_0;
} else if (y_46_re <= 6.2e+45) {
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 if (y_46_re <= 2.4e+72) {
tmp = pow(x_46_im, y_46_re) * (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 = 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) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)) tmp = 0.0 if (y_46_re <= -0.76) tmp = t_0; elseif (y_46_re <= 6.2e+45) 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)))); elseif (y_46_re <= 2.4e+72) tmp = Float64((x_46_im ^ y_46_re) * 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 = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.76], t$95$0, If[LessEqual[y$46$re, 6.2e+45], 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], If[LessEqual[y$46$re, 2.4e+72], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{if}\;y.re \leq -0.76:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+45}:\\
\;\;\;\;\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{elif}\;y.re \leq 2.4 \cdot 10^{+72}:\\
\;\;\;\;{x.im}^{y.re} \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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.76000000000000001 or 2.4000000000000001e72 < y.re Initial program 40.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites65.3%
Applied rewrites65.3%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6464.6
Applied rewrites64.6%
Taylor expanded in y.re around 0
Applied rewrites70.4%
if -0.76000000000000001 < y.re < 6.19999999999999975e45Initial program 46.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.f6468.2
Applied rewrites68.2%
if 6.19999999999999975e45 < y.re < 2.4000000000000001e72Initial program 12.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.f6437.5
Applied rewrites37.5%
Taylor expanded in x.re around 0
Applied rewrites37.9%
Taylor expanded in y.re around 0
Applied rewrites75.4%
Final simplification69.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 2.5e+34) (/ (pow (hypot x.re x.im) y.re) (pow (* y.re (atan2 x.im x.re)) -1.0)) (* (pow (* x.re x.re) (* y.re 0.5)) (sin (* (atan2 x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.5e+34) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) / pow((y_46_re * atan2(x_46_im, x_46_re)), -1.0);
} else {
tmp = pow((x_46_re * x_46_re), (y_46_re * 0.5)) * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.5e+34) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), -1.0);
} else {
tmp = Math.pow((x_46_re * x_46_re), (y_46_re * 0.5)) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 2.5e+34: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), -1.0) else: tmp = math.pow((x_46_re * x_46_re), (y_46_re * 0.5)) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 2.5e+34) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ -1.0)); else tmp = Float64((Float64(x_46_re * x_46_re) ^ Float64(y_46_re * 0.5)) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 2.5e+34) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) / ((y_46_re * atan2(x_46_im, x_46_re)) ^ -1.0); else tmp = ((x_46_re * x_46_re) ^ (y_46_re * 0.5)) * sin((atan2(x_46_im, x_46_re) * y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 2.5e+34], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(x$46$re * x$46$re), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{-1}}\\
\mathbf{else}:\\
\;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.im < 2.4999999999999999e34Initial program 42.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites77.6%
Applied rewrites77.6%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f6446.9
Applied rewrites46.9%
Taylor expanded in y.re around 0
Applied rewrites48.2%
if 2.4999999999999999e34 < y.im Initial program 44.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.f6427.9
Applied rewrites27.9%
Taylor expanded in x.im around 0
Applied rewrites23.7%
Applied rewrites41.0%
Final simplification46.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.im -1.5e+24)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 1.95e-128)
(* (pow (* x.re x.re) (* y.re 0.5)) 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.5e+24) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.95e-128) {
tmp = pow((x_46_re * x_46_re), (y_46_re * 0.5)) * 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.5d+24)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 1.95d-128) then
tmp = ((x_46re * x_46re) ** (y_46re * 0.5d0)) * 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.5e+24) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 1.95e-128) {
tmp = Math.pow((x_46_re * x_46_re), (y_46_re * 0.5)) * 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.5e+24: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 1.95e-128: tmp = math.pow((x_46_re * x_46_re), (y_46_re * 0.5)) * 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.5e+24) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 1.95e-128) tmp = Float64((Float64(x_46_re * x_46_re) ^ Float64(y_46_re * 0.5)) * 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.5e+24) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 1.95e-128) tmp = ((x_46_re * x_46_re) ^ (y_46_re * 0.5)) * 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.5e+24], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 1.95e-128], N[(N[Power[N[(x$46$re * x$46$re), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $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.5 \cdot 10^{+24}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 1.95 \cdot 10^{-128}:\\
\;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.49999999999999997e24Initial program 28.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.f6443.4
Applied rewrites43.4%
Taylor expanded in x.im around -inf
Applied rewrites43.4%
if -1.49999999999999997e24 < x.im < 1.94999999999999998e-128Initial program 43.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.f6439.9
Applied rewrites39.9%
Taylor expanded in x.im around 0
Applied rewrites33.4%
Applied rewrites44.0%
if 1.94999999999999998e-128 < x.im Initial program 51.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.f6445.5
Applied rewrites45.5%
Taylor expanded in x.re around 0
Applied rewrites43.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= x.re -1.05e-43)
(* (pow (- x.re) y.re) t_0)
(if (<= x.re 1.15e-24)
(* (pow (* x.im x.im) (* y.re 0.5)) 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.05e-43) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 1.15e-24) {
tmp = pow((x_46_im * x_46_im), (y_46_re * 0.5)) * 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.05d-43)) then
tmp = (-x_46re ** y_46re) * t_0
else if (x_46re <= 1.15d-24) then
tmp = ((x_46im * x_46im) ** (y_46re * 0.5d0)) * 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.05e-43) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else if (x_46_re <= 1.15e-24) {
tmp = Math.pow((x_46_im * x_46_im), (y_46_re * 0.5)) * 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.05e-43: tmp = math.pow(-x_46_re, y_46_re) * t_0 elif x_46_re <= 1.15e-24: tmp = math.pow((x_46_im * x_46_im), (y_46_re * 0.5)) * 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.05e-43) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); elseif (x_46_re <= 1.15e-24) tmp = Float64((Float64(x_46_im * x_46_im) ^ Float64(y_46_re * 0.5)) * 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.05e-43) tmp = (-x_46_re ^ y_46_re) * t_0; elseif (x_46_re <= 1.15e-24) tmp = ((x_46_im * x_46_im) ^ (y_46_re * 0.5)) * 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.05e-43], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 1.15e-24], N[(N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $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.05 \cdot 10^{-43}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.re \leq 1.15 \cdot 10^{-24}:\\
\;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.re < -1.05e-43Initial program 36.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.f6450.8
Applied rewrites50.8%
Taylor expanded in x.re around -inf
Applied rewrites50.8%
if -1.05e-43 < x.re < 1.1500000000000001e-24Initial program 52.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.f6443.2
Applied rewrites43.2%
Taylor expanded in x.re around 0
Applied rewrites38.5%
Applied rewrites43.8%
if 1.1500000000000001e-24 < x.re Initial program 28.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.f6433.0
Applied rewrites33.0%
Taylor expanded in x.im around 0
Applied rewrites33.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 -108000000.0)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 8.4e-74)
(* (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 <= -108000000.0) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 8.4e-74) {
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 <= (-108000000.0d0)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 8.4d-74) 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 <= -108000000.0) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 8.4e-74) {
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 <= -108000000.0: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 8.4e-74: 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 <= -108000000.0) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 8.4e-74) tmp = Float64((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 <= -108000000.0) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 8.4e-74) 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, -108000000.0], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 8.4e-74], 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 -108000000:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 8.4 \cdot 10^{-74}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.08e8Initial program 31.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.f6441.5
Applied rewrites41.5%
Taylor expanded in x.im around -inf
Applied rewrites41.5%
if -1.08e8 < x.im < 8.4e-74Initial program 41.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.f6439.4
Applied rewrites39.4%
Taylor expanded in x.re around -inf
Applied rewrites36.7%
if 8.4e-74 < x.im Initial program 53.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.f6448.9
Applied rewrites48.9%
Taylor expanded in x.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 (or (<= x.re -380000000000.0) (not (<= x.re 1.15e-24)))
(* (pow x.re y.re) t_0)
(* (pow x.im y.re) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((x_46_re <= -380000000000.0) || !(x_46_re <= 1.15e-24)) {
tmp = pow(x_46_re, y_46_re) * t_0;
} else {
tmp = pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((atan2(x_46im, x_46re) * y_46re))
if ((x_46re <= (-380000000000.0d0)) .or. (.not. (x_46re <= 1.15d-24))) then
tmp = (x_46re ** y_46re) * t_0
else
tmp = (x_46im ** y_46re) * t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if ((x_46_re <= -380000000000.0) || !(x_46_re <= 1.15e-24)) {
tmp = Math.pow(x_46_re, y_46_re) * t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if (x_46_re <= -380000000000.0) or not (x_46_re <= 1.15e-24): tmp = math.pow(x_46_re, y_46_re) * t_0 else: tmp = math.pow(x_46_im, y_46_re) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if ((x_46_re <= -380000000000.0) || !(x_46_re <= 1.15e-24)) tmp = Float64((x_46_re ^ y_46_re) * t_0); else tmp = Float64((x_46_im ^ y_46_re) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if ((x_46_re <= -380000000000.0) || ~((x_46_re <= 1.15e-24))) tmp = (x_46_re ^ y_46_re) * t_0; else tmp = (x_46_im ^ y_46_re) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$re, -380000000000.0], N[Not[LessEqual[x$46$re, 1.15e-24]], $MachinePrecision]], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;x.re \leq -380000000000 \lor \neg \left(x.re \leq 1.15 \cdot 10^{-24}\right):\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.re < -3.8e11 or 1.1500000000000001e-24 < x.re Initial program 29.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.f6445.0
Applied rewrites45.0%
Taylor expanded in x.im around 0
Applied rewrites36.5%
if -3.8e11 < x.re < 1.1500000000000001e-24Initial program 53.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.f6440.8
Applied rewrites40.8%
Taylor expanded in x.re around 0
Applied rewrites36.3%
Final simplification36.4%
(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.35e-89)
(* (pow (- x.im) y.re) t_0)
(if (<= x.im 5e-131) (* (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.35e-89) {
tmp = pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 5e-131) {
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.35d-89)) then
tmp = (-x_46im ** y_46re) * t_0
else if (x_46im <= 5d-131) 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.35e-89) {
tmp = Math.pow(-x_46_im, y_46_re) * t_0;
} else if (x_46_im <= 5e-131) {
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.35e-89: tmp = math.pow(-x_46_im, y_46_re) * t_0 elif x_46_im <= 5e-131: 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.35e-89) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * t_0); elseif (x_46_im <= 5e-131) 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.35e-89) tmp = (-x_46_im ^ y_46_re) * t_0; elseif (x_46_im <= 5e-131) 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.35e-89], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 5e-131], 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.35 \cdot 10^{-89}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 5 \cdot 10^{-131}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if x.im < -1.34999999999999994e-89Initial program 35.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6440.1
Applied rewrites40.1%
Taylor expanded in x.im around -inf
Applied rewrites37.9%
if -1.34999999999999994e-89 < x.im < 5.0000000000000004e-131Initial 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.f6443.8
Applied rewrites43.8%
Taylor expanded in x.im around 0
Applied rewrites39.0%
if 5.0000000000000004e-131 < x.im Initial program 51.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.f6444.1
Applied rewrites44.1%
Taylor expanded in x.re around 0
Applied rewrites42.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow x.im y.re) (sin (* (atan2 x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = (x_46im ** y_46re) * sin((atan2(x_46im, x_46re) * y_46re))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
Initial program 42.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.f6442.6
Applied rewrites42.6%
Taylor expanded in x.re around 0
Applied rewrites29.0%
herbie shell --seed 2024308
(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)))))