
(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 21 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 (* 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 (log (hypot x.im x.re))))
(if (<= y.re -5.0)
(* (sin (* (fma y.im (/ t_2 y.re) (atan2 x.im x.re)) y.re)) t_1)
(if (<= y.re 6.4e+59)
(/
1.0
(/
(exp t_0)
(*
(sin (fma y.im t_2 (* (atan2 x.im x.re) y.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 = 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 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -5.0) {
tmp = sin((fma(y_46_im, (t_2 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re)) * t_1;
} else if (y_46_re <= 6.4e+59) {
tmp = 1.0 / (exp(t_0) / (sin(fma(y_46_im, t_2, (atan2(x_46_im, x_46_re) * y_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(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 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -5.0) tmp = Float64(sin(Float64(fma(y_46_im, Float64(t_2 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re)) * t_1); elseif (y_46_re <= 6.4e+59) tmp = Float64(1.0 / Float64(exp(t_0) / Float64(sin(fma(y_46_im, t_2, Float64(atan(x_46_im, x_46_re) * y_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[(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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.0], N[(N[Sin[N[(N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 6.4e+59], N[(1.0 / N[(N[Exp[t$95$0], $MachinePrecision] / N[(N[Sin[N[(y$46$im * t$95$2 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $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 := 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 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -5:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{t\_2}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{+59}:\\
\;\;\;\;\frac{1}{\frac{e^{t\_0}}{\sin \left(\mathsf{fma}\left(y.im, t\_2, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot {\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 < -5Initial program 38.8%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6482.2
Applied rewrites82.2%
if -5 < y.re < 6.39999999999999964e59Initial program 43.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites77.1%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
*-commutativeN/A
lift-*.f64N/A
lower-exp.f6477.6
Applied rewrites77.6%
if 6.39999999999999964e59 < y.re Initial program 44.7%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6478.8
Applied rewrites78.8%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re))
(t_1 (log (sqrt (+ (* x.im x.im) (* x.re x.re))))))
(if (<=
(*
(sin (+ (* y.im t_1) t_0))
(exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re)))))
-0.0002)
(* (+ (log x.re) (/ (* 0.5 (* x.im x.im)) (* x.re 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 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))));
double tmp;
if ((sin(((y_46_im * t_1) + t_0)) * exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))))) <= -0.0002) {
tmp = (log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re))) * y_46_im;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46re
t_1 = log(sqrt(((x_46im * x_46im) + (x_46re * x_46re))))
if ((sin(((y_46im * t_1) + t_0)) * exp(((t_1 * y_46re) - (y_46im * atan2(x_46im, x_46re))))) <= (-0.0002d0)) then
tmp = (log(x_46re) + ((0.5d0 * (x_46im * x_46im)) / (x_46re * x_46re))) * y_46im
else
tmp = 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.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))));
double tmp;
if ((Math.sin(((y_46_im * t_1) + t_0)) * Math.exp(((t_1 * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))))) <= -0.0002) {
tmp = (Math.log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * 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.atan2(x_46_im, x_46_re) * y_46_re t_1 = math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) tmp = 0 if (math.sin(((y_46_im * t_1) + t_0)) * math.exp(((t_1 * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re))))) <= -0.0002: tmp = (math.log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * 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(atan(x_46_im, x_46_re) * y_46_re) t_1 = log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) tmp = 0.0 if (Float64(sin(Float64(Float64(y_46_im * t_1) + t_0)) * exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) <= -0.0002) tmp = Float64(Float64(log(x_46_re) + Float64(Float64(0.5 * Float64(x_46_im * x_46_im)) / Float64(x_46_re * 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 = atan2(x_46_im, x_46_re) * y_46_re; t_1 = log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))); tmp = 0.0; if ((sin(((y_46_im * t_1) + t_0)) * exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))))) <= -0.0002) tmp = (log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Sin[N[(N[(y$46$im * t$95$1), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.0002], N[(N[(N[Log[x$46$re], $MachinePrecision] + N[(N[(0.5 * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\\
\mathbf{if}\;\sin \left(y.im \cdot t\_1 + t\_0\right) \cdot e^{t\_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \leq -0.0002:\\
\;\;\;\;\left(\log x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -2.0000000000000001e-4Initial program 53.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites6.4%
Taylor expanded in y.re around 0
Applied rewrites3.9%
Taylor expanded in y.re around 0
Applied rewrites3.9%
Taylor expanded in x.im around 0
Applied rewrites24.5%
if -2.0000000000000001e-4 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 40.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6443.9
Applied rewrites43.9%
Taylor expanded in x.im around 0
Applied rewrites17.8%
Taylor expanded in y.re around 0
Applied rewrites13.8%
Final simplification15.2%
(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 (log (hypot x.im x.re))))
(if (<= y.re -3.8e-8)
(* (sin (* (fma y.im (/ t_1 y.re) (atan2 x.im x.re)) y.re)) t_0)
(if (<= y.re 0.075)
(*
(sin (* (fma y.re (/ (atan2 x.im x.re) y.im) t_1) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(* (sin (* t_1 y.im)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -3.8e-8) {
tmp = sin((fma(y_46_im, (t_1 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re)) * t_0;
} else if (y_46_re <= 0.075) {
tmp = sin((fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), t_1) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((t_1 * y_46_im)) * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -3.8e-8) tmp = Float64(sin(Float64(fma(y_46_im, Float64(t_1 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re)) * t_0); elseif (y_46_re <= 0.075) tmp = Float64(sin(Float64(fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), t_1) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(t_1 * y_46_im)) * t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.8e-8], N[(N[Sin[N[(N[(y$46$im * N[(t$95$1 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.075], N[(N[Sin[N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im), $MachinePrecision]], $MachinePrecision] * 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 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{t\_1}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 0.075:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, t\_1\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_1 \cdot y.im\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -3.80000000000000028e-8Initial program 40.5%
Taylor expanded in y.re around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6482.6
Applied rewrites82.6%
if -3.80000000000000028e-8 < y.re < 0.0749999999999999972Initial program 40.9%
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.f6447.7
Applied rewrites47.7%
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.f6474.2
Applied rewrites74.2%
if 0.0749999999999999972 < y.re Initial program 47.4%
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%
Final simplification77.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -1.7e-18)
(* (sin (* (atan2 x.im x.re) y.re)) t_1)
(if (<= y.re 0.075)
(*
(sin (* (fma y.re (/ (atan2 x.im x.re) y.im) t_0) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(* (sin (* t_0 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 = log(hypot(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) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.7e-18) {
tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * t_1;
} else if (y_46_re <= 0.075) {
tmp = sin((fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), t_0) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((t_0 * y_46_im)) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = 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.7e-18) tmp = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * t_1); elseif (y_46_re <= 0.075) tmp = Float64(sin(Float64(fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), t_0) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(t_0 * 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$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, -1.7e-18], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.075], N[(N[Sin[N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\log \left(\sqrt{x.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.7 \cdot 10^{-18}:\\
\;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 0.075:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, t\_0\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.70000000000000001e-18Initial program 41.0%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6478.4
Applied rewrites78.4%
if -1.70000000000000001e-18 < y.re < 0.0749999999999999972Initial program 40.6%
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.f6447.6
Applied rewrites47.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.f6475.0
Applied rewrites75.0%
if 0.0749999999999999972 < y.re Initial program 47.4%
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%
Final simplification76.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.7e-18)
t_0
(if (<= y.re 0.062)
(*
(sin
(*
(fma y.re (/ (atan2 x.im x.re) y.im) (log (hypot x.im x.re)))
y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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.7e-18) {
tmp = t_0;
} else if (y_46_re <= 0.062) {
tmp = 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)) * exp((-y_46_im * 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(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.7e-18) tmp = t_0; elseif (y_46_re <= 0.062) tmp = Float64(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)) * exp(Float64(Float64(-y_46_im) * 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[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.7e-18], t$95$0, If[LessEqual[y$46$re, 0.062], N[(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] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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.7 \cdot 10^{-18}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 0.062:\\
\;\;\;\;\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) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.70000000000000001e-18 or 0.062 < y.re Initial program 43.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6468.6
Applied rewrites68.6%
if -1.70000000000000001e-18 < y.re < 0.062Initial program 40.6%
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.f6447.6
Applied rewrites47.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.f6475.0
Applied rewrites75.0%
Final simplification71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1
(*
(sin (* (atan2 x.im x.re) y.re))
(exp
(- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0)))))
(if (<= y.re -7e-73)
t_1
(if (<= y.re 3.7e-47)
(/ 1.0 (/ (exp t_0) (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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = 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) - t_0));
double tmp;
if (y_46_re <= -7e-73) {
tmp = t_1;
} else if (y_46_re <= 3.7e-47) {
tmp = 1.0 / (exp(t_0) / sin((log(hypot(x_46_im, x_46_re)) * y_46_im)));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = 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) - t_0));
double tmp;
if (y_46_re <= -7e-73) {
tmp = t_1;
} else if (y_46_re <= 3.7e-47) {
tmp = 1.0 / (Math.exp(t_0) / Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = 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) - t_0)) tmp = 0 if y_46_re <= -7e-73: tmp = t_1 elif y_46_re <= 3.7e-47: tmp = 1.0 / (math.exp(t_0) / math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im))) else: tmp = 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 = 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) - t_0))) tmp = 0.0 if (y_46_re <= -7e-73) tmp = t_1; elseif (y_46_re <= 3.7e-47) tmp = Float64(1.0 / Float64(exp(t_0) / sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)))); 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 = y_46_im * atan2(x_46_im, x_46_re); t_1 = 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) - t_0)); tmp = 0.0; if (y_46_re <= -7e-73) tmp = t_1; elseif (y_46_re <= 3.7e-47) tmp = 1.0 / (exp(t_0) / sin((log(hypot(x_46_im, x_46_re)) * y_46_im))); 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-73], t$95$1, If[LessEqual[y$46$re, 3.7e-47], N[(1.0 / N[(N[Exp[t$95$0], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \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 - t\_0}\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-47}:\\
\;\;\;\;\frac{1}{\frac{e^{t\_0}}{\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -6.9999999999999995e-73 or 3.7e-47 < y.re Initial program 41.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6465.5
Applied rewrites65.5%
if -6.9999999999999995e-73 < y.re < 3.7e-47Initial program 43.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites78.1%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
*-commutativeN/A
lift-*.f64N/A
lower-exp.f6478.8
Applied rewrites78.8%
Taylor expanded in y.re around 0
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6464.9
Applied rewrites64.9%
Final simplification65.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -27.0)
t_0
(if (<= y.re 4.6e-48)
(/
1.0
(/
(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)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -27.0) {
tmp = t_0;
} else if (y_46_re <= 4.6e-48) {
tmp = 1.0 / (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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -27.0) {
tmp = t_0;
} else if (y_46_re <= 4.6e-48) {
tmp = 1.0 / (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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -27.0: tmp = t_0 elif y_46_re <= 4.6e-48: tmp = 1.0 / (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)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -27.0) tmp = t_0; elseif (y_46_re <= 4.6e-48) tmp = Float64(1.0 / Float64(exp(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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -27.0) tmp = t_0; elseif (y_46_re <= 4.6e-48) tmp = 1.0 / (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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -27.0], t$95$0, If[LessEqual[y$46$re, 4.6e-48], N[(1.0 / 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]), $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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -27:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-48}:\\
\;\;\;\;\frac{1}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{\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 < -27 or 4.6000000000000001e-48 < y.re Initial program 39.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.f6464.0
Applied rewrites64.0%
if -27 < y.re < 4.6000000000000001e-48Initial program 44.8%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites75.3%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
*-commutativeN/A
lift-*.f64N/A
lower-exp.f6475.8
Applied rewrites75.8%
Taylor expanded in y.re around 0
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6462.3
Applied rewrites62.3%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -27.0)
t_0
(if (<= y.re 4.6e-48)
(*
(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)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -27.0) {
tmp = t_0;
} else if (y_46_re <= 4.6e-48) {
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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -27.0) {
tmp = t_0;
} else if (y_46_re <= 4.6e-48) {
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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -27.0: tmp = t_0 elif y_46_re <= 4.6e-48: 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -27.0) tmp = t_0; elseif (y_46_re <= 4.6e-48) 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -27.0) tmp = t_0; elseif (y_46_re <= 4.6e-48) 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -27.0], t$95$0, If[LessEqual[y$46$re, 4.6e-48], 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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -27:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-48}:\\
\;\;\;\;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 < -27 or 4.6000000000000001e-48 < y.re Initial program 39.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.f6464.0
Applied rewrites64.0%
if -27 < y.re < 4.6000000000000001e-48Initial program 44.8%
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.f6462.3
Applied rewrites62.3%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -5.5e-41)
t_0
(if (<= y.re -4.8e-294)
(*
(- (exp (* (- y.im) (atan2 x.im x.re))))
(sin (* (log (/ -1.0 x.im)) y.im)))
(if (<= y.re 5.8e-186) (* (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)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5.5e-41) {
tmp = t_0;
} else if (y_46_re <= -4.8e-294) {
tmp = -exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log((-1.0 / x_46_im)) * y_46_im));
} else if (y_46_re <= 5.8e-186) {
tmp = 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5.5e-41) {
tmp = t_0;
} else if (y_46_re <= -4.8e-294) {
tmp = -Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((Math.log((-1.0 / x_46_im)) * y_46_im));
} else if (y_46_re <= 5.8e-186) {
tmp = 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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -5.5e-41: tmp = t_0 elif y_46_re <= -4.8e-294: tmp = -math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((math.log((-1.0 / x_46_im)) * y_46_im)) elif y_46_re <= 5.8e-186: tmp = 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -5.5e-41) tmp = t_0; elseif (y_46_re <= -4.8e-294) tmp = Float64(Float64(-exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))) * sin(Float64(log(Float64(-1.0 / x_46_im)) * y_46_im))); elseif (y_46_re <= 5.8e-186) tmp = 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -5.5e-41) tmp = t_0; elseif (y_46_re <= -4.8e-294) tmp = -exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log((-1.0 / x_46_im)) * y_46_im)); elseif (y_46_re <= 5.8e-186) tmp = 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-41], t$95$0, If[LessEqual[y$46$re, -4.8e-294], N[((-N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * N[Sin[N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-41}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.8 \cdot 10^{-294}:\\
\;\;\;\;\left(-e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \sin \left(\log \left(\frac{-1}{x.im}\right) \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -5.50000000000000022e-41 or 5.80000000000000038e-186 < y.re Initial program 44.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.f6456.2
Applied rewrites56.2%
if -5.50000000000000022e-41 < y.re < -4.79999999999999994e-294Initial program 35.4%
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 rewrites42.3%
Taylor expanded in y.re around 0
Applied rewrites34.1%
if -4.79999999999999994e-294 < y.re < 5.80000000000000038e-186Initial program 44.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites52.3%
Taylor expanded in y.re around 0
Applied rewrites52.3%
Taylor expanded in y.re around 0
Applied rewrites49.2%
Final simplification50.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (sin (* (atan2 x.im x.re) y.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -1.75e-72)
t_0
(if (<= y.re 5.8e-186) (* (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)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.75e-72) {
tmp = t_0;
} else if (y_46_re <= 5.8e-186) {
tmp = 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.75e-72) {
tmp = t_0;
} else if (y_46_re <= 5.8e-186) {
tmp = 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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1.75e-72: tmp = t_0 elif y_46_re <= 5.8e-186: tmp = 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.75e-72) tmp = t_0; elseif (y_46_re <= 5.8e-186) tmp = 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -1.75e-72) tmp = t_0; elseif (y_46_re <= 5.8e-186) tmp = 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.75e-72], t$95$0, If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.75 \cdot 10^{-72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.75e-72 or 5.80000000000000038e-186 < y.re Initial program 44.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6454.4
Applied rewrites54.4%
if -1.75e-72 < y.re < 5.80000000000000038e-186Initial program 38.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites34.1%
Final simplification48.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
(if (<= y.re -9e-72)
(* (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re) t_1)
(if (<= y.re 5.8e-186)
(* (log (hypot x.im x.re)) y.im)
(if (<= y.re 1e-9) t_0 (* (pow x.im y.re) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -9e-72) {
tmp = pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re) * t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = t_0;
} else {
tmp = pow(x_46_im, y_46_re) * 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 = sin(t_0) tmp = 0.0 if (y_46_re <= -9e-72) tmp = Float64((fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re) * t_1); elseif (y_46_re <= 5.8e-186) tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); elseif (y_46_re <= 1e-9) tmp = t_0; else tmp = Float64((x_46_im ^ y_46_re) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -9e-72], N[(N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1e-9], t$95$0, N[(N[Power[x$46$im, y$46$re], $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 := \sin t\_0\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{-72}:\\
\;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{elif}\;y.re \leq 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -9e-72Initial 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.f6466.5
Applied rewrites66.5%
Taylor expanded in x.re around 0
Applied rewrites62.9%
if -9e-72 < y.re < 5.80000000000000038e-186Initial program 38.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites34.1%
if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9Initial program 50.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.f6430.5
Applied rewrites30.5%
Taylor expanded in x.im around 0
Applied rewrites12.7%
Taylor expanded in y.re around 0
Applied rewrites30.5%
if 1.00000000000000006e-9 < y.re Initial program 44.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.f6452.2
Applied rewrites52.2%
Taylor expanded in x.re around 0
Applied rewrites45.9%
Final simplification45.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
(if (<= y.re -1.5e-51)
(* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) t_1)
(if (<= y.re 5.8e-186)
(* (log (hypot x.im x.re)) y.im)
(if (<= y.re 1e-9) t_0 (* (pow x.im y.re) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -1.5e-51) {
tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = t_0;
} else {
tmp = pow(x_46_im, y_46_re) * 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 = sin(t_0) tmp = 0.0 if (y_46_re <= -1.5e-51) tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * t_1); elseif (y_46_re <= 5.8e-186) tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); elseif (y_46_re <= 1e-9) tmp = t_0; else tmp = Float64((x_46_im ^ y_46_re) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.5e-51], N[(N[Power[N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1e-9], t$95$0, N[(N[Power[x$46$im, y$46$re], $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 := \sin t\_0\\
\mathbf{if}\;y.re \leq -1.5 \cdot 10^{-51}:\\
\;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{elif}\;y.re \leq 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.50000000000000001e-51Initial program 40.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6467.2
Applied rewrites67.2%
Taylor expanded in x.im around 0
Applied rewrites63.5%
if -1.50000000000000001e-51 < y.re < 5.80000000000000038e-186Initial program 38.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites42.9%
Taylor expanded in y.re around 0
Applied rewrites42.9%
Taylor expanded in y.re around 0
Applied rewrites33.7%
if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9Initial program 50.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.f6430.5
Applied rewrites30.5%
Taylor expanded in x.im around 0
Applied rewrites12.7%
Taylor expanded in y.re around 0
Applied rewrites30.5%
if 1.00000000000000006e-9 < y.re Initial program 44.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.f6452.2
Applied rewrites52.2%
Taylor expanded in x.re around 0
Applied rewrites45.9%
Final simplification45.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
(if (<= y.re -1.55e-40)
(* (pow x.re y.re) t_1)
(if (<= y.re 5.8e-186)
(* (log (hypot x.im x.re)) y.im)
(if (<= y.re 1e-9) t_0 (* (pow x.im y.re) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -1.55e-40) {
tmp = pow(x_46_re, y_46_re) * t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = t_0;
} else {
tmp = pow(x_46_im, y_46_re) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -1.55e-40) {
tmp = Math.pow(x_46_re, y_46_re) * t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_re t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -1.55e-40: tmp = math.pow(x_46_re, y_46_re) * t_1 elif y_46_re <= 5.8e-186: tmp = math.log(math.hypot(x_46_im, x_46_re)) * y_46_im elif y_46_re <= 1e-9: tmp = t_0 else: tmp = math.pow(x_46_im, y_46_re) * 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 = sin(t_0) tmp = 0.0 if (y_46_re <= -1.55e-40) tmp = Float64((x_46_re ^ y_46_re) * t_1); elseif (y_46_re <= 5.8e-186) tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); elseif (y_46_re <= 1e-9) tmp = t_0; else tmp = Float64((x_46_im ^ y_46_re) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_re; t_1 = sin(t_0); tmp = 0.0; if (y_46_re <= -1.55e-40) tmp = (x_46_re ^ y_46_re) * t_1; elseif (y_46_re <= 5.8e-186) tmp = log(hypot(x_46_im, x_46_re)) * y_46_im; elseif (y_46_re <= 1e-9) tmp = t_0; else tmp = (x_46_im ^ y_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.55e-40], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1e-9], t$95$0, N[(N[Power[x$46$im, y$46$re], $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 := \sin t\_0\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{-40}:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{elif}\;y.re \leq 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.55000000000000005e-40Initial program 40.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6471.5
Applied rewrites71.5%
Taylor expanded in x.im around 0
Applied rewrites54.5%
if -1.55000000000000005e-40 < y.re < 5.80000000000000038e-186Initial program 38.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites40.4%
Taylor expanded in y.re around 0
Applied rewrites40.4%
Taylor expanded in y.re around 0
Applied rewrites31.7%
if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9Initial program 50.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.f6430.5
Applied rewrites30.5%
Taylor expanded in x.im around 0
Applied rewrites12.7%
Taylor expanded in y.re around 0
Applied rewrites30.5%
if 1.00000000000000006e-9 < y.re Initial program 44.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.f6452.2
Applied rewrites52.2%
Taylor expanded in x.re around 0
Applied rewrites45.9%
Final simplification41.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (* (pow x.im y.re) (sin t_0))))
(if (<= y.re -2.5e-68)
t_1
(if (<= y.re 5.8e-186)
(* (log (hypot x.im x.re)) y.im)
(if (<= y.re 1e-9) 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 = atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = pow(x_46_im, y_46_re) * sin(t_0);
double tmp;
if (y_46_re <= -2.5e-68) {
tmp = t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_1 = Math.pow(x_46_im, y_46_re) * Math.sin(t_0);
double tmp;
if (y_46_re <= -2.5e-68) {
tmp = t_1;
} else if (y_46_re <= 5.8e-186) {
tmp = Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1e-9) {
tmp = 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.atan2(x_46_im, x_46_re) * y_46_re t_1 = math.pow(x_46_im, y_46_re) * math.sin(t_0) tmp = 0 if y_46_re <= -2.5e-68: tmp = t_1 elif y_46_re <= 5.8e-186: tmp = math.log(math.hypot(x_46_im, x_46_re)) * y_46_im elif y_46_re <= 1e-9: tmp = t_0 else: tmp = 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 = Float64((x_46_im ^ y_46_re) * sin(t_0)) tmp = 0.0 if (y_46_re <= -2.5e-68) tmp = t_1; elseif (y_46_re <= 5.8e-186) tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); elseif (y_46_re <= 1e-9) tmp = 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 = atan2(x_46_im, x_46_re) * y_46_re; t_1 = (x_46_im ^ y_46_re) * sin(t_0); tmp = 0.0; if (y_46_re <= -2.5e-68) tmp = t_1; elseif (y_46_re <= 5.8e-186) tmp = log(hypot(x_46_im, x_46_re)) * y_46_im; elseif (y_46_re <= 1e-9) tmp = 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.5e-68], t$95$1, If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1e-9], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_1 := {x.im}^{y.re} \cdot \sin t\_0\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{elif}\;y.re \leq 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -2.49999999999999986e-68 or 1.00000000000000006e-9 < y.re Initial program 42.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.f6460.4
Applied rewrites60.4%
Taylor expanded in x.re around 0
Applied rewrites47.3%
if -2.49999999999999986e-68 < y.re < 5.80000000000000038e-186Initial program 38.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites34.1%
if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9Initial program 50.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.f6430.5
Applied rewrites30.5%
Taylor expanded in x.im around 0
Applied rewrites12.7%
Taylor expanded in y.re around 0
Applied rewrites30.5%
Final simplification40.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* 1.0 (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -1.75e-72)
t_0
(if (<= y.re 5.8e-186)
(* (log (hypot x.im x.re)) y.im)
(if (<= y.re 1.3e+54)
t_0
(* (* (log (pow (hypot x.im x.re) 2.0)) 0.5) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.75e-72) {
tmp = t_0;
} else if (y_46_re <= 5.8e-186) {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1.3e+54) {
tmp = t_0;
} else {
tmp = (log(pow(hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.75e-72) {
tmp = t_0;
} else if (y_46_re <= 5.8e-186) {
tmp = Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im;
} else if (y_46_re <= 1.3e+54) {
tmp = t_0;
} else {
tmp = (Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.75e-72: tmp = t_0 elif y_46_re <= 5.8e-186: tmp = math.log(math.hypot(x_46_im, x_46_re)) * y_46_im elif y_46_re <= 1.3e+54: tmp = t_0 else: tmp = (math.log(math.pow(math.hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -1.75e-72) tmp = t_0; elseif (y_46_re <= 5.8e-186) tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); elseif (y_46_re <= 1.3e+54) tmp = t_0; else tmp = Float64(Float64(log((hypot(x_46_im, x_46_re) ^ 2.0)) * 0.5) * y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.75e-72) tmp = t_0; elseif (y_46_re <= 5.8e-186) tmp = log(hypot(x_46_im, x_46_re)) * y_46_im; elseif (y_46_re <= 1.3e+54) tmp = t_0; else tmp = (log((hypot(x_46_im, x_46_re) ^ 2.0)) * 0.5) * y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.75e-72], t$95$0, If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1.3e+54], t$95$0, N[(N[(N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] * y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.75 \cdot 10^{-72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+54}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right) \cdot 0.5\right) \cdot y.im\\
\end{array}
\end{array}
if y.re < -1.75e-72 or 5.80000000000000038e-186 < y.re < 1.30000000000000003e54Initial program 44.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.f6457.9
Applied rewrites57.9%
Taylor expanded in y.re around 0
Applied rewrites15.0%
if -1.75e-72 < y.re < 5.80000000000000038e-186Initial program 38.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites34.1%
if 1.30000000000000003e54 < y.re Initial program 42.9%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites30.6%
Taylor expanded in y.re around 0
Applied rewrites7.9%
Taylor expanded in y.re around 0
Applied rewrites2.5%
Applied rewrites28.1%
Final simplification23.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (* 0.5 (* x.im x.im)) (* x.re x.re))))
(if (<= x.re -5e-309)
(* (fma -1.0 (log (/ -1.0 x.re)) t_0) y.im)
(if (<= x.re 6.5e-136)
(* (+ (log x.re) t_0) y.im)
(* (log (hypot x.im x.re)) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re);
double tmp;
if (x_46_re <= -5e-309) {
tmp = fma(-1.0, log((-1.0 / x_46_re)), t_0) * y_46_im;
} else if (x_46_re <= 6.5e-136) {
tmp = (log(x_46_re) + t_0) * y_46_im;
} else {
tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(0.5 * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re)) tmp = 0.0 if (x_46_re <= -5e-309) tmp = Float64(fma(-1.0, log(Float64(-1.0 / x_46_re)), t_0) * y_46_im); elseif (x_46_re <= 6.5e-136) tmp = Float64(Float64(log(x_46_re) + t_0) * y_46_im); else tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(0.5 * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(N[(-1.0 * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[x$46$re, 6.5e-136], N[(N[(N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), t\_0\right) \cdot y.im\\
\mathbf{elif}\;x.re \leq 6.5 \cdot 10^{-136}:\\
\;\;\;\;\left(\log x.re + t\_0\right) \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
\end{array}
\end{array}
if x.re < -4.9999999999999995e-309Initial program 41.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.2%
Taylor expanded in y.re around 0
Applied rewrites23.7%
Taylor expanded in y.re around 0
Applied rewrites12.9%
Taylor expanded in x.re around -inf
Applied rewrites16.8%
if -4.9999999999999995e-309 < x.re < 6.50000000000000011e-136Initial program 52.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites33.0%
Taylor expanded in y.re around 0
Applied rewrites15.0%
Taylor expanded in y.re around 0
Applied rewrites8.5%
Taylor expanded in x.im around 0
Applied rewrites34.9%
if 6.50000000000000011e-136 < x.re Initial program 39.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.7%
Taylor expanded in y.re around 0
Applied rewrites27.2%
Taylor expanded in y.re around 0
Applied rewrites19.3%
Final simplification20.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (* 0.5 (* x.im x.im)) (* x.re x.re))))
(if (<= x.re -5e-309)
(* (fma -1.0 (log (/ -1.0 x.re)) t_0) y.im)
(* (+ (log x.re) t_0) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re);
double tmp;
if (x_46_re <= -5e-309) {
tmp = fma(-1.0, log((-1.0 / x_46_re)), t_0) * y_46_im;
} else {
tmp = (log(x_46_re) + t_0) * y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(0.5 * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re)) tmp = 0.0 if (x_46_re <= -5e-309) tmp = Float64(fma(-1.0, log(Float64(-1.0 / x_46_re)), t_0) * y_46_im); else tmp = Float64(Float64(log(x_46_re) + t_0) * y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(0.5 * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(N[(-1.0 * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision], N[(N[(N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), t\_0\right) \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;\left(\log x.re + t\_0\right) \cdot y.im\\
\end{array}
\end{array}
if x.re < -4.9999999999999995e-309Initial program 41.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.2%
Taylor expanded in y.re around 0
Applied rewrites23.7%
Taylor expanded in y.re around 0
Applied rewrites12.9%
Taylor expanded in x.re around -inf
Applied rewrites16.8%
if -4.9999999999999995e-309 < x.re Initial program 43.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites48.5%
Taylor expanded in y.re around 0
Applied rewrites23.7%
Taylor expanded in y.re around 0
Applied rewrites16.2%
Taylor expanded in x.im around 0
Applied rewrites19.4%
Final simplification18.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 6.2e-233) (* (atan2 x.im x.re) y.re) (* (+ (/ (* 0.5 (* x.re x.re)) (* x.im x.im)) (log 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 (x_46_im <= 6.2e-233) {
tmp = atan2(x_46_im, x_46_re) * y_46_re;
} else {
tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + log(x_46_im)) * y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 6.2d-233) then
tmp = atan2(x_46im, x_46re) * y_46re
else
tmp = (((0.5d0 * (x_46re * x_46re)) / (x_46im * x_46im)) + log(x_46im)) * y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 6.2e-233) {
tmp = Math.atan2(x_46_im, x_46_re) * y_46_re;
} else {
tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + Math.log(x_46_im)) * y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 6.2e-233: tmp = math.atan2(x_46_im, x_46_re) * y_46_re else: tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + math.log(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 (x_46_im <= 6.2e-233) tmp = Float64(atan(x_46_im, x_46_re) * y_46_re); else tmp = Float64(Float64(Float64(Float64(0.5 * Float64(x_46_re * x_46_re)) / Float64(x_46_im * x_46_im)) + log(x_46_im)) * y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 6.2e-233) tmp = atan2(x_46_im, x_46_re) * y_46_re; else tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + log(x_46_im)) * y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 6.2e-233], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision], N[(N[(N[(N[(0.5 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 6.2 \cdot 10^{-233}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im} + \log x.im\right) \cdot y.im\\
\end{array}
\end{array}
if x.im < 6.2000000000000003e-233Initial program 41.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6443.6
Applied rewrites43.6%
Taylor expanded in x.im around 0
Applied rewrites18.6%
Taylor expanded in y.re around 0
Applied rewrites16.0%
if 6.2000000000000003e-233 < x.im Initial program 43.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites42.0%
Taylor expanded in y.re around 0
Applied rewrites19.7%
Taylor expanded in y.re around 0
Applied rewrites13.1%
Taylor expanded in x.re around 0
Applied rewrites12.0%
Final simplification14.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 8.8e-198) (* (log x.im) y.im) (* (log x.re) y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 8.8e-198) {
tmp = log(x_46_im) * y_46_im;
} else {
tmp = log(x_46_re) * y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= 8.8d-198) then
tmp = log(x_46im) * y_46im
else
tmp = log(x_46re) * y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 8.8e-198) {
tmp = Math.log(x_46_im) * y_46_im;
} else {
tmp = Math.log(x_46_re) * y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 8.8e-198: tmp = math.log(x_46_im) * y_46_im else: tmp = math.log(x_46_re) * y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 8.8e-198) tmp = Float64(log(x_46_im) * y_46_im); else tmp = Float64(log(x_46_re) * y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 8.8e-198) tmp = log(x_46_im) * y_46_im; else tmp = log(x_46_re) * y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 8.8e-198], N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision], N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 8.8 \cdot 10^{-198}:\\
\;\;\;\;\log x.im \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;\log x.re \cdot y.im\\
\end{array}
\end{array}
if x.re < 8.8000000000000001e-198Initial program 43.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites43.2%
Taylor expanded in y.re around 0
Applied rewrites22.8%
Taylor expanded in y.re around 0
Applied rewrites13.0%
Taylor expanded in x.re around 0
Applied rewrites4.4%
if 8.8000000000000001e-198 < x.re Initial program 40.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.6%
Taylor expanded in y.re around 0
Applied rewrites24.9%
Taylor expanded in y.re around 0
Applied rewrites16.7%
Taylor expanded in x.im around 0
Applied rewrites13.8%
Final simplification8.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (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 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 = 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.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.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(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 = 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re
\end{array}
Initial program 42.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.f6442.5
Applied rewrites42.5%
Taylor expanded in x.im around 0
Applied rewrites16.1%
Taylor expanded in y.re around 0
Applied rewrites12.4%
Final simplification12.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (log x.im) y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log(x_46_im) * y_46_im;
}
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 = log(x_46im) * y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log(x_46_im) * y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log(x_46_im) * y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(log(x_46_im) * y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = log(x_46_im) * y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\log x.im \cdot y.im
\end{array}
Initial program 42.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites46.4%
Taylor expanded in y.re around 0
Applied rewrites23.7%
Taylor expanded in y.re around 0
Applied rewrites14.6%
Taylor expanded in x.re around 0
Applied rewrites3.7%
Final simplification3.7%
herbie shell --seed 2024295
(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)))))