
(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 18 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
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.re -1700.0)
t_1
(if (<= y.re 10000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ 1.0 (exp t_0)))
(if (<= y.re 2.55e+147)
t_1
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1700.0) {
tmp = t_1;
} else if (y_46_re <= 10000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (1.0 / exp(t_0));
} else if (y_46_re <= 2.55e+147) {
tmp = t_1;
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -1700.0) tmp = t_1; elseif (y_46_re <= 10000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64(1.0 / exp(t_0))); elseif (y_46_re <= 2.55e+147) tmp = t_1; else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $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]}, If[LessEqual[y$46$re, -1700.0], t$95$1, If[LessEqual[y$46$re, 10000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e+147], t$95$1, 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[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1700:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 10000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -1700 or 1e7 < y.re < 2.55e147Initial program 35.9%
Taylor expanded in y.re around 0 47.4%
*-commutative47.4%
unpow247.4%
unpow247.4%
hypot-undefine82.1%
Simplified82.1%
if -1700 < y.re < 1e7Initial program 44.1%
exp-diff43.4%
exp-to-pow43.4%
hypot-define43.4%
*-commutative43.4%
exp-prod43.4%
fma-define43.4%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 81.6%
if 2.55e147 < y.re Initial program 30.6%
fmm-def30.6%
hypot-define30.6%
distribute-rgt-neg-out30.6%
fma-define30.6%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 66.7%
unpow266.7%
unpow266.7%
hypot-undefine66.7%
Simplified66.7%
add-cbrt-cube80.6%
pow380.6%
Applied egg-rr80.6%
Final simplification81.6%
(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 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (log (hypot x.im x.re))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) (- INFINITY))
(* t_3 (fabs (sin (fma y.im t_4 t_1))))
(*
(exp (pow (cbrt (cbrt (* y.re (- t_4 (/ t_0 y.re))))) 9.0))
(sin (fma (log (hypot x.re x.im)) y.im t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((t_2 * y_46_re) - t_0));
double t_4 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= -((double) INFINITY)) {
tmp = t_3 * fabs(sin(fma(y_46_im, t_4, t_1)));
} else {
tmp = exp(pow(cbrt(cbrt((y_46_re * (t_4 - (t_0 / y_46_re))))), 9.0)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Float64(-Inf)) tmp = Float64(t_3 * abs(sin(fma(y_46_im, t_4, t_1)))); else tmp = Float64(exp((cbrt(cbrt(Float64(y_46_re * Float64(t_4 - Float64(t_0 / y_46_re))))) ^ 9.0)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(t$95$3 * N[Abs[N[Sin[N[(y$46$im * t$95$4 + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[Power[N[Power[N[Power[N[(y$46$re * N[(t$95$4 - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision], 9.0], $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $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 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq -\infty:\\
\;\;\;\;t\_3 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, t\_4, t\_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;e^{{\left(\sqrt[3]{\sqrt[3]{y.re \cdot \left(t\_4 - \frac{t\_0}{y.re}\right)}}\right)}^{9}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 33.3%
fma-define33.3%
hypot-define33.3%
*-commutative33.3%
add-sqr-sqrt0.0%
sqrt-unprod66.7%
pow266.7%
Applied egg-rr66.7%
unpow266.7%
rem-sqrt-square66.7%
fma-undefine66.7%
hypot-undefine66.7%
unpow266.7%
unpow266.7%
+-commutative66.7%
+-commutative66.7%
fma-define66.7%
Simplified66.7%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around inf 62.8%
mul-1-neg62.8%
unsub-neg62.8%
unpow262.8%
unpow262.8%
hypot-undefine83.0%
associate-/l*83.0%
Simplified83.0%
add-cube-cbrt83.0%
pow383.0%
Applied egg-rr83.0%
add-cube-cbrt83.0%
pow383.0%
rem-cbrt-cube83.0%
rem-cube-cbrt83.0%
associate-*r/83.0%
Applied egg-rr83.0%
pow-pow83.0%
pow-to-exp31.3%
Applied egg-rr31.3%
exp-to-pow83.0%
associate-*r/83.0%
Simplified83.0%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))))
(t_3 (log (hypot x.im x.re))))
(if (<= (* t_2 (sin (+ (* t_1 y.im) t_0))) (- INFINITY))
(* t_2 (fabs (sin (fma y.im t_3 t_0))))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp
(pow
(cbrt (* y.re (- t_3 (* y.im (/ (atan2 x.im x.re) y.re)))))
3.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 t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((t_2 * sin(((t_1 * y_46_im) + t_0))) <= -((double) INFINITY)) {
tmp = t_2 * fabs(sin(fma(y_46_im, t_3, t_0)));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(pow(cbrt((y_46_re * (t_3 - (y_46_im * (atan2(x_46_im, x_46_re) / y_46_re))))), 3.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)) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + t_0))) <= Float64(-Inf)) tmp = Float64(t_2 * abs(sin(fma(y_46_im, t_3, t_0)))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((cbrt(Float64(y_46_re * Float64(t_3 - Float64(y_46_im * Float64(atan(x_46_im, x_46_re) / y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(t$95$2 * N[Abs[N[Sin[N[(y$46$im * t$95$3 + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[Power[N[Power[N[(y$46$re * N[(t$95$3 - N[(y$46$im * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;t\_2 \cdot \sin \left(t\_1 \cdot y.im + t\_0\right) \leq -\infty:\\
\;\;\;\;t\_2 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, t\_3, t\_0\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{{\left(\sqrt[3]{y.re \cdot \left(t\_3 - y.im \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 33.3%
fma-define33.3%
hypot-define33.3%
*-commutative33.3%
add-sqr-sqrt0.0%
sqrt-unprod66.7%
pow266.7%
Applied egg-rr66.7%
unpow266.7%
rem-sqrt-square66.7%
fma-undefine66.7%
hypot-undefine66.7%
unpow266.7%
unpow266.7%
+-commutative66.7%
+-commutative66.7%
fma-define66.7%
Simplified66.7%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around inf 62.8%
mul-1-neg62.8%
unsub-neg62.8%
unpow262.8%
unpow262.8%
hypot-undefine83.0%
associate-/l*83.0%
Simplified83.0%
add-cube-cbrt83.0%
pow383.0%
Applied egg-rr83.0%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))))
(t_3 (log (hypot x.im x.re))))
(if (<= (* t_2 (sin (+ (* t_1 y.im) t_0))) (- INFINITY))
(* t_2 (fabs (sin (fma y.im t_3 t_0))))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* y.re (- t_3 (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((t_2 * sin(((t_1 * y_46_im) + t_0))) <= -((double) INFINITY)) {
tmp = t_2 * fabs(sin(fma(y_46_im, t_3, t_0)));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((y_46_re * (t_3 - (y_46_im * (atan2(x_46_im, x_46_re) / y_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + t_0))) <= Float64(-Inf)) tmp = Float64(t_2 * abs(sin(fma(y_46_im, t_3, t_0)))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(y_46_re * Float64(t_3 - Float64(y_46_im * Float64(atan(x_46_im, x_46_re) / y_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(t$95$2 * N[Abs[N[Sin[N[(y$46$im * t$95$3 + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * N[(t$95$3 - N[(y$46$im * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;t\_2 \cdot \sin \left(t\_1 \cdot y.im + t\_0\right) \leq -\infty:\\
\;\;\;\;t\_2 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, t\_3, t\_0\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{y.re \cdot \left(t\_3 - y.im \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 33.3%
fma-define33.3%
hypot-define33.3%
*-commutative33.3%
add-sqr-sqrt0.0%
sqrt-unprod66.7%
pow266.7%
Applied egg-rr66.7%
unpow266.7%
rem-sqrt-square66.7%
fma-undefine66.7%
hypot-undefine66.7%
unpow266.7%
unpow266.7%
+-commutative66.7%
+-commutative66.7%
fma-define66.7%
Simplified66.7%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around inf 62.8%
mul-1-neg62.8%
unsub-neg62.8%
unpow262.8%
unpow262.8%
hypot-undefine83.0%
associate-/l*83.0%
Simplified83.0%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re 1.52e+22)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(exp (* y.re (- t_0 (* y.im (/ (atan2 x.im x.re) y.re))))))
(if (<= y.re 1.4e+148)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (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 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= 1.52e+22) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp((y_46_re * (t_0 - (y_46_im * (atan2(x_46_im, x_46_re) / y_46_re)))));
} else if (y_46_re <= 1.4e+148) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(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 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= 1.52e+22) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(y_46_re * Float64(t_0 - Float64(y_46_im * Float64(atan(x_46_im, x_46_re) / y_46_re)))))); elseif (y_46_re <= 1.4e+148) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 1.52e+22], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * N[(t$95$0 - N[(y$46$im * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.4e+148], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $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[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $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 1.52 \cdot 10^{+22}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{y.re \cdot \left(t\_0 - y.im \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+148}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < 1.52e22Initial program 41.8%
fmm-def41.8%
hypot-define41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.re around inf 59.5%
mul-1-neg59.5%
unsub-neg59.5%
unpow259.5%
unpow259.5%
hypot-undefine81.8%
associate-/l*81.8%
Simplified81.8%
if 1.52e22 < y.re < 1.3999999999999999e148Initial program 35.0%
Taylor expanded in y.re around 0 55.0%
*-commutative55.0%
unpow255.0%
unpow255.0%
hypot-undefine80.0%
Simplified80.0%
if 1.3999999999999999e148 < y.re Initial program 30.6%
fmm-def30.6%
hypot-define30.6%
distribute-rgt-neg-out30.6%
fma-define30.6%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 66.7%
unpow266.7%
unpow266.7%
hypot-undefine66.7%
Simplified66.7%
add-cbrt-cube80.6%
pow380.6%
Applied egg-rr80.6%
Final simplification81.5%
(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))))
(if (<= y.re -160.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(sin (fabs t_1)))
(if (<= y.re 246.0)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -160.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(fabs(t_1));
} else if (y_46_re <= 246.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -160.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(abs(t_1))); elseif (y_46_re <= 246.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 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[(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]}, If[LessEqual[y$46$re, -160.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 246.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $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[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $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}\\
\mathbf{if}\;y.re \leq -160:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 246:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -160Initial program 35.6%
add-sqr-sqrt16.9%
sqrt-unprod25.4%
pow225.4%
*-commutative25.4%
Applied egg-rr25.4%
unpow225.4%
rem-sqrt-square39.0%
Simplified39.0%
Taylor expanded in y.im around 0 79.7%
*-commutative79.7%
Simplified79.7%
if -160 < y.re < 246Initial program 44.7%
exp-diff44.0%
exp-to-pow44.0%
hypot-define44.0%
*-commutative44.0%
exp-prod44.0%
fma-define44.0%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.re around 0 82.8%
if 246 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine59.8%
Simplified59.8%
add-cbrt-cube70.3%
pow370.3%
Applied egg-rr70.3%
Final simplification79.3%
(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))))
(if (<= y.re -160.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(sin t_1))
(if (<= y.re 140.0)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -160.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(t_1);
} else if (y_46_re <= 140.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -160.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(t_1)); elseif (y_46_re <= 140.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 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[(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]}, If[LessEqual[y$46$re, -160.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 140.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $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[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $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}\\
\mathbf{if}\;y.re \leq -160:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 140:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -160Initial program 35.6%
Taylor expanded in y.im around 0 74.7%
if -160 < y.re < 140Initial program 44.7%
exp-diff44.0%
exp-to-pow44.0%
hypot-define44.0%
*-commutative44.0%
exp-prod44.0%
fma-define44.0%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.re around 0 82.8%
if 140 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine59.8%
Simplified59.8%
add-cbrt-cube70.3%
pow370.3%
Applied egg-rr70.3%
Final simplification78.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.im -0.0028)
(* t_0 (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im 7200000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.im x.re) y.re))
(* t_0 (exp (* (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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -0.0028) {
tmp = t_0 * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 7200000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * exp((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 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -0.0028) tmp = Float64(t_0 * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 7200000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.0028], N[(t$95$0 * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7200000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -0.0028:\\
\;\;\;\;t\_0 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq 7200000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -0.00279999999999999997Initial program 32.1%
fmm-def32.1%
hypot-define32.1%
distribute-rgt-neg-out32.1%
fma-define32.1%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.re around inf 54.1%
mul-1-neg54.1%
unsub-neg54.1%
unpow254.1%
unpow254.1%
hypot-undefine68.9%
associate-/l*68.9%
Simplified68.9%
add-cube-cbrt68.9%
pow368.9%
Applied egg-rr68.9%
Taylor expanded in y.re around 0 30.9%
associate-*r*30.9%
neg-mul-130.9%
exp-prod30.9%
unpow230.9%
unpow230.9%
hypot-undefine63.6%
Simplified63.6%
if -0.00279999999999999997 < y.im < 7.2e9Initial program 43.9%
fmm-def43.9%
hypot-define43.9%
distribute-rgt-neg-out43.9%
fma-define43.9%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in y.im around 0 61.7%
unpow261.7%
unpow261.7%
hypot-undefine85.5%
Simplified85.5%
if 7.2e9 < y.im Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y.re around 0 39.3%
neg-mul-139.3%
distribute-lft-neg-in39.3%
*-commutative39.3%
unpow239.3%
unpow239.3%
hypot-undefine65.9%
Simplified65.9%
Final simplification74.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2e-103)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 41000.0)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (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 tmp;
if (y_46_re <= -2e-103) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 41000.0) {
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 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(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 tmp;
if (y_46_re <= -2e-103) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 41000.0) {
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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.cbrt(Math.pow(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) tmp = 0.0 if (y_46_re <= -2e-103) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 41000.0) 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((hypot(x_46_im, x_46_re) ^ y_46_re) * 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_] := If[LessEqual[y$46$re, -2e-103], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 41000.0], 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[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2 \cdot 10^{-103}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 41000:\\
\;\;\;\;\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}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -1.99999999999999992e-103Initial program 37.0%
Taylor expanded in y.im around 0 69.4%
if -1.99999999999999992e-103 < y.re < 41000Initial program 45.4%
fmm-def45.4%
hypot-define45.4%
distribute-rgt-neg-out45.4%
fma-define45.4%
hypot-define86.1%
*-commutative86.1%
Simplified86.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-undefine69.0%
Simplified69.0%
if 41000 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine59.8%
Simplified59.8%
add-cbrt-cube70.3%
pow370.3%
Applied egg-rr70.3%
Final simplification69.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -2e-103) (not (<= y.re 4500.0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (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 <= -2e-103) || !(y_46_re <= 4500.0)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((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 <= -2e-103) || !(y_46_re <= 4500.0)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
} else {
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));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2e-103) || !(y_46_re <= 4500.0)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); else 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)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2e-103], N[Not[LessEqual[y$46$re, 4500.0]], $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[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2 \cdot 10^{-103} \lor \neg \left(y.re \leq 4500\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if y.re < -1.99999999999999992e-103 or 4500 < y.re Initial program 34.8%
fmm-def34.8%
hypot-define34.8%
distribute-rgt-neg-out34.8%
fma-define34.8%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine61.2%
Simplified61.2%
add-cbrt-cube66.3%
pow366.3%
Applied egg-rr66.3%
if -1.99999999999999992e-103 < y.re < 4500Initial program 45.4%
fmm-def45.4%
hypot-define45.4%
distribute-rgt-neg-out45.4%
fma-define45.4%
hypot-define86.1%
*-commutative86.1%
Simplified86.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-undefine69.0%
Simplified69.0%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))))
(if (<= y.re -1.42e-103)
t_0
(if (<= y.re 300.0)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.05e+217)
t_0
(*
(sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.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 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.42e-103) {
tmp = t_0;
} else if (y_46_re <= 300.0) {
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 if (y_46_re <= 1.05e+217) {
tmp = t_0;
} else {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.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 = 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)));
double tmp;
if (y_46_re <= -1.42e-103) {
tmp = t_0;
} else if (y_46_re <= 300.0) {
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 if (y_46_re <= 1.05e+217) {
tmp = t_0;
} else {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.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((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1.42e-103) tmp = t_0; elseif (y_46_re <= 300.0) 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)))); elseif (y_46_re <= 1.05e+217) tmp = t_0; else tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.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[(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]}, If[LessEqual[y$46$re, -1.42e-103], t$95$0, If[LessEqual[y$46$re, 300.0], 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], If[LessEqual[y$46$re, 1.05e+217], t$95$0, N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\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{if}\;y.re \leq -1.42 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 300:\\
\;\;\;\;\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{elif}\;y.re \leq 1.05 \cdot 10^{+217}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.4199999999999999e-103 or 300 < y.re < 1.05e217Initial program 36.0%
fmm-def36.0%
hypot-define36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in y.im around 0 61.1%
unpow261.1%
unpow261.1%
hypot-undefine62.7%
Simplified62.7%
if -1.4199999999999999e-103 < y.re < 300Initial program 45.4%
fmm-def45.4%
hypot-define45.4%
distribute-rgt-neg-out45.4%
fma-define45.4%
hypot-define86.1%
*-commutative86.1%
Simplified86.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-undefine69.0%
Simplified69.0%
if 1.05e217 < y.re Initial program 25.0%
fmm-def25.0%
hypot-define25.0%
distribute-rgt-neg-out25.0%
fma-define25.0%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in x.re around 0 50.2%
*-commutative50.2%
Simplified50.2%
add-cbrt-cube81.3%
pow381.3%
Applied egg-rr81.4%
Final simplification66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -8.5e+107)
(log (exp (fabs t_1)))
(if (<= y.im 1.8e-24) (* t_0 (sin t_1)) (* t_0 0.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 t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8.5e+107) {
tmp = log(exp(fabs(t_1)));
} else if (y_46_im <= 1.8e-24) {
tmp = t_0 * sin(t_1);
} else {
tmp = t_0 * 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 t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8.5e+107) {
tmp = Math.log(Math.exp(Math.abs(t_1)));
} else if (y_46_im <= 1.8e-24) {
tmp = t_0 * Math.sin(t_1);
} else {
tmp = t_0 * 0.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -8.5e+107: tmp = math.log(math.exp(math.fabs(t_1))) elif y_46_im <= 1.8e-24: tmp = t_0 * math.sin(t_1) else: tmp = t_0 * 0.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 t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -8.5e+107) tmp = log(exp(abs(t_1))); elseif (y_46_im <= 1.8e-24) tmp = Float64(t_0 * sin(t_1)); else tmp = Float64(t_0 * 0.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_im <= -8.5e+107) tmp = log(exp(abs(t_1))); elseif (y_46_im <= 1.8e-24) tmp = t_0 * sin(t_1); else tmp = t_0 * 0.0; 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.5e+107], N[Log[N[Exp[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1.8e-24], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 0.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{+107}:\\
\;\;\;\;\log \left(e^{\left|t\_1\right|}\right)\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-24}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot 0\\
\end{array}
\end{array}
if y.im < -8.4999999999999999e107Initial program 32.1%
fmm-def32.1%
hypot-define32.1%
distribute-rgt-neg-out32.1%
fma-define32.1%
hypot-define70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in y.im around 0 32.0%
unpow232.0%
unpow232.0%
hypot-undefine19.3%
Simplified19.3%
Taylor expanded in y.re around 0 6.5%
*-commutative6.5%
Simplified6.5%
add-sqr-sqrt7.5%
sqrt-unprod32.1%
pow232.1%
*-commutative32.1%
Applied egg-rr24.5%
unpow232.1%
rem-sqrt-square34.0%
Simplified6.6%
add-log-exp46.1%
Applied egg-rr46.1%
if -8.4999999999999999e107 < y.im < 1.8e-24Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in y.im around 0 45.9%
unpow245.9%
unpow245.9%
hypot-undefine57.7%
Simplified57.7%
if 1.8e-24 < y.im Initial program 43.4%
fmm-def43.4%
hypot-define43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in y.im around 0 36.8%
unpow236.8%
unpow236.8%
hypot-undefine33.1%
Simplified33.1%
add-log-exp48.1%
Applied egg-rr48.1%
Taylor expanded in y.re around 0 47.9%
Final simplification52.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8e+31) (not (<= y.im 5e-65))) (* (pow (hypot x.im x.re) y.re) 0.0) (* (sin (* y.re (atan2 x.im x.re))) (pow (- x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -8e+31) || !(y_46_im <= 5e-65)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * 0.0;
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(-x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -8e+31) || !(y_46_im <= 5e-65)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * 0.0;
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(-x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -8e+31) or not (y_46_im <= 5e-65): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * 0.0 else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(-x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -8e+31) || !(y_46_im <= 5e-65)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 0.0); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (Float64(-x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -8e+31) || ~((y_46_im <= 5e-65))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * 0.0; else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (-x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -8e+31], N[Not[LessEqual[y$46$im, 5e-65]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * 0.0), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \cdot 10^{+31} \lor \neg \left(y.im \leq 5 \cdot 10^{-65}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot 0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-x.re\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -7.9999999999999997e31 or 4.99999999999999983e-65 < y.im Initial program 40.3%
fmm-def40.3%
hypot-define40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in y.im around 0 37.8%
unpow237.8%
unpow237.8%
hypot-undefine31.0%
Simplified31.0%
add-log-exp49.5%
Applied egg-rr49.5%
Taylor expanded in y.re around 0 46.2%
if -7.9999999999999997e31 < y.im < 4.99999999999999983e-65Initial program 38.8%
fmm-def38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y.im around 0 44.1%
unpow244.1%
unpow244.1%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in x.re around -inf 48.2%
mul-1-neg48.2%
Simplified48.2%
Final simplification47.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -2.1e-198) (not (<= y.im 3.4e+59)))
(sqrt (pow t_0 2.0))
(log1p (expm1 t_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_im <= -2.1e-198) || !(y_46_im <= 3.4e+59)) {
tmp = sqrt(pow(t_0, 2.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -2.1e-198) || !(y_46_im <= 3.4e+59)) {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
} else {
tmp = Math.log1p(Math.expm1(t_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_im <= -2.1e-198) or not (y_46_im <= 3.4e+59): tmp = math.sqrt(math.pow(t_0, 2.0)) else: tmp = math.log1p(math.expm1(t_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_im <= -2.1e-198) || !(y_46_im <= 3.4e+59)) tmp = sqrt((t_0 ^ 2.0)); else tmp = log1p(expm1(t_0)); 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[Or[LessEqual[y$46$im, -2.1e-198], N[Not[LessEqual[y$46$im, 3.4e+59]], $MachinePrecision]], N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.1 \cdot 10^{-198} \lor \neg \left(y.im \leq 3.4 \cdot 10^{+59}\right):\\
\;\;\;\;\sqrt{{t\_0}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -2.09999999999999993e-198 or 3.40000000000000006e59 < y.im Initial program 36.6%
fmm-def36.6%
hypot-define36.6%
distribute-rgt-neg-out36.6%
fma-define36.6%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around 0 33.5%
unpow233.5%
unpow233.5%
hypot-undefine30.7%
Simplified30.7%
Taylor expanded in y.re around 0 8.6%
*-commutative8.6%
Simplified8.6%
add-sqr-sqrt19.5%
sqrt-unprod32.4%
pow232.4%
*-commutative32.4%
Applied egg-rr23.2%
if -2.09999999999999993e-198 < y.im < 3.40000000000000006e59Initial program 45.0%
fmm-def45.0%
hypot-define45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 52.2%
unpow252.2%
unpow252.2%
hypot-undefine63.0%
Simplified63.0%
Taylor expanded in y.re around 0 27.3%
*-commutative27.3%
Simplified27.3%
*-commutative27.3%
log1p-expm1-u41.4%
Applied egg-rr41.4%
Final simplification29.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5.4e-83) (not (<= y.im 1.35e-115))) (* (pow (hypot x.im x.re) y.re) 0.0) (log1p (expm1 (* 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 ((y_46_im <= -5.4e-83) || !(y_46_im <= 1.35e-115)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * 0.0;
} else {
tmp = log1p(expm1((y_46_re * 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 tmp;
if ((y_46_im <= -5.4e-83) || !(y_46_im <= 1.35e-115)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * 0.0;
} else {
tmp = Math.log1p(Math.expm1((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 (y_46_im <= -5.4e-83) or not (y_46_im <= 1.35e-115): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * 0.0 else: tmp = math.log1p(math.expm1((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 ((y_46_im <= -5.4e-83) || !(y_46_im <= 1.35e-115)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * 0.0); else tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -5.4e-83], N[Not[LessEqual[y$46$im, 1.35e-115]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * 0.0), $MachinePrecision], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.4 \cdot 10^{-83} \lor \neg \left(y.im \leq 1.35 \cdot 10^{-115}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot 0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -5.39999999999999982e-83 or 1.35e-115 < y.im Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in y.im around 0 39.6%
unpow239.6%
unpow239.6%
hypot-undefine34.3%
Simplified34.3%
add-log-exp49.2%
Applied egg-rr49.2%
Taylor expanded in y.re around 0 44.1%
if -5.39999999999999982e-83 < y.im < 1.35e-115Initial program 40.8%
fmm-def40.8%
hypot-define40.8%
distribute-rgt-neg-out40.8%
fma-define40.8%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.im around 0 41.9%
unpow241.9%
unpow241.9%
hypot-undefine61.0%
Simplified61.0%
Taylor expanded in y.re around 0 35.6%
*-commutative35.6%
Simplified35.6%
*-commutative35.6%
log1p-expm1-u50.1%
Applied egg-rr50.1%
Final simplification45.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 7.6e-180) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (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_re <= 7.6e-180) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(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 tmp;
if (x_46_re <= 7.6e-180) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(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_re <= 7.6e-180: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(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_re <= 7.6e-180) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 7.6e-180], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 7.6 \cdot 10^{-180}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 7.59999999999999999e-180Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 41.0%
unpow241.0%
unpow241.0%
hypot-undefine44.8%
Simplified44.8%
Taylor expanded in y.re around 0 16.0%
*-commutative16.0%
Simplified16.0%
*-commutative16.0%
log1p-expm1-u27.7%
Applied egg-rr27.7%
if 7.59999999999999999e-180 < x.re Initial program 33.3%
fmm-def33.3%
hypot-define33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y.im around 0 38.7%
unpow238.7%
unpow238.7%
hypot-undefine37.4%
Simplified37.4%
Taylor expanded in y.re around 0 14.1%
*-commutative14.1%
Simplified14.1%
add-log-exp24.6%
Applied egg-rr24.6%
Final simplification26.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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 log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((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.log1p(math.expm1((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 log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 39.7%
fmm-def39.7%
hypot-define39.7%
distribute-rgt-neg-out39.7%
fma-define39.7%
hypot-define77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y.im around 0 40.3%
unpow240.3%
unpow240.3%
hypot-undefine42.5%
Simplified42.5%
Taylor expanded in y.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
*-commutative15.4%
log1p-expm1-u24.5%
Applied egg-rr24.5%
(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 39.7%
fmm-def39.7%
hypot-define39.7%
distribute-rgt-neg-out39.7%
fma-define39.7%
hypot-define77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y.im around 0 40.3%
unpow240.3%
unpow240.3%
hypot-undefine42.5%
Simplified42.5%
Taylor expanded in y.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Final simplification15.4%
herbie shell --seed 2024157
(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)))))