
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (log (hypot x.im x.re)))
(t_2 (* t_1 y.im))
(t_3
(exp (- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0)))
(t_4 (* (atan2 x.im x.re) y.re)))
(if (<= y.re -1.45e+43)
(* (sin (* (fma y.im (/ t_1 y.re) (atan2 x.im x.re)) y.re)) t_3)
(if (<= y.re 1250000.0)
(*
(fma (* (cos t_4) t_1) y.im (sin t_4))
(exp (* (- y.im) (atan2 x.im x.re))))
(if (<= y.re 7.8e+174)
(* (sin t_2) t_3)
(/
1.0
(/
(+ t_0 1.0)
(*
(sin (* (+ (/ t_2 y.re) (atan2 x.im x.re)) y.re))
(pow (hypot 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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = t_1 * y_46_im;
double t_3 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - t_0));
double t_4 = atan2(x_46_im, x_46_re) * y_46_re;
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = sin((fma(y_46_im, (t_1 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re)) * t_3;
} else if (y_46_re <= 1250000.0) {
tmp = fma((cos(t_4) * t_1), y_46_im, sin(t_4)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 7.8e+174) {
tmp = sin(t_2) * t_3;
} else {
tmp = 1.0 / ((t_0 + 1.0) / (sin((((t_2 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = Float64(t_1 * y_46_im) t_3 = 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_4 = Float64(atan(x_46_im, x_46_re) * y_46_re) tmp = 0.0 if (y_46_re <= -1.45e+43) 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_3); elseif (y_46_re <= 1250000.0) tmp = Float64(fma(Float64(cos(t_4) * t_1), y_46_im, sin(t_4)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 7.8e+174) tmp = Float64(sin(t_2) * t_3); else tmp = Float64(1.0 / Float64(Float64(t_0 + 1.0) / Float64(sin(Float64(Float64(Float64(t_2 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$im), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e+43], 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$3), $MachinePrecision], If[LessEqual[y$46$re, 1250000.0], N[(N[(N[(N[Cos[t$95$4], $MachinePrecision] * t$95$1), $MachinePrecision] * y$46$im + N[Sin[t$95$4], $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, 7.8e+174], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision], N[(1.0 / N[(N[(t$95$0 + 1.0), $MachinePrecision] / N[(N[Sin[N[(N[(N[(t$95$2 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := t\_1 \cdot y.im\\
t_3 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\
t_4 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;\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\_3\\
\mathbf{elif}\;y.re \leq 1250000:\\
\;\;\;\;\mathsf{fma}\left(\cos t\_4 \cdot t\_1, y.im, \sin t\_4\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\sin t\_2 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t\_0 + 1}{\sin \left(\left(\frac{t\_2}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43Initial program 42.6%
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.f6492.7
Applied rewrites92.7%
if -1.4500000000000001e43 < y.re < 1.25e6Initial program 39.4%
Taylor expanded in y.im around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites51.3%
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.4
Applied rewrites82.4%
if 1.25e6 < y.re < 7.79999999999999962e174Initial program 34.6%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6465.6
Applied rewrites65.6%
if 7.79999999999999962e174 < y.re Initial program 38.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites45.2%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6445.2
Applied rewrites45.2%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-*.f64N/A
lower-atan2.f6483.9
Applied rewrites83.9%
Final simplification81.4%
(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)))
(t_3 (* t_2 y.im)))
(if (<= y.re -5e-10)
(* (sin (* (fma y.im (/ t_2 y.re) (atan2 x.im x.re)) y.re)) t_1)
(if (<= y.re 4.1)
(/
-1.0
(/
(/
(/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.re x.im) y.re))
(sin (fma (log (hypot x.re x.im)) y.im (* (atan2 x.im x.re) y.re))))
-1.0))
(if (<= y.re 7.8e+174)
(* (sin t_3) t_1)
(/
1.0
(/
(+ t_0 1.0)
(*
(sin (* (+ (/ t_3 y.re) (atan2 x.im x.re)) y.re))
(pow (hypot 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 = 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 t_3 = t_2 * y_46_im;
double tmp;
if (y_46_re <= -5e-10) {
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 <= 4.1) {
tmp = -1.0 / (((pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / pow(hypot(x_46_re, x_46_im), y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)))) / -1.0);
} else if (y_46_re <= 7.8e+174) {
tmp = sin(t_3) * t_1;
} else {
tmp = 1.0 / ((t_0 + 1.0) / (sin((((t_3 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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)) t_3 = Float64(t_2 * y_46_im) tmp = 0.0 if (y_46_re <= -5e-10) 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 <= 4.1) tmp = Float64(-1.0 / Float64(Float64(Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / (hypot(x_46_re, x_46_im) ^ y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re)))) / -1.0)); elseif (y_46_re <= 7.8e+174) tmp = Float64(sin(t_3) * t_1); else tmp = Float64(1.0 / Float64(Float64(t_0 + 1.0) / Float64(sin(Float64(Float64(Float64(t_3 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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]}, Block[{t$95$3 = N[(t$95$2 * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, -5e-10], 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, 4.1], N[(-1.0 / N[(N[(N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e+174], N[(N[Sin[t$95$3], $MachinePrecision] * t$95$1), $MachinePrecision], N[(1.0 / N[(N[(t$95$0 + 1.0), $MachinePrecision] / N[(N[Sin[N[(N[(N[(t$95$3 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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)\\
t_3 := t\_2 \cdot y.im\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-10}:\\
\;\;\;\;\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 4.1:\\
\;\;\;\;\frac{-1}{\frac{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}}{-1}}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\sin t\_3 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t\_0 + 1}{\sin \left(\left(\frac{t\_3}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\
\end{array}
\end{array}
if y.re < -5.00000000000000031e-10Initial program 43.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.f6490.4
Applied rewrites90.4%
if -5.00000000000000031e-10 < y.re < 4.0999999999999996Initial program 39.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.0%
/-rgt-identityN/A
frac-2negN/A
neg-sub0N/A
metadata-evalN/A
div-subN/A
metadata-evalN/A
lower--.f64N/A
lower-/.f6485.4
Applied rewrites85.4%
if 4.0999999999999996 < y.re < 7.79999999999999962e174Initial program 33.3%
Taylor expanded in y.re around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6463.2
Applied rewrites63.2%
if 7.79999999999999962e174 < y.re Initial program 38.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites45.2%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-atan2.f6445.2
Applied rewrites45.2%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-*.f64N/A
lower-atan2.f6483.9
Applied rewrites83.9%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
-1.0
(/
(/
(pow (exp y.im) (atan2 x.im x.re))
(sin (* (log (hypot x.re x.im)) y.im)))
-1.0))))
(if (<= y.im -0.19)
t_0
(if (<= y.im 5.2e+98)
(/
1.0
(/
(+ (* y.im (atan2 x.im x.re)) 1.0)
(*
(sin (fma y.im (log (hypot x.im x.re)) (* (atan2 x.im x.re) y.re)))
(pow (hypot x.im x.re) y.re))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -1.0 / ((pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / sin((log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
double tmp;
if (y_46_im <= -0.19) {
tmp = t_0;
} else if (y_46_im <= 5.2e+98) {
tmp = 1.0 / (((y_46_im * atan2(x_46_im, x_46_re)) + 1.0) / (sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), (atan2(x_46_im, x_46_re) * y_46_re))) * pow(hypot(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(-1.0 / Float64(Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0)) tmp = 0.0 if (y_46_im <= -0.19) tmp = t_0; elseif (y_46_im <= 5.2e+98) tmp = Float64(1.0 / Float64(Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) + 1.0) / Float64(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), Float64(atan(x_46_im, x_46_re) * y_46_re))) * (hypot(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[(-1.0 / N[(N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -0.19], t$95$0, If[LessEqual[y$46$im, 5.2e+98], N[(1.0 / N[(N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + 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], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}}{-1}}\\
\mathbf{if}\;y.im \leq -0.19:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \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}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -0.19 or 5.1999999999999999e98 < y.im Initial program 26.9%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites44.7%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6461.1
Applied rewrites61.1%
Applied rewrites65.0%
if -0.19 < y.im < 5.1999999999999999e98Initial program 47.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites84.6%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-*.f64N/A
lower-atan2.f6486.6
Applied rewrites86.6%
Final simplification76.3%
(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.45e+43)
t_0
(if (<= y.re 6.2e-129)
(/
1.0
(/
(/ 1.0 (pow (exp y.im) (- (atan2 x.im x.re))))
(sin (* (log (hypot x.im x.re)) y.im))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_0;
} else if (y_46_re <= 6.2e-129) {
tmp = 1.0 / ((1.0 / pow(exp(y_46_im), -atan2(x_46_im, x_46_re))) / sin((log(hypot(x_46_im, x_46_re)) * y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_0;
} else if (y_46_re <= 6.2e-129) {
tmp = 1.0 / ((1.0 / Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re))) / Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.45e+43: tmp = t_0 elif y_46_re <= 6.2e-129: tmp = 1.0 / ((1.0 / math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) / math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -1.45e+43) tmp = t_0; elseif (y_46_re <= 6.2e-129) tmp = Float64(1.0 / Float64(Float64(1.0 / (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))) / sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.45e+43) tmp = t_0; elseif (y_46_re <= 6.2e-129) tmp = 1.0 / ((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[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.45e+43], t$95$0, If[LessEqual[y$46$re, 6.2e-129], N[(1.0 / N[(N[(1.0 / N[Power[N[Exp[y$46$im], $MachinePrecision], (-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 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.45 \cdot 10^{+43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43 or 6.2000000000000001e-129 < y.re Initial program 38.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6469.3
Applied rewrites69.3%
if -1.4500000000000001e43 < y.re < 6.2000000000000001e-129Initial program 39.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.8%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.2
Applied rewrites71.2%
Applied rewrites71.3%
Final simplification70.0%
(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.45e+43)
t_0
(if (<= y.re 1.05e-34)
(/
-1.0
(/
(/
(pow (exp y.im) (atan2 x.im x.re))
(sin (* (log (hypot x.re x.im)) y.im)))
-1.0))
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.45e+43) {
tmp = t_0;
} else if (y_46_re <= 1.05e-34) {
tmp = -1.0 / ((pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / sin((log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_0;
} else if (y_46_re <= 1.05e-34) {
tmp = -1.0 / ((Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)) / Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.45e+43: tmp = t_0 elif y_46_re <= 1.05e-34: tmp = -1.0 / ((math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) / math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0) 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.45e+43) tmp = t_0; elseif (y_46_re <= 1.05e-34) tmp = Float64(-1.0 / Float64(Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.45e+43) tmp = t_0; elseif (y_46_re <= 1.05e-34) tmp = -1.0 / (((exp(y_46_im) ^ atan2(x_46_im, x_46_re)) / sin((log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e+43], t$95$0, If[LessEqual[y$46$re, 1.05e-34], N[(-1.0 / N[(N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -1.0), $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.45 \cdot 10^{+43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1}{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}}{-1}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43 or 1.05e-34 < y.re Initial program 38.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6471.7
Applied rewrites71.7%
if -1.4500000000000001e43 < y.re < 1.05e-34Initial program 39.2%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites77.8%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6467.3
Applied rewrites67.3%
Applied rewrites73.5%
Final simplification69.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* (atan2 x.im x.re) y.re))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))))
(if (<= y.re -1.45e+43)
t_0
(if (<= y.re 6.2e-129)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_0;
} else if (y_46_re <= 6.2e-129) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = t_0;
} else if (y_46_re <= 6.2e-129) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.45e+43: tmp = t_0 elif y_46_re <= 6.2e-129: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -1.45e+43) tmp = t_0; elseif (y_46_re <= 6.2e-129) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.45e+43) tmp = t_0; elseif (y_46_re <= 6.2e-129) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin((log(hypot(x_46_im, x_46_re)) * y_46_im)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e+43], t$95$0, If[LessEqual[y$46$re, 6.2e-129], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43 or 6.2000000000000001e-129 < y.re Initial program 38.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6469.3
Applied rewrites69.3%
if -1.4500000000000001e43 < y.re < 6.2000000000000001e-129Initial program 39.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.f6471.3
Applied rewrites71.3%
Final simplification70.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -1.45e+43)
(* (pow (+ (* (/ (* x.im x.im) x.re) 0.5) x.re) y.re) t_0)
(if (<= y.re 1.05e-34)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(sin (* (log (hypot x.im x.re)) y.im)))
(* t_0 (pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_0;
} else if (y_46_re <= 1.05e-34) {
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 * pow(hypot(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 t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.45e+43) {
tmp = Math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_0;
} else if (y_46_re <= 1.05e-34) {
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 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.45e+43: tmp = math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * t_0 elif y_46_re <= 1.05e-34: 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 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_re <= -1.45e+43) tmp = Float64((Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * t_0); elseif (y_46_re <= 1.05e-34) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.45e+43) tmp = (((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * t_0; elseif (y_46_re <= 1.05e-34) 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 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e+43], N[(N[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-34], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;{\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-34}:\\
\;\;\;\;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 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e43Initial 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.f6487.2
Applied rewrites87.2%
Taylor expanded in x.im around 0
Applied rewrites87.2%
if -1.4500000000000001e43 < y.re < 1.05e-34Initial program 39.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.f6467.3
Applied rewrites67.3%
if 1.05e-34 < y.re Initial program 36.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6458.0
Applied rewrites58.0%
Final simplification68.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 -7.2e-156)
t_0
(if (<= y.re 3.4e-169)
(/
1.0
(/
(+ (* y.im (atan2 x.im x.re)) 1.0)
(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 <= -7.2e-156) {
tmp = t_0;
} else if (y_46_re <= 3.4e-169) {
tmp = 1.0 / (((y_46_im * atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156) {
tmp = t_0;
} else if (y_46_re <= 3.4e-169) {
tmp = 1.0 / (((y_46_im * Math.atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156: tmp = t_0 elif y_46_re <= 3.4e-169: tmp = 1.0 / (((y_46_im * math.atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156) tmp = t_0; elseif (y_46_re <= 3.4e-169) tmp = Float64(1.0 / Float64(Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156) tmp = t_0; elseif (y_46_re <= 3.4e-169) tmp = 1.0 / (((y_46_im * atan2(x_46_im, x_46_re)) + 1.0) / 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, -7.2e-156], t$95$0, If[LessEqual[y$46$re, 3.4e-169], N[(1.0 / N[(N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + 1.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$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 -7.2 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-169}:\\
\;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\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 < -7.19999999999999998e-156 or 3.4e-169 < y.re Initial program 40.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.f6458.8
Applied rewrites58.8%
if -7.19999999999999998e-156 < y.re < 3.4e-169Initial program 34.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.4%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6473.5
Applied rewrites73.5%
Taylor expanded in y.im around 0
Applied rewrites53.7%
Final simplification57.6%
(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 -4.6e-156)
t_0
(if (<= y.re 2.4e-120)
(/ 1.0 (/ 1.0 (* (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 <= -4.6e-156) {
tmp = t_0;
} else if (y_46_re <= 2.4e-120) {
tmp = 1.0 / (1.0 / (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 <= -4.6e-156) {
tmp = t_0;
} else if (y_46_re <= 2.4e-120) {
tmp = 1.0 / (1.0 / (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 <= -4.6e-156: tmp = t_0 elif y_46_re <= 2.4e-120: tmp = 1.0 / (1.0 / (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 <= -4.6e-156) tmp = t_0; elseif (y_46_re <= 2.4e-120) tmp = Float64(1.0 / Float64(1.0 / 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 <= -4.6e-156) tmp = t_0; elseif (y_46_re <= 2.4e-120) tmp = 1.0 / (1.0 / (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, -4.6e-156], t$95$0, If[LessEqual[y$46$re, 2.4e-120], N[(1.0 / N[(1.0 / 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 -4.6 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{1}{\frac{1}{\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 < -4.5999999999999999e-156 or 2.3999999999999999e-120 < y.re Initial program 39.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.f6460.7
Applied rewrites60.7%
if -4.5999999999999999e-156 < y.re < 2.3999999999999999e-120Initial program 36.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.4%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.6
Applied rewrites71.6%
Taylor expanded in y.im around 0
Applied rewrites48.7%
Final simplification57.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(pow (+ (* (/ (* x.im x.im) x.re) 0.5) x.re) y.re)
(sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -6500.0)
t_0
(if (<= y.re 9e-120)
(/ 1.0 (/ 1.0 (* (log (hypot x.im x.re)) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -6500.0) {
tmp = t_0;
} else if (y_46_re <= 9e-120) {
tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -6500.0) {
tmp = t_0;
} else if (y_46_re <= 9e-120) {
tmp = 1.0 / (1.0 / (Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -6500.0: tmp = t_0 elif y_46_re <= 9e-120: tmp = 1.0 / (1.0 / (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((Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -6500.0) tmp = t_0; elseif (y_46_re <= 9e-120) tmp = Float64(1.0 / Float64(1.0 / 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 = (((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -6500.0) tmp = t_0; elseif (y_46_re <= 9e-120) tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6500.0], t$95$0, If[LessEqual[y$46$re, 9e-120], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -6500:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 9 \cdot 10^{-120}:\\
\;\;\;\;\frac{1}{\frac{1}{\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 < -6500 or 9e-120 < y.re Initial program 39.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.8
Applied rewrites64.8%
Taylor expanded in x.im around 0
Applied rewrites62.4%
if -6500 < y.re < 9e-120Initial program 37.7%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites80.0%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6468.9
Applied rewrites68.9%
Taylor expanded in y.im around 0
Applied rewrites40.9%
Final simplification54.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.re -6e-154)
(* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) x.im) y.re) t_0)
(if (<= y.re 1.05e-119)
(/ 1.0 (/ 1.0 (* (log (hypot x.im x.re)) y.im)))
(* (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 (y_46_re <= -6e-154) {
tmp = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = pow(x_46_im, y_46_re) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -6e-154) {
tmp = Math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} 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 y_46_re <= -6e-154: tmp = math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * t_0 elif y_46_re <= 1.05e-119: tmp = 1.0 / (1.0 / (math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) 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 (y_46_re <= -6e-154) tmp = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * t_0); elseif (y_46_re <= 1.05e-119) tmp = Float64(1.0 / Float64(1.0 / Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); 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 (y_46_re <= -6e-154) tmp = (((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * t_0; elseif (y_46_re <= 1.05e-119) tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im)); 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[y$46$re, -6e-154], N[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $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}\;y.re \leq -6 \cdot 10^{-154}:\\
\;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
\;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot t\_0\\
\end{array}
\end{array}
if y.re < -6.0000000000000005e-154Initial program 44.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.f6471.0
Applied rewrites71.0%
Taylor expanded in x.re around 0
Applied rewrites67.2%
if -6.0000000000000005e-154 < y.re < 1.05e-119Initial program 36.1%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.7%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6472.1
Applied rewrites72.1%
Taylor expanded in y.im around 0
Applied rewrites48.0%
if 1.05e-119 < y.re Initial program 36.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.f6453.3
Applied rewrites53.3%
Taylor expanded in x.re around 0
Applied rewrites43.9%
Final simplification52.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))) (t_1 (* (pow x.im y.re) t_0)))
(if (<= y.re -3.5e+271)
t_1
(if (<= y.re -3.8e-8)
(* (pow (- x.re) y.re) t_0)
(if (<= y.re 1.05e-119)
(/ 1.0 (/ 1.0 (* (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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -3.5e+271) {
tmp = t_1;
} else if (y_46_re <= -3.8e-8) {
tmp = pow(-x_46_re, y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (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 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -3.5e+271) {
tmp = t_1;
} else if (y_46_re <= -3.8e-8) {
tmp = Math.pow(-x_46_re, y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (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 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.pow(x_46_im, y_46_re) * t_0 tmp = 0 if y_46_re <= -3.5e+271: tmp = t_1 elif y_46_re <= -3.8e-8: tmp = math.pow(-x_46_re, y_46_re) * t_0 elif y_46_re <= 1.05e-119: tmp = 1.0 / (1.0 / (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 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = Float64((x_46_im ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -3.5e+271) tmp = t_1; elseif (y_46_re <= -3.8e-8) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * t_0); elseif (y_46_re <= 1.05e-119) tmp = Float64(1.0 / Float64(1.0 / 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 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_1 = (x_46_im ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -3.5e+271) tmp = t_1; elseif (y_46_re <= -3.8e-8) tmp = (-x_46_re ^ y_46_re) * t_0; elseif (y_46_re <= 1.05e-119) tmp = 1.0 / (1.0 / (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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3.5e+271], t$95$1, If[LessEqual[y$46$re, -3.8e-8], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := {x.im}^{y.re} \cdot t\_0\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{+271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -3.8 \cdot 10^{-8}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
\;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -3.4999999999999999e271 or 1.05e-119 < y.re Initial program 37.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.f6456.1
Applied rewrites56.1%
Taylor expanded in x.re around 0
Applied rewrites47.5%
if -3.4999999999999999e271 < y.re < -3.80000000000000028e-8Initial program 44.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.f6484.8
Applied rewrites84.8%
Taylor expanded in x.re around -inf
Applied rewrites69.6%
if -3.80000000000000028e-8 < y.re < 1.05e-119Initial program 38.1%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.7%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6468.5
Applied rewrites68.5%
Taylor expanded in y.im around 0
Applied rewrites41.4%
Final simplification49.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* (atan2 x.im x.re) y.re))) (t_1 (* (pow x.im y.re) t_0)))
(if (<= y.re -3.5e+271)
t_1
(if (<= y.re -18000000000.0)
(* (pow x.re y.re) t_0)
(if (<= y.re 1.05e-119)
(/ 1.0 (/ 1.0 (* (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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -3.5e+271) {
tmp = t_1;
} else if (y_46_re <= -18000000000.0) {
tmp = pow(x_46_re, y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (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 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
double tmp;
if (y_46_re <= -3.5e+271) {
tmp = t_1;
} else if (y_46_re <= -18000000000.0) {
tmp = Math.pow(x_46_re, y_46_re) * t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (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 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) t_1 = math.pow(x_46_im, y_46_re) * t_0 tmp = 0 if y_46_re <= -3.5e+271: tmp = t_1 elif y_46_re <= -18000000000.0: tmp = math.pow(x_46_re, y_46_re) * t_0 elif y_46_re <= 1.05e-119: tmp = 1.0 / (1.0 / (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 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = Float64((x_46_im ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -3.5e+271) tmp = t_1; elseif (y_46_re <= -18000000000.0) tmp = Float64((x_46_re ^ y_46_re) * t_0); elseif (y_46_re <= 1.05e-119) tmp = Float64(1.0 / Float64(1.0 / 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 = sin((atan2(x_46_im, x_46_re) * y_46_re)); t_1 = (x_46_im ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -3.5e+271) tmp = t_1; elseif (y_46_re <= -18000000000.0) tmp = (x_46_re ^ y_46_re) * t_0; elseif (y_46_re <= 1.05e-119) tmp = 1.0 / (1.0 / (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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3.5e+271], t$95$1, If[LessEqual[y$46$re, -18000000000.0], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := {x.im}^{y.re} \cdot t\_0\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{+271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -18000000000:\\
\;\;\;\;{x.re}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
\;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -3.4999999999999999e271 or 1.05e-119 < y.re Initial program 37.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.f6456.1
Applied rewrites56.1%
Taylor expanded in x.re around 0
Applied rewrites47.5%
if -3.4999999999999999e271 < y.re < -1.8e10Initial 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.f6484.2
Applied rewrites84.2%
Taylor expanded in x.im around 0
Applied rewrites70.4%
if -1.8e10 < y.re < 1.05e-119Initial program 38.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites80.2%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6469.2
Applied rewrites69.2%
Taylor expanded in y.im around 0
Applied rewrites40.5%
Final simplification49.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (pow x.im y.re) (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -6e-154)
t_0
(if (<= y.re 1.05e-119)
(/ 1.0 (/ 1.0 (* (log (hypot x.im x.re)) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -6e-154) {
tmp = t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -6e-154) {
tmp = t_0;
} else if (y_46_re <= 1.05e-119) {
tmp = 1.0 / (1.0 / (Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -6e-154: tmp = t_0 elif y_46_re <= 1.05e-119: tmp = 1.0 / (1.0 / (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((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -6e-154) tmp = t_0; elseif (y_46_re <= 1.05e-119) tmp = Float64(1.0 / Float64(1.0 / 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 = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -6e-154) tmp = t_0; elseif (y_46_re <= 1.05e-119) tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[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]}, If[LessEqual[y$46$re, -6e-154], t$95$0, If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / 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 := {x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-154}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
\;\;\;\;\frac{1}{\frac{1}{\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 < -6.0000000000000005e-154 or 1.05e-119 < y.re Initial program 40.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.f6461.0
Applied rewrites61.0%
Taylor expanded in x.re around 0
Applied rewrites45.0%
if -6.0000000000000005e-154 < y.re < 1.05e-119Initial program 36.1%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.7%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6472.1
Applied rewrites72.1%
Taylor expanded in y.im around 0
Applied rewrites48.0%
Final simplification45.8%
(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 -4.6e-156)
t_0
(if (<= y.re 2.4e-120)
(/ 1.0 (/ 1.0 (* (log (hypot x.im x.re)) y.im)))
(if (<= y.re 52000000000.0)
t_0
(/
1.0
(/
1.0
(fma
0.5
(/ (* y.im (* 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 t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -4.6e-156) {
tmp = t_0;
} else if (y_46_re <= 2.4e-120) {
tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im));
} else if (y_46_re <= 52000000000.0) {
tmp = t_0;
} else {
tmp = 1.0 / (1.0 / fma(0.5, ((y_46_im * (x_46_re * x_46_re)) / (x_46_im * x_46_im)), (log(x_46_im) * 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 <= -4.6e-156) tmp = t_0; elseif (y_46_re <= 2.4e-120) tmp = Float64(1.0 / Float64(1.0 / Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); elseif (y_46_re <= 52000000000.0) tmp = t_0; else tmp = Float64(1.0 / Float64(1.0 / fma(0.5, Float64(Float64(y_46_im * Float64(x_46_re * x_46_re)) / Float64(x_46_im * x_46_im)), Float64(log(x_46_im) * 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[(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, -4.6e-156], t$95$0, If[LessEqual[y$46$re, 2.4e-120], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 52000000000.0], t$95$0, N[(1.0 / N[(1.0 / N[(0.5 * N[(N[(y$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -4.6 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 52000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}, \log x.im \cdot y.im\right)}}\\
\end{array}
\end{array}
if y.re < -4.5999999999999999e-156 or 2.3999999999999999e-120 < y.re < 5.2e10Initial 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.f6463.8
Applied rewrites63.8%
Taylor expanded in y.re around 0
Applied rewrites15.8%
if -4.5999999999999999e-156 < y.re < 2.3999999999999999e-120Initial program 36.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites79.4%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6471.6
Applied rewrites71.6%
Taylor expanded in y.im around 0
Applied rewrites48.7%
if 5.2e10 < y.re Initial program 36.3%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites46.3%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6422.8
Applied rewrites22.8%
Taylor expanded in y.im around 0
Applied rewrites2.4%
Taylor expanded in x.re around 0
Applied rewrites11.8%
Final simplification23.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (* x.im x.im))))
(if (<= x.re -1e-308)
(/
1.0
(/ 1.0 (fma (- y.im) (log (/ -1.0 x.re)) (/ (* t_0 0.5) (* x.re x.re)))))
(/ 1.0 (/ 1.0 (fma 0.5 (/ t_0 (* x.re x.re)) (* (log 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 = y_46_im * (x_46_im * x_46_im);
double tmp;
if (x_46_re <= -1e-308) {
tmp = 1.0 / (1.0 / fma(-y_46_im, log((-1.0 / x_46_re)), ((t_0 * 0.5) / (x_46_re * x_46_re))));
} else {
tmp = 1.0 / (1.0 / fma(0.5, (t_0 / (x_46_re * x_46_re)), (log(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(y_46_im * Float64(x_46_im * x_46_im)) tmp = 0.0 if (x_46_re <= -1e-308) tmp = Float64(1.0 / Float64(1.0 / fma(Float64(-y_46_im), log(Float64(-1.0 / x_46_re)), Float64(Float64(t_0 * 0.5) / Float64(x_46_re * x_46_re))))); else tmp = Float64(1.0 / Float64(1.0 / fma(0.5, Float64(t_0 / Float64(x_46_re * x_46_re)), Float64(log(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[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1e-308], N[(1.0 / N[(1.0 / N[((-y$46$im) * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] + N[(N[(t$95$0 * 0.5), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(0.5 * N[(t$95$0 / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-308}:\\
\;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \frac{t\_0 \cdot 0.5}{x.re \cdot x.re}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{t\_0}{x.re \cdot x.re}, \log x.re \cdot y.im\right)}}\\
\end{array}
\end{array}
if x.re < -9.9999999999999991e-309Initial program 39.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites62.6%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6446.1
Applied rewrites46.1%
Taylor expanded in y.im around 0
Applied rewrites12.2%
Taylor expanded in x.re around -inf
Applied rewrites16.0%
if -9.9999999999999991e-309 < x.re Initial program 38.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites74.0%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6443.3
Applied rewrites43.3%
Taylor expanded in y.im around 0
Applied rewrites20.9%
Taylor expanded in x.im around 0
Applied rewrites23.2%
Final simplification19.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.re 8.6e-263)
(/ 1.0 (/ 1.0 (* (atan2 x.im x.re) y.re)))
(/
1.0
(/
1.0
(fma 0.5 (/ (* y.im (* x.im x.im)) (* x.re x.re)) (* (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.6e-263) {
tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = 1.0 / (1.0 / fma(0.5, ((y_46_im * (x_46_im * x_46_im)) / (x_46_re * x_46_re)), (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.6e-263) tmp = Float64(1.0 / Float64(1.0 / Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(1.0 / Float64(1.0 / fma(0.5, Float64(Float64(y_46_im * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re)), Float64(log(x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 8.6e-263], N[(1.0 / N[(1.0 / N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(0.5 * N[(N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 8.6 \cdot 10^{-263}:\\
\;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, \log x.re \cdot y.im\right)}}\\
\end{array}
\end{array}
if x.re < 8.5999999999999994e-263Initial program 37.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites63.1%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6450.4
Applied rewrites50.4%
Taylor expanded in y.re around 0
Applied rewrites9.4%
if 8.5999999999999994e-263 < x.re Initial program 40.8%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites74.4%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6443.5
Applied rewrites43.5%
Taylor expanded in y.im around 0
Applied rewrites20.1%
Taylor expanded in x.im around 0
Applied rewrites24.3%
Final simplification16.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 6.8e-103) (/ 1.0 (/ 1.0 (* (atan2 x.im x.re) y.re))) (/ 1.0 (/ 1.0 (* (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 <= 6.8e-103) {
tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = 1.0 / (1.0 / (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 <= 6.8d-103) then
tmp = 1.0d0 / (1.0d0 / (atan2(x_46im, x_46re) * y_46re))
else
tmp = 1.0d0 / (1.0d0 / (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 <= 6.8e-103) {
tmp = 1.0 / (1.0 / (Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = 1.0 / (1.0 / (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 <= 6.8e-103: tmp = 1.0 / (1.0 / (math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = 1.0 / (1.0 / (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 <= 6.8e-103) tmp = Float64(1.0 / Float64(1.0 / Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(1.0 / Float64(1.0 / 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 <= 6.8e-103) tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re)); else tmp = 1.0 / (1.0 / (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, 6.8e-103], N[(1.0 / N[(1.0 / N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 6.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\log x.re \cdot y.im}}\\
\end{array}
\end{array}
if x.re < 6.80000000000000006e-103Initial program 38.4%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites65.0%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6449.7
Applied rewrites49.7%
Taylor expanded in y.re around 0
Applied rewrites9.2%
if 6.80000000000000006e-103 < x.re Initial program 40.2%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites75.1%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6443.4
Applied rewrites43.4%
Taylor expanded in y.im around 0
Applied rewrites25.8%
Taylor expanded in x.re around inf
Applied rewrites20.5%
Final simplification13.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ 1.0 (/ 1.0 (* (atan2 x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = 1.0d0 / (1.0d0 / (atan2(x_46im, x_46re) * y_46re))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 / (1.0 / (Math.atan2(x_46_im, x_46_re) * y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0 / (1.0 / (math.atan2(x_46_im, x_46_re) * y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(1.0 / Float64(1.0 / Float64(atan(x_46_im, x_46_re) * y_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 / N[(1.0 / N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}
\end{array}
Initial program 39.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites68.4%
Taylor expanded in y.im around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6447.8
Applied rewrites47.8%
Taylor expanded in y.re around 0
Applied rewrites10.5%
Final simplification10.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ 1.0 (/ 1.0 (* (log x.im) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 / (1.0 / (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 = 1.0d0 / (1.0d0 / (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 1.0 / (1.0 / (Math.log(x_46_im) * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0 / (1.0 / (math.log(x_46_im) * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(1.0 / Float64(1.0 / 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 = 1.0 / (1.0 / (log(x_46_im) * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 / N[(1.0 / N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{1}{\log x.im \cdot y.im}}
\end{array}
Initial program 39.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
associate-*r/N/A
clear-numN/A
Applied rewrites68.4%
Taylor expanded in y.re around 0
lower-/.f64N/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lower-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f6444.7
Applied rewrites44.7%
Taylor expanded in y.im around 0
Applied rewrites16.6%
Taylor expanded in x.re around 0
Applied rewrites4.5%
Final simplification4.5%
herbie shell --seed 2024284
(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)))))