
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.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) (* (atan2 x.im x.re) y.im)))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) -0.5)
(* t_3 (fabs (sin (fma y.im (log (hypot x.im x.re)) t_1))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_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) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= -0.5) {
tmp = t_3 * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)));
} else {
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, t_1));
}
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)) 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) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= -0.5) tmp = Float64(t_3 * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)))); else 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, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $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], -0.5], N[(t$95$3 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
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 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq -0.5:\\
\;\;\;\;t\_3 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;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, 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)))) < -0.5Initial program 36.1%
fma-define40.1%
hypot-define40.1%
*-commutative40.1%
add-sqr-sqrt4.0%
sqrt-unprod60.7%
pow260.7%
fma-undefine60.7%
*-commutative60.7%
*-commutative60.7%
fma-define60.7%
Applied egg-rr60.7%
unpow260.7%
rem-sqrt-square60.7%
hypot-undefine60.7%
unpow260.7%
unpow260.7%
+-commutative60.7%
*-commutative60.7%
fma-define60.7%
fma-define60.7%
unpow260.7%
unpow260.7%
hypot-undefine60.7%
Simplified60.7%
if -0.5 < (*.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 38.2%
cancel-sign-sub-inv38.2%
fma-define38.2%
hypot-define38.2%
distribute-lft-neg-in38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Final simplification83.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2e-69)
(*
t_2
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.im 0.062)
(*
(sin (fma t_1 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_2 (sin 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 t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2e-69) {
tmp = t_2 * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 0.062) {
tmp = sin(fma(t_1, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_2 * sin(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)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2e-69) tmp = Float64(t_2 * sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_im <= 0.062) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_2 * sin(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]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e-69], N[(t$95$2 * N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.062], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * 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]), $MachinePrecision], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{-69}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 0.062:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot \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}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\end{array}
\end{array}
if y.im < -1.9999999999999999e-69Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define38.8%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around inf 38.8%
unpow238.8%
unpow238.8%
hypot-undefine74.0%
associate-/l*75.6%
Simplified75.6%
if -1.9999999999999999e-69 < y.im < 0.062Initial program 45.4%
exp-diff45.4%
exp-to-pow45.4%
hypot-define45.4%
*-commutative45.4%
exp-prod45.4%
fma-define45.4%
hypot-define92.3%
*-commutative92.3%
Simplified92.3%
if 0.062 < y.im Initial program 25.5%
cancel-sign-sub-inv25.5%
fma-define25.5%
hypot-define25.5%
distribute-lft-neg-in25.5%
distribute-rgt-neg-out25.5%
fma-define25.5%
hypot-define68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in y.im around inf 25.5%
unpow225.5%
unpow225.5%
hypot-undefine69.9%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in y.im around 0 72.2%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(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)))))))
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));
return 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))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return 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))))) 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]}, 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]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
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)
\end{array}
\end{array}
Initial program 38.0%
cancel-sign-sub-inv38.0%
fma-define38.0%
hypot-define38.0%
distribute-lft-neg-in38.0%
distribute-rgt-neg-out38.0%
fma-define38.4%
hypot-define81.6%
*-commutative81.6%
Simplified81.6%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im -3e+226)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (or (<= y.im -15500000000.0) (not (<= y.im 0.062)))
(* (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))) (sin t_0))
(*
(sin (fma t_1 y.im t_0))
(exp (+ (* y.re t_1) (* (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -3e+226) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if ((y_46_im <= -15500000000.0) || !(y_46_im <= 0.062)) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_0);
} else {
tmp = sin(fma(t_1, y_46_im, t_0)) * exp(((y_46_re * t_1) + (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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -3e+226) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif ((y_46_im <= -15500000000.0) || !(y_46_im <= 0.062)) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_0)); else tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * exp(Float64(Float64(y_46_re * t_1) + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3e+226], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -15500000000.0], N[Not[LessEqual[y$46$im, 0.062]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -3 \cdot 10^{+226}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq -15500000000 \lor \neg \left(y.im \leq 0.062\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot e^{y.re \cdot t\_1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -2.99999999999999975e226Initial program 27.3%
exp-diff18.2%
exp-to-pow18.2%
hypot-define18.2%
*-commutative18.2%
exp-prod18.2%
fma-define18.2%
hypot-define51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in y.re around 0 31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.3%
exp-prod69.4%
Simplified69.4%
if -2.99999999999999975e226 < y.im < -1.55e10 or 0.062 < y.im Initial program 29.4%
cancel-sign-sub-inv29.4%
fma-define29.4%
hypot-define29.4%
distribute-lft-neg-in29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in y.im around inf 29.4%
unpow229.4%
unpow229.4%
hypot-undefine69.6%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in y.im around 0 71.1%
if -1.55e10 < y.im < 0.062Initial program 46.2%
cancel-sign-sub-inv46.2%
fma-define46.2%
hypot-define46.2%
distribute-lft-neg-in46.2%
distribute-rgt-neg-out46.2%
fma-define46.2%
hypot-define91.8%
*-commutative91.8%
Simplified91.8%
fma-undefine91.8%
hypot-define65.1%
*-commutative65.1%
hypot-define91.8%
*-commutative91.8%
add-sqr-sqrt47.9%
sqrt-unprod91.5%
sqr-neg91.5%
sqrt-unprod43.6%
add-sqr-sqrt91.3%
Applied egg-rr91.3%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -1.35e-80)
(*
t_2
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.im 0.062)
(*
(sin (fma t_1 y.im t_0))
(exp (+ (* y.re t_1) (* (atan2 x.im x.re) y.im))))
(* t_2 (sin 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 t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.35e-80) {
tmp = t_2 * sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 0.062) {
tmp = sin(fma(t_1, y_46_im, t_0)) * exp(((y_46_re * t_1) + (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_2 * sin(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)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -1.35e-80) tmp = Float64(t_2 * sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_im <= 0.062) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * exp(Float64(Float64(y_46_re * t_1) + Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(t_2 * sin(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]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.35e-80], N[(t$95$2 * N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.062], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{-80}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 0.062:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot e^{y.re \cdot t\_1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\end{array}
\end{array}
if y.im < -1.3500000000000001e-80Initial program 37.1%
cancel-sign-sub-inv37.1%
fma-define37.1%
hypot-define37.1%
distribute-lft-neg-in37.1%
distribute-rgt-neg-out37.1%
fma-define38.5%
hypot-define75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y.im around inf 38.5%
unpow238.5%
unpow238.5%
hypot-undefine73.7%
associate-/l*75.2%
Simplified75.2%
if -1.3500000000000001e-80 < y.im < 0.062Initial program 45.7%
cancel-sign-sub-inv45.7%
fma-define45.7%
hypot-define45.7%
distribute-lft-neg-in45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define93.0%
*-commutative93.0%
Simplified93.0%
fma-undefine93.0%
hypot-define65.4%
*-commutative65.4%
hypot-define93.0%
*-commutative93.0%
add-sqr-sqrt43.1%
sqrt-unprod92.6%
sqr-neg92.6%
sqrt-unprod49.5%
add-sqr-sqrt92.6%
Applied egg-rr92.6%
if 0.062 < y.im Initial program 25.5%
cancel-sign-sub-inv25.5%
fma-define25.5%
hypot-define25.5%
distribute-lft-neg-in25.5%
distribute-rgt-neg-out25.5%
fma-define25.5%
hypot-define68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in y.im around inf 25.5%
unpow225.5%
unpow225.5%
hypot-undefine69.9%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in y.im around 0 72.2%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.re -1e-308)
(* t_1 (sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 3.7e-48)
(*
t_1
(sin (* y.im (+ (* y.re (/ (atan2 x.im x.re) y.im)) (log x.re)))))
(/
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.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 t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_re <= -1e-308) {
tmp = t_1 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 3.7e-48) {
tmp = t_1 * sin((y_46_im * ((y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)) + log(x_46_re))));
} else {
tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = 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)))) tmp = 0.0 if (x_46_re <= -1e-308) tmp = Float64(t_1 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 3.7e-48) tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)) + log(x_46_re))))); else tmp = Float64(Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[x$46$re, -1e-308], N[(t$95$1 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.7e-48], N[(t$95$1 * N[Sin[N[(y$46$im * N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $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}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := 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)}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 3.7 \cdot 10^{-48}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t\_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\end{array}
\end{array}
if x.re < -9.9999999999999991e-309Initial program 36.4%
cancel-sign-sub-inv36.4%
fma-define36.4%
hypot-define36.4%
distribute-lft-neg-in36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x.re around -inf 74.0%
+-commutative74.0%
mul-1-neg74.0%
unsub-neg74.0%
Simplified74.0%
if -9.9999999999999991e-309 < x.re < 3.6999999999999998e-48Initial program 49.9%
cancel-sign-sub-inv49.9%
fma-define49.9%
hypot-define49.9%
distribute-lft-neg-in49.9%
distribute-rgt-neg-out49.9%
fma-define49.9%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around inf 47.6%
unpow247.6%
unpow247.6%
hypot-undefine80.2%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in x.im around 0 68.1%
associate-*r/70.4%
Simplified70.4%
if 3.6999999999999998e-48 < x.re Initial program 33.8%
exp-diff33.8%
exp-to-pow33.8%
hypot-define33.8%
*-commutative33.8%
exp-prod33.4%
fma-define33.4%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in x.im around 0 72.7%
Final simplification73.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re -2.55e-139)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
t_0)
(if (<= y.re 9.2e-128)
(/ t_1 t_2)
(if (<= y.re 0.017)
(* (/ (pow (hypot x.re x.im) y.re) t_2) t_0)
(if (or (<= y.re 1.12e+184) (not (<= y.re 9.2e+235)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1)
(* (fabs t_0) (pow (hypot x.im x.re) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2.55e-139) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
} else if (y_46_re <= 9.2e-128) {
tmp = t_1 / t_2;
} else if (y_46_re <= 0.017) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / t_2) * t_0;
} else if ((y_46_re <= 1.12e+184) || !(y_46_re <= 9.2e+235)) {
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))) * t_1;
} else {
tmp = fabs(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = exp(y_46_im) ^ atan(x_46_im, x_46_re) tmp = 0.0 if (y_46_re <= -2.55e-139) 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)))) * t_0); elseif (y_46_re <= 9.2e-128) tmp = Float64(t_1 / t_2); elseif (y_46_re <= 0.017) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / t_2) * t_0); elseif ((y_46_re <= 1.12e+184) || !(y_46_re <= 9.2e+235)) 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))) * t_1); else tmp = Float64(abs(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.55e-139], 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] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 9.2e-128], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 0.017], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[y$46$re, 1.12e+184], N[Not[LessEqual[y$46$re, 9.2e+235]], $MachinePrecision]], 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] * t$95$1), $MachinePrecision], N[(N[Abs[t$95$0], $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -2.55 \cdot 10^{-139}:\\
\;\;\;\;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 t\_0\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;y.re \leq 0.017:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_2} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+184} \lor \neg \left(y.re \leq 9.2 \cdot 10^{+235}\right):\\
\;\;\;\;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 t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.55000000000000018e-139Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define38.9%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.im around inf 26.7%
unpow226.7%
unpow226.7%
hypot-undefine67.4%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y.im around 0 77.8%
if -2.55000000000000018e-139 < y.re < 9.2000000000000003e-128Initial program 39.6%
exp-diff39.6%
exp-to-pow39.6%
hypot-define39.6%
*-commutative39.6%
exp-prod39.4%
fma-define39.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around 0 34.3%
unpow234.3%
unpow234.3%
hypot-undefine72.6%
exp-prod71.9%
Simplified71.9%
if 9.2000000000000003e-128 < y.re < 0.017000000000000001Initial program 47.7%
exp-diff47.7%
exp-to-pow47.7%
hypot-define47.7%
*-commutative47.7%
exp-prod47.7%
fma-define47.7%
hypot-define86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y.re around inf 43.3%
+-commutative43.3%
associate-/l*43.3%
unpow243.3%
unpow243.3%
hypot-undefine77.9%
Simplified77.9%
Taylor expanded in y.im around 0 83.1%
if 0.017000000000000001 < y.re < 1.12000000000000007e184 or 9.2e235 < y.re Initial program 31.1%
Taylor expanded in y.re around 0 26.7%
unpow226.7%
unpow226.7%
hypot-undefine73.4%
Simplified73.4%
if 1.12000000000000007e184 < y.re < 9.2e235Initial program 33.3%
exp-diff33.3%
exp-to-pow33.3%
hypot-define33.3%
*-commutative33.3%
exp-prod33.3%
fma-define33.3%
hypot-define44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in y.im around 0 44.4%
unpow244.4%
unpow244.4%
hypot-undefine44.4%
Simplified44.4%
add-sqr-sqrt33.3%
sqrt-unprod78.1%
pow278.1%
Applied egg-rr100.0%
unpow278.1%
rem-sqrt-square78.1%
Simplified100.0%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (pow (exp y.im) (atan2 x.im x.re)))
(t_3 (sin t_0))
(t_4 (* (/ (pow (hypot x.re x.im) y.re) t_2) t_3)))
(if (<= y.re -1.9e+73)
(* t_1 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re -6.6e-141)
t_4
(if (<= y.re 7.8e-127)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_2)
(if (<= y.re 1.12e+173) t_4 (* (fabs t_3) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_3 = sin(t_0);
double t_4 = (pow(hypot(x_46_re, x_46_im), y_46_re) / t_2) * t_3;
double tmp;
if (y_46_re <= -1.9e+73) {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= -6.6e-141) {
tmp = t_4;
} else if (y_46_re <= 7.8e-127) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_2;
} else if (y_46_re <= 1.12e+173) {
tmp = t_4;
} else {
tmp = fabs(t_3) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double t_3 = Math.sin(t_0);
double t_4 = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / t_2) * t_3;
double tmp;
if (y_46_re <= -1.9e+73) {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= -6.6e-141) {
tmp = t_4;
} else if (y_46_re <= 7.8e-127) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_2;
} else if (y_46_re <= 1.12e+173) {
tmp = t_4;
} else {
tmp = Math.abs(t_3) * t_1;
}
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 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = exp(y_46_im) ^ atan(x_46_im, x_46_re) t_3 = sin(t_0) t_4 = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / t_2) * t_3) tmp = 0.0 if (y_46_re <= -1.9e+73) tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= -6.6e-141) tmp = t_4; elseif (y_46_re <= 7.8e-127) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_2); elseif (y_46_re <= 1.12e+173) tmp = t_4; else tmp = Float64(abs(t_3) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / t$95$2), $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$re, -1.9e+73], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -6.6e-141], t$95$4, If[LessEqual[y$46$re, 7.8e-127], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 1.12e+173], t$95$4, N[(N[Abs[t$95$3], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := \sin t\_0\\
t_4 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_2} \cdot t\_3\\
\mathbf{if}\;y.re \leq -1.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq -6.6 \cdot 10^{-141}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t\_2}\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+173}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\left|t\_3\right| \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.90000000000000011e73Initial program 38.2%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.5%
fma-define34.5%
hypot-define65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in y.im around 0 74.7%
unpow274.7%
unpow274.7%
hypot-undefine74.7%
Simplified74.7%
*-commutative74.7%
add-cube-cbrt83.8%
pow382.0%
*-commutative82.0%
Applied egg-rr82.0%
if -1.90000000000000011e73 < y.re < -6.59999999999999998e-141 or 7.79999999999999932e-127 < y.re < 1.12e173Initial program 37.6%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.4%
fma-define34.4%
hypot-define77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y.re around inf 32.3%
+-commutative32.3%
associate-/l*32.2%
unpow232.2%
unpow232.2%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in y.im around 0 68.1%
if -6.59999999999999998e-141 < y.re < 7.79999999999999932e-127Initial program 39.6%
exp-diff39.6%
exp-to-pow39.6%
hypot-define39.6%
*-commutative39.6%
exp-prod39.4%
fma-define39.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around 0 34.3%
unpow234.3%
unpow234.3%
hypot-undefine72.6%
exp-prod71.9%
Simplified71.9%
if 1.12e173 < y.re Initial program 33.3%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-sqr-sqrt25.1%
sqrt-unprod62.8%
pow262.8%
Applied egg-rr75.0%
unpow262.8%
rem-sqrt-square62.8%
Simplified75.0%
Final simplification72.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
t_0)))
(if (<= y.re -7e-141)
t_1
(if (<= y.re 9.2e-127)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.re 1.2e+177)
t_1
(* (fabs t_0) (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
double tmp;
if (y_46_re <= -7e-141) {
tmp = t_1;
} else if (y_46_re <= 9.2e-127) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.2e+177) {
tmp = t_1;
} else {
tmp = fabs(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = 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)))) * t_0) tmp = 0.0 if (y_46_re <= -7e-141) tmp = t_1; elseif (y_46_re <= 9.2e-127) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.2e+177) tmp = t_1; else tmp = Float64(abs(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-141], t$95$1, If[LessEqual[y$46$re, 9.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[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+177], t$95$1, N[(N[Abs[t$95$0], $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := 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 t\_0\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-127}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -7.0000000000000006e-141 or 9.20000000000000075e-127 < y.re < 1.2e177Initial program 37.8%
cancel-sign-sub-inv37.8%
fma-define37.8%
hypot-define37.8%
distribute-lft-neg-in37.8%
distribute-rgt-neg-out37.8%
fma-define38.5%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around inf 29.9%
unpow229.9%
unpow229.9%
hypot-undefine70.9%
associate-/l*70.9%
Simplified70.9%
Taylor expanded in y.im around 0 74.4%
if -7.0000000000000006e-141 < y.re < 9.20000000000000075e-127Initial program 39.6%
exp-diff39.6%
exp-to-pow39.6%
hypot-define39.6%
*-commutative39.6%
exp-prod39.4%
fma-define39.4%
hypot-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.re around 0 34.3%
unpow234.3%
unpow234.3%
hypot-undefine72.6%
exp-prod71.9%
Simplified71.9%
if 1.2e177 < y.re Initial program 33.3%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-sqr-sqrt25.1%
sqrt-unprod62.8%
pow262.8%
Applied egg-rr75.0%
unpow262.8%
rem-sqrt-square62.8%
Simplified75.0%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (log (hypot x.im x.re)))
(t_4 (/ (sin (* y.im t_3)) (pow (exp y.im) (atan2 x.im x.re)))))
(if (<= y.re -2.45e-10)
(* t_2 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re -7.2e-100)
t_4
(if (<= y.re -1.3e-138)
(* y.re (* (atan2 x.im x.re) (+ (* y.re t_3) 1.0)))
(if (<= y.re 7.8e-120)
t_4
(if (<= y.re 1.44e+175)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1)
(* (fabs t_1) t_2))))))))
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 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = sin((y_46_im * t_3)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2.45e-10) {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= -7.2e-100) {
tmp = t_4;
} else if (y_46_re <= -1.3e-138) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 7.8e-120) {
tmp = t_4;
} else if (y_46_re <= 1.44e+175) {
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))) * t_1;
} else {
tmp = fabs(t_1) * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_im * t_3)) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2.45e-10) {
tmp = t_2 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= -7.2e-100) {
tmp = t_4;
} else if (y_46_re <= -1.3e-138) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 7.8e-120) {
tmp = t_4;
} else if (y_46_re <= 1.44e+175) {
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))) * t_1;
} else {
tmp = Math.abs(t_1) * t_2;
}
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 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = log(hypot(x_46_im, x_46_re)) t_4 = Float64(sin(Float64(y_46_im * t_3)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -2.45e-10) tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= -7.2e-100) tmp = t_4; elseif (y_46_re <= -1.3e-138) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(Float64(y_46_re * t_3) + 1.0))); elseif (y_46_re <= 7.8e-120) tmp = t_4; elseif (y_46_re <= 1.44e+175) 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))) * t_1); else tmp = Float64(abs(t_1) * t_2); 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.45e-10], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -7.2e-100], t$95$4, If[LessEqual[y$46$re, -1.3e-138], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[(y$46$re * t$95$3), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-120], t$95$4, If[LessEqual[y$46$re, 1.44e+175], 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] * t$95$1), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \frac{\sin \left(y.im \cdot t\_3\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{if}\;y.re \leq -2.45 \cdot 10^{-10}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq -7.2 \cdot 10^{-100}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -1.3 \cdot 10^{-138}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t\_3 + 1\right)\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-120}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.44 \cdot 10^{+175}:\\
\;\;\;\;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 t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right| \cdot t\_2\\
\end{array}
\end{array}
if y.re < -2.4499999999999998e-10Initial program 35.3%
exp-diff32.4%
exp-to-pow32.4%
hypot-define32.4%
*-commutative32.4%
exp-prod32.4%
fma-define32.4%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around 0 76.6%
unpow276.6%
unpow276.6%
hypot-undefine76.6%
Simplified76.6%
*-commutative76.6%
add-cube-cbrt82.5%
pow381.0%
*-commutative81.0%
Applied egg-rr81.0%
if -2.4499999999999998e-10 < y.re < -7.1999999999999997e-100 or -1.3e-138 < y.re < 7.8000000000000003e-120Initial program 41.6%
exp-diff41.6%
exp-to-pow41.6%
hypot-define41.6%
*-commutative41.6%
exp-prod41.3%
fma-define41.3%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around 0 33.3%
unpow233.3%
unpow233.3%
hypot-undefine69.0%
exp-prod68.3%
Simplified68.3%
if -7.1999999999999997e-100 < y.re < -1.3e-138Initial program 24.8%
exp-diff24.8%
exp-to-pow24.8%
hypot-define24.8%
*-commutative24.8%
exp-prod24.8%
fma-define24.8%
hypot-define62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in y.im around 0 26.8%
unpow226.8%
unpow226.8%
hypot-undefine62.7%
Simplified62.7%
Taylor expanded in y.re around 0 25.9%
associate-*r*25.9%
distribute-lft1-in25.9%
unpow225.9%
unpow225.9%
hypot-undefine62.7%
Simplified62.7%
if 7.8000000000000003e-120 < y.re < 1.4400000000000001e175Initial program 38.4%
Taylor expanded in y.im around 0 53.0%
if 1.4400000000000001e175 < y.re Initial program 33.3%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-sqr-sqrt25.1%
sqrt-unprod62.8%
pow262.8%
Applied egg-rr75.0%
unpow262.8%
rem-sqrt-square62.8%
Simplified75.0%
Final simplification69.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_1 (sin (pow (cbrt t_0) 3.0))))
(t_3 (log (hypot x.im x.re)))
(t_4 (/ (sin (* y.im t_3)) (pow (exp y.im) (atan2 x.im x.re)))))
(if (<= y.re -0.000108)
t_2
(if (<= y.re -6.8e-95)
t_4
(if (<= y.re -1.4e-138)
(* y.re (* (atan2 x.im x.re) (+ (* y.re t_3) 1.0)))
(if (<= y.re 6.2e+27)
t_4
(if (<= y.re 1.1e+168) t_2 (* (fabs (sin 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * sin(pow(cbrt(t_0), 3.0));
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = sin((y_46_im * t_3)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.000108) {
tmp = t_2;
} else if (y_46_re <= -6.8e-95) {
tmp = t_4;
} else if (y_46_re <= -1.4e-138) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 6.2e+27) {
tmp = t_4;
} else if (y_46_re <= 1.1e+168) {
tmp = t_2;
} else {
tmp = fabs(sin(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_im * t_3)) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.000108) {
tmp = t_2;
} else if (y_46_re <= -6.8e-95) {
tmp = t_4;
} else if (y_46_re <= -1.4e-138) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 6.2e+27) {
tmp = t_4;
} else if (y_46_re <= 1.1e+168) {
tmp = t_2;
} else {
tmp = Math.abs(Math.sin(t_0)) * t_1;
}
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 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))) t_3 = log(hypot(x_46_im, x_46_re)) t_4 = Float64(sin(Float64(y_46_im * t_3)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -0.000108) tmp = t_2; elseif (y_46_re <= -6.8e-95) tmp = t_4; elseif (y_46_re <= -1.4e-138) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(Float64(y_46_re * t_3) + 1.0))); elseif (y_46_re <= 6.2e+27) tmp = t_4; elseif (y_46_re <= 1.1e+168) tmp = t_2; else tmp = Float64(abs(sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000108], t$95$2, If[LessEqual[y$46$re, -6.8e-95], t$95$4, If[LessEqual[y$46$re, -1.4e-138], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[(y$46$re * t$95$3), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+27], t$95$4, If[LessEqual[y$46$re, 1.1e+168], t$95$2, N[(N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \frac{\sin \left(y.im \cdot t\_3\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{if}\;y.re \leq -0.000108:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-95}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -1.4 \cdot 10^{-138}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t\_3 + 1\right)\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+27}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+168}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|\sin t\_0\right| \cdot t\_1\\
\end{array}
\end{array}
if y.re < -1.08e-4 or 6.19999999999999992e27 < y.re < 1.1000000000000001e168Initial program 33.7%
exp-diff28.1%
exp-to-pow28.1%
hypot-define28.1%
*-commutative28.1%
exp-prod28.1%
fma-define28.1%
hypot-define66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y.im around 0 68.8%
unpow268.8%
unpow268.8%
hypot-undefine68.8%
Simplified68.8%
*-commutative68.8%
add-cube-cbrt76.6%
pow375.5%
*-commutative75.5%
Applied egg-rr75.5%
if -1.08e-4 < y.re < -6.79999999999999986e-95 or -1.4e-138 < y.re < 6.19999999999999992e27Initial program 43.4%
exp-diff43.4%
exp-to-pow43.4%
hypot-define43.4%
*-commutative43.4%
exp-prod43.1%
fma-define43.1%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.re around 0 31.0%
unpow231.0%
unpow231.0%
hypot-undefine64.5%
exp-prod64.0%
Simplified64.0%
if -6.79999999999999986e-95 < y.re < -1.4e-138Initial program 24.8%
exp-diff24.8%
exp-to-pow24.8%
hypot-define24.8%
*-commutative24.8%
exp-prod24.8%
fma-define24.8%
hypot-define62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in y.im around 0 26.8%
unpow226.8%
unpow226.8%
hypot-undefine62.7%
Simplified62.7%
Taylor expanded in y.re around 0 25.9%
associate-*r*25.9%
distribute-lft1-in25.9%
unpow225.9%
unpow225.9%
hypot-undefine62.7%
Simplified62.7%
if 1.1000000000000001e168 < y.re Initial program 29.6%
exp-diff14.8%
exp-to-pow14.8%
hypot-define14.8%
*-commutative14.8%
exp-prod14.8%
fma-define14.8%
hypot-define44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in y.im around 0 51.9%
unpow251.9%
unpow251.9%
hypot-undefine51.9%
Simplified51.9%
add-sqr-sqrt26.0%
sqrt-unprod59.5%
pow259.5%
Applied egg-rr70.4%
unpow259.5%
rem-sqrt-square59.5%
Simplified70.4%
Final simplification68.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 (* y.re (atan2 x.im x.re)))
(t_2 (* t_0 (sin (fabs t_1))))
(t_3 (log (hypot x.im x.re)))
(t_4 (/ (sin (* y.im t_3)) (pow (exp y.im) (atan2 x.im x.re)))))
(if (<= y.re -0.000145)
t_2
(if (<= y.re -2.35e-98)
t_4
(if (<= y.re -6e-139)
(* y.re (* (atan2 x.im x.re) (+ (* y.re t_3) 1.0)))
(if (<= y.re 6.2e+39)
t_4
(if (<= y.re 1.4e+177) t_2 (* (fabs (sin t_1)) t_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 t_2 = t_0 * sin(fabs(t_1));
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = sin((y_46_im * t_3)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.000145) {
tmp = t_2;
} else if (y_46_re <= -2.35e-98) {
tmp = t_4;
} else if (y_46_re <= -6e-139) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 6.2e+39) {
tmp = t_4;
} else if (y_46_re <= 1.4e+177) {
tmp = t_2;
} else {
tmp = fabs(sin(t_1)) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(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 t_2 = t_0 * Math.sin(Math.abs(t_1));
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_im * t_3)) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.000145) {
tmp = t_2;
} else if (y_46_re <= -2.35e-98) {
tmp = t_4;
} else if (y_46_re <= -6e-139) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0));
} else if (y_46_re <= 6.2e+39) {
tmp = t_4;
} else if (y_46_re <= 1.4e+177) {
tmp = t_2;
} else {
tmp = Math.abs(Math.sin(t_1)) * t_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) t_2 = t_0 * math.sin(math.fabs(t_1)) t_3 = math.log(math.hypot(x_46_im, x_46_re)) t_4 = math.sin((y_46_im * t_3)) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -0.000145: tmp = t_2 elif y_46_re <= -2.35e-98: tmp = t_4 elif y_46_re <= -6e-139: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0)) elif y_46_re <= 6.2e+39: tmp = t_4 elif y_46_re <= 1.4e+177: tmp = t_2 else: tmp = math.fabs(math.sin(t_1)) * t_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)) t_2 = Float64(t_0 * sin(abs(t_1))) t_3 = log(hypot(x_46_im, x_46_re)) t_4 = Float64(sin(Float64(y_46_im * t_3)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -0.000145) tmp = t_2; elseif (y_46_re <= -2.35e-98) tmp = t_4; elseif (y_46_re <= -6e-139) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(Float64(y_46_re * t_3) + 1.0))); elseif (y_46_re <= 6.2e+39) tmp = t_4; elseif (y_46_re <= 1.4e+177) tmp = t_2; else tmp = Float64(abs(sin(t_1)) * t_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); t_2 = t_0 * sin(abs(t_1)); t_3 = log(hypot(x_46_im, x_46_re)); t_4 = sin((y_46_im * t_3)) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -0.000145) tmp = t_2; elseif (y_46_re <= -2.35e-98) tmp = t_4; elseif (y_46_re <= -6e-139) tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * t_3) + 1.0)); elseif (y_46_re <= 6.2e+39) tmp = t_4; elseif (y_46_re <= 1.4e+177) tmp = t_2; else tmp = abs(sin(t_1)) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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]}, Block[{t$95$2 = N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000145], t$95$2, If[LessEqual[y$46$re, -2.35e-98], t$95$4, If[LessEqual[y$46$re, -6e-139], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[(y$46$re * t$95$3), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+39], t$95$4, If[LessEqual[y$46$re, 1.4e+177], t$95$2, N[(N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision] * t$95$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}\\
t_2 := t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \frac{\sin \left(y.im \cdot t\_3\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{if}\;y.re \leq -0.000145:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.35 \cdot 10^{-98}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -6 \cdot 10^{-139}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t\_3 + 1\right)\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+39}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|\sin t\_1\right| \cdot t\_0\\
\end{array}
\end{array}
if y.re < -1.45e-4 or 6.2000000000000005e39 < y.re < 1.40000000000000001e177Initial program 32.2%
exp-diff26.7%
exp-to-pow26.7%
hypot-define26.7%
*-commutative26.7%
exp-prod26.7%
fma-define26.7%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 69.1%
unpow269.1%
unpow269.1%
hypot-undefine69.1%
Simplified69.1%
*-commutative69.1%
add-sqr-sqrt35.7%
sqrt-unprod40.2%
sqr-abs40.2%
*-commutative40.2%
*-commutative40.2%
*-commutative40.2%
*-commutative40.2%
sqr-abs40.2%
pow240.2%
*-commutative40.2%
Applied egg-rr40.2%
unpow240.2%
rem-sqrt-square71.3%
Simplified71.3%
if -1.45e-4 < y.re < -2.35000000000000003e-98 or -5.9999999999999998e-139 < y.re < 6.2000000000000005e39Initial program 43.5%
exp-diff43.5%
exp-to-pow43.5%
hypot-define43.5%
*-commutative43.5%
exp-prod43.2%
fma-define43.2%
hypot-define83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y.re around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine64.3%
exp-prod63.9%
Simplified63.9%
if -2.35000000000000003e-98 < y.re < -5.9999999999999998e-139Initial program 24.8%
exp-diff24.8%
exp-to-pow24.8%
hypot-define24.8%
*-commutative24.8%
exp-prod24.8%
fma-define24.8%
hypot-define62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in y.im around 0 26.8%
unpow226.8%
unpow226.8%
hypot-undefine62.7%
Simplified62.7%
Taylor expanded in y.re around 0 25.9%
associate-*r*25.9%
distribute-lft1-in25.9%
unpow225.9%
unpow225.9%
hypot-undefine62.7%
Simplified62.7%
if 1.40000000000000001e177 < y.re Initial program 33.3%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-sqr-sqrt25.1%
sqrt-unprod62.8%
pow262.8%
Applied egg-rr75.0%
unpow262.8%
rem-sqrt-square62.8%
Simplified75.0%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_1 t_2)))
(if (<= y.re -5.8e-141)
t_3
(if (<= y.re 4.2e-201)
(* -0.16666666666666666 (* t_2 (pow t_0 3.0)))
(if (<= y.re 1e+176) t_3 (* (fabs t_1) t_2))))))
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 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (y_46_re <= -5.8e-141) {
tmp = t_3;
} else if (y_46_re <= 4.2e-201) {
tmp = -0.16666666666666666 * (t_2 * pow(t_0, 3.0));
} else if (y_46_re <= 1e+176) {
tmp = t_3;
} else {
tmp = fabs(t_1) * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (y_46_re <= -5.8e-141) {
tmp = t_3;
} else if (y_46_re <= 4.2e-201) {
tmp = -0.16666666666666666 * (t_2 * Math.pow(t_0, 3.0));
} else if (y_46_re <= 1e+176) {
tmp = t_3;
} else {
tmp = Math.abs(t_1) * t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_1 * t_2 tmp = 0 if y_46_re <= -5.8e-141: tmp = t_3 elif y_46_re <= 4.2e-201: tmp = -0.16666666666666666 * (t_2 * math.pow(t_0, 3.0)) elif y_46_re <= 1e+176: tmp = t_3 else: tmp = math.fabs(t_1) * t_2 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 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_1 * t_2) tmp = 0.0 if (y_46_re <= -5.8e-141) tmp = t_3; elseif (y_46_re <= 4.2e-201) tmp = Float64(-0.16666666666666666 * Float64(t_2 * (t_0 ^ 3.0))); elseif (y_46_re <= 1e+176) tmp = t_3; else tmp = Float64(abs(t_1) * t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = t_1 * t_2; tmp = 0.0; if (y_46_re <= -5.8e-141) tmp = t_3; elseif (y_46_re <= 4.2e-201) tmp = -0.16666666666666666 * (t_2 * (t_0 ^ 3.0)); elseif (y_46_re <= 1e+176) tmp = t_3; else tmp = abs(t_1) * t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e-141], t$95$3, If[LessEqual[y$46$re, 4.2e-201], N[(-0.16666666666666666 * N[(t$95$2 * N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e+176], t$95$3, N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t\_1 \cdot t\_2\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{-141}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{-201}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(t\_2 \cdot {t\_0}^{3}\right)\\
\mathbf{elif}\;y.re \leq 10^{+176}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right| \cdot t\_2\\
\end{array}
\end{array}
if y.re < -5.7999999999999999e-141 or 4.20000000000000024e-201 < y.re < 1e176Initial program 37.4%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.3%
fma-define34.3%
hypot-define74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in y.im around 0 48.7%
unpow248.7%
unpow248.7%
hypot-undefine54.9%
Simplified54.9%
if -5.7999999999999999e-141 < y.re < 4.20000000000000024e-201Initial program 41.2%
exp-diff41.2%
exp-to-pow41.2%
hypot-define41.2%
*-commutative41.2%
exp-prod41.2%
fma-define41.2%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.im around 0 14.2%
unpow214.2%
unpow214.2%
hypot-undefine11.2%
Simplified11.2%
Taylor expanded in y.re around 0 11.2%
Taylor expanded in y.re around inf 16.7%
associate-*r*16.7%
cube-prod16.7%
unpow216.7%
unpow216.7%
hypot-undefine23.8%
Simplified23.8%
if 1e176 < y.re Initial program 33.3%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-sqr-sqrt25.1%
sqrt-unprod62.8%
pow262.8%
Applied egg-rr75.0%
unpow262.8%
rem-sqrt-square62.8%
Simplified75.0%
Final simplification49.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (or (<= y.im -1.95e-44) (not (<= y.im 0.062)))
(* t_0 (sin (+ 1.0 (fma y.re (atan2 x.im x.re) -1.0))))
(* (sin (* y.re (atan2 x.im x.re))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -1.95e-44) || !(y_46_im <= 0.062)) {
tmp = t_0 * sin((1.0 + fma(y_46_re, atan2(x_46_im, x_46_re), -1.0)));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_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_im <= -1.95e-44) || !(y_46_im <= 0.062)) tmp = Float64(t_0 * sin(Float64(1.0 + fma(y_46_re, atan(x_46_im, x_46_re), -1.0)))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_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[Or[LessEqual[y$46$im, -1.95e-44], N[Not[LessEqual[y$46$im, 0.062]], $MachinePrecision]], N[(t$95$0 * N[Sin[N[(1.0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -1.95 \cdot 10^{-44} \lor \neg \left(y.im \leq 0.062\right):\\
\;\;\;\;t\_0 \cdot \sin \left(1 + \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\end{array}
\end{array}
if y.im < -1.9500000000000001e-44 or 0.062 < y.im Initial program 29.2%
exp-diff22.2%
exp-to-pow22.2%
hypot-define22.2%
*-commutative22.2%
exp-prod21.9%
fma-define21.9%
hypot-define52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in y.im around 0 34.0%
unpow234.0%
unpow234.0%
hypot-undefine30.2%
Simplified30.2%
add-exp-log20.1%
Applied egg-rr20.1%
rem-exp-log30.2%
expm1-log1p-u21.6%
expm1-undefine38.9%
Applied egg-rr38.9%
log1p-undefine38.9%
rem-exp-log48.4%
associate-+r-48.4%
fma-neg48.4%
metadata-eval48.4%
Simplified48.4%
if -1.9500000000000001e-44 < y.im < 0.062Initial program 46.8%
exp-diff46.8%
exp-to-pow46.8%
hypot-define46.8%
*-commutative46.8%
exp-prod46.8%
fma-define46.8%
hypot-define92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y.im around 0 46.6%
unpow246.6%
unpow246.6%
hypot-undefine57.2%
Simplified57.2%
Final simplification52.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.6e+14) (not (<= y.re 2.6e+14))) (* (pow x.re y.re) (fabs (sin (* y.re (atan2 x.im x.re))))) (* y.re (* (atan2 x.im x.re) (+ (* y.re (log (hypot x.im x.re))) 1.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 <= -4.6e+14) || !(y_46_re <= 2.6e+14)) {
tmp = pow(x_46_re, y_46_re) * fabs(sin((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * log(hypot(x_46_im, x_46_re))) + 1.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 <= -4.6e+14) || !(y_46_re <= 2.6e+14)) {
tmp = Math.pow(x_46_re, y_46_re) * Math.abs(Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * ((y_46_re * Math.log(Math.hypot(x_46_im, x_46_re))) + 1.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.6e+14) or not (y_46_re <= 2.6e+14): tmp = math.pow(x_46_re, y_46_re) * math.fabs(math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * ((y_46_re * math.log(math.hypot(x_46_im, x_46_re))) + 1.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.6e+14) || !(y_46_re <= 2.6e+14)) tmp = Float64((x_46_re ^ y_46_re) * abs(sin(Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(Float64(y_46_re * log(hypot(x_46_im, x_46_re))) + 1.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_re <= -4.6e+14) || ~((y_46_re <= 2.6e+14))) tmp = (x_46_re ^ y_46_re) * abs(sin((y_46_re * atan2(x_46_im, x_46_re)))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * log(hypot(x_46_im, x_46_re))) + 1.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.6e+14], N[Not[LessEqual[y$46$re, 2.6e+14]], $MachinePrecision]], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Abs[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.6 \cdot 10^{+14} \lor \neg \left(y.re \leq 2.6 \cdot 10^{+14}\right):\\
\;\;\;\;{x.re}^{y.re} \cdot \left|\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + 1\right)\right)\\
\end{array}
\end{array}
if y.re < -4.6e14 or 2.6e14 < y.re Initial program 33.6%
exp-diff25.7%
exp-to-pow25.7%
hypot-define25.7%
*-commutative25.7%
exp-prod25.7%
fma-define25.7%
hypot-define59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in y.im around 0 63.0%
unpow263.0%
unpow263.0%
hypot-undefine63.0%
Simplified63.0%
Taylor expanded in x.im around 0 51.7%
add-sqr-sqrt27.6%
sqrt-unprod57.0%
pow257.0%
Applied egg-rr57.0%
unpow257.0%
rem-sqrt-square57.0%
Simplified57.0%
if -4.6e14 < y.re < 2.6e14Initial program 41.4%
exp-diff41.4%
exp-to-pow41.4%
hypot-define41.4%
*-commutative41.4%
exp-prod41.2%
fma-define41.2%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.im around 0 22.4%
unpow222.4%
unpow222.4%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in y.re around 0 18.1%
associate-*r*18.1%
distribute-lft1-in18.1%
unpow218.1%
unpow218.1%
hypot-undefine25.4%
Simplified25.4%
Final simplification39.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.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) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 38.0%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.3%
fma-define34.3%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.im around 0 40.3%
unpow240.3%
unpow240.3%
hypot-undefine43.7%
Simplified43.7%
Final simplification43.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -4.6e+14)
(and (not (<= y.re 2.6e+14))
(or (<= y.re 2.6e+225) (not (<= y.re 1.14e+254)))))
(* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re))
(* y.re (* (atan2 x.im x.re) (+ (* y.re (log (hypot x.im x.re))) 1.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 <= -4.6e+14) || (!(y_46_re <= 2.6e+14) && ((y_46_re <= 2.6e+225) || !(y_46_re <= 1.14e+254)))) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * log(hypot(x_46_im, x_46_re))) + 1.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 <= -4.6e+14) || (!(y_46_re <= 2.6e+14) && ((y_46_re <= 2.6e+225) || !(y_46_re <= 1.14e+254)))) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * ((y_46_re * Math.log(Math.hypot(x_46_im, x_46_re))) + 1.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.6e+14) or (not (y_46_re <= 2.6e+14) and ((y_46_re <= 2.6e+225) or not (y_46_re <= 1.14e+254))): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * ((y_46_re * math.log(math.hypot(x_46_im, x_46_re))) + 1.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.6e+14) || (!(y_46_re <= 2.6e+14) && ((y_46_re <= 2.6e+225) || !(y_46_re <= 1.14e+254)))) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(Float64(y_46_re * log(hypot(x_46_im, x_46_re))) + 1.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_re <= -4.6e+14) || (~((y_46_re <= 2.6e+14)) && ((y_46_re <= 2.6e+225) || ~((y_46_re <= 1.14e+254))))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * ((y_46_re * log(hypot(x_46_im, x_46_re))) + 1.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.6e+14], And[N[Not[LessEqual[y$46$re, 2.6e+14]], $MachinePrecision], Or[LessEqual[y$46$re, 2.6e+225], N[Not[LessEqual[y$46$re, 1.14e+254]], $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], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.6 \cdot 10^{+14} \lor \neg \left(y.re \leq 2.6 \cdot 10^{+14}\right) \land \left(y.re \leq 2.6 \cdot 10^{+225} \lor \neg \left(y.re \leq 1.14 \cdot 10^{+254}\right)\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + 1\right)\right)\\
\end{array}
\end{array}
if y.re < -4.6e14 or 2.6e14 < y.re < 2.60000000000000004e225 or 1.14000000000000003e254 < y.re Initial program 36.5%
exp-diff27.9%
exp-to-pow27.9%
hypot-define27.9%
*-commutative27.9%
exp-prod27.9%
fma-define27.9%
hypot-define61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in y.im around 0 66.5%
unpow266.5%
unpow266.5%
hypot-undefine66.5%
Simplified66.5%
Taylor expanded in x.im around 0 55.1%
if -4.6e14 < y.re < 2.6e14 or 2.60000000000000004e225 < y.re < 1.14000000000000003e254Initial program 39.0%
exp-diff39.0%
exp-to-pow39.0%
hypot-define39.0%
*-commutative39.0%
exp-prod38.8%
fma-define38.8%
hypot-define80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 22.4%
unpow222.4%
unpow222.4%
hypot-undefine28.1%
Simplified28.1%
Taylor expanded in y.re around 0 21.0%
associate-*r*21.0%
distribute-lft1-in21.0%
unpow221.0%
unpow221.0%
hypot-undefine27.9%
Simplified27.9%
Final simplification39.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= x.re 1.08e-306) (not (<= x.re 1.12e-94))) (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log 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 <= 1.08e-306) || !(x_46_re <= 1.12e-94)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((x_46re <= 1.08d-306) .or. (.not. (x_46re <= 1.12d-94))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * (1.0d0 + (y_46re * log(x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((x_46_re <= 1.08e-306) || !(x_46_re <= 1.12e-94)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * Math.log(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 <= 1.08e-306) or not (x_46_re <= 1.12e-94): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * math.log(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 <= 1.08e-306) || !(x_46_re <= 1.12e-94)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((x_46_re <= 1.08e-306) || ~((x_46_re <= 1.12e-94))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[x$46$re, 1.08e-306], N[Not[LessEqual[x$46$re, 1.12e-94]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.08 \cdot 10^{-306} \lor \neg \left(x.re \leq 1.12 \cdot 10^{-94}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.re\right)\right)\\
\end{array}
\end{array}
if x.re < 1.07999999999999994e-306 or 1.12e-94 < x.re Initial program 36.1%
exp-diff32.9%
exp-to-pow32.9%
hypot-define32.9%
*-commutative32.9%
exp-prod32.7%
fma-define32.7%
hypot-define72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in y.im around 0 41.8%
unpow241.8%
unpow241.8%
hypot-undefine43.7%
Simplified43.7%
Taylor expanded in x.re around 0 26.4%
if 1.07999999999999994e-306 < x.re < 1.12e-94Initial program 48.6%
exp-diff43.4%
exp-to-pow43.4%
hypot-define43.4%
*-commutative43.4%
exp-prod43.4%
fma-define43.4%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.im around 0 31.8%
unpow231.8%
unpow231.8%
hypot-undefine43.7%
Simplified43.7%
Taylor expanded in x.im around 0 36.2%
Taylor expanded in y.re around 0 36.2%
associate-*r*36.2%
distribute-lft1-in36.2%
Simplified36.2%
Final simplification27.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))) (if (<= x.im 2.3e-15) (* t_0 (pow x.re y.re)) (* 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 (x_46_im <= 2.3e-15) {
tmp = t_0 * pow(x_46_re, y_46_re);
} 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 (x_46im <= 2.3d-15) then
tmp = t_0 * (x_46re ** y_46re)
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 (x_46_im <= 2.3e-15) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} 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 x_46_im <= 2.3e-15: tmp = t_0 * math.pow(x_46_re, y_46_re) 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 (x_46_im <= 2.3e-15) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); 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 (x_46_im <= 2.3e-15) tmp = t_0 * (x_46_re ^ y_46_re); 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[x$46$im, 2.3e-15], N[(t$95$0 * N[Power[x$46$re, y$46$re], $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}\;x.im \leq 2.3 \cdot 10^{-15}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < 2.2999999999999999e-15Initial program 39.0%
exp-diff35.4%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod35.2%
fma-define35.2%
hypot-define71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in y.im around 0 41.1%
unpow241.1%
unpow241.1%
hypot-undefine43.9%
Simplified43.9%
Taylor expanded in x.im around 0 32.8%
if 2.2999999999999999e-15 < x.im Initial program 34.8%
exp-diff31.6%
exp-to-pow31.6%
hypot-define31.6%
*-commutative31.6%
exp-prod31.6%
fma-define31.6%
hypot-define75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y.im around 0 37.8%
unpow237.8%
unpow237.8%
hypot-undefine43.2%
Simplified43.2%
Taylor expanded in x.re around 0 43.2%
Final simplification35.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log 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) * (1.0 + (y_46_re * log(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) * (1.0d0 + (y_46re * log(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) * (1.0 + (y_46_re * Math.log(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) * (1.0 + (y_46_re * math.log(x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(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) * (1.0 + (y_46_re * log(x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.re\right)\right)
\end{array}
Initial program 38.0%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.3%
fma-define34.3%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.im around 0 40.3%
unpow240.3%
unpow240.3%
hypot-undefine43.7%
Simplified43.7%
Taylor expanded in x.im around 0 30.5%
Taylor expanded in y.re around 0 11.8%
associate-*r*11.8%
distribute-lft1-in11.8%
Simplified11.8%
Final simplification11.8%
herbie shell --seed 2024084
(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)))))