
(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 (log (hypot x.re x.im)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* t_3 y.re) t_1))))
(if (<= (* t_4 (sin (+ (* t_3 y.im) t_2))) (- INFINITY))
(* t_4 (fabs (sin t_2)))
(* (exp (fma t_0 y.re (- t_1))) (sin (fma t_0 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 = log(hypot(x_46_re, x_46_im));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((t_3 * y_46_re) - t_1));
double tmp;
if ((t_4 * sin(((t_3 * y_46_im) + t_2))) <= -((double) INFINITY)) {
tmp = t_4 * fabs(sin(t_2));
} else {
tmp = exp(fma(t_0, y_46_re, -t_1)) * sin(fma(t_0, y_46_im, t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_1)) tmp = 0.0 if (Float64(t_4 * sin(Float64(Float64(t_3 * y_46_im) + t_2))) <= Float64(-Inf)) tmp = Float64(t_4 * abs(sin(t_2))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(-t_1))) * sin(fma(t_0, 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$4 * N[Sin[N[(N[(t$95$3 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(t$95$4 * N[Abs[N[Sin[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + (-t$95$1)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{t\_3 \cdot y.re - t\_1}\\
\mathbf{if}\;t\_4 \cdot \sin \left(t\_3 \cdot y.im + t\_2\right) \leq -\infty:\\
\;\;\;\;t\_4 \cdot \left|\sin t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, -t\_1\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 33.3%
Taylor expanded in y.im around 0 38.1%
add-sqr-sqrt14.3%
sqrt-unprod61.9%
pow261.9%
Applied egg-rr61.9%
unpow261.9%
rem-sqrt-square66.7%
Simplified66.7%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 38.6%
fmm-def38.6%
hypot-define38.6%
distribute-rgt-neg-out38.6%
fma-define38.6%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
Final simplification87.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -4.5e-24)
(* t_1 t_0)
(if (<= y.re 1.5e+70)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (+ t_0 (fabs (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -4.5e-24) {
tmp = t_1 * t_0;
} else if (y_46_re <= 1.5e+70) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin((t_0 + fabs((y_46_im * log(hypot(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -4.5e-24) tmp = Float64(t_1 * t_0); elseif (y_46_re <= 1.5e+70) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * sin(Float64(t_0 + abs(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e-24], N[(t$95$1 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.5e+70], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-24}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + \left|y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\end{array}
\end{array}
if y.re < -4.4999999999999997e-24Initial program 42.7%
Taylor expanded in y.im around 0 83.0%
*-commutative83.0%
add-cube-cbrt81.8%
pow383.0%
*-commutative83.0%
Applied egg-rr83.0%
Taylor expanded in y.re around 0 86.7%
if -4.4999999999999997e-24 < y.re < 1.49999999999999988e70Initial program 40.3%
exp-diff40.3%
exp-to-pow40.3%
hypot-define40.3%
*-commutative40.3%
exp-prod39.6%
fma-define39.6%
hypot-define86.3%
*-commutative86.3%
Simplified86.3%
if 1.49999999999999988e70 < y.re Initial program 25.0%
add-sqr-sqrt8.3%
sqrt-unprod16.7%
pow216.7%
*-commutative16.7%
hypot-define52.1%
Applied egg-rr52.1%
unpow252.1%
rem-sqrt-square70.8%
hypot-undefine29.2%
unpow229.2%
unpow229.2%
+-commutative29.2%
unpow229.2%
unpow229.2%
hypot-undefine70.8%
Simplified70.8%
Final simplification83.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0)))
(t_3 (* t_2 t_1)))
(if (<= y.re -0.059)
t_3
(if (<= y.re 4.2e+20)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(if (<= y.re 3.6e+112)
t_3
(* t_2 (sin (+ t_1 (fabs (* y.im (log (hypot x.im x.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_3 = t_2 * t_1;
double tmp;
if (y_46_re <= -0.059) {
tmp = t_3;
} else if (y_46_re <= 4.2e+20) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else if (y_46_re <= 3.6e+112) {
tmp = t_3;
} else {
tmp = t_2 * sin((t_1 + fabs((y_46_im * log(hypot(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) t_3 = Float64(t_2 * t_1) tmp = 0.0 if (y_46_re <= -0.059) tmp = t_3; elseif (y_46_re <= 4.2e+20) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); elseif (y_46_re <= 3.6e+112) tmp = t_3; else tmp = Float64(t_2 * sin(Float64(t_1 + abs(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(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]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -0.059], t$95$3, If[LessEqual[y$46$re, 4.2e+20], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.6e+112], t$95$3, N[(t$95$2 * N[Sin[N[(t$95$1 + N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
t_3 := t\_2 \cdot t\_1\\
\mathbf{if}\;y.re \leq -0.059:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{+20}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{+112}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_1 + \left|y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\end{array}
\end{array}
if y.re < -0.058999999999999997 or 4.2e20 < y.re < 3.6e112Initial program 41.1%
Taylor expanded in y.im around 0 79.0%
*-commutative79.0%
add-cube-cbrt78.0%
pow380.1%
*-commutative80.1%
Applied egg-rr80.1%
Taylor expanded in y.re around 0 86.4%
if -0.058999999999999997 < y.re < 4.2e20Initial program 40.3%
exp-diff40.3%
exp-to-pow40.3%
hypot-define40.3%
*-commutative40.3%
exp-prod39.5%
fma-define39.5%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.re around 0 86.6%
if 3.6e112 < y.re Initial program 25.0%
add-sqr-sqrt7.5%
sqrt-unprod17.5%
pow217.5%
*-commutative17.5%
hypot-define55.0%
Applied egg-rr55.0%
unpow255.0%
rem-sqrt-square75.0%
hypot-undefine30.0%
unpow230.0%
unpow230.0%
+-commutative30.0%
unpow230.0%
unpow230.0%
hypot-undefine75.0%
Simplified75.0%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0)))
(t_3 (sin (fma (log (hypot x.re x.im)) y.im t_1))))
(if (<= y.im -490000000000.0)
(* t_2 t_1)
(if (<= y.im 6.8e+15)
(* t_3 (/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(if (<= y.im 1.7e+179)
(* t_2 (sin (* y.im (log (hypot x.im x.re)))))
(* t_3 (pow (exp y.im) (- (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
double tmp;
if (y_46_im <= -490000000000.0) {
tmp = t_2 * t_1;
} else if (y_46_im <= 6.8e+15) {
tmp = t_3 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else if (y_46_im <= 1.7e+179) {
tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_3 * pow(exp(y_46_im), -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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) tmp = 0.0 if (y_46_im <= -490000000000.0) tmp = Float64(t_2 * t_1); elseif (y_46_im <= 6.8e+15) tmp = Float64(t_3 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); elseif (y_46_im <= 1.7e+179) tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_3 * (exp(y_46_im) ^ Float64(-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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(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]}, Block[{t$95$3 = 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]}, If[LessEqual[y$46$im, -490000000000.0], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 6.8e+15], 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], If[LessEqual[y$46$im, 1.7e+179], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
t_3 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{if}\;y.im \leq -490000000000:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.im \leq 6.8 \cdot 10^{+15}:\\
\;\;\;\;t\_3 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+179}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.im < -4.9e11Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
*-commutative82.6%
add-cube-cbrt80.8%
pow380.8%
*-commutative80.8%
Applied egg-rr80.8%
Taylor expanded in y.re around 0 82.6%
if -4.9e11 < y.im < 6.8e15Initial program 36.1%
exp-diff35.4%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod34.8%
fma-define34.9%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 89.1%
if 6.8e15 < y.im < 1.69999999999999998e179Initial program 41.1%
Taylor expanded in y.re around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine68.4%
Simplified68.4%
if 1.69999999999999998e179 < y.im Initial program 27.3%
exp-diff13.6%
exp-to-pow13.6%
hypot-define13.6%
*-commutative13.6%
exp-prod13.6%
fma-define13.6%
hypot-define59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y.re around 0 82.8%
rec-exp82.8%
distribute-rgt-neg-in82.8%
mul-1-neg82.8%
exp-prod86.6%
mul-1-neg86.6%
Simplified86.6%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))))
(if (<= y.re -0.033)
(* t_2 t_1)
(if (<= y.re 2.3e+40)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(* t_2 (fabs (sin 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 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double tmp;
if (y_46_re <= -0.033) {
tmp = t_2 * t_1;
} else if (y_46_re <= 2.3e+40) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else {
tmp = t_2 * fabs(sin(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 = 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)) tmp = 0.0 if (y_46_re <= -0.033) tmp = Float64(t_2 * t_1); elseif (y_46_re <= 2.3e+40) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); else tmp = Float64(t_2 * abs(sin(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[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]}, If[LessEqual[y$46$re, -0.033], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2.3e+40], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Abs[N[Sin[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 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
\mathbf{if}\;y.re \leq -0.033:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{+40}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left|\sin t\_1\right|\\
\end{array}
\end{array}
if y.re < -0.033000000000000002Initial program 41.8%
Taylor expanded in y.im around 0 83.6%
*-commutative83.6%
add-cube-cbrt82.4%
pow383.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y.re around 0 87.4%
if -0.033000000000000002 < y.re < 2.29999999999999994e40Initial program 40.6%
exp-diff40.6%
exp-to-pow40.6%
hypot-define40.6%
*-commutative40.6%
exp-prod39.9%
fma-define39.9%
hypot-define86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y.re around 0 85.5%
if 2.29999999999999994e40 < y.re Initial program 26.9%
Taylor expanded in y.im around 0 65.4%
add-sqr-sqrt42.3%
sqrt-unprod69.2%
pow269.2%
Applied egg-rr69.2%
unpow269.2%
rem-sqrt-square69.2%
Simplified69.2%
Final simplification82.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.re x.im))))
(if (<= y.re -0.13)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_1)
(if (<= y.re 0.0039)
(* (sin (fma t_2 y.im t_1)) (/ 1.0 (exp t_0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 y.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -0.13) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1;
} else if (y_46_re <= 0.0039) {
tmp = sin(fma(t_2, y_46_im, t_1)) * (1.0 / exp(t_0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -0.13) 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)) * t_1); elseif (y_46_re <= 0.0039) tmp = Float64(sin(fma(t_2, y_46_im, t_1)) * Float64(1.0 / exp(t_0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / y_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.13], 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] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.0039], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(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]]]]]]
\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.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -0.13:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 0.0039:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -0.13Initial program 41.8%
Taylor expanded in y.im around 0 83.6%
*-commutative83.6%
add-cube-cbrt82.4%
pow383.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y.re around 0 87.4%
if -0.13 < y.re < 0.0038999999999999998Initial program 41.0%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod40.2%
fma-define40.2%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around 0 88.1%
if 0.0038999999999999998 < y.re Initial program 27.6%
exp-diff17.2%
exp-to-pow17.2%
hypot-define17.2%
*-commutative17.2%
exp-prod15.5%
fma-define15.5%
hypot-define46.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in y.im around 0 63.9%
unpow263.9%
unpow263.9%
hypot-undefine63.9%
Simplified63.9%
Taylor expanded in y.re around inf 24.2%
+-commutative24.2%
associate-/l*24.2%
+-commutative24.2%
unpow224.2%
unpow224.2%
hypot-undefine63.9%
Simplified63.9%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im))))
(if (<= y.re -0.021)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_1)
(if (<= y.re 2.4e-9)
(* (sin (fma t_2 y.im t_1)) (exp (- t_0)))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 y.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -0.021) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1;
} else if (y_46_re <= 2.4e-9) {
tmp = sin(fma(t_2, y_46_im, t_1)) * exp(-t_0);
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -0.021) 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)) * t_1); elseif (y_46_re <= 2.4e-9) tmp = Float64(sin(fma(t_2, y_46_im, t_1)) * exp(Float64(-t_0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / y_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.021], 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] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2.4e-9], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[(-t$95$0)], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(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]]]]]]
\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.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -0.021:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-9}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_1\right)\right) \cdot e^{-t\_0}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -0.0210000000000000013Initial program 41.8%
Taylor expanded in y.im around 0 83.6%
*-commutative83.6%
add-cube-cbrt82.4%
pow383.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y.re around 0 87.4%
if -0.0210000000000000013 < y.re < 2.4e-9Initial program 41.0%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod40.2%
fma-define40.2%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around 0 88.1%
rec-exp88.1%
distribute-rgt-neg-in88.1%
Simplified88.1%
if 2.4e-9 < y.re Initial program 27.6%
exp-diff17.2%
exp-to-pow17.2%
hypot-define17.2%
*-commutative17.2%
exp-prod15.5%
fma-define15.5%
hypot-define46.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in y.im around 0 63.9%
unpow263.9%
unpow263.9%
hypot-undefine63.9%
Simplified63.9%
Taylor expanded in y.re around inf 24.2%
+-commutative24.2%
associate-/l*24.2%
+-commutative24.2%
unpow224.2%
unpow224.2%
hypot-undefine63.9%
Simplified63.9%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im))))
(if (<= y.im -26000000000000.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_1)
(if (<= y.im 4.2e+125)
(* (sin (fma t_2 y.im t_1)) (pow (hypot x.im x.re) y.re))
(* (/ 1.0 (exp 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_re, x_46_im));
double tmp;
if (y_46_im <= -26000000000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1;
} else if (y_46_im <= 4.2e+125) {
tmp = sin(fma(t_2, y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = (1.0 / exp(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_re, x_46_im)) tmp = 0.0 if (y_46_im <= -26000000000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1); elseif (y_46_im <= 4.2e+125) tmp = Float64(sin(fma(t_2, y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(Float64(1.0 / exp(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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -26000000000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 4.2e+125], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Exp[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.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -26000000000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_1\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+125}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{t\_0}} \cdot \sin \left(y.im \cdot t\_2\right)\\
\end{array}
\end{array}
if y.im < -2.6e13Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
*-commutative82.6%
add-cube-cbrt80.8%
pow380.8%
*-commutative80.8%
Applied egg-rr80.8%
Taylor expanded in y.re around 0 82.6%
if -2.6e13 < y.im < 4.2000000000000001e125Initial program 37.1%
exp-diff34.8%
exp-to-pow34.8%
hypot-define34.8%
*-commutative34.8%
exp-prod33.6%
fma-define33.6%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.im around 0 60.5%
unpow260.5%
unpow260.5%
hypot-undefine82.7%
Simplified82.7%
if 4.2000000000000001e125 < y.im Initial program 30.0%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in y.re around 0 77.6%
Taylor expanded in y.re around 0 30.0%
+-commutative4.0%
unpow24.0%
unpow24.0%
hypot-undefine25.6%
Simplified77.6%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (sin (* y.im t_0))))
(if (<= y.im -510000000000.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))
t_2)
(if (<= y.im -2.25e-126)
(* t_3 (sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.im 1.8e-191)
(* (sin t_2) t_3)
(if (<= y.im 3.1e+125) (* t_3 t_4) (* (/ 1.0 (exp t_1)) t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -510000000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * t_2;
} else if (y_46_im <= -2.25e-126) {
tmp = t_3 * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 1.8e-191) {
tmp = sin(t_2) * t_3;
} else if (y_46_im <= 3.1e+125) {
tmp = t_3 * t_4;
} else {
tmp = (1.0 / exp(t_1)) * t_4;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_re, x_46_im));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = Math.sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -510000000000.0) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * t_2;
} else if (y_46_im <= -2.25e-126) {
tmp = t_3 * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 1.8e-191) {
tmp = Math.sin(t_2) * t_3;
} else if (y_46_im <= 3.1e+125) {
tmp = t_3 * t_4;
} else {
tmp = (1.0 / Math.exp(t_1)) * t_4;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_re, x_46_im)) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = math.sin((y_46_im * t_0)) tmp = 0 if y_46_im <= -510000000000.0: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * t_2 elif y_46_im <= -2.25e-126: tmp = t_3 * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) elif y_46_im <= 1.8e-191: tmp = math.sin(t_2) * t_3 elif y_46_im <= 3.1e+125: tmp = t_3 * t_4 else: tmp = (1.0 / math.exp(t_1)) * t_4 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = sin(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -510000000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_1)) * t_2); elseif (y_46_im <= -2.25e-126) tmp = Float64(t_3 * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_im <= 1.8e-191) tmp = Float64(sin(t_2) * t_3); elseif (y_46_im <= 3.1e+125) tmp = Float64(t_3 * t_4); else tmp = Float64(Float64(1.0 / exp(t_1)) * t_4); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)); t_1 = atan2(x_46_im, x_46_re) * y_46_im; t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = hypot(x_46_im, x_46_re) ^ y_46_re; t_4 = sin((y_46_im * t_0)); tmp = 0.0; if (y_46_im <= -510000000000.0) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * t_2; elseif (y_46_im <= -2.25e-126) tmp = t_3 * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_im <= 1.8e-191) tmp = sin(t_2) * t_3; elseif (y_46_im <= 3.1e+125) tmp = t_3 * t_4; else tmp = (1.0 / exp(t_1)) * t_4; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -510000000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, -2.25e-126], N[(t$95$3 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.8e-191], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, 3.1e+125], N[(t$95$3 * t$95$4), $MachinePrecision], N[(N[(1.0 / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -510000000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1} \cdot t\_2\\
\mathbf{elif}\;y.im \leq -2.25 \cdot 10^{-126}:\\
\;\;\;\;t\_3 \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-191}:\\
\;\;\;\;\sin t\_2 \cdot t\_3\\
\mathbf{elif}\;y.im \leq 3.1 \cdot 10^{+125}:\\
\;\;\;\;t\_3 \cdot t\_4\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{t\_1}} \cdot t\_4\\
\end{array}
\end{array}
if y.im < -5.1e11Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
*-commutative82.6%
add-cube-cbrt80.8%
pow380.8%
*-commutative80.8%
Applied egg-rr80.8%
Taylor expanded in y.re around 0 82.6%
if -5.1e11 < y.im < -2.25000000000000013e-126Initial program 49.3%
exp-diff49.3%
exp-to-pow49.3%
hypot-define49.3%
*-commutative49.3%
exp-prod49.3%
fma-define49.3%
hypot-define90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y.im around 0 69.2%
unpow269.2%
unpow269.2%
hypot-undefine89.4%
Simplified89.4%
Taylor expanded in y.im around inf 45.8%
+-commutative45.8%
unpow245.8%
unpow245.8%
hypot-undefine89.4%
associate-/l*89.4%
Simplified89.4%
if -2.25000000000000013e-126 < y.im < 1.8000000000000001e-191Initial program 32.7%
exp-diff32.7%
exp-to-pow32.7%
hypot-define32.7%
*-commutative32.7%
exp-prod32.7%
fma-define32.8%
hypot-define91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine91.0%
Simplified91.0%
Taylor expanded in y.im around 0 54.4%
*-commutative54.4%
unpow254.4%
unpow254.4%
hypot-undefine73.7%
Simplified73.7%
if 1.8000000000000001e-191 < y.im < 3.1e125Initial program 37.4%
exp-diff32.5%
exp-to-pow32.5%
hypot-define32.5%
*-commutative32.5%
exp-prod30.1%
fma-define30.1%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around 0 57.9%
unpow257.9%
unpow257.9%
hypot-undefine73.9%
Simplified73.9%
Taylor expanded in y.re around 0 37.3%
+-commutative37.3%
unpow237.3%
unpow237.3%
hypot-undefine74.0%
Simplified74.0%
if 3.1e125 < y.im Initial program 30.0%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in y.re around 0 77.6%
Taylor expanded in y.re around 0 30.0%
+-commutative4.0%
unpow24.0%
unpow24.0%
hypot-undefine25.6%
Simplified77.6%
Final simplification77.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -490000000000.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))
(* y.re (atan2 x.im x.re)))
(if (<= y.im 2.4e+114)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* (/ 1.0 (exp t_1)) (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -490000000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_im <= 2.4e+114) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = (1.0 / exp(t_1)) * sin((y_46_im * 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.log(Math.hypot(x_46_re, x_46_im));
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -490000000000.0) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * (y_46_re * Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= 2.4e+114) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = (1.0 / Math.exp(t_1)) * Math.sin((y_46_im * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_re, x_46_im)) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if y_46_im <= -490000000000.0: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * (y_46_re * math.atan2(x_46_im, x_46_re)) elif y_46_im <= 2.4e+114: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = (1.0 / math.exp(t_1)) * math.sin((y_46_im * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -490000000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_1)) * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_im <= 2.4e+114) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(Float64(1.0 / exp(t_1)) * sin(Float64(y_46_im * t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (y_46_im <= -490000000000.0) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * (y_46_re * atan2(x_46_im, x_46_re)); elseif (y_46_im <= 2.4e+114) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = (1.0 / exp(t_1)) * sin((y_46_im * 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -490000000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+114], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -490000000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+114}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{t\_1}} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.im < -4.9e11Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
*-commutative82.6%
add-cube-cbrt80.8%
pow380.8%
*-commutative80.8%
Applied egg-rr80.8%
Taylor expanded in y.re around 0 82.6%
if -4.9e11 < y.im < 2.4e114Initial program 37.4%
exp-diff35.0%
exp-to-pow35.0%
hypot-define35.0%
*-commutative35.0%
exp-prod34.4%
fma-define34.5%
hypot-define81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-undefine82.8%
Simplified82.8%
Taylor expanded in y.re around inf 34.5%
+-commutative34.5%
associate-/l*34.5%
+-commutative34.5%
unpow234.5%
unpow234.5%
hypot-undefine82.9%
Simplified82.9%
if 2.4e114 < y.im Initial program 29.4%
exp-diff17.6%
exp-to-pow17.6%
hypot-define17.6%
*-commutative17.6%
exp-prod14.7%
fma-define14.7%
hypot-define53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in y.re around 0 74.5%
Taylor expanded in y.re around 0 26.6%
+-commutative6.5%
unpow26.5%
unpow26.5%
hypot-undefine31.5%
Simplified74.5%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* t_0 (sin (* y.im (log (hypot x.re x.im))))))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3 (* t_2 (/ 1.0 (exp (* (atan2 x.im x.re) y.im))))))
(if (<= y.im -2.2e+224)
t_3
(if (<= y.im -6.2e+157)
t_1
(if (<= y.im -1400000000.0)
t_3
(if (<= y.im -7.4e-103)
t_1
(if (<= y.im 2.2e-191)
(* t_2 t_0)
(if (<= y.im 3.1e+125) t_1 t_3))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im))));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = t_2 * (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2.2e+224) {
tmp = t_3;
} else if (y_46_im <= -6.2e+157) {
tmp = t_1;
} else if (y_46_im <= -1400000000.0) {
tmp = t_3;
} else if (y_46_im <= -7.4e-103) {
tmp = t_1;
} else if (y_46_im <= 2.2e-191) {
tmp = t_2 * t_0;
} else if (y_46_im <= 3.1e+125) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = t_2 * (1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2.2e+224) {
tmp = t_3;
} else if (y_46_im <= -6.2e+157) {
tmp = t_1;
} else if (y_46_im <= -1400000000.0) {
tmp = t_3;
} else if (y_46_im <= -7.4e-103) {
tmp = t_1;
} else if (y_46_im <= 2.2e-191) {
tmp = t_2 * t_0;
} else if (y_46_im <= 3.1e+125) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_3 = t_2 * (1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_im <= -2.2e+224: tmp = t_3 elif y_46_im <= -6.2e+157: tmp = t_1 elif y_46_im <= -1400000000.0: tmp = t_3 elif y_46_im <= -7.4e-103: tmp = t_1 elif y_46_im <= 2.2e-191: tmp = t_2 * t_0 elif y_46_im <= 3.1e+125: tmp = t_1 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = Float64(t_2 * Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)))) tmp = 0.0 if (y_46_im <= -2.2e+224) tmp = t_3; elseif (y_46_im <= -6.2e+157) tmp = t_1; elseif (y_46_im <= -1400000000.0) tmp = t_3; elseif (y_46_im <= -7.4e-103) tmp = t_1; elseif (y_46_im <= 2.2e-191) tmp = Float64(t_2 * t_0); elseif (y_46_im <= 3.1e+125) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = t_0 * sin((y_46_im * log(hypot(x_46_re, x_46_im)))); t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_3 = t_2 * (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_im <= -2.2e+224) tmp = t_3; elseif (y_46_im <= -6.2e+157) tmp = t_1; elseif (y_46_im <= -1400000000.0) tmp = t_3; elseif (y_46_im <= -7.4e-103) tmp = t_1; elseif (y_46_im <= 2.2e-191) tmp = t_2 * t_0; elseif (y_46_im <= 3.1e+125) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.2e+224], t$95$3, If[LessEqual[y$46$im, -6.2e+157], t$95$1, If[LessEqual[y$46$im, -1400000000.0], t$95$3, If[LessEqual[y$46$im, -7.4e-103], t$95$1, If[LessEqual[y$46$im, 2.2e-191], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 3.1e+125], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := t\_2 \cdot \frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{if}\;y.im \leq -2.2 \cdot 10^{+224}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -6.2 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -1400000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -7.4 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{-191}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{elif}\;y.im \leq 3.1 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -2.2e224 or -6.1999999999999994e157 < y.im < -1.4e9 or 3.1e125 < y.im Initial program 36.8%
exp-diff30.3%
exp-to-pow30.3%
hypot-define30.3%
*-commutative30.3%
exp-prod30.3%
fma-define30.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 68.9%
Taylor expanded in y.im around 0 72.7%
if -2.2e224 < y.im < -6.1999999999999994e157 or -1.4e9 < y.im < -7.3999999999999999e-103 or 2.19999999999999998e-191 < y.im < 3.1e125Initial program 43.1%
exp-diff35.0%
exp-to-pow35.0%
hypot-define35.0%
*-commutative35.0%
exp-prod33.2%
fma-define33.2%
hypot-define70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in y.im around 0 61.7%
unpow261.7%
unpow261.7%
hypot-undefine75.5%
Simplified75.5%
Taylor expanded in y.re around 0 41.4%
+-commutative41.4%
unpow241.4%
unpow241.4%
hypot-undefine75.6%
Simplified75.6%
if -7.3999999999999999e-103 < y.im < 2.19999999999999998e-191Initial program 31.8%
exp-diff31.8%
exp-to-pow31.8%
hypot-define31.8%
*-commutative31.8%
exp-prod31.8%
fma-define31.8%
hypot-define91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine91.2%
Simplified91.2%
Taylor expanded in y.im around 0 54.3%
*-commutative54.3%
unpow254.3%
unpow254.3%
hypot-undefine73.1%
Simplified73.1%
Final simplification74.1%
(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 (pow (hypot x.im x.re) y.re))
(t_3 (sin (* y.im (log (hypot x.re x.im)))))
(t_4 (* t_2 t_3)))
(if (<= y.im -35000000.0)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_1)
(if (<= y.im -7.4e-103)
t_4
(if (<= y.im 1.22e-191)
(* (sin t_1) t_2)
(if (<= y.im 4.8e+127) t_4 (* (/ 1.0 (exp t_0)) t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = sin((y_46_im * log(hypot(x_46_re, x_46_im))));
double t_4 = t_2 * t_3;
double tmp;
if (y_46_im <= -35000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1;
} else if (y_46_im <= -7.4e-103) {
tmp = t_4;
} else if (y_46_im <= 1.22e-191) {
tmp = sin(t_1) * t_2;
} else if (y_46_im <= 4.8e+127) {
tmp = t_4;
} else {
tmp = (1.0 / exp(t_0)) * t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
double t_4 = t_2 * t_3;
double tmp;
if (y_46_im <= -35000000.0) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1;
} else if (y_46_im <= -7.4e-103) {
tmp = t_4;
} else if (y_46_im <= 1.22e-191) {
tmp = Math.sin(t_1) * t_2;
} else if (y_46_im <= 4.8e+127) {
tmp = t_4;
} else {
tmp = (1.0 / Math.exp(t_0)) * t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) t_4 = t_2 * t_3 tmp = 0 if y_46_im <= -35000000.0: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1 elif y_46_im <= -7.4e-103: tmp = t_4 elif y_46_im <= 1.22e-191: tmp = math.sin(t_1) * t_2 elif y_46_im <= 4.8e+127: tmp = t_4 else: tmp = (1.0 / math.exp(t_0)) * t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) t_4 = Float64(t_2 * t_3) tmp = 0.0 if (y_46_im <= -35000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1); elseif (y_46_im <= -7.4e-103) tmp = t_4; elseif (y_46_im <= 1.22e-191) tmp = Float64(sin(t_1) * t_2); elseif (y_46_im <= 4.8e+127) tmp = t_4; else tmp = Float64(Float64(1.0 / exp(t_0)) * t_3); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = sin((y_46_im * log(hypot(x_46_re, x_46_im)))); t_4 = t_2 * t_3; tmp = 0.0; if (y_46_im <= -35000000.0) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_1; elseif (y_46_im <= -7.4e-103) tmp = t_4; elseif (y_46_im <= 1.22e-191) tmp = sin(t_1) * t_2; elseif (y_46_im <= 4.8e+127) tmp = t_4; else tmp = (1.0 / exp(t_0)) * t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$im, -35000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, -7.4e-103], t$95$4, If[LessEqual[y$46$im, 1.22e-191], N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 4.8e+127], t$95$4, N[(N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * t$95$3), $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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
t_4 := t\_2 \cdot t\_3\\
\mathbf{if}\;y.im \leq -35000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_1\\
\mathbf{elif}\;y.im \leq -7.4 \cdot 10^{-103}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{-191}:\\
\;\;\;\;\sin t\_1 \cdot t\_2\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{+127}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{t\_0}} \cdot t\_3\\
\end{array}
\end{array}
if y.im < -3.5e7Initial program 44.8%
Taylor expanded in y.im around 0 82.9%
*-commutative82.9%
add-cube-cbrt81.1%
pow381.1%
*-commutative81.1%
Applied egg-rr81.1%
Taylor expanded in y.re around 0 82.9%
if -3.5e7 < y.im < -7.3999999999999999e-103 or 1.22e-191 < y.im < 4.8000000000000004e127Initial program 41.2%
exp-diff37.2%
exp-to-pow37.2%
hypot-define37.2%
*-commutative37.2%
exp-prod35.3%
fma-define35.3%
hypot-define74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in y.im around 0 60.1%
unpow260.1%
unpow260.1%
hypot-undefine76.5%
Simplified76.5%
Taylor expanded in y.re around 0 40.3%
+-commutative40.3%
unpow240.3%
unpow240.3%
hypot-undefine76.7%
Simplified76.7%
if -7.3999999999999999e-103 < y.im < 1.22e-191Initial program 31.8%
exp-diff31.8%
exp-to-pow31.8%
hypot-define31.8%
*-commutative31.8%
exp-prod31.8%
fma-define31.8%
hypot-define91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine91.2%
Simplified91.2%
Taylor expanded in y.im around 0 54.3%
*-commutative54.3%
unpow254.3%
unpow254.3%
hypot-undefine73.1%
Simplified73.1%
if 4.8000000000000004e127 < y.im Initial program 30.0%
exp-diff16.7%
exp-to-pow16.7%
hypot-define16.7%
*-commutative16.7%
exp-prod16.7%
fma-define16.7%
hypot-define53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in y.re around 0 77.6%
Taylor expanded in y.re around 0 30.0%
+-commutative4.0%
unpow24.0%
unpow24.0%
hypot-undefine25.6%
Simplified77.6%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (exp (* (atan2 x.im x.re) y.im))))
(t_1 (sin (* y.im (log (hypot x.re x.im)))))
(t_2 (* (pow (hypot x.im x.re) y.re) t_1)))
(if (<= y.re -1.85)
t_2
(if (<= y.re -1.75e-166)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 1.9e+14) (* t_0 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 = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = sin((y_46_im * log(hypot(x_46_re, x_46_im))));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -1.85) {
tmp = t_2;
} else if (y_46_re <= -1.75e-166) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.9e+14) {
tmp = t_0 * 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 = 1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))));
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -1.85) {
tmp = t_2;
} else if (y_46_re <= -1.75e-166) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.9e+14) {
tmp = t_0 * t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_1 tmp = 0 if y_46_re <= -1.85: tmp = t_2 elif y_46_re <= -1.75e-166: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 1.9e+14: tmp = t_0 * 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(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) t_2 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -1.85) tmp = t_2; elseif (y_46_re <= -1.75e-166) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.9e+14) tmp = Float64(t_0 * t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im)); t_1 = sin((y_46_im * log(hypot(x_46_re, x_46_im)))); t_2 = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_1; tmp = 0.0; if (y_46_re <= -1.85) tmp = t_2; elseif (y_46_re <= -1.75e-166) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 1.9e+14) tmp = t_0 * t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -1.85], t$95$2, If[LessEqual[y$46$re, -1.75e-166], 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.9e+14], N[(t$95$0 * t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -1.85:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.75 \cdot 10^{-166}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.8500000000000001 or 1.9e14 < y.re Initial program 36.0%
exp-diff25.7%
exp-to-pow25.7%
hypot-define25.7%
*-commutative25.7%
exp-prod25.0%
fma-define25.0%
hypot-define58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y.im around 0 72.9%
unpow272.9%
unpow272.9%
hypot-undefine72.9%
Simplified72.9%
Taylor expanded in y.re around 0 35.4%
+-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine72.9%
Simplified72.9%
if -1.8500000000000001 < y.re < -1.75e-166Initial program 43.3%
exp-diff43.3%
exp-to-pow43.3%
hypot-define43.3%
*-commutative43.3%
exp-prod43.3%
fma-define43.3%
hypot-define86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y.re around 0 86.5%
Taylor expanded in y.im around 0 65.1%
if -1.75e-166 < y.re < 1.9e14Initial program 39.7%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod38.7%
fma-define38.7%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.re around 0 87.7%
Taylor expanded in y.re around 0 35.0%
+-commutative17.7%
unpow217.7%
unpow217.7%
hypot-undefine39.4%
Simplified71.4%
Final simplification71.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* t_0 (/ 1.0 (exp (* (atan2 x.im x.re) y.im)))))
(t_2 (* t_0 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -0.00068)
t_2
(if (<= y.re -1.8e-276)
t_1
(if (<= y.re 7.6e-152)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 2300.0) 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.00068) {
tmp = t_2;
} else if (y_46_re <= -1.8e-276) {
tmp = t_1;
} else if (y_46_re <= 7.6e-152) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2300.0) {
tmp = 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * (1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.00068) {
tmp = t_2;
} else if (y_46_re <= -1.8e-276) {
tmp = t_1;
} else if (y_46_re <= 7.6e-152) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2300.0) {
tmp = t_1;
} else {
tmp = t_2;
}
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))) t_1 = t_0 * (1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))) t_2 = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -0.00068: tmp = t_2 elif y_46_re <= -1.8e-276: tmp = t_1 elif y_46_re <= 7.6e-152: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 2300.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)))) t_2 = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.00068) tmp = t_2; elseif (y_46_re <= -1.8e-276) tmp = t_1; elseif (y_46_re <= 7.6e-152) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 2300.0) tmp = t_1; else tmp = t_2; 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))); t_1 = t_0 * (1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im))); t_2 = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -0.00068) tmp = t_2; elseif (y_46_re <= -1.8e-276) tmp = t_1; elseif (y_46_re <= 7.6e-152) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 2300.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00068], t$95$2, If[LessEqual[y$46$re, -1.8e-276], t$95$1, If[LessEqual[y$46$re, 7.6e-152], 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, 2300.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot \frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
t_2 := t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.00068:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.8 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 7.6 \cdot 10^{-152}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2300:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -6.8e-4 or 2300 < y.re Initial program 35.8%
exp-diff25.5%
exp-to-pow25.5%
hypot-define25.5%
*-commutative25.5%
exp-prod24.8%
fma-define24.8%
hypot-define59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in y.im around 0 73.1%
unpow273.1%
unpow273.1%
hypot-undefine73.1%
Simplified73.1%
Taylor expanded in y.im around 0 70.2%
*-commutative70.2%
unpow270.2%
unpow270.2%
hypot-undefine70.2%
Simplified70.2%
if -6.8e-4 < y.re < -1.79999999999999997e-276 or 7.60000000000000024e-152 < y.re < 2300Initial program 42.8%
exp-diff42.8%
exp-to-pow42.8%
hypot-define42.8%
*-commutative42.8%
exp-prod41.6%
fma-define41.7%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.re around 0 83.5%
Taylor expanded in y.im around 0 61.3%
if -1.79999999999999997e-276 < y.re < 7.60000000000000024e-152Initial program 37.4%
exp-diff37.4%
exp-to-pow37.4%
hypot-define37.4%
*-commutative37.4%
exp-prod37.4%
fma-define37.4%
hypot-define97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in y.im around 0 28.1%
unpow228.1%
unpow228.1%
hypot-undefine69.8%
Simplified69.8%
Taylor expanded in y.re around 0 19.1%
unpow219.1%
unpow219.1%
hypot-undefine55.7%
Simplified55.7%
Final simplification65.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.7e-167) (not (<= y.re 1.1e-146))) (* (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))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.7e-167) || !(y_46_re <= 1.1e-146)) {
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))));
}
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 <= -1.7e-167) || !(y_46_re <= 1.1e-146)) {
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))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.7e-167) or not (y_46_re <= 1.1e-146): 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)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1.7e-167) || !(y_46_re <= 1.1e-146)) 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 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -1.7e-167) || ~((y_46_re <= 1.1e-146))) 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)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1.7e-167], N[Not[LessEqual[y$46$re, 1.1e-146]], $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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.7 \cdot 10^{-167} \lor \neg \left(y.re \leq 1.1 \cdot 10^{-146}\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)\\
\end{array}
\end{array}
if y.re < -1.6999999999999999e-167 or 1.1e-146 < y.re Initial program 38.3%
exp-diff31.1%
exp-to-pow31.1%
hypot-define31.1%
*-commutative31.1%
exp-prod30.3%
fma-define30.3%
hypot-define67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in y.im around 0 60.5%
unpow260.5%
unpow260.5%
hypot-undefine67.3%
Simplified67.3%
Taylor expanded in y.im around 0 55.2%
*-commutative55.2%
unpow255.2%
unpow255.2%
hypot-undefine59.5%
Simplified59.5%
if -1.6999999999999999e-167 < y.re < 1.1e-146Initial program 37.7%
exp-diff37.7%
exp-to-pow37.7%
hypot-define37.7%
*-commutative37.7%
exp-prod37.4%
fma-define37.4%
hypot-define86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y.im around 0 31.5%
unpow231.5%
unpow231.5%
hypot-undefine58.9%
Simplified58.9%
Taylor expanded in y.re around 0 20.2%
unpow220.2%
unpow220.2%
hypot-undefine48.2%
Simplified48.2%
Final simplification56.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.0)
(sin (log (pow (hypot x.re x.im) y.im)))
(if (<= y.re 4.2e-56)
(sin (* y.im (log (hypot x.im x.re))))
(* y.im (log (sqrt (+ (pow x.im 2.0) (pow x.re 2.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.0) {
tmp = sin(log(pow(hypot(x_46_re, x_46_im), y_46_im)));
} else if (y_46_re <= 4.2e-56) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * log(sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.0) {
tmp = Math.sin(Math.log(Math.pow(Math.hypot(x_46_re, x_46_im), y_46_im)));
} else if (y_46_re <= 4.2e-56) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * Math.log(Math.sqrt((Math.pow(x_46_im, 2.0) + Math.pow(x_46_re, 2.0))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.0: tmp = math.sin(math.log(math.pow(math.hypot(x_46_re, x_46_im), y_46_im))) elif y_46_re <= 4.2e-56: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = y_46_im * math.log(math.sqrt((math.pow(x_46_im, 2.0) + math.pow(x_46_re, 2.0)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.0) tmp = sin(log((hypot(x_46_re, x_46_im) ^ y_46_im))); elseif (y_46_re <= 4.2e-56) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(y_46_im * log(sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.0) tmp = sin(log((hypot(x_46_re, x_46_im) ^ y_46_im))); elseif (y_46_re <= 4.2e-56) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = y_46_im * log(sqrt(((x_46_im ^ 2.0) + (x_46_re ^ 2.0)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.0], N[Sin[N[Log[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$im], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 4.2e-56], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[N[(N[Power[x$46$im, 2.0], $MachinePrecision] + N[Power[x$46$re, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1:\\
\;\;\;\;\sin \log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.im}\right)\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{-56}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\\
\end{array}
\end{array}
if y.re < -1Initial program 41.8%
exp-diff31.6%
exp-to-pow31.6%
hypot-define31.6%
*-commutative31.6%
exp-prod31.6%
fma-define31.6%
hypot-define68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in y.im around 0 79.9%
unpow279.9%
unpow279.9%
hypot-undefine79.9%
Simplified79.9%
Taylor expanded in y.re around 0 1.6%
unpow21.6%
unpow21.6%
hypot-undefine3.7%
Simplified3.7%
*-un-lft-identity3.7%
*-commutative3.7%
Applied egg-rr34.6%
*-rgt-identity34.6%
Simplified34.6%
if -1 < y.re < 4.20000000000000012e-56Initial program 38.7%
exp-diff38.7%
exp-to-pow38.7%
hypot-define38.7%
*-commutative38.7%
exp-prod37.9%
fma-define37.9%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.im around 0 30.9%
unpow230.9%
unpow230.9%
hypot-undefine57.4%
Simplified57.4%
Taylor expanded in y.re around 0 15.7%
unpow215.7%
unpow215.7%
hypot-undefine36.4%
Simplified36.4%
if 4.20000000000000012e-56 < y.re Initial program 32.8%
exp-diff23.4%
exp-to-pow23.4%
hypot-define23.4%
*-commutative23.4%
exp-prod21.9%
fma-define21.9%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 61.2%
unpow261.2%
unpow261.2%
hypot-undefine61.2%
Simplified61.2%
Taylor expanded in y.re around 0 2.2%
unpow22.2%
unpow22.2%
hypot-undefine3.3%
Simplified3.3%
Taylor expanded in y.im around 0 30.4%
Final simplification34.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -0.8) (sin (log (pow (hypot x.re x.im) y.im))) (sin (* y.im (log (hypot x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -0.8) {
tmp = sin(log(pow(hypot(x_46_re, x_46_im), y_46_im)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -0.8) {
tmp = Math.sin(Math.log(Math.pow(Math.hypot(x_46_re, x_46_im), y_46_im)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -0.8: tmp = math.sin(math.log(math.pow(math.hypot(x_46_re, x_46_im), y_46_im))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -0.8) tmp = sin(log((hypot(x_46_re, x_46_im) ^ y_46_im))); else tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -0.8) tmp = sin(log((hypot(x_46_re, x_46_im) ^ y_46_im))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.8], N[Sin[N[Log[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$im], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.8:\\
\;\;\;\;\sin \log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -0.80000000000000004Initial program 41.8%
exp-diff31.6%
exp-to-pow31.6%
hypot-define31.6%
*-commutative31.6%
exp-prod31.6%
fma-define31.6%
hypot-define68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in y.im around 0 79.9%
unpow279.9%
unpow279.9%
hypot-undefine79.9%
Simplified79.9%
Taylor expanded in y.re around 0 1.6%
unpow21.6%
unpow21.6%
hypot-undefine3.7%
Simplified3.7%
*-un-lft-identity3.7%
*-commutative3.7%
Applied egg-rr34.6%
*-rgt-identity34.6%
Simplified34.6%
if -0.80000000000000004 < y.re Initial program 36.6%
exp-diff33.2%
exp-to-pow33.2%
hypot-define33.2%
*-commutative33.2%
exp-prod32.1%
fma-define32.1%
hypot-define73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in y.im around 0 41.9%
unpow241.9%
unpow241.9%
hypot-undefine58.8%
Simplified58.8%
Taylor expanded in y.re around 0 10.8%
unpow210.8%
unpow210.8%
hypot-undefine24.4%
Simplified24.4%
Final simplification27.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.im (log (hypot x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_im * log(hypot(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.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)
\end{array}
Initial program 38.2%
exp-diff32.7%
exp-to-pow32.7%
hypot-define32.7%
*-commutative32.7%
exp-prod32.0%
fma-define32.0%
hypot-define72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in y.im around 0 53.6%
unpow253.6%
unpow253.6%
hypot-undefine65.3%
Simplified65.3%
Taylor expanded in y.re around 0 8.0%
unpow28.0%
unpow28.0%
hypot-undefine18.0%
Simplified18.0%
Final simplification18.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 1.9e-147) (sin (* y.im (log x.im))) (sin (* y.im (log x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.9e-147) {
tmp = sin((y_46_im * log(x_46_im)));
} else {
tmp = sin((y_46_im * log(x_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= 1.9d-147) then
tmp = sin((y_46im * log(x_46im)))
else
tmp = sin((y_46im * log(x_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.9e-147) {
tmp = Math.sin((y_46_im * Math.log(x_46_im)));
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 1.9e-147: tmp = math.sin((y_46_im * math.log(x_46_im))) else: tmp = math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 1.9e-147) tmp = sin(Float64(y_46_im * log(x_46_im))); else tmp = sin(Float64(y_46_im * log(x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 1.9e-147) tmp = sin((y_46_im * log(x_46_im))); else tmp = sin((y_46_im * 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, 1.9e-147], N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.9 \cdot 10^{-147}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 1.90000000000000014e-147Initial program 37.6%
exp-diff31.0%
exp-to-pow31.0%
hypot-define31.0%
*-commutative31.0%
exp-prod31.0%
fma-define31.0%
hypot-define72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in y.im around 0 51.0%
unpow251.0%
unpow251.0%
hypot-undefine65.2%
Simplified65.2%
Taylor expanded in y.re around 0 5.6%
unpow25.6%
unpow25.6%
hypot-undefine14.5%
Simplified14.5%
Taylor expanded in x.re around 0 6.7%
if 1.90000000000000014e-147 < x.re Initial program 39.0%
exp-diff35.2%
exp-to-pow35.2%
hypot-define35.2%
*-commutative35.2%
exp-prod33.4%
fma-define33.4%
hypot-define72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine65.4%
Simplified65.4%
Taylor expanded in y.re around 0 11.4%
unpow211.4%
unpow211.4%
hypot-undefine23.1%
Simplified23.1%
Taylor expanded in x.im around 0 19.6%
Final simplification12.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log (hypot x.re x.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * log(hypot(x_46_re, x_46_im));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * Math.log(Math.hypot(x_46_re, x_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * math.log(math.hypot(x_46_re, x_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(hypot(x_46_re, x_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_im * log(hypot(x_46_re, x_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)
\end{array}
Initial program 38.2%
exp-diff32.7%
exp-to-pow32.7%
hypot-define32.7%
*-commutative32.7%
exp-prod32.0%
fma-define32.0%
hypot-define72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in y.im around 0 53.6%
unpow253.6%
unpow253.6%
hypot-undefine65.3%
Simplified65.3%
Taylor expanded in y.re around 0 8.0%
unpow28.0%
unpow28.0%
hypot-undefine18.0%
Simplified18.0%
Taylor expanded in y.im around 0 17.6%
+-commutative17.6%
unpow217.6%
unpow217.6%
hypot-undefine17.6%
Simplified17.6%
Final simplification17.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.im (log x.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_im * log(x_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((y_46im * log(x_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_im * Math.log(x_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_im * math.log(x_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_im * log(x_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_im * log(x_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.im \cdot \log x.im\right)
\end{array}
Initial program 38.2%
exp-diff32.7%
exp-to-pow32.7%
hypot-define32.7%
*-commutative32.7%
exp-prod32.0%
fma-define32.0%
hypot-define72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in y.im around 0 53.6%
unpow253.6%
unpow253.6%
hypot-undefine65.3%
Simplified65.3%
Taylor expanded in y.re around 0 8.0%
unpow28.0%
unpow28.0%
hypot-undefine18.0%
Simplified18.0%
Taylor expanded in x.re around 0 5.2%
Final simplification5.2%
herbie shell --seed 2024131
(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)))))