
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 3.6e+122)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 3.6e+122) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 3.6e+122) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 3.6e+122], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 3.6 \cdot 10^{+122}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \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 < 3.6000000000000003e122Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
if 3.6000000000000003e122 < y.re Initial program 24.5%
Taylor expanded in y.re around 0 34.7%
*-commutative34.7%
unpow234.7%
unpow234.7%
hypot-undefine71.5%
Simplified71.5%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.re -11.5) (not (<= y.re 6e+26)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -11.5) || !(y_46_re <= 6e+26)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -11.5) || !(y_46_re <= 6e+26)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_im * t_0));
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if (y_46_re <= -11.5) or not (y_46_re <= 6e+26): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_im * t_0)) else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -11.5) || !(y_46_re <= 6e+26)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, 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) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if ((y_46_re <= -11.5) || ~((y_46_re <= 6e+26))) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0)); else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -11.5], N[Not[LessEqual[y$46$re, 6e+26]], $MachinePrecision]], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -11.5 \lor \neg \left(y.re \leq 6 \cdot 10^{+26}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.re < -11.5 or 5.99999999999999994e26 < y.re Initial program 38.4%
Taylor expanded in y.re around 0 42.4%
*-commutative42.4%
unpow242.4%
unpow242.4%
hypot-undefine77.7%
Simplified77.7%
if -11.5 < y.re < 5.99999999999999994e26Initial program 46.0%
exp-diff46.0%
exp-to-pow46.0%
hypot-define46.0%
*-commutative46.0%
exp-prod45.8%
fma-define45.7%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around inf 46.5%
unpow246.5%
unpow246.5%
hypot-undefine82.7%
associate-/l*83.4%
Simplified83.4%
Final simplification80.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -1.2)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(if (<= y.re 6e+26)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* 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 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -1.2) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else if (y_46_re <= 6e+26) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -1.2) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); elseif (y_46_re <= 6e+26) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6e+26], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+26}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.19999999999999996Initial program 46.7%
fmm-def46.7%
hypot-define46.7%
distribute-rgt-neg-out46.7%
fma-define46.7%
hypot-define88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.re around inf 45.0%
+-commutative45.0%
associate-/l*46.7%
unpow246.7%
unpow246.7%
hypot-undefine88.3%
Simplified88.3%
if -1.19999999999999996 < y.re < 5.99999999999999994e26Initial program 46.0%
exp-diff46.0%
exp-to-pow46.0%
hypot-define46.0%
*-commutative46.0%
exp-prod45.8%
fma-define45.7%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y.im around inf 46.5%
unpow246.5%
unpow246.5%
hypot-undefine82.7%
associate-/l*83.4%
Simplified83.4%
if 5.99999999999999994e26 < y.re Initial program 30.8%
Taylor expanded in y.re around 0 35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine70.8%
Simplified70.8%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.im -3.15e-15) (not (<= y.im 2.1e-68)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 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 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -3.15e-15) || !(y_46_im <= 2.1e-68)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
} else {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * 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.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -3.15e-15) || !(y_46_im <= 2.1e-68)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_im * t_0));
} else {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * 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.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if (y_46_im <= -3.15e-15) or not (y_46_im <= 2.1e-68): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_im * t_0)) else: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * 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 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3.15e-15) || !(y_46_im <= 2.1e-68)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); else tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * (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 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if ((y_46_im <= -3.15e-15) || ~((y_46_im <= 2.1e-68))) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0)); else tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.15e-15], N[Not[LessEqual[y$46$im, 2.1e-68]], $MachinePrecision]], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -3.15 \cdot 10^{-15} \lor \neg \left(y.im \leq 2.1 \cdot 10^{-68}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -3.14999999999999991e-15 or 2.10000000000000008e-68 < y.im Initial program 40.5%
Taylor expanded in y.re around 0 44.7%
*-commutative44.7%
unpow244.7%
unpow244.7%
hypot-undefine66.6%
Simplified66.6%
if -3.14999999999999991e-15 < y.im < 2.10000000000000008e-68Initial program 44.5%
fmm-def44.5%
hypot-define44.5%
distribute-rgt-neg-out44.5%
fma-define44.5%
hypot-define90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y.re around inf 44.5%
+-commutative44.5%
associate-/l*44.5%
unpow244.5%
unpow244.5%
hypot-undefine90.9%
Simplified90.9%
Taylor expanded in y.im around 0 64.2%
unpow264.2%
unpow264.2%
hypot-undefine90.9%
Simplified90.9%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (sin (* y.im t_0)))
(t_2 (pow (hypot x.im x.re) y.re)))
(if (<= y.im -3.2e+17)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.im 2.2e+31)
(* (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))) t_2)
(if (<= y.im 2.9e+176)
(pow
(pow (* t_2 (sin (* y.re (atan2 x.im x.re)))) 3.0)
0.3333333333333333)
(* t_1 (pow (exp y.im) (- (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((y_46_im * t_0));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= -3.2e+17) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_im <= 2.2e+31) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * t_2;
} else if (y_46_im <= 2.9e+176) {
tmp = pow(pow((t_2 * sin((y_46_re * atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333);
} else {
tmp = t_1 * pow(exp(y_46_im), -atan2(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.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_im * t_0));
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= -3.2e+17) {
tmp = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_im <= 2.2e+31) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * t_2;
} else if (y_46_im <= 2.9e+176) {
tmp = Math.pow(Math.pow((t_2 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333);
} else {
tmp = t_1 * Math.pow(Math.exp(y_46_im), -Math.atan2(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.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_im * t_0)) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_im <= -3.2e+17: tmp = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_im <= 2.2e+31: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * t_2 elif y_46_im <= 2.9e+176: tmp = math.pow(math.pow((t_2 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333) else: tmp = t_1 * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * t_0)) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_im <= -3.2e+17) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_im <= 2.2e+31) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * t_2); elseif (y_46_im <= 2.9e+176) tmp = (Float64(t_2 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0) ^ 0.3333333333333333; else tmp = Float64(t_1 * (exp(y_46_im) ^ Float64(-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) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_im * t_0)); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_im <= -3.2e+17) tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_im <= 2.2e+31) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * t_2; elseif (y_46_im <= 2.9e+176) tmp = ((t_2 * sin((y_46_re * atan2(x_46_im, x_46_re)))) ^ 3.0) ^ 0.3333333333333333; else tmp = t_1 * (exp(y_46_im) ^ -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_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -3.2e+17], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.2e+31], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 2.9e+176], N[Power[N[Power[N[(t$95$2 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.im \cdot t\_0\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{+17}:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+31}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot t\_2\\
\mathbf{elif}\;y.im \leq 2.9 \cdot 10^{+176}:\\
\;\;\;\;{\left({\left(t\_2 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.im < -3.2e17Initial program 42.9%
fmm-def42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y.re around 0 39.8%
neg-mul-139.8%
distribute-lft-neg-in39.8%
*-commutative39.8%
unpow239.8%
unpow239.8%
hypot-undefine60.1%
Simplified60.1%
if -3.2e17 < y.im < 2.2000000000000001e31Initial program 43.4%
fmm-def43.4%
hypot-define43.4%
distribute-rgt-neg-out43.4%
fma-define43.3%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.re around inf 43.3%
+-commutative43.3%
associate-/l*43.3%
unpow243.3%
unpow243.3%
hypot-undefine86.8%
Simplified86.8%
Taylor expanded in y.im around 0 62.1%
unpow262.1%
unpow262.1%
hypot-undefine85.5%
Simplified85.5%
if 2.2000000000000001e31 < y.im < 2.9000000000000001e176Initial program 39.4%
fmm-def39.4%
hypot-define39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in y.im around 0 43.1%
unpow243.1%
unpow243.1%
hypot-undefine41.0%
Simplified41.0%
add-cbrt-cube53.7%
pow1/362.0%
pow362.0%
Applied egg-rr62.0%
if 2.9000000000000001e176 < y.im Initial program 38.2%
fmm-def38.2%
hypot-define38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in y.re around 0 33.6%
neg-mul-133.6%
distribute-rgt-neg-in33.6%
mul-1-neg33.6%
exp-prod38.2%
mul-1-neg38.2%
*-commutative38.2%
unpow238.2%
unpow238.2%
hypot-undefine72.5%
Simplified72.5%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.15e-65)
(* t_0 (fabs (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re 1.5e-37)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.15e-65) {
tmp = t_0 * fabs(sin((y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 1.5e-37) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.15e-65) {
tmp = t_0 * Math.abs(Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 1.5e-37) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.15e-65) tmp = Float64(t_0 * abs(sin(Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 1.5e-37) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.15e-65], N[(t$95$0 * N[Abs[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.5e-37], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.15 \cdot 10^{-65}:\\
\;\;\;\;t\_0 \cdot \left|\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right|\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-37}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -3.1499999999999998e-65Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 70.5%
unpow270.5%
unpow270.5%
hypot-undefine77.0%
Simplified77.0%
add-sqr-sqrt48.0%
sqrt-unprod77.1%
pow277.1%
Applied egg-rr77.1%
unpow277.1%
rem-sqrt-square78.4%
Simplified78.4%
if -3.1499999999999998e-65 < y.re < 1.5e-37Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.re around 0 42.1%
neg-mul-142.1%
distribute-lft-neg-in42.1%
*-commutative42.1%
unpow242.1%
unpow242.1%
hypot-undefine71.1%
Simplified71.1%
if 1.5e-37 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in y.im around 0 54.1%
unpow254.1%
unpow254.1%
hypot-undefine56.6%
Simplified56.6%
add-cube-cbrt65.7%
pow365.7%
Applied egg-rr65.7%
Final simplification71.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -5.2e-77)
(* t_0 (fabs t_1))
(if (<= y.re 2.55e-36)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.2e-77) {
tmp = t_0 * fabs(t_1);
} else if (y_46_re <= 2.55e-36) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.2e-77) {
tmp = t_0 * Math.abs(t_1);
} else if (y_46_re <= 2.55e-36) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -5.2e-77: tmp = t_0 * math.fabs(t_1) elif y_46_re <= 2.55e-36: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = t_0 * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -5.2e-77) tmp = Float64(t_0 * abs(t_1)); elseif (y_46_re <= 2.55e-36) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -5.2e-77) tmp = t_0 * abs(t_1); elseif (y_46_re <= 2.55e-36) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = t_0 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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, -5.2e-77], N[(t$95$0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-36], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{-77}:\\
\;\;\;\;t\_0 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-36}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -5.2000000000000002e-77Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 70.5%
unpow270.5%
unpow270.5%
hypot-undefine77.0%
Simplified77.0%
add-sqr-sqrt48.0%
sqrt-unprod77.1%
pow277.1%
Applied egg-rr77.1%
unpow277.1%
rem-sqrt-square78.4%
Simplified78.4%
if -5.2000000000000002e-77 < y.re < 2.54999999999999987e-36Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.re around 0 42.1%
neg-mul-142.1%
distribute-lft-neg-in42.1%
*-commutative42.1%
unpow242.1%
unpow242.1%
hypot-undefine71.1%
Simplified71.1%
if 2.54999999999999987e-36 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in y.im around 0 54.1%
unpow254.1%
unpow254.1%
hypot-undefine56.6%
Simplified56.6%
Final simplification68.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -3.9e-154)
(* t_0 (fabs t_1))
(if (<= y.re 2.9e-127)
(/
(sin (* y.im (log (hypot x.im x.re))))
(fma y.im (atan2 x.im x.re) 1.0))
(* t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -3.9e-154) {
tmp = t_0 * fabs(t_1);
} else if (y_46_re <= 2.9e-127) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / fma(y_46_im, atan2(x_46_im, x_46_re), 1.0);
} else {
tmp = t_0 * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -3.9e-154) tmp = Float64(t_0 * abs(t_1)); elseif (y_46_re <= 2.9e-127) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / fma(y_46_im, atan(x_46_im, x_46_re), 1.0)); else tmp = Float64(t_0 * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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, -3.9e-154], N[(t$95$0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.9e-127], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-154}:\\
\;\;\;\;t\_0 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{-127}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\mathsf{fma}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -3.90000000000000032e-154Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine72.7%
Simplified72.7%
add-sqr-sqrt47.1%
sqrt-unprod72.8%
pow272.8%
Applied egg-rr72.8%
unpow272.8%
rem-sqrt-square73.9%
Simplified73.9%
if -3.90000000000000032e-154 < y.re < 2.9e-127Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.7%
fma-define48.7%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 51.0%
add-cbrt-cube50.7%
pow350.7%
Applied egg-rr50.7%
Taylor expanded in y.re around 0 24.8%
unpow224.8%
unpow224.8%
hypot-undefine47.3%
+-commutative47.3%
fma-undefine47.3%
Simplified47.3%
if 2.9e-127 < y.re Initial program 32.6%
fmm-def32.6%
hypot-define32.6%
distribute-rgt-neg-out32.6%
fma-define32.6%
hypot-define63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y.im around 0 48.9%
unpow248.9%
unpow248.9%
hypot-undefine50.2%
Simplified50.2%
Final simplification57.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1.15e-160)
(* t_0 (fabs t_1))
(if (<= y.re 1.2e-127)
(*
(sin (* y.im (log (hypot x.im x.re))))
(/ 1.0 (+ 1.0 (* (atan2 x.im x.re) y.im))))
(* t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.15e-160) {
tmp = t_0 * fabs(t_1);
} else if (y_46_re <= 1.2e-127) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.15e-160) {
tmp = t_0 * Math.abs(t_1);
} else if (y_46_re <= 1.2e-127) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -1.15e-160: tmp = t_0 * math.fabs(t_1) elif y_46_re <= 1.2e-127: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (math.atan2(x_46_im, x_46_re) * y_46_im))) else: tmp = t_0 * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -1.15e-160) tmp = Float64(t_0 * abs(t_1)); elseif (y_46_re <= 1.2e-127) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * Float64(1.0 / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(t_0 * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -1.15e-160) tmp = t_0 * abs(t_1); elseif (y_46_re <= 1.2e-127) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = t_0 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $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, -1.15e-160], N[(t$95$0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e-127], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-160}:\\
\;\;\;\;t\_0 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-127}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \frac{1}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.14999999999999992e-160Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine72.7%
Simplified72.7%
add-sqr-sqrt47.1%
sqrt-unprod72.8%
pow272.8%
Applied egg-rr72.8%
unpow272.8%
rem-sqrt-square73.9%
Simplified73.9%
if -1.14999999999999992e-160 < y.re < 1.19999999999999991e-127Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.7%
fma-define48.7%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 51.0%
Taylor expanded in y.re around 0 51.0%
Taylor expanded in y.re around 0 24.8%
unpow224.8%
unpow224.8%
hypot-undefine47.3%
Simplified47.3%
if 1.19999999999999991e-127 < y.re Initial program 32.6%
fmm-def32.6%
hypot-define32.6%
distribute-rgt-neg-out32.6%
fma-define32.6%
hypot-define63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y.im around 0 48.9%
unpow248.9%
unpow248.9%
hypot-undefine50.2%
Simplified50.2%
Final simplification57.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -9.2e-153) (not (<= y.re 3.5e-128)))
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
(*
(sin (* y.im (log (hypot x.im x.re))))
(/ 1.0 (+ 1.0 (* (atan2 x.im x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.2e-153) || !(y_46_re <= 3.5e-128)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.2e-153) || !(y_46_re <= 3.5e-128)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (Math.atan2(x_46_im, 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 (y_46_re <= -9.2e-153) or not (y_46_re <= 3.5e-128): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -9.2e-153) || !(y_46_re <= 3.5e-128)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * Float64(1.0 / Float64(1.0 + Float64(atan(x_46_im, 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 ((y_46_re <= -9.2e-153) || ~((y_46_re <= 3.5e-128))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 / (1.0 + (atan2(x_46_im, 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[Or[LessEqual[y$46$re, -9.2e-153], N[Not[LessEqual[y$46$re, 3.5e-128]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.2 \cdot 10^{-153} \lor \neg \left(y.re \leq 3.5 \cdot 10^{-128}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \frac{1}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < -9.19999999999999988e-153 or 3.5e-128 < y.re Initial program 39.3%
fmm-def39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.im around 0 56.8%
unpow256.8%
unpow256.8%
hypot-undefine60.7%
Simplified60.7%
if -9.19999999999999988e-153 < y.re < 3.5e-128Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.7%
fma-define48.7%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 51.0%
Taylor expanded in y.re around 0 51.0%
Taylor expanded in y.re around 0 24.8%
unpow224.8%
unpow224.8%
hypot-undefine47.3%
Simplified47.3%
Final simplification56.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -9.5e+29)
0.0
(if (<= y.im 3.9e+77)
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
0.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -9.5e+29) {
tmp = 0.0;
} else if (y_46_im <= 3.9e+77) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -9.5e+29) {
tmp = 0.0;
} else if (y_46_im <= 3.9e+77) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -9.5e+29: tmp = 0.0 elif y_46_im <= 3.9e+77: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -9.5e+29) tmp = 0.0; elseif (y_46_im <= 3.9e+77) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = 0.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 (y_46_im <= -9.5e+29) tmp = 0.0; elseif (y_46_im <= 3.9e+77) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = 0.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -9.5e+29], 0.0, If[LessEqual[y$46$im, 3.9e+77], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{+29}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{+77}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -9.5000000000000003e29 or 3.8999999999999998e77 < y.im Initial program 40.7%
fmm-def40.7%
hypot-define40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.im around 0 37.3%
unpow237.3%
unpow237.3%
hypot-undefine33.2%
Simplified33.2%
Taylor expanded in y.re around 0 5.8%
*-commutative5.8%
expm1-log1p-u5.3%
expm1-undefine25.1%
*-commutative25.1%
Applied egg-rr25.1%
Taylor expanded in y.re around 0 47.8%
if -9.5000000000000003e29 < y.im < 3.8999999999999998e77Initial program 43.4%
fmm-def43.4%
hypot-define43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 45.0%
unpow245.0%
unpow245.0%
hypot-undefine53.9%
Simplified53.9%
Final simplification51.3%
(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 -28.0)
0.0
(if (<= y.re 3.7e-6)
(* t_0 (/ 1.0 (+ 1.0 (* (atan2 x.im x.re) y.im))))
(* t_0 (pow x.im y.re))))))
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 <= -28.0) {
tmp = 0.0;
} else if (y_46_re <= 3.7e-6) {
tmp = t_0 * (1.0 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0 * pow(x_46_im, y_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) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (y_46re <= (-28.0d0)) then
tmp = 0.0d0
else if (y_46re <= 3.7d-6) then
tmp = t_0 * (1.0d0 / (1.0d0 + (atan2(x_46im, x_46re) * y_46im)))
else
tmp = t_0 * (x_46im ** y_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 t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -28.0) {
tmp = 0.0;
} else if (y_46_re <= 3.7e-6) {
tmp = t_0 * (1.0 / (1.0 + (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
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 <= -28.0: tmp = 0.0 elif y_46_re <= 3.7e-6: tmp = t_0 * (1.0 / (1.0 + (math.atan2(x_46_im, x_46_re) * y_46_im))) else: tmp = t_0 * math.pow(x_46_im, y_46_re) 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 <= -28.0) tmp = 0.0; elseif (y_46_re <= 3.7e-6) tmp = Float64(t_0 * Float64(1.0 / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(t_0 * (x_46_im ^ 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((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -28.0) tmp = 0.0; elseif (y_46_re <= 3.7e-6) tmp = t_0 * (1.0 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = t_0 * (x_46_im ^ 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -28.0], 0.0, If[LessEqual[y$46$re, 3.7e-6], N[(t$95$0 * N[(1.0 / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $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 -28:\\
\;\;\;\;0\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-6}:\\
\;\;\;\;t\_0 \cdot \frac{1}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -28Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y.im around 0 79.8%
unpow279.8%
unpow279.8%
hypot-undefine79.8%
Simplified79.8%
Taylor expanded in y.re around 0 7.5%
*-commutative7.5%
expm1-log1p-u6.3%
expm1-undefine11.2%
*-commutative11.2%
Applied egg-rr11.2%
Taylor expanded in y.re around 0 76.6%
if -28 < y.re < 3.7000000000000002e-6Initial program 46.6%
exp-diff46.6%
exp-to-pow46.6%
hypot-define46.6%
*-commutative46.6%
exp-prod46.4%
fma-define46.4%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.im around 0 53.2%
Taylor expanded in y.re around 0 50.7%
Taylor expanded in y.im around 0 33.2%
if 3.7000000000000002e-6 < y.re Initial program 30.0%
fmm-def30.0%
hypot-define30.0%
distribute-rgt-neg-out30.0%
fma-define30.0%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 55.8%
unpow255.8%
unpow255.8%
hypot-undefine55.8%
Simplified55.8%
Taylor expanded in x.im around inf 13.0%
*-commutative13.0%
mul-1-neg13.0%
*-commutative13.0%
distribute-lft-neg-in13.0%
log-rec13.0%
remove-double-neg13.0%
exp-to-pow48.9%
Simplified48.9%
Final simplification47.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 -1.2e-23)
0.0
(if (<= y.re 0.48) (cbrt (pow t_0 3.0)) (* (sin t_0) (pow x.im 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_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1.2e-23) {
tmp = 0.0;
} else if (y_46_re <= 0.48) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = sin(t_0) * pow(x_46_im, 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1.2e-23) {
tmp = 0.0;
} else if (y_46_re <= 0.48) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
}
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 <= -1.2e-23) tmp = 0.0; elseif (y_46_re <= 0.48) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(sin(t_0) * (x_46_im ^ 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e-23], 0.0, If[LessEqual[y$46$re, 0.48], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $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 -1.2 \cdot 10^{-23}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.re \leq 0.48:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.19999999999999998e-23Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around 0 76.1%
unpow276.1%
unpow276.1%
hypot-undefine76.1%
Simplified76.1%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
expm1-log1p-u8.1%
expm1-undefine13.5%
*-commutative13.5%
Applied egg-rr13.5%
Taylor expanded in y.re around 0 71.8%
if -1.19999999999999998e-23 < y.re < 0.47999999999999998Initial program 45.2%
fmm-def45.2%
hypot-define45.2%
distribute-rgt-neg-out45.2%
fma-define45.2%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.im around 0 14.6%
unpow214.6%
unpow214.6%
hypot-undefine21.8%
Simplified21.8%
Taylor expanded in y.re around 0 21.0%
*-commutative21.0%
add-cbrt-cube28.2%
pow328.2%
*-commutative28.2%
Applied egg-rr28.2%
if 0.47999999999999998 < y.re Initial program 30.0%
fmm-def30.0%
hypot-define30.0%
distribute-rgt-neg-out30.0%
fma-define30.0%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 55.8%
unpow255.8%
unpow255.8%
hypot-undefine55.8%
Simplified55.8%
Taylor expanded in x.im around inf 13.0%
*-commutative13.0%
mul-1-neg13.0%
*-commutative13.0%
distribute-lft-neg-in13.0%
log-rec13.0%
remove-double-neg13.0%
exp-to-pow48.9%
Simplified48.9%
Final simplification45.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -8.5e-110) 0.0 (if (<= y.im 3.3e-167) (log1p (expm1 (* y.re (atan2 x.im x.re)))) 0.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -8.5e-110) {
tmp = 0.0;
} else if (y_46_im <= 3.3e-167) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -8.5e-110) {
tmp = 0.0;
} else if (y_46_im <= 3.3e-167) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -8.5e-110: tmp = 0.0 elif y_46_im <= 3.3e-167: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -8.5e-110) tmp = 0.0; elseif (y_46_im <= 3.3e-167) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = 0.0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -8.5e-110], 0.0, If[LessEqual[y$46$im, 3.3e-167], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{-110}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq 3.3 \cdot 10^{-167}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -8.50000000000000029e-110 or 3.29999999999999995e-167 < y.im Initial program 41.9%
fmm-def41.9%
hypot-define41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around 0 38.3%
unpow238.3%
unpow238.3%
hypot-undefine36.6%
Simplified36.6%
Taylor expanded in y.re around 0 6.4%
*-commutative6.4%
expm1-log1p-u5.8%
expm1-undefine16.9%
*-commutative16.9%
Applied egg-rr16.9%
Taylor expanded in y.re around 0 42.0%
if -8.50000000000000029e-110 < y.im < 3.29999999999999995e-167Initial program 43.1%
fmm-def43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y.im around 0 50.2%
unpow250.2%
unpow250.2%
hypot-undefine65.9%
Simplified65.9%
Taylor expanded in y.re around 0 29.0%
log1p-expm1-u42.9%
Applied egg-rr42.9%
Final simplification42.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2.1e-251) 0.0 (if (<= y.im 1.6e-213) (* y.re (atan2 x.im x.re)) 0.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2.1e-251) {
tmp = 0.0;
} else if (y_46_im <= 1.6e-213) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = 0.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 (y_46im <= (-2.1d-251)) then
tmp = 0.0d0
else if (y_46im <= 1.6d-213) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = 0.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 (y_46_im <= -2.1e-251) {
tmp = 0.0;
} else if (y_46_im <= 1.6e-213) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -2.1e-251: tmp = 0.0 elif y_46_im <= 1.6e-213: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = 0.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -2.1e-251) tmp = 0.0; elseif (y_46_im <= 1.6e-213) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = 0.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 (y_46_im <= -2.1e-251) tmp = 0.0; elseif (y_46_im <= 1.6e-213) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = 0.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -2.1e-251], 0.0, If[LessEqual[y$46$im, 1.6e-213], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.1 \cdot 10^{-251}:\\
\;\;\;\;0\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{-213}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if y.im < -2.09999999999999982e-251 or 1.59999999999999986e-213 < y.im Initial program 42.3%
fmm-def42.3%
hypot-define42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y.im around 0 38.7%
unpow238.7%
unpow238.7%
hypot-undefine38.7%
Simplified38.7%
Taylor expanded in y.re around 0 8.2%
*-commutative8.2%
expm1-log1p-u7.6%
expm1-undefine15.3%
*-commutative15.3%
Applied egg-rr15.3%
Taylor expanded in y.re around 0 37.9%
if -2.09999999999999982e-251 < y.im < 1.59999999999999986e-213Initial program 42.3%
fmm-def42.3%
hypot-define42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in y.im around 0 61.9%
unpow261.9%
unpow261.9%
hypot-undefine88.2%
Simplified88.2%
Taylor expanded in y.re around 0 45.1%
Final simplification38.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 0.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 0.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 0.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 0.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 42.3%
fmm-def42.3%
hypot-define42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-undefine45.1%
Simplified45.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
expm1-log1p-u12.3%
expm1-undefine14.2%
*-commutative14.2%
Applied egg-rr14.2%
Taylor expanded in y.re around 0 35.0%
Final simplification35.0%
herbie shell --seed 2024188
(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)))))