
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_3 (log (hypot x.im x.re))))
(if (<= y.re -9e+29)
(* t_2 (+ (sin t_1) (* y.im (* t_3 (cos t_1)))))
(if (<= y.re 2400.0)
(/
(sin (+ t_1 (* y.im (log (hypot x.re x.im)))))
(/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(* t_2 (sin (* y.im t_3)))))))
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_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_3 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -9e+29) {
tmp = t_2 * (sin(t_1) + (y_46_im * (t_3 * cos(t_1))));
} else if (y_46_re <= 2400.0) {
tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 * sin((y_46_im * t_3));
}
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_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -9e+29) {
tmp = t_2 * (Math.sin(t_1) + (y_46_im * (t_3 * Math.cos(t_1))));
} else if (y_46_re <= 2400.0) {
tmp = Math.sin((t_1 + (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))))) / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 * Math.sin((y_46_im * t_3));
}
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_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_3 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -9e+29: tmp = t_2 * (math.sin(t_1) + (y_46_im * (t_3 * math.cos(t_1)))) elif y_46_re <= 2400.0: tmp = math.sin((t_1 + (y_46_im * math.log(math.hypot(x_46_re, x_46_im))))) / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_2 * math.sin((y_46_im * t_3)) 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_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_3 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -9e+29) tmp = Float64(t_2 * Float64(sin(t_1) + Float64(y_46_im * Float64(t_3 * cos(t_1))))); elseif (y_46_re <= 2400.0) tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(t_2 * sin(Float64(y_46_im * t_3))); 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_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_3 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -9e+29) tmp = t_2 * (sin(t_1) + (y_46_im * (t_3 * cos(t_1)))); elseif (y_46_re <= 2400.0) tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2 * sin((y_46_im * t_3)); 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$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9e+29], N[(t$95$2 * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(t$95$3 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2400.0], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{+29}:\\
\;\;\;\;t\_2 \cdot \left(\sin t\_1 + y.im \cdot \left(t\_3 \cdot \cos t\_1\right)\right)\\
\mathbf{elif}\;y.re \leq 2400:\\
\;\;\;\;\frac{\sin \left(t\_1 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot t\_3\right)\\
\end{array}
\end{array}
if y.re < -9.0000000000000005e29Initial program 43.3%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6493.4%
Simplified93.4%
if -9.0000000000000005e29 < y.re < 2400Initial program 43.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified85.4%
if 2400 < y.re Initial program 45.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6469.0%
Simplified69.0%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -5.2e-9)
(* t_2 (sin t_1))
(if (<= y.re 1100.0)
(/
(sin (+ t_1 (* y.im (log (hypot x.re x.im)))))
(/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(* t_2 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -5.2e-9) {
tmp = t_2 * sin(t_1);
} else if (y_46_re <= 1100.0) {
tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -5.2e-9) {
tmp = t_2 * Math.sin(t_1);
} else if (y_46_re <= 1100.0) {
tmp = Math.sin((t_1 + (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))))) / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
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_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) tmp = 0 if y_46_re <= -5.2e-9: tmp = t_2 * math.sin(t_1) elif y_46_re <= 1100.0: tmp = math.sin((t_1 + (y_46_im * math.log(math.hypot(x_46_re, x_46_im))))) / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_2 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) 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_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_re <= -5.2e-9) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_re <= 1100.0) tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); tmp = 0.0; if (y_46_re <= -5.2e-9) tmp = t_2 * sin(t_1); elseif (y_46_re <= 1100.0) tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.2e-9], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1100.0], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 1100:\\
\;\;\;\;\frac{\sin \left(t\_1 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -5.2000000000000002e-9Initial program 42.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6491.0%
Simplified91.0%
if -5.2000000000000002e-9 < y.re < 1100Initial program 44.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified85.5%
if 1100 < y.re Initial program 45.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6469.0%
Simplified69.0%
Final simplification83.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp t_0))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3 (sin (* y.re (atan2 x.im x.re))))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -1.9e-13)
(* t_4 t_3)
(if (<= y.re -1.05e-139)
(* t_3 (/ (- 0.0 -1.0) t_1))
(if (<= y.re 1.3e-97)
(/ t_2 t_1)
(if (<= y.re 1.5e+14)
(/ t_3 (/ t_1 (pow (hypot x.re x.im) y.re)))
(* t_4 t_2)))))))
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_im;
double t_1 = exp(t_0);
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -1.9e-13) {
tmp = t_4 * t_3;
} else if (y_46_re <= -1.05e-139) {
tmp = t_3 * ((0.0 - -1.0) / t_1);
} else if (y_46_re <= 1.3e-97) {
tmp = t_2 / t_1;
} else if (y_46_re <= 1.5e+14) {
tmp = t_3 / (t_1 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_4 * t_2;
}
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_im;
double t_1 = Math.exp(t_0);
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -1.9e-13) {
tmp = t_4 * t_3;
} else if (y_46_re <= -1.05e-139) {
tmp = t_3 * ((0.0 - -1.0) / t_1);
} else if (y_46_re <= 1.3e-97) {
tmp = t_2 / t_1;
} else if (y_46_re <= 1.5e+14) {
tmp = t_3 / (t_1 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_4 * t_2;
}
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_im t_1 = math.exp(t_0) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) tmp = 0 if y_46_re <= -1.9e-13: tmp = t_4 * t_3 elif y_46_re <= -1.05e-139: tmp = t_3 * ((0.0 - -1.0) / t_1) elif y_46_re <= 1.3e-97: tmp = t_2 / t_1 elif y_46_re <= 1.5e+14: tmp = t_3 / (t_1 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_4 * t_2 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_im) t_1 = exp(t_0) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_re <= -1.9e-13) tmp = Float64(t_4 * t_3); elseif (y_46_re <= -1.05e-139) tmp = Float64(t_3 * Float64(Float64(0.0 - -1.0) / t_1)); elseif (y_46_re <= 1.3e-97) tmp = Float64(t_2 / t_1); elseif (y_46_re <= 1.5e+14) tmp = Float64(t_3 / Float64(t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(t_4 * t_2); 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_im; t_1 = exp(t_0); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); tmp = 0.0; if (y_46_re <= -1.9e-13) tmp = t_4 * t_3; elseif (y_46_re <= -1.05e-139) tmp = t_3 * ((0.0 - -1.0) / t_1); elseif (y_46_re <= 1.3e-97) tmp = t_2 / t_1; elseif (y_46_re <= 1.5e+14) tmp = t_3 / (t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_4 * t_2; 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$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.9e-13], N[(t$95$4 * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, -1.05e-139], N[(t$95$3 * N[(N[(0.0 - -1.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.3e-97], N[(t$95$2 / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.5e+14], N[(t$95$3 / N[(t$95$1 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{t\_0}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -1.9 \cdot 10^{-13}:\\
\;\;\;\;t\_4 \cdot t\_3\\
\mathbf{elif}\;y.re \leq -1.05 \cdot 10^{-139}:\\
\;\;\;\;t\_3 \cdot \frac{0 - -1}{t\_1}\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{-97}:\\
\;\;\;\;\frac{t\_2}{t\_1}\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{t\_3}{\frac{t\_1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot t\_2\\
\end{array}
\end{array}
if y.re < -1.9e-13Initial program 42.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6489.8%
Simplified89.8%
if -1.9e-13 < y.re < -1.05000000000000004e-139Initial program 33.9%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9%
Simplified41.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6464.3%
Simplified64.3%
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
rec-expN/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.3%
Applied egg-rr74.3%
if -1.05000000000000004e-139 < y.re < 1.30000000000000003e-97Initial program 48.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.1%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.4%
Simplified74.4%
if 1.30000000000000003e-97 < y.re < 1.5e14Initial program 39.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified74.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6490.0%
Simplified90.0%
if 1.5e14 < y.re Initial program 47.5%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6469.6%
Simplified69.6%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp t_0))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_2)))
(if (<= y.re -4.9e-11)
t_3
(if (<= y.re -2.2e-139)
(* t_2 (/ (- 0.0 -1.0) t_1))
(if (<= y.re 1.8e-97)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.re 3.85)
(/ t_2 (/ t_1 (pow (hypot x.re x.im) y.re)))
t_3))))))
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_im;
double t_1 = exp(t_0);
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2;
double tmp;
if (y_46_re <= -4.9e-11) {
tmp = t_3;
} else if (y_46_re <= -2.2e-139) {
tmp = t_2 * ((0.0 - -1.0) / t_1);
} else if (y_46_re <= 1.8e-97) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_1;
} else if (y_46_re <= 3.85) {
tmp = t_2 / (t_1 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_3;
}
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_im;
double t_1 = Math.exp(t_0);
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2;
double tmp;
if (y_46_re <= -4.9e-11) {
tmp = t_3;
} else if (y_46_re <= -2.2e-139) {
tmp = t_2 * ((0.0 - -1.0) / t_1);
} else if (y_46_re <= 1.8e-97) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_1;
} else if (y_46_re <= 3.85) {
tmp = t_2 / (t_1 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_3;
}
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_im t_1 = math.exp(t_0) t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_3 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2 tmp = 0 if y_46_re <= -4.9e-11: tmp = t_3 elif y_46_re <= -2.2e-139: tmp = t_2 * ((0.0 - -1.0) / t_1) elif y_46_re <= 1.8e-97: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / t_1 elif y_46_re <= 3.85: tmp = t_2 / (t_1 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_3 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_im) t_1 = exp(t_0) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_2) tmp = 0.0 if (y_46_re <= -4.9e-11) tmp = t_3; elseif (y_46_re <= -2.2e-139) tmp = Float64(t_2 * Float64(Float64(0.0 - -1.0) / t_1)); elseif (y_46_re <= 1.8e-97) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_1); elseif (y_46_re <= 3.85) tmp = Float64(t_2 / Float64(t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = t_3; 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_im; t_1 = exp(t_0); t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_2; tmp = 0.0; if (y_46_re <= -4.9e-11) tmp = t_3; elseif (y_46_re <= -2.2e-139) tmp = t_2 * ((0.0 - -1.0) / t_1); elseif (y_46_re <= 1.8e-97) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_1; elseif (y_46_re <= 3.85) tmp = t_2 / (t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_3; 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$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -4.9e-11], t$95$3, If[LessEqual[y$46$re, -2.2e-139], N[(t$95$2 * N[(N[(0.0 - -1.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.8e-97], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.85], N[(t$95$2 / N[(t$95$1 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{t\_0}\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_2\\
\mathbf{if}\;y.re \leq -4.9 \cdot 10^{-11}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -2.2 \cdot 10^{-139}:\\
\;\;\;\;t\_2 \cdot \frac{0 - -1}{t\_1}\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{-97}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t\_1}\\
\mathbf{elif}\;y.re \leq 3.85:\\
\;\;\;\;\frac{t\_2}{\frac{t\_1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -4.8999999999999999e-11 or 3.85000000000000009 < y.re Initial program 44.2%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.4%
Simplified78.4%
if -4.8999999999999999e-11 < y.re < -2.2000000000000001e-139Initial program 33.9%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9%
Simplified41.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6464.3%
Simplified64.3%
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
rec-expN/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.3%
Applied egg-rr74.3%
if -2.2000000000000001e-139 < y.re < 1.79999999999999999e-97Initial program 48.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.1%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.4%
Simplified74.4%
if 1.79999999999999999e-97 < y.re < 3.85000000000000009Initial program 43.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified77.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6488.9%
Simplified88.9%
Final simplification76.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) y.im)))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (log (+ (* x.re x.re) (* x.im x.im)))))
(if (<= y.re -7.4e-16)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re -7.8e-137)
(* t_1 (/ (- 0.0 -1.0) t_0))
(if (<= y.re 3e-96)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_0)
(if (<= y.re 1.06e+178)
(/ t_1 (/ t_0 (pow (hypot x.re x.im) y.re)))
(/ (* (* y.im 0.5) t_2) (exp (* t_2 (* y.re -0.5))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= -7.4e-16) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -7.8e-137) {
tmp = t_1 * ((0.0 - -1.0) / t_0);
} else if (y_46_re <= 3e-96) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0;
} else if (y_46_re <= 1.06e+178) {
tmp = t_1 / (t_0 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = ((y_46_im * 0.5) * t_2) / exp((t_2 * (y_46_re * -0.5)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= -7.4e-16) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -7.8e-137) {
tmp = t_1 * ((0.0 - -1.0) / t_0);
} else if (y_46_re <= 3e-96) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_0;
} else if (y_46_re <= 1.06e+178) {
tmp = t_1 / (t_0 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = ((y_46_im * 0.5) * t_2) / Math.exp((t_2 * (y_46_re * -0.5)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) tmp = 0 if y_46_re <= -7.4e-16: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= -7.8e-137: tmp = t_1 * ((0.0 - -1.0) / t_0) elif y_46_re <= 3e-96: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / t_0 elif y_46_re <= 1.06e+178: tmp = t_1 / (t_0 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = ((y_46_im * 0.5) * t_2) / math.exp((t_2 * (y_46_re * -0.5))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) tmp = 0.0 if (y_46_re <= -7.4e-16) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -7.8e-137) tmp = Float64(t_1 * Float64(Float64(0.0 - -1.0) / t_0)); elseif (y_46_re <= 3e-96) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0); elseif (y_46_re <= 1.06e+178) tmp = Float64(t_1 / Float64(t_0 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(Float64(Float64(y_46_im * 0.5) * t_2) / exp(Float64(t_2 * Float64(y_46_re * -0.5)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); tmp = 0.0; if (y_46_re <= -7.4e-16) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -7.8e-137) tmp = t_1 * ((0.0 - -1.0) / t_0); elseif (y_46_re <= 3e-96) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0; elseif (y_46_re <= 1.06e+178) tmp = t_1 / (t_0 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = ((y_46_im * 0.5) * t_2) / exp((t_2 * (y_46_re * -0.5))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7.4e-16], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -7.8e-137], N[(t$95$1 * N[(N[(0.0 - -1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3e-96], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.06e+178], N[(t$95$1 / N[(t$95$0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$46$im * 0.5), $MachinePrecision] * t$95$2), $MachinePrecision] / N[Exp[N[(t$95$2 * N[(y$46$re * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -7.4 \cdot 10^{-16}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -7.8 \cdot 10^{-137}:\\
\;\;\;\;t\_1 \cdot \frac{0 - -1}{t\_0}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t\_0}\\
\mathbf{elif}\;y.re \leq 1.06 \cdot 10^{+178}:\\
\;\;\;\;\frac{t\_1}{\frac{t\_0}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y.im \cdot 0.5\right) \cdot t\_2}{e^{t\_2 \cdot \left(y.re \cdot -0.5\right)}}\\
\end{array}
\end{array}
if y.re < -7.3999999999999999e-16Initial program 43.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6487.2%
Simplified87.2%
if -7.3999999999999999e-16 < y.re < -7.7999999999999999e-137Initial program 31.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.1%
Simplified43.1%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.3%
Simplified66.3%
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
rec-expN/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6476.6%
Applied egg-rr76.6%
if -7.7999999999999999e-137 < y.re < 3e-96Initial program 48.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.1%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.4%
Simplified74.4%
if 3e-96 < y.re < 1.05999999999999994e178Initial program 51.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified66.0%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.4%
Simplified71.4%
if 1.05999999999999994e178 < y.re Initial program 30.4%
Applied egg-rr13.0%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.0%
Simplified13.0%
Taylor expanded in y.im around 0
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (/ -1.0 x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp t_2)))
(if (<= x.re -1.45e-65)
(* (exp (- 0.0 (+ t_2 (* y.re t_0)))) (sin (- t_1 (* y.im t_0))))
(if (<= x.re 3.6e-50)
(/ (sin t_1) (/ t_3 (pow (hypot x.re x.im) y.re)))
(/
(sin (- t_1 (* y.im (log (/ 1.0 x.re)))))
(* t_3 (pow (/ 1.0 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((-1.0 / x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(t_2);
double tmp;
if (x_46_re <= -1.45e-65) {
tmp = exp((0.0 - (t_2 + (y_46_re * t_0)))) * sin((t_1 - (y_46_im * t_0)));
} else if (x_46_re <= 3.6e-50) {
tmp = sin(t_1) / (t_3 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = sin((t_1 - (y_46_im * log((1.0 / x_46_re))))) / (t_3 * pow((1.0 / 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.log((-1.0 / x_46_re));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(t_2);
double tmp;
if (x_46_re <= -1.45e-65) {
tmp = Math.exp((0.0 - (t_2 + (y_46_re * t_0)))) * Math.sin((t_1 - (y_46_im * t_0)));
} else if (x_46_re <= 3.6e-50) {
tmp = Math.sin(t_1) / (t_3 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.sin((t_1 - (y_46_im * Math.log((1.0 / x_46_re))))) / (t_3 * Math.pow((1.0 / 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.log((-1.0 / x_46_re)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(t_2) tmp = 0 if x_46_re <= -1.45e-65: tmp = math.exp((0.0 - (t_2 + (y_46_re * t_0)))) * math.sin((t_1 - (y_46_im * t_0))) elif x_46_re <= 3.6e-50: tmp = math.sin(t_1) / (t_3 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.sin((t_1 - (y_46_im * math.log((1.0 / x_46_re))))) / (t_3 * math.pow((1.0 / x_46_re), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(-1.0 / x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(t_2) tmp = 0.0 if (x_46_re <= -1.45e-65) tmp = Float64(exp(Float64(0.0 - Float64(t_2 + Float64(y_46_re * t_0)))) * sin(Float64(t_1 - Float64(y_46_im * t_0)))); elseif (x_46_re <= 3.6e-50) tmp = Float64(sin(t_1) / Float64(t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(sin(Float64(t_1 - Float64(y_46_im * log(Float64(1.0 / x_46_re))))) / Float64(t_3 * (Float64(1.0 / 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 = log((-1.0 / x_46_re)); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(t_2); tmp = 0.0; if (x_46_re <= -1.45e-65) tmp = exp((0.0 - (t_2 + (y_46_re * t_0)))) * sin((t_1 - (y_46_im * t_0))); elseif (x_46_re <= 3.6e-50) tmp = sin(t_1) / (t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = sin((t_1 - (y_46_im * log((1.0 / x_46_re))))) / (t_3 * ((1.0 / 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[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[t$95$2], $MachinePrecision]}, If[LessEqual[x$46$re, -1.45e-65], N[(N[Exp[N[(0.0 - N[(t$95$2 + N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.6e-50], N[(N[Sin[t$95$1], $MachinePrecision] / N[(t$95$3 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$3 * N[Power[N[(1.0 / x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\frac{-1}{x.re}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{t\_2}\\
\mathbf{if}\;x.re \leq -1.45 \cdot 10^{-65}:\\
\;\;\;\;e^{0 - \left(t\_2 + y.re \cdot t\_0\right)} \cdot \sin \left(t\_1 - y.im \cdot t\_0\right)\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-50}:\\
\;\;\;\;\frac{\sin t\_1}{\frac{t\_3}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t\_1 - y.im \cdot \log \left(\frac{1}{x.re}\right)\right)}{t\_3 \cdot {\left(\frac{1}{x.re}\right)}^{y.re}}\\
\end{array}
\end{array}
if x.re < -1.4499999999999999e-65Initial program 33.9%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified76.7%
if -1.4499999999999999e-65 < x.re < 3.59999999999999979e-50Initial program 62.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified86.3%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.5%
Simplified73.5%
if 3.59999999999999979e-50 < x.re Initial program 32.7%
Applied egg-rr24.0%
Taylor expanded in x.re around inf
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6473.6%
Simplified73.6%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) y.im)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -7.4e-16)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re -1e-140)
(* t_1 (/ (- 0.0 -1.0) t_0))
(if (<= y.re 1.1e-98)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_0)
(if (<= y.re 3.5e+77)
(*
y.re
(* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
(* t_1 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.4e-16) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -1e-140) {
tmp = t_1 * ((0.0 - -1.0) / t_0);
} else if (y_46_re <= 1.1e-98) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0;
} else if (y_46_re <= 3.5e+77) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_1 * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.4e-16) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -1e-140) {
tmp = t_1 * ((0.0 - -1.0) / t_0);
} else if (y_46_re <= 1.1e-98) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_0;
} else if (y_46_re <= 3.5e+77) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_1 * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -7.4e-16: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= -1e-140: tmp = t_1 * ((0.0 - -1.0) / t_0) elif y_46_re <= 1.1e-98: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / t_0 elif y_46_re <= 3.5e+77: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))) else: tmp = t_1 * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -7.4e-16) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -1e-140) tmp = Float64(t_1 * Float64(Float64(0.0 - -1.0) / t_0)); elseif (y_46_re <= 1.1e-98) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0); elseif (y_46_re <= 3.5e+77) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))))); else tmp = Float64(t_1 * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -7.4e-16) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -1e-140) tmp = t_1 * ((0.0 - -1.0) / t_0); elseif (y_46_re <= 1.1e-98) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_0; elseif (y_46_re <= 3.5e+77) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))); else tmp = t_1 * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7.4e-16], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1e-140], N[(t$95$1 * N[(N[(0.0 - -1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-98], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 3.5e+77], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -7.4 \cdot 10^{-16}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -1 \cdot 10^{-140}:\\
\;\;\;\;t\_1 \cdot \frac{0 - -1}{t\_0}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-98}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t\_0}\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+77}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -7.3999999999999999e-16Initial program 43.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6487.2%
Simplified87.2%
if -7.3999999999999999e-16 < y.re < -9.9999999999999998e-141Initial program 31.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.1%
Simplified43.1%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.3%
Simplified66.3%
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
rec-expN/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6476.6%
Applied egg-rr76.6%
if -9.9999999999999998e-141 < y.re < 1.09999999999999998e-98Initial program 48.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.1%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.4%
Simplified74.4%
if 1.09999999999999998e-98 < y.re < 3.5000000000000001e77Initial program 46.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6458.9%
Simplified58.9%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6469.4%
Simplified69.4%
if 3.5000000000000001e77 < y.re Initial program 44.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.7%
Simplified66.7%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.7%
Applied egg-rr66.7%
Final simplification74.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -5.5e-7)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 2.5e+75)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
(* t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.5e-7) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.5e+75) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_0 * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.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((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.5e-7) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.5e+75) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_0 * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -5.5e-7: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 2.5e+75: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))) else: tmp = t_0 * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -5.5e-7) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 2.5e+75) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))))); else tmp = Float64(t_0 * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -5.5e-7) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 2.5e+75) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))); else tmp = t_0 * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-7], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.5e+75], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+75}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -5.5000000000000003e-7Initial program 43.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.8%
Simplified90.8%
if -5.5000000000000003e-7 < y.re < 2.5000000000000001e75Initial program 44.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.7%
Simplified40.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6454.5%
Simplified54.5%
if 2.5000000000000001e75 < y.re Initial program 44.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.7%
Simplified66.7%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.7%
Applied egg-rr66.7%
Final simplification65.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* y.re (atan2 x.im x.re)))
(pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))))
(if (<= y.re -0.000205)
t_0
(if (<= y.re 2.5e+75)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 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((y_46_re * atan2(x_46_im, x_46_re))) * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -0.000205) {
tmp = t_0;
} else if (y_46_re <= 2.5e+75) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - 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) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re))) * (((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0))
if (y_46re <= (-0.000205d0)) then
tmp = t_0
else if (y_46re <= 2.5d+75) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * (0.0d0 - 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -0.000205) {
tmp = t_0;
} else if (y_46_re <= 2.5e+75) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - 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((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -0.000205: tmp = t_0 elif y_46_re <= 2.5e+75: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - 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(y_46_re * atan(x_46_im, x_46_re))) * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0))) tmp = 0.0 if (y_46_re <= -0.000205) tmp = t_0; elseif (y_46_re <= 2.5e+75) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - 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((y_46_re * atan2(x_46_im, x_46_re))) * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0)); tmp = 0.0; if (y_46_re <= -0.000205) tmp = t_0; elseif (y_46_re <= 2.5e+75) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000205], t$95$0, If[LessEqual[y$46$re, 2.5e+75], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -0.000205:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+75}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -2.05e-4 or 2.5000000000000001e75 < y.re Initial program 44.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6480.8%
Simplified80.8%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6480.8%
Applied egg-rr80.8%
if -2.05e-4 < y.re < 2.5000000000000001e75Initial program 44.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.5%
Simplified40.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6454.4%
Simplified54.4%
Final simplification65.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (+ (* x.re x.re) (* x.im x.im)))
(t_2 (pow t_1 (/ y.re -2.0)))
(t_3 (/ (* (* y.im 0.5) (log t_1)) t_2))
(t_4 (/ t_0 t_2)))
(if (<= y.im -1.5e-5)
t_4
(if (<= y.im -3e-47)
t_3
(if (<= y.im 1.2e-117)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.im 4.4e-35) t_3 t_4))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = pow(t_1, (y_46_re / -2.0));
double t_3 = ((y_46_im * 0.5) * log(t_1)) / t_2;
double t_4 = t_0 / t_2;
double tmp;
if (y_46_im <= -1.5e-5) {
tmp = t_4;
} else if (y_46_im <= -3e-47) {
tmp = t_3;
} else if (y_46_im <= 1.2e-117) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 4.4e-35) {
tmp = t_3;
} else {
tmp = t_4;
}
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_re * Math.atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = Math.pow(t_1, (y_46_re / -2.0));
double t_3 = ((y_46_im * 0.5) * Math.log(t_1)) / t_2;
double t_4 = t_0 / t_2;
double tmp;
if (y_46_im <= -1.5e-5) {
tmp = t_4;
} else if (y_46_im <= -3e-47) {
tmp = t_3;
} else if (y_46_im <= 1.2e-117) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 4.4e-35) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) t_2 = math.pow(t_1, (y_46_re / -2.0)) t_3 = ((y_46_im * 0.5) * math.log(t_1)) / t_2 t_4 = t_0 / t_2 tmp = 0 if y_46_im <= -1.5e-5: tmp = t_4 elif y_46_im <= -3e-47: tmp = t_3 elif y_46_im <= 1.2e-117: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 4.4e-35: tmp = t_3 else: tmp = t_4 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_2 = t_1 ^ Float64(y_46_re / -2.0) t_3 = Float64(Float64(Float64(y_46_im * 0.5) * log(t_1)) / t_2) t_4 = Float64(t_0 / t_2) tmp = 0.0 if (y_46_im <= -1.5e-5) tmp = t_4; elseif (y_46_im <= -3e-47) tmp = t_3; elseif (y_46_im <= 1.2e-117) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 4.4e-35) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); t_2 = t_1 ^ (y_46_re / -2.0); t_3 = ((y_46_im * 0.5) * log(t_1)) / t_2; t_4 = t_0 / t_2; tmp = 0.0; if (y_46_im <= -1.5e-5) tmp = t_4; elseif (y_46_im <= -3e-47) tmp = t_3; elseif (y_46_im <= 1.2e-117) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 4.4e-35) tmp = t_3; else tmp = t_4; 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 / t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -1.5e-5], t$95$4, If[LessEqual[y$46$im, -3e-47], t$95$3, If[LessEqual[y$46$im, 1.2e-117], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.4e-35], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := {t\_1}^{\left(\frac{y.re}{-2}\right)}\\
t_3 := \frac{\left(y.im \cdot 0.5\right) \cdot \log t\_1}{t\_2}\\
t_4 := \frac{t\_0}{t\_2}\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{-5}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-47}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-117}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.im < -1.50000000000000004e-5 or 4.39999999999999987e-35 < y.im Initial program 35.0%
Applied egg-rr25.4%
sub0-negN/A
frac-2negN/A
/-lowering-/.f64N/A
Applied egg-rr28.2%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6%
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6445.4%
Simplified45.4%
if -1.50000000000000004e-5 < y.im < -3.00000000000000017e-47 or 1.20000000000000007e-117 < y.im < 4.39999999999999987e-35Initial program 63.7%
Applied egg-rr60.6%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.4%
Simplified57.4%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.9%
Simplified59.9%
if -3.00000000000000017e-47 < y.im < 1.20000000000000007e-117Initial program 52.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.3%
Simplified76.3%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6475.2%
Simplified75.2%
Final simplification58.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.3e-7)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 7.5e+50)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
(/ t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.3e-7) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.5e+50) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.3e-7) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.5e+50) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
tmp = t_0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -4.3e-7: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 7.5e+50: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))) else: tmp = t_0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4.3e-7) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 7.5e+50) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))))); else tmp = Float64(t_0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -4.3e-7) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 7.5e+50) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))); else tmp = t_0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.3e-7], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+50], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.3 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+50}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if y.re < -4.3000000000000001e-7Initial program 43.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.8%
Simplified90.8%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6489.3%
Simplified89.3%
if -4.3000000000000001e-7 < y.re < 7.4999999999999999e50Initial program 44.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.5%
Simplified40.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6454.6%
Simplified54.6%
if 7.4999999999999999e50 < y.re Initial program 44.9%
Applied egg-rr28.6%
sub0-negN/A
frac-2negN/A
/-lowering-/.f64N/A
Applied egg-rr38.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6465.4%
Simplified65.4%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6459.3%
Simplified59.3%
Final simplification64.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -6.6e+69)
(/ (* (- 0.0 y.im) (log (/ -1.0 x.im))) (pow (/ -1.0 x.im) y.re))
(/
(* y.re (atan2 x.im x.re))
(pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))
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.6e+69) {
tmp = ((0.0 - y_46_im) * log((-1.0 / x_46_im))) / pow((-1.0 / x_46_im), y_46_re);
} else {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.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) :: tmp
if (x_46im <= (-6.6d+69)) then
tmp = ((0.0d0 - y_46im) * log(((-1.0d0) / x_46im))) / (((-1.0d0) / x_46im) ** y_46re)
else
tmp = (y_46re * atan2(x_46im, x_46re)) / (((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / (-2.0d0)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -6.6e+69) {
tmp = ((0.0 - y_46_im) * Math.log((-1.0 / x_46_im))) / Math.pow((-1.0 / x_46_im), y_46_re);
} else {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -6.6e+69: tmp = ((0.0 - y_46_im) * math.log((-1.0 / x_46_im))) / math.pow((-1.0 / x_46_im), y_46_re) else: tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -6.6e+69) tmp = Float64(Float64(Float64(0.0 - y_46_im) * log(Float64(-1.0 / x_46_im))) / (Float64(-1.0 / x_46_im) ^ y_46_re)); else tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); 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.6e+69) tmp = ((0.0 - y_46_im) * log((-1.0 / x_46_im))) / ((-1.0 / x_46_im) ^ y_46_re); else tmp = (y_46_re * atan2(x_46_im, x_46_re)) / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -6.6e+69], N[(N[(N[(0.0 - y$46$im), $MachinePrecision] * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[(-1.0 / x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -6.6 \cdot 10^{+69}:\\
\;\;\;\;\frac{\left(0 - y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)}{{\left(\frac{-1}{x.im}\right)}^{y.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if x.im < -6.5999999999999997e69Initial program 20.0%
Applied egg-rr14.0%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.7%
Simplified12.7%
Taylor expanded in x.im around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6459.8%
Simplified59.8%
Taylor expanded in y.im around 0
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6454.3%
Simplified54.3%
if -6.5999999999999997e69 < x.im Initial program 50.2%
Applied egg-rr43.4%
sub0-negN/A
frac-2negN/A
/-lowering-/.f64N/A
Applied egg-rr46.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.0%
Simplified50.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.5%
Simplified49.5%
Final simplification50.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -1.9e-295) (/ (* (- 0.0 y.im) (log (/ -1.0 x.im))) (pow (/ -1.0 x.im) y.re)) (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.9e-295) {
tmp = ((0.0 - y_46_im) * log((-1.0 / x_46_im))) / pow((-1.0 / x_46_im), y_46_re);
} else {
tmp = y_46_re * atan2(x_46_im, x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-1.9d-295)) then
tmp = ((0.0d0 - y_46im) * log(((-1.0d0) / x_46im))) / (((-1.0d0) / x_46im) ** y_46re)
else
tmp = y_46re * atan2(x_46im, x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.9e-295) {
tmp = ((0.0 - y_46_im) * Math.log((-1.0 / x_46_im))) / Math.pow((-1.0 / x_46_im), y_46_re);
} else {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -1.9e-295: tmp = ((0.0 - y_46_im) * math.log((-1.0 / x_46_im))) / math.pow((-1.0 / x_46_im), y_46_re) else: tmp = y_46_re * math.atan2(x_46_im, x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -1.9e-295) tmp = Float64(Float64(Float64(0.0 - y_46_im) * log(Float64(-1.0 / x_46_im))) / (Float64(-1.0 / x_46_im) ^ y_46_re)); else tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -1.9e-295) tmp = ((0.0 - y_46_im) * log((-1.0 / x_46_im))) / ((-1.0 / x_46_im) ^ y_46_re); else tmp = y_46_re * atan2(x_46_im, x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -1.9e-295], N[(N[(N[(0.0 - y$46$im), $MachinePrecision] * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[(-1.0 / x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.9 \cdot 10^{-295}:\\
\;\;\;\;\frac{\left(0 - y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)}{{\left(\frac{-1}{x.im}\right)}^{y.re}}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\end{array}
\end{array}
if x.im < -1.90000000000000009e-295Initial program 42.9%
Applied egg-rr34.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.2%
Simplified28.2%
Taylor expanded in x.im around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6446.9%
Simplified46.9%
Taylor expanded in y.im around 0
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6439.2%
Simplified39.2%
if -1.90000000000000009e-295 < x.im Initial program 45.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.8%
Simplified46.8%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6417.3%
Simplified17.3%
Final simplification28.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((y_46re * atan2(x_46im, x_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_re * atan(x_46_im, x_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 44.3%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6458.0%
Simplified58.0%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.7%
Simplified43.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6417.2%
Simplified17.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 44.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.1%
Simplified52.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6417.1%
Simplified17.1%
herbie shell --seed 2024140
(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)))))