
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.im x.re))))
(if (<= y.re -0.00042)
(* (exp (* y.re (- t_2 (/ t_0 y.re)))) (sin t_1))
(if (<= y.re 6.8e-21)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* y.re (/ (* (atan2 x.im x.re) (- y.im)) y.re))))
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(sin (* y.im t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.00042) {
tmp = exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * sin(t_1);
} else if (y_46_re <= 6.8e-21) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((y_46_re * ((atan2(x_46_im, x_46_re) * -y_46_im) / y_46_re)));
} else {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin((y_46_im * t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.00042) tmp = Float64(exp(Float64(y_46_re * Float64(t_2 - Float64(t_0 / y_46_re)))) * sin(t_1)); elseif (y_46_re <= 6.8e-21) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(y_46_re * Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) / y_46_re)))); else tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(Float64(y_46_im * t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00042], N[(N[Exp[N[(y$46$re * N[(t$95$2 - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.8e-21], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -0.00042:\\
\;\;\;\;e^{y.re \cdot \left(t\_2 - \frac{t\_0}{y.re}\right)} \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 6.8 \cdot 10^{-21}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}{y.re}}\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(y.im \cdot t\_2\right)\\
\end{array}
\end{array}
if y.re < -4.2000000000000002e-4Initial program 41.1%
fmm-def41.1%
hypot-define41.1%
distribute-rgt-neg-out41.1%
fma-define41.1%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around inf 82.2%
unpow282.2%
unpow282.2%
hypot-undefine83.9%
associate-*r/83.9%
neg-mul-183.9%
distribute-lft-neg-in83.9%
Simplified83.9%
Taylor expanded in y.im around 0 89.3%
*-commutative89.3%
Simplified89.3%
if -4.2000000000000002e-4 < y.re < 6.8e-21Initial program 49.2%
fmm-def49.2%
hypot-define49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in y.re around inf 58.4%
unpow258.4%
unpow258.4%
hypot-undefine86.7%
associate-*r/86.7%
neg-mul-186.7%
distribute-lft-neg-in86.7%
Simplified86.7%
Taylor expanded in y.im around inf 86.7%
associate-*r/86.7%
neg-mul-186.7%
distribute-rgt-neg-in86.7%
Simplified86.7%
if 6.8e-21 < y.re Initial program 36.8%
Taylor expanded in y.re around 0 42.6%
*-commutative42.6%
unpow242.6%
unpow242.6%
hypot-undefine75.0%
Simplified75.0%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (log (hypot x.im x.re))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) (- INFINITY))
(* t_3 (fabs (sin (fma y.im t_4 t_1))))
(*
(exp (* y.re (- t_4 (/ t_0 y.re))))
(sin (fma (log (hypot x.re x.im)) y.im t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((t_2 * y_46_re) - t_0));
double t_4 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= -((double) INFINITY)) {
tmp = t_3 * fabs(sin(fma(y_46_im, t_4, t_1)));
} else {
tmp = exp((y_46_re * (t_4 - (t_0 / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Float64(-Inf)) tmp = Float64(t_3 * abs(sin(fma(y_46_im, t_4, t_1)))); else tmp = Float64(exp(Float64(y_46_re * Float64(t_4 - Float64(t_0 / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(t$95$3 * N[Abs[N[Sin[N[(y$46$im * t$95$4 + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$re * N[(t$95$4 - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq -\infty:\\
\;\;\;\;t\_3 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, t\_4, t\_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \left(t\_4 - \frac{t\_0}{y.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 36.8%
fma-define36.8%
hypot-define36.8%
*-commutative36.8%
add-sqr-sqrt0.0%
sqrt-unprod63.2%
pow263.2%
Applied egg-rr63.2%
unpow263.2%
rem-sqrt-square63.2%
fma-define63.2%
hypot-undefine63.2%
unpow263.2%
unpow263.2%
+-commutative63.2%
+-commutative63.2%
fma-define63.2%
Simplified63.2%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 44.7%
fmm-def44.7%
hypot-define44.7%
distribute-rgt-neg-out44.7%
fma-define44.7%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.re around inf 68.4%
unpow268.4%
unpow268.4%
hypot-undefine85.4%
associate-*r/85.4%
neg-mul-185.4%
distribute-lft-neg-in85.4%
Simplified85.4%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (exp (* y.re (- (log (hypot x.im x.re)) (/ (* (atan2 x.im x.re) y.im) y.re)))) (sin (fma (log (hypot x.re x.im)) 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) {
return exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - ((atan2(x_46_im, x_46_re) * y_46_im) / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), 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) return Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), 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_] := N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}{y.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.re around inf 66.1%
unpow266.1%
unpow266.1%
hypot-undefine81.8%
associate-*r/81.8%
neg-mul-181.8%
distribute-lft-neg-in81.8%
Simplified81.8%
Final simplification81.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.im x.re))))
(if (<= y.re -0.00042)
(* (exp (* y.re (- t_2 (/ t_0 y.re)))) (sin t_1))
(if (<= y.re 1.1)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* y.re (/ (* (atan2 x.im x.re) (- y.im)) y.re))))
(* (sin (* y.im t_2)) (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -0.00042) {
tmp = exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * sin(t_1);
} else if (y_46_re <= 1.1) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((y_46_re * ((atan2(x_46_im, x_46_re) * -y_46_im) / y_46_re)));
} else {
tmp = sin((y_46_im * t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.00042) tmp = Float64(exp(Float64(y_46_re * Float64(t_2 - Float64(t_0 / y_46_re)))) * sin(t_1)); elseif (y_46_re <= 1.1) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(y_46_re * Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) / y_46_re)))); else tmp = Float64(sin(Float64(y_46_im * t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00042], N[(N[Exp[N[(y$46$re * N[(t$95$2 - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -0.00042:\\
\;\;\;\;e^{y.re \cdot \left(t\_2 - \frac{t\_0}{y.re}\right)} \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 1.1:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}{y.re}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_2\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\end{array}
\end{array}
if y.re < -4.2000000000000002e-4Initial program 41.1%
fmm-def41.1%
hypot-define41.1%
distribute-rgt-neg-out41.1%
fma-define41.1%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around inf 82.2%
unpow282.2%
unpow282.2%
hypot-undefine83.9%
associate-*r/83.9%
neg-mul-183.9%
distribute-lft-neg-in83.9%
Simplified83.9%
Taylor expanded in y.im around 0 89.3%
*-commutative89.3%
Simplified89.3%
if -4.2000000000000002e-4 < y.re < 1.1000000000000001Initial program 49.6%
fmm-def49.6%
hypot-define49.6%
distribute-rgt-neg-out49.6%
fma-define49.6%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.re around inf 59.3%
unpow259.3%
unpow259.3%
hypot-undefine87.0%
associate-*r/87.0%
neg-mul-187.0%
distribute-lft-neg-in87.0%
Simplified87.0%
Taylor expanded in y.im around inf 87.0%
associate-*r/87.0%
neg-mul-187.0%
distribute-rgt-neg-in87.0%
Simplified87.0%
if 1.1000000000000001 < y.re Initial program 35.4%
exp-diff24.6%
exp-to-pow24.6%
hypot-define24.6%
*-commutative24.6%
exp-prod24.6%
fma-define24.6%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 33.9%
unpow233.9%
unpow233.9%
hypot-undefine67.8%
Simplified67.8%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (log (hypot x.im x.re)))
(t_3 (sin (* y.im t_2)))
(t_4
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 y.re))))))))
(if (<= y.re -2150000000000.0)
(* (exp (* y.re (- t_2 (/ t_0 y.re)))) (sin (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.25e-215)
t_4
(if (<= y.re 1.08e-133)
(* t_3 t_1)
(if (<= y.re 1.4)
t_4
(* t_3 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = sin((y_46_im * t_2));
double t_4 = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
double tmp;
if (y_46_re <= -2150000000000.0) {
tmp = exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= -2.25e-215) {
tmp = t_4;
} else if (y_46_re <= 1.08e-133) {
tmp = t_3 * t_1;
} else if (y_46_re <= 1.4) {
tmp = t_4;
} else {
tmp = t_3 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = Math.sin((y_46_im * t_2));
double t_4 = t_1 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
double tmp;
if (y_46_re <= -2150000000000.0) {
tmp = Math.exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= -2.25e-215) {
tmp = t_4;
} else if (y_46_re <= 1.08e-133) {
tmp = t_3 * t_1;
} else if (y_46_re <= 1.4) {
tmp = t_4;
} else {
tmp = t_3 * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = math.sin((y_46_im * t_2)) t_4 = t_1 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))) tmp = 0 if y_46_re <= -2150000000000.0: tmp = math.exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= -2.25e-215: tmp = t_4 elif y_46_re <= 1.08e-133: tmp = t_3 * t_1 elif y_46_re <= 1.4: tmp = t_4 else: tmp = t_3 * (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = sin(Float64(y_46_im * t_2)) t_4 = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / y_46_re)))))) tmp = 0.0 if (y_46_re <= -2150000000000.0) tmp = Float64(exp(Float64(y_46_re * Float64(t_2 - Float64(t_0 / y_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= -2.25e-215) tmp = t_4; elseif (y_46_re <= 1.08e-133) tmp = Float64(t_3 * t_1); elseif (y_46_re <= 1.4) tmp = t_4; else tmp = Float64(t_3 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_2 = log(hypot(x_46_im, x_46_re)); t_3 = sin((y_46_im * t_2)); t_4 = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))); tmp = 0.0; if (y_46_re <= -2150000000000.0) tmp = exp((y_46_re * (t_2 - (t_0 / y_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= -2.25e-215) tmp = t_4; elseif (y_46_re <= 1.08e-133) tmp = t_3 * t_1; elseif (y_46_re <= 1.4) tmp = t_4; else tmp = t_3 * ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2150000000000.0], N[(N[Exp[N[(y$46$re * N[(t$95$2 - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.25e-215], t$95$4, If[LessEqual[y$46$re, 1.08e-133], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.4], t$95$4, N[(t$95$3 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := \sin \left(y.im \cdot t\_2\right)\\
t_4 := t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\mathbf{if}\;y.re \leq -2150000000000:\\
\;\;\;\;e^{y.re \cdot \left(t\_2 - \frac{t\_0}{y.re}\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq -2.25 \cdot 10^{-215}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.08 \cdot 10^{-133}:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.4:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\end{array}
\end{array}
if y.re < -2.15e12Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define41.5%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y.re around inf 83.1%
unpow283.1%
unpow283.1%
hypot-undefine84.9%
associate-*r/84.9%
neg-mul-184.9%
distribute-lft-neg-in84.9%
Simplified84.9%
Taylor expanded in y.im around 0 90.6%
*-commutative90.6%
Simplified90.6%
if -2.15e12 < y.re < -2.25e-215 or 1.07999999999999992e-133 < y.re < 1.3999999999999999Initial program 56.3%
fmm-def56.3%
hypot-define56.3%
distribute-rgt-neg-out56.3%
fma-define56.3%
hypot-define89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y.re around inf 62.8%
unpow262.8%
unpow262.8%
hypot-undefine89.9%
associate-*r/89.9%
neg-mul-189.9%
distribute-lft-neg-in89.9%
Simplified89.9%
Taylor expanded in y.re around inf 50.8%
+-commutative50.8%
associate-/l*50.8%
unpow250.8%
unpow250.8%
hypot-undefine87.1%
Simplified87.1%
Taylor expanded in y.re around 0 85.8%
neg-mul-185.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if -2.25e-215 < y.re < 1.07999999999999992e-133Initial program 41.4%
fmm-def41.4%
hypot-define41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.re around 0 38.1%
neg-mul-138.1%
distribute-lft-neg-in38.1%
*-commutative38.1%
unpow238.1%
unpow238.1%
hypot-undefine76.6%
Simplified76.6%
if 1.3999999999999999 < y.re Initial program 35.4%
exp-diff24.6%
exp-to-pow24.6%
hypot-define24.6%
*-commutative24.6%
exp-prod24.6%
fma-define24.6%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 33.9%
unpow233.9%
unpow233.9%
hypot-undefine67.8%
Simplified67.8%
Final simplification79.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (log (hypot x.im x.re)))
(t_2 (sin (* y.im t_1)))
(t_3
(* t_0 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_1 y.re))))))))
(if (<= y.re -4.7e+36)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(if (<= y.re -3.2e-215)
t_3
(if (<= y.re 3.2e-133)
(* t_2 t_0)
(if (<= y.re 1.4)
t_3
(*
t_2
(/
(pow (hypot x.re x.im) y.re)
(+ 1.0 (* (atan2 x.im x.re) y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = sin((y_46_im * t_1));
double t_3 = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re)))));
double tmp;
if (y_46_re <= -4.7e+36) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -3.2e-215) {
tmp = t_3;
} else if (y_46_re <= 3.2e-133) {
tmp = t_2 * t_0;
} else if (y_46_re <= 1.4) {
tmp = t_3;
} else {
tmp = t_2 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.sin((y_46_im * t_1));
double t_3 = t_0 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re)))));
double tmp;
if (y_46_re <= -4.7e+36) {
tmp = 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);
} else if (y_46_re <= -3.2e-215) {
tmp = t_3;
} else if (y_46_re <= 3.2e-133) {
tmp = t_2 * t_0;
} else if (y_46_re <= 1.4) {
tmp = t_3;
} else {
tmp = t_2 * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_1 = math.log(math.hypot(x_46_im, x_46_re)) t_2 = math.sin((y_46_im * t_1)) t_3 = t_0 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) tmp = 0 if y_46_re <= -4.7e+36: tmp = 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) elif y_46_re <= -3.2e-215: tmp = t_3 elif y_46_re <= 3.2e-133: tmp = t_2 * t_0 elif y_46_re <= 1.4: tmp = t_3 else: tmp = t_2 * (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = sin(Float64(y_46_im * t_1)) t_3 = Float64(t_0 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_1 / y_46_re)))))) tmp = 0.0 if (y_46_re <= -4.7e+36) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -3.2e-215) tmp = t_3; elseif (y_46_re <= 3.2e-133) tmp = Float64(t_2 * t_0); elseif (y_46_re <= 1.4) tmp = t_3; else tmp = Float64(t_2 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_1 = log(hypot(x_46_im, x_46_re)); t_2 = sin((y_46_im * t_1)); t_3 = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))); tmp = 0.0; if (y_46_re <= -4.7e+36) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -3.2e-215) tmp = t_3; elseif (y_46_re <= 3.2e-133) tmp = t_2 * t_0; elseif (y_46_re <= 1.4) tmp = t_3; else tmp = t_2 * ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.7e+36], 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], If[LessEqual[y$46$re, -3.2e-215], t$95$3, If[LessEqual[y$46$re, 3.2e-133], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.4], t$95$3, N[(t$95$2 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \sin \left(y.im \cdot t\_1\right)\\
t_3 := t\_0 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_1}{y.re}\right)\right)\\
\mathbf{if}\;y.re \leq -4.7 \cdot 10^{+36}:\\
\;\;\;\;\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}\\
\mathbf{elif}\;y.re \leq -3.2 \cdot 10^{-215}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-133}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.4:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < -4.69999999999999989e36Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine84.9%
Simplified84.9%
if -4.69999999999999989e36 < y.re < -3.2000000000000001e-215 or 3.20000000000000013e-133 < y.re < 1.3999999999999999Initial program 57.6%
fmm-def57.6%
hypot-define57.6%
distribute-rgt-neg-out57.6%
fma-define57.6%
hypot-define89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in y.re around inf 63.6%
unpow263.6%
unpow263.6%
hypot-undefine89.5%
associate-*r/89.5%
neg-mul-189.5%
distribute-lft-neg-in89.5%
Simplified89.5%
Taylor expanded in y.re around inf 52.6%
+-commutative52.6%
associate-/l*52.6%
unpow252.6%
unpow252.6%
hypot-undefine87.0%
Simplified87.0%
Taylor expanded in y.re around 0 83.4%
neg-mul-183.4%
distribute-rgt-neg-in83.4%
Simplified83.4%
if -3.2000000000000001e-215 < y.re < 3.20000000000000013e-133Initial program 41.4%
fmm-def41.4%
hypot-define41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y.re around 0 38.1%
neg-mul-138.1%
distribute-lft-neg-in38.1%
*-commutative38.1%
unpow238.1%
unpow238.1%
hypot-undefine76.6%
Simplified76.6%
if 1.3999999999999999 < y.re Initial program 35.4%
exp-diff24.6%
exp-to-pow24.6%
hypot-define24.6%
*-commutative24.6%
exp-prod24.6%
fma-define24.6%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 33.9%
unpow233.9%
unpow233.9%
hypot-undefine67.8%
Simplified67.8%
Final simplification78.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (+ 1.0 (* (atan2 x.im x.re) y.im)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.8e+37)
(* (sin t_2) (pow (hypot x.im x.re) y.re))
(if (<= y.re 2.1e-140)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 0.0016)
(* (sin (fma (log (hypot x.re x.im)) y.im t_2)) (/ 1.0 t_1))
(* t_0 (/ (pow (hypot x.re x.im) y.re) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = 1.0 + (atan2(x_46_im, x_46_re) * y_46_im);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.8e+37) {
tmp = sin(t_2) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.1e-140) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 0.0016) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * (1.0 / t_1);
} else {
tmp = t_0 * (pow(hypot(x_46_re, x_46_im), y_46_re) / t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.8e+37) tmp = Float64(sin(t_2) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 2.1e-140) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 0.0016) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * Float64(1.0 / t_1)); else tmp = Float64(t_0 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.8e+37], N[(N[Sin[t$95$2], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e-140], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0016], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := 1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.8 \cdot 10^{+37}:\\
\;\;\;\;\sin t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-140}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 0.0016:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right) \cdot \frac{1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_1}\\
\end{array}
\end{array}
if y.re < -2.7999999999999998e37Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine84.9%
Simplified84.9%
if -2.7999999999999998e37 < y.re < 2.10000000000000017e-140Initial program 49.6%
fmm-def49.6%
hypot-define49.6%
distribute-rgt-neg-out49.6%
fma-define49.6%
hypot-define85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in y.re around 0 40.3%
neg-mul-140.3%
distribute-lft-neg-in40.3%
*-commutative40.3%
unpow240.3%
unpow240.3%
hypot-undefine68.5%
Simplified68.5%
if 2.10000000000000017e-140 < y.re < 0.00160000000000000008Initial program 53.5%
exp-diff53.5%
exp-to-pow53.5%
hypot-define53.5%
*-commutative53.5%
exp-prod53.5%
fma-define53.5%
hypot-define92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y.im around 0 72.2%
Taylor expanded in y.re around 0 72.2%
if 0.00160000000000000008 < y.re Initial program 35.4%
exp-diff24.6%
exp-to-pow24.6%
hypot-define24.6%
*-commutative24.6%
exp-prod24.6%
fma-define24.6%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 33.9%
unpow233.9%
unpow233.9%
hypot-undefine67.8%
Simplified67.8%
Final simplification71.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.re -4.2e+36)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(if (<= y.re 1.55)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(*
t_0
(/
(pow (hypot x.re x.im) y.re)
(+ 1.0 (* (atan2 x.im x.re) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -4.2e+36) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 1.55) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -4.2e+36) {
tmp = 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);
} else if (y_46_re <= 1.55) {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -4.2e+36: tmp = 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) elif y_46_re <= 1.55: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = t_0 * (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -4.2e+36) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 1.55) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -4.2e+36) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 1.55) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = t_0 * ((hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e+36], 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], If[LessEqual[y$46$re, 1.55], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+36}:\\
\;\;\;\;\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}\\
\mathbf{elif}\;y.re \leq 1.55:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < -4.20000000000000009e36Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine84.9%
Simplified84.9%
if -4.20000000000000009e36 < y.re < 1.55000000000000004Initial program 50.3%
fmm-def50.3%
hypot-define50.3%
distribute-rgt-neg-out50.3%
fma-define50.3%
hypot-define86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y.re around 0 38.7%
neg-mul-138.7%
distribute-lft-neg-in38.7%
*-commutative38.7%
unpow238.7%
unpow238.7%
hypot-undefine65.8%
Simplified65.8%
if 1.55000000000000004 < y.re Initial program 35.4%
exp-diff24.6%
exp-to-pow24.6%
hypot-define24.6%
*-commutative24.6%
exp-prod24.6%
fma-define24.6%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 33.9%
unpow233.9%
unpow233.9%
hypot-undefine67.8%
Simplified67.8%
Final simplification69.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.8e+36)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 1.25e+46)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (* y.re (log1p (expm1 (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.8e+36) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.25e+46) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin((y_46_re * log1p(expm1(atan2(x_46_im, x_46_re)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.8e+36) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.25e+46) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.log1p(Math.expm1(Math.atan2(x_46_im, x_46_re)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.8e+36: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 1.25e+46: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = t_0 * math.sin((y_46_re * math.log1p(math.expm1(math.atan2(x_46_im, x_46_re))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.8e+36) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.25e+46) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * log1p(expm1(atan(x_46_im, x_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.8e+36], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.25e+46], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+36}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{+46}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.80000000000000025e36Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine84.9%
Simplified84.9%
if -3.80000000000000025e36 < y.re < 1.2500000000000001e46Initial program 49.0%
fmm-def49.0%
hypot-define49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around 0 38.0%
neg-mul-138.0%
distribute-lft-neg-in38.0%
*-commutative38.0%
unpow238.0%
unpow238.0%
hypot-undefine63.7%
Simplified63.7%
if 1.2500000000000001e46 < y.re Initial program 36.8%
fmm-def36.8%
hypot-define36.8%
distribute-rgt-neg-out36.8%
fma-define36.8%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 61.5%
unpow261.5%
unpow261.5%
hypot-undefine61.5%
Simplified61.5%
log1p-expm1-u63.3%
Applied egg-rr63.3%
Final simplification67.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -3.8e+36) (not (<= y.re 2.45e+45)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.8e+36) || !(y_46_re <= 2.45e+45)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.8e+36) || !(y_46_re <= 2.45e+45)) {
tmp = 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);
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3.8e+36) or not (y_46_re <= 2.45e+45): tmp = 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) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.8e+36) || !(y_46_re <= 2.45e+45)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3.8e+36) || ~((y_46_re <= 2.45e+45))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.8e+36], N[Not[LessEqual[y$46$re, 2.45e+45]], $MachinePrecision]], 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], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+36} \lor \neg \left(y.re \leq 2.45 \cdot 10^{+45}\right):\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -3.80000000000000025e36 or 2.4500000000000001e45 < y.re Initial program 36.9%
fmm-def36.9%
hypot-define36.9%
distribute-rgt-neg-out36.9%
fma-define36.9%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine72.0%
Simplified72.0%
if -3.80000000000000025e36 < y.re < 2.4500000000000001e45Initial program 49.0%
fmm-def49.0%
hypot-define49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around 0 38.0%
neg-mul-138.0%
distribute-lft-neg-in38.0%
*-commutative38.0%
unpow238.0%
unpow238.0%
hypot-undefine63.7%
Simplified63.7%
Final simplification67.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -3.8e+36) (not (<= y.re 1.02e+48))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.8e+36) || !(y_46_re <= 1.02e+48)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.8e+36) || !(y_46_re <= 1.02e+48)) {
tmp = 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);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3.8e+36) or not (y_46_re <= 1.02e+48): tmp = 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) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.8e+36) || !(y_46_re <= 1.02e+48)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3.8e+36) || ~((y_46_re <= 1.02e+48))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.8e+36], N[Not[LessEqual[y$46$re, 1.02e+48]], $MachinePrecision]], 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], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+36} \lor \neg \left(y.re \leq 1.02 \cdot 10^{+48}\right):\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -3.80000000000000025e36 or 1.02e48 < y.re Initial program 36.9%
fmm-def36.9%
hypot-define36.9%
distribute-rgt-neg-out36.9%
fma-define36.9%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine72.0%
Simplified72.0%
if -3.80000000000000025e36 < y.re < 1.02e48Initial program 49.0%
fmm-def49.0%
hypot-define49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around inf 58.9%
unpow258.9%
unpow258.9%
hypot-undefine83.9%
associate-*r/83.9%
neg-mul-183.9%
distribute-lft-neg-in83.9%
Simplified83.9%
Taylor expanded in y.im around 0 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in y.re around 0 52.8%
*-commutative52.8%
neg-mul-152.8%
distribute-rgt-neg-in52.8%
Simplified52.8%
Final simplification60.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (expm1 t_0)) (t_2 (sin t_0)))
(if (<= y.re -1.8e+46)
(* t_2 (pow x.re y.re))
(if (<= y.re 1.36e-155)
(log (+ 1.0 t_1))
(if (<= y.re 2.9e+59) (log1p t_1) (* t_2 (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = expm1(t_0);
double t_2 = sin(t_0);
double tmp;
if (y_46_re <= -1.8e+46) {
tmp = t_2 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.36e-155) {
tmp = log((1.0 + t_1));
} else if (y_46_re <= 2.9e+59) {
tmp = log1p(t_1);
} else {
tmp = t_2 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.expm1(t_0);
double t_2 = Math.sin(t_0);
double tmp;
if (y_46_re <= -1.8e+46) {
tmp = t_2 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.36e-155) {
tmp = Math.log((1.0 + t_1));
} else if (y_46_re <= 2.9e+59) {
tmp = Math.log1p(t_1);
} else {
tmp = t_2 * 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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.expm1(t_0) t_2 = math.sin(t_0) tmp = 0 if y_46_re <= -1.8e+46: tmp = t_2 * math.pow(x_46_re, y_46_re) elif y_46_re <= 1.36e-155: tmp = math.log((1.0 + t_1)) elif y_46_re <= 2.9e+59: tmp = math.log1p(t_1) else: tmp = t_2 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = expm1(t_0) t_2 = sin(t_0) tmp = 0.0 if (y_46_re <= -1.8e+46) tmp = Float64(t_2 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 1.36e-155) tmp = log(Float64(1.0 + t_1)); elseif (y_46_re <= 2.9e+59) tmp = log1p(t_1); else tmp = Float64(t_2 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Exp[t$95$0] - 1), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.8e+46], N[(t$95$2 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.36e-155], N[Log[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.9e+59], N[Log[1 + t$95$1], $MachinePrecision], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{expm1}\left(t\_0\right)\\
t_2 := \sin t\_0\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{+46}:\\
\;\;\;\;t\_2 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.36 \cdot 10^{-155}:\\
\;\;\;\;\log \left(1 + t\_1\right)\\
\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{log1p}\left(t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.7999999999999999e46Initial program 37.8%
fmm-def37.8%
hypot-define37.8%
distribute-rgt-neg-out37.8%
fma-define37.8%
hypot-define84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in y.im around 0 84.5%
unpow284.5%
unpow284.5%
hypot-undefine84.5%
Simplified84.5%
Taylor expanded in x.im around 0 71.4%
*-commutative71.4%
Simplified71.4%
if -1.7999999999999999e46 < y.re < 1.35999999999999996e-155Initial program 49.6%
fmm-def49.6%
hypot-define49.6%
distribute-rgt-neg-out49.6%
fma-define49.6%
hypot-define84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in y.im around 0 22.9%
unpow222.9%
unpow222.9%
hypot-undefine20.1%
Simplified20.1%
Taylor expanded in y.re around 0 16.7%
*-commutative16.7%
Simplified16.7%
log1p-expm1-u20.1%
log1p-undefine31.7%
*-commutative31.7%
Applied egg-rr31.7%
if 1.35999999999999996e-155 < y.re < 2.89999999999999991e59Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.im around 0 23.5%
unpow223.5%
unpow223.5%
hypot-undefine30.7%
Simplified30.7%
Taylor expanded in y.re around 0 28.9%
*-commutative28.9%
Simplified28.9%
*-commutative28.9%
log1p-expm1-u40.0%
Applied egg-rr40.0%
if 2.89999999999999991e59 < y.re Initial program 38.2%
fmm-def38.2%
hypot-define38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in y.im around 0 61.9%
unpow261.9%
unpow261.9%
hypot-undefine61.9%
Simplified61.9%
Taylor expanded in x.re around 0 54.9%
*-commutative54.9%
Simplified54.9%
Final simplification45.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (expm1 t_0))
(t_2 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -2.2e+73)
t_2
(if (<= y.re 1.05e-162)
(log (+ 1.0 t_1))
(if (<= y.re 3.6e+59) (log1p 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 = expm1(t_0);
double t_2 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -2.2e+73) {
tmp = t_2;
} else if (y_46_re <= 1.05e-162) {
tmp = log((1.0 + t_1));
} else if (y_46_re <= 3.6e+59) {
tmp = log1p(t_1);
} else {
tmp = 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.expm1(t_0);
double t_2 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -2.2e+73) {
tmp = t_2;
} else if (y_46_re <= 1.05e-162) {
tmp = Math.log((1.0 + t_1));
} else if (y_46_re <= 3.6e+59) {
tmp = Math.log1p(t_1);
} else {
tmp = 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.expm1(t_0) t_2 = math.sin(t_0) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -2.2e+73: tmp = t_2 elif y_46_re <= 1.05e-162: tmp = math.log((1.0 + t_1)) elif y_46_re <= 3.6e+59: tmp = math.log1p(t_1) else: tmp = 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 = expm1(t_0) t_2 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -2.2e+73) tmp = t_2; elseif (y_46_re <= 1.05e-162) tmp = log(Float64(1.0 + t_1)); elseif (y_46_re <= 3.6e+59) tmp = log1p(t_1); else tmp = 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[(Exp[t$95$0] - 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e+73], t$95$2, If[LessEqual[y$46$re, 1.05e-162], N[Log[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 3.6e+59], N[Log[1 + t$95$1], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{expm1}\left(t\_0\right)\\
t_2 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-162}:\\
\;\;\;\;\log \left(1 + t\_1\right)\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{log1p}\left(t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -2.2e73 or 3.5999999999999999e59 < y.re Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.im around 0 72.3%
unpow272.3%
unpow272.3%
hypot-undefine72.3%
Simplified72.3%
Taylor expanded in x.re around 0 57.1%
*-commutative57.1%
Simplified57.1%
if -2.2e73 < y.re < 1.05e-162Initial program 48.3%
fmm-def48.3%
hypot-define48.3%
distribute-rgt-neg-out48.3%
fma-define48.3%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y.im around 0 24.1%
unpow224.1%
unpow224.1%
hypot-undefine21.3%
Simplified21.3%
Taylor expanded in y.re around 0 17.2%
*-commutative17.2%
Simplified17.2%
log1p-expm1-u20.5%
log1p-undefine31.7%
*-commutative31.7%
Applied egg-rr31.7%
if 1.05e-162 < y.re < 3.5999999999999999e59Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.im around 0 23.5%
unpow223.5%
unpow223.5%
hypot-undefine30.7%
Simplified30.7%
Taylor expanded in y.re around 0 28.9%
*-commutative28.9%
Simplified28.9%
*-commutative28.9%
log1p-expm1-u40.0%
Applied egg-rr40.0%
Final simplification42.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -2.3e+39)
(* t_0 (pow x.re y.re))
(if (<= y.re 4.2e+47)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -2.3e+39) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 4.2e+47) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (y_46re <= (-2.3d+39)) then
tmp = t_0 * (x_46re ** y_46re)
else if (y_46re <= 4.2d+47) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -2.3e+39) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 4.2e+47) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -2.3e+39: tmp = t_0 * math.pow(x_46_re, y_46_re) elif y_46_re <= 4.2e+47: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -2.3e+39) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 4.2e+47) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -2.3e+39) tmp = t_0 * (x_46_re ^ y_46_re); elseif (y_46_re <= 4.2e+47) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.3e+39], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.2e+47], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -2.3 \cdot 10^{+39}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{+47}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.30000000000000012e39Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine84.9%
Simplified84.9%
Taylor expanded in x.im around 0 72.0%
*-commutative72.0%
Simplified72.0%
if -2.30000000000000012e39 < y.re < 4.2e47Initial program 49.0%
fmm-def49.0%
hypot-define49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.re around inf 58.9%
unpow258.9%
unpow258.9%
hypot-undefine83.9%
associate-*r/83.9%
neg-mul-183.9%
distribute-lft-neg-in83.9%
Simplified83.9%
Taylor expanded in y.im around 0 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in y.re around 0 52.8%
*-commutative52.8%
neg-mul-152.8%
distribute-rgt-neg-in52.8%
Simplified52.8%
if 4.2e47 < y.re Initial program 36.8%
fmm-def36.8%
hypot-define36.8%
distribute-rgt-neg-out36.8%
fma-define36.8%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 61.5%
unpow261.5%
unpow261.5%
hypot-undefine61.5%
Simplified61.5%
Taylor expanded in x.re around 0 54.7%
*-commutative54.7%
Simplified54.7%
Final simplification56.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -1750000.0) (not (<= y.im 1e-85)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1750000.0) || !(y_46_im <= 1e-85)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(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.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1750000.0) || !(y_46_im <= 1e-85)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -1750000.0) or not (y_46_im <= 1e-85): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -1750000.0) || !(y_46_im <= 1e-85)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1750000.0], N[Not[LessEqual[y$46$im, 1e-85]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -1750000 \lor \neg \left(y.im \leq 10^{-85}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -1.75e6 or 9.9999999999999998e-86 < y.im Initial program 42.8%
fmm-def42.8%
hypot-define42.8%
distribute-rgt-neg-out42.8%
fma-define42.8%
hypot-define76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine32.1%
Simplified32.1%
Taylor expanded in y.re around 0 5.0%
*-commutative5.0%
Simplified5.0%
log1p-expm1-u14.4%
log1p-undefine35.7%
*-commutative35.7%
Applied egg-rr35.7%
if -1.75e6 < y.im < 9.9999999999999998e-86Initial program 46.1%
fmm-def46.1%
hypot-define46.1%
distribute-rgt-neg-out46.1%
fma-define46.0%
hypot-define89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y.im around 0 44.5%
unpow244.5%
unpow244.5%
hypot-undefine56.5%
Simplified56.5%
Taylor expanded in y.re around 0 26.5%
*-commutative26.5%
Simplified26.5%
*-commutative26.5%
log1p-expm1-u40.8%
Applied egg-rr40.8%
Final simplification37.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (expm1 t_0)))
(if (<= y.im -5e-96)
(pow (pow t_0 3.0) 0.3333333333333333)
(if (<= y.im 2.2e-85) (log1p t_1) (log (+ 1.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 = expm1(t_0);
double tmp;
if (y_46_im <= -5e-96) {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 2.2e-85) {
tmp = log1p(t_1);
} else {
tmp = log((1.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.expm1(t_0);
double tmp;
if (y_46_im <= -5e-96) {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 2.2e-85) {
tmp = Math.log1p(t_1);
} else {
tmp = Math.log((1.0 + t_1));
}
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.expm1(t_0) tmp = 0 if y_46_im <= -5e-96: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) elif y_46_im <= 2.2e-85: tmp = math.log1p(t_1) else: tmp = math.log((1.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 = expm1(t_0) tmp = 0.0 if (y_46_im <= -5e-96) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 2.2e-85) tmp = log1p(t_1); else tmp = log(Float64(1.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[(Exp[t$95$0] - 1), $MachinePrecision]}, If[LessEqual[y$46$im, -5e-96], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, 2.2e-85], N[Log[1 + t$95$1], $MachinePrecision], N[Log[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{expm1}\left(t\_0\right)\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{-96}:\\
\;\;\;\;{\left({t\_0}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{-85}:\\
\;\;\;\;\mathsf{log1p}\left(t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + t\_1\right)\\
\end{array}
\end{array}
if y.im < -4.99999999999999995e-96Initial program 39.7%
fmm-def39.7%
hypot-define39.7%
distribute-rgt-neg-out39.7%
fma-define39.7%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around 0 40.2%
unpow240.2%
unpow240.2%
hypot-undefine30.6%
Simplified30.6%
Taylor expanded in y.re around 0 5.0%
*-commutative5.0%
Simplified5.0%
add-cbrt-cube24.8%
pow1/332.2%
pow332.2%
*-commutative32.2%
Applied egg-rr32.2%
if -4.99999999999999995e-96 < y.im < 2.2e-85Initial program 42.9%
fmm-def42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.8%
hypot-define90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y.im around 0 48.0%
unpow248.0%
unpow248.0%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in y.re around 0 31.3%
*-commutative31.3%
Simplified31.3%
*-commutative31.3%
log1p-expm1-u46.7%
Applied egg-rr46.7%
if 2.2e-85 < y.im Initial program 48.9%
fmm-def48.9%
hypot-define48.9%
distribute-rgt-neg-out48.9%
fma-define48.9%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 38.6%
unpow238.6%
unpow238.6%
hypot-undefine32.8%
Simplified32.8%
Taylor expanded in y.re around 0 5.2%
*-commutative5.2%
Simplified5.2%
log1p-expm1-u18.3%
log1p-undefine37.3%
*-commutative37.3%
Applied egg-rr37.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1.55e-65) (not (<= y.im 2.4e-85)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.55e-65) || !(y_46_im <= 2.4e-85)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.55e-65) || !(y_46_im <= 2.4e-85)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.55e-65) || !(y_46_im <= 2.4e-85)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.55e-65], N[Not[LessEqual[y$46$im, 2.4e-85]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.55 \cdot 10^{-65} \lor \neg \left(y.im \leq 2.4 \cdot 10^{-85}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -1.55000000000000008e-65 or 2.4000000000000001e-85 < y.im Initial program 44.3%
fmm-def44.3%
hypot-define44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 39.5%
unpow239.5%
unpow239.5%
hypot-undefine31.8%
Simplified31.8%
Taylor expanded in y.re around 0 4.8%
*-commutative4.8%
Simplified4.8%
add-cbrt-cube24.1%
pow324.1%
*-commutative24.1%
Applied egg-rr24.1%
if -1.55000000000000008e-65 < y.im < 2.4000000000000001e-85Initial program 43.8%
fmm-def43.8%
hypot-define43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine61.0%
Simplified61.0%
Taylor expanded in y.re around 0 30.3%
*-commutative30.3%
Simplified30.3%
*-commutative30.3%
log1p-expm1-u45.9%
Applied egg-rr45.9%
Final simplification31.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -8200000000.0)
(sqrt (pow t_0 2.0))
(if (<= y.im 3.8e-72) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8200000000.0) {
tmp = sqrt(pow(t_0, 2.0));
} else if (y_46_im <= 3.8e-72) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8200000000.0) {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
} else if (y_46_im <= 3.8e-72) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -8200000000.0) tmp = sqrt((t_0 ^ 2.0)); elseif (y_46_im <= 3.8e-72) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8200000000.0], N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 3.8e-72], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8200000000:\\
\;\;\;\;\sqrt{{t\_0}^{2}}\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-72}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.im < -8.2e9Initial program 32.5%
fmm-def32.5%
hypot-define32.5%
distribute-rgt-neg-out32.5%
fma-define32.5%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y.im around 0 44.1%
unpow244.1%
unpow244.1%
hypot-undefine30.8%
Simplified30.8%
Taylor expanded in y.re around 0 4.6%
*-commutative4.6%
Simplified4.6%
add-sqr-sqrt3.2%
sqrt-unprod31.8%
pow231.8%
*-commutative31.8%
Applied egg-rr31.8%
if -8.2e9 < y.im < 3.80000000000000002e-72Initial program 48.0%
fmm-def48.0%
hypot-define48.0%
distribute-rgt-neg-out48.0%
fma-define48.0%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 44.7%
unpow244.7%
unpow244.7%
hypot-undefine56.3%
Simplified56.3%
Taylor expanded in y.re around 0 25.6%
*-commutative25.6%
Simplified25.6%
*-commutative25.6%
log1p-expm1-u39.4%
Applied egg-rr39.4%
if 3.80000000000000002e-72 < y.im Initial program 46.6%
fmm-def46.6%
hypot-define46.6%
distribute-rgt-neg-out46.6%
fma-define46.6%
hypot-define75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in y.im around 0 38.0%
unpow238.0%
unpow238.0%
hypot-undefine32.0%
Simplified32.0%
Taylor expanded in y.re around 0 5.4%
*-commutative5.4%
Simplified5.4%
add-cbrt-cube24.0%
pow324.0%
*-commutative24.0%
Applied egg-rr24.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 42.2%
unpow242.2%
unpow242.2%
hypot-undefine42.2%
Simplified42.2%
Taylor expanded in y.re around 0 13.9%
*-commutative13.9%
Simplified13.9%
*-commutative13.9%
log1p-expm1-u25.3%
Applied egg-rr25.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 6.6e-262) (* y.re (atan2 x.im x.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 <= 6.6e-262) {
tmp = y_46_re * atan2(x_46_im, x_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 <= 6.6d-262) then
tmp = y_46re * atan2(x_46im, x_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 <= 6.6e-262) {
tmp = y_46_re * Math.atan2(x_46_im, x_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 <= 6.6e-262: tmp = y_46_re * math.atan2(x_46_im, x_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 <= 6.6e-262) tmp = 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(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 <= 6.6e-262) tmp = y_46_re * atan2(x_46_im, x_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[LessEqual[x$46$re, 6.6e-262], N[(y$46$re * N[ArcTan[x$46$im / x$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 6.6 \cdot 10^{-262}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.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 < 6.6000000000000005e-262Initial program 41.8%
fmm-def41.8%
hypot-define41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.5%
Simplified46.5%
Taylor expanded in y.re around 0 15.7%
*-commutative15.7%
Simplified15.7%
if 6.6000000000000005e-262 < x.re Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y.im around 0 37.3%
unpow237.3%
unpow237.3%
hypot-undefine36.9%
Simplified36.9%
Taylor expanded in x.im around 0 30.0%
*-commutative30.0%
Simplified30.0%
Taylor expanded in y.re around 0 15.8%
+-commutative15.8%
*-lft-identity15.8%
associate-*r*15.8%
distribute-rgt-out15.8%
Simplified15.8%
Final simplification15.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 44.1%
fmm-def44.1%
hypot-define44.1%
distribute-rgt-neg-out44.1%
fma-define44.1%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 42.2%
unpow242.2%
unpow242.2%
hypot-undefine42.2%
Simplified42.2%
Taylor expanded in y.re around 0 13.9%
*-commutative13.9%
Simplified13.9%
Final simplification13.9%
herbie shell --seed 2024181
(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)))))