
(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 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* y.re t_1) (* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1e+45)
(* t_2 (sin (fabs (fma y.im (log (hypot x.im x.re)) t_0))))
(if (<= y.re -4e-50)
(* t_2 (sin t_0))
(* t_2 (sin (fma t_1 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((y_46_re * t_1) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1e+45) {
tmp = t_2 * sin(fabs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else if (y_46_re <= -4e-50) {
tmp = t_2 * sin(t_0);
} else {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(y_46_re * t_1) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1e+45) tmp = Float64(t_2 * sin(abs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); elseif (y_46_re <= -4e-50) tmp = Float64(t_2 * sin(t_0)); else tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1e+45], N[(t$95$2 * N[Sin[N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -4e-50], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{y.re \cdot t_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{+45}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_0\right)\right|\right)\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-50}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\end{array}
\end{array}
if y.re < -9.9999999999999993e44Initial program 42.2%
Simplified82.2%
*-commutative82.2%
hypot-udef44.4%
fma-def42.2%
add-sqr-sqrt22.2%
sqrt-unprod22.2%
pow222.2%
*-commutative22.2%
hypot-udef42.2%
fma-def42.2%
Applied egg-rr42.2%
unpow242.2%
rem-sqrt-square91.1%
hypot-def51.1%
unpow251.1%
unpow251.1%
+-commutative51.1%
unpow251.1%
unpow251.1%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
if -9.9999999999999993e44 < y.re < -4.00000000000000003e-50Initial program 39.8%
Simplified64.8%
*-commutative64.8%
hypot-udef39.8%
fma-def39.8%
add-cube-cbrt39.6%
pow239.6%
*-commutative39.6%
hypot-udef39.6%
fma-def39.6%
Applied egg-rr69.6%
Taylor expanded in y.im around 0 96.2%
if -4.00000000000000003e-50 < y.re Initial program 43.6%
Simplified81.8%
Final simplification84.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2
(*
(exp (- (* y.re t_1) t_0))
(sin (+ (* y.re (atan2 x.im x.re)) (* y.im t_1))))))
(if (<= t_2 INFINITY)
t_2
(*
(exp (- (* y.re (log (hypot x.re x.im))) t_0))
(sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((y_46_re * t_1) - t_0)) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * 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 t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = Math.exp(((y_46_re * t_1) - t_0)) * Math.sin(((y_46_re * Math.atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_0)) * 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): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_2 = math.exp(((y_46_re * t_1) - t_0)) * math.sin(((y_46_re * math.atan2(x_46_im, x_46_re)) + (y_46_im * t_1))) tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_0)) * 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) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = Float64(exp(Float64(Float64(y_46_re * t_1) - t_0)) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_1)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * 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) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_2 = exp(((y_46_re * t_1) - t_0)) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_1))); tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * 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_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{y.re \cdot t_1 - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\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 84.2%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
Simplified76.0%
*-commutative76.0%
hypot-udef0.0%
fma-def0.0%
add-cube-cbrt0.0%
pow20.0%
*-commutative0.0%
hypot-udef0.0%
fma-def0.0%
Applied egg-rr75.7%
Taylor expanded in y.re around 0 0.0%
unpow20.0%
unpow20.0%
hypot-def68.5%
Simplified68.5%
Final simplification76.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 (log (hypot x.re x.im)))
(t_3 (exp (- (* y.re t_2) t_0))))
(if (<= y.im -3.1e+57)
(* t_3 (sin t_1))
(if (<= y.im 1.2e-5)
(/ (pow (hypot x.re x.im) y.re) (/ (exp t_0) (sin (fma y.im t_2 t_1))))
(* t_3 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 t_3 = exp(((y_46_re * t_2) - t_0));
double tmp;
if (y_46_im <= -3.1e+57) {
tmp = t_3 * sin(t_1);
} else if (y_46_im <= 1.2e-5) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) / (exp(t_0) / sin(fma(y_46_im, t_2, t_1)));
} else {
tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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)) t_3 = exp(Float64(Float64(y_46_re * t_2) - t_0)) tmp = 0.0 if (y_46_im <= -3.1e+57) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_im <= 1.2e-5) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(exp(t_0) / sin(fma(y_46_im, t_2, t_1)))); else tmp = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3.1e+57], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e-5], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Sin[N[(y$46$im * t$95$2 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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)\\
t_3 := e^{y.re \cdot t_2 - t_0}\\
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{+57}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\frac{e^{t_0}}{\sin \left(\mathsf{fma}\left(y.im, t_2, t_1\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.10000000000000013e57Initial program 44.8%
Simplified62.0%
*-commutative62.0%
hypot-udef44.8%
fma-def44.8%
add-cube-cbrt33.2%
pow233.2%
*-commutative33.2%
hypot-udef33.2%
fma-def33.2%
Applied egg-rr54.2%
Taylor expanded in y.im around 0 73.2%
if -3.10000000000000013e57 < y.im < 1.2e-5Initial program 49.9%
exp-diff49.9%
+-rgt-identity49.9%
+-rgt-identity49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.1%
+-commutative49.1%
*-commutative49.1%
Simplified93.0%
associate-*l/92.9%
associate-/l*93.0%
fma-udef93.0%
*-commutative93.0%
hypot-udef49.2%
+-commutative49.2%
*-commutative49.2%
hypot-udef93.0%
fma-def93.0%
Applied egg-rr93.0%
Taylor expanded in y.im around inf 93.9%
if 1.2e-5 < y.im Initial program 27.7%
Simplified70.3%
*-commutative70.3%
hypot-udef29.3%
fma-def27.7%
add-cube-cbrt31.0%
pow231.0%
*-commutative31.0%
hypot-udef31.0%
fma-def31.0%
Applied egg-rr67.4%
Taylor expanded in y.re around 0 29.3%
unpow229.3%
unpow229.3%
hypot-def70.3%
Simplified70.3%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* y.re t_1) (* (atan2 x.im x.re) y.im)))))
(if (<= y.re -4e-50) (* t_2 (sin t_0)) (* t_2 (sin (fma t_1 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((y_46_re * t_1) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -4e-50) {
tmp = t_2 * sin(t_0);
} else {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(y_46_re * t_1) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -4e-50) tmp = Float64(t_2 * sin(t_0)); else tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4e-50], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{y.re \cdot t_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-50}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\end{array}
\end{array}
if y.re < -4.00000000000000003e-50Initial program 41.5%
Simplified76.9%
*-commutative76.9%
hypot-udef43.0%
fma-def41.5%
add-cube-cbrt41.4%
pow241.4%
*-commutative41.4%
hypot-udef41.4%
fma-def41.4%
Applied egg-rr78.3%
Taylor expanded in y.im around 0 85.0%
if -4.00000000000000003e-50 < y.re Initial program 43.6%
Simplified81.8%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(*
(exp (- (* y.re (log (hypot x.re x.im))) t_0))
(sin (* y.re (atan2 x.im x.re)))))
(t_2
(/
(pow (hypot x.re x.im) y.re)
(/ (exp t_0) (sin (* y.im (log (hypot x.im x.re))))))))
(if (<= y.re -5e-77)
t_1
(if (<= y.re 1.4e-129)
t_2
(if (<= y.re 4.2e+185)
t_1
(if (<= y.re 1.2e+211)
t_2
(*
(sin (* (sqrt y.re) (* (atan2 x.im x.re) (sqrt y.re))))
(pow (hypot x.im x.re) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re) / (exp(t_0) / sin((y_46_im * log(hypot(x_46_im, x_46_re)))));
double tmp;
if (y_46_re <= -5e-77) {
tmp = t_1;
} else if (y_46_re <= 1.4e-129) {
tmp = t_2;
} else if (y_46_re <= 4.2e+185) {
tmp = t_1;
} else if (y_46_re <= 1.2e+211) {
tmp = t_2;
} else {
tmp = sin((sqrt(y_46_re) * (atan2(x_46_im, x_46_re) * sqrt(y_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (Math.exp(t_0) / Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))));
double tmp;
if (y_46_re <= -5e-77) {
tmp = t_1;
} else if (y_46_re <= 1.4e-129) {
tmp = t_2;
} else if (y_46_re <= 4.2e+185) {
tmp = t_1;
} else if (y_46_re <= 1.2e+211) {
tmp = t_2;
} else {
tmp = Math.sin((Math.sqrt(y_46_re) * (Math.atan2(x_46_im, x_46_re) * Math.sqrt(y_46_re)))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (math.exp(t_0) / math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))) tmp = 0 if y_46_re <= -5e-77: tmp = t_1 elif y_46_re <= 1.4e-129: tmp = t_2 elif y_46_re <= 4.2e+185: tmp = t_1 elif y_46_re <= 1.2e+211: tmp = t_2 else: tmp = math.sin((math.sqrt(y_46_re) * (math.atan2(x_46_im, x_46_re) * math.sqrt(y_46_re)))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(exp(t_0) / sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_re <= -5e-77) tmp = t_1; elseif (y_46_re <= 1.4e-129) tmp = t_2; elseif (y_46_re <= 4.2e+185) tmp = t_1; elseif (y_46_re <= 1.2e+211) tmp = t_2; else tmp = Float64(sin(Float64(sqrt(y_46_re) * Float64(atan(x_46_im, x_46_re) * sqrt(y_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = (hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(t_0) / sin((y_46_im * log(hypot(x_46_im, x_46_re))))); tmp = 0.0; if (y_46_re <= -5e-77) tmp = t_1; elseif (y_46_re <= 1.4e-129) tmp = t_2; elseif (y_46_re <= 4.2e+185) tmp = t_1; elseif (y_46_re <= 1.2e+211) tmp = t_2; else tmp = sin((sqrt(y_46_re) * (atan2(x_46_im, x_46_re) * sqrt(y_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5e-77], t$95$1, If[LessEqual[y$46$re, 1.4e-129], t$95$2, If[LessEqual[y$46$re, 4.2e+185], t$95$1, If[LessEqual[y$46$re, 1.2e+211], t$95$2, N[(N[Sin[N[(N[Sqrt[y$46$re], $MachinePrecision] * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Sqrt[y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\frac{e^{t_0}}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{-129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{+185}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+211}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\sqrt{y.re} \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sqrt{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -4.99999999999999963e-77 or 1.4e-129 < y.re < 4.2e185Initial program 46.2%
Simplified81.6%
*-commutative81.6%
hypot-udef46.9%
fma-def46.2%
add-cube-cbrt42.7%
pow242.7%
*-commutative42.7%
hypot-udef42.7%
fma-def42.7%
Applied egg-rr77.3%
Taylor expanded in y.im around 0 80.2%
if -4.99999999999999963e-77 < y.re < 1.4e-129 or 4.2e185 < y.re < 1.20000000000000009e211Initial program 40.2%
exp-diff40.1%
+-rgt-identity40.1%
+-rgt-identity40.1%
exp-to-pow40.1%
hypot-def40.1%
*-commutative40.1%
exp-prod39.8%
+-commutative39.8%
*-commutative39.8%
Simplified80.0%
associate-*l/80.0%
associate-/l*80.0%
fma-udef80.0%
*-commutative80.0%
hypot-udef39.8%
+-commutative39.8%
*-commutative39.8%
hypot-udef80.0%
fma-def80.0%
Applied egg-rr80.0%
Taylor expanded in y.re around 0 35.6%
+-commutative35.6%
unpow235.6%
unpow235.6%
hypot-def73.0%
hypot-def35.6%
unpow235.6%
unpow235.6%
+-commutative35.6%
unpow235.6%
unpow235.6%
hypot-def73.0%
Simplified73.0%
if 1.20000000000000009e211 < y.re Initial program 30.8%
exp-diff23.1%
+-rgt-identity23.1%
+-rgt-identity23.1%
exp-to-pow23.1%
hypot-def23.1%
*-commutative23.1%
exp-prod23.1%
+-commutative23.1%
*-commutative23.1%
Simplified46.2%
Taylor expanded in y.im around 0 69.4%
unpow269.4%
unpow269.4%
hypot-def69.4%
Simplified69.4%
*-commutative69.4%
add-exp-log7.7%
Applied egg-rr7.7%
add-exp-log69.4%
add-sqr-sqrt77.0%
associate-*r*84.7%
Applied egg-rr84.7%
Final simplification77.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* y.re (log (hypot x.re x.im))) (* (atan2 x.im x.re) y.im)))))
(if (or (<= y.re -1.55e-77)
(and (not (<= y.re 1.1e-129)) (<= y.re 2.25e-11)))
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(* t_0 (sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((y_46_re <= -1.55e-77) || (!(y_46_re <= 1.1e-129) && (y_46_re <= 2.25e-11))) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * 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 t_0 = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((y_46_re <= -1.55e-77) || (!(y_46_re <= 1.1e-129) && (y_46_re <= 2.25e-11))) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * 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): t_0 = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if (y_46_re <= -1.55e-77) or (not (y_46_re <= 1.1e-129) and (y_46_re <= 2.25e-11)): tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = t_0 * 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) t_0 = exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if ((y_46_re <= -1.55e-77) || (!(y_46_re <= 1.1e-129) && (y_46_re <= 2.25e-11))) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * 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) t_0 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if ((y_46_re <= -1.55e-77) || (~((y_46_re <= 1.1e-129)) && (y_46_re <= 2.25e-11))) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = t_0 * 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_] := Block[{t$95$0 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.55e-77], And[N[Not[LessEqual[y$46$re, 1.1e-129]], $MachinePrecision], LessEqual[y$46$re, 2.25e-11]]], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{-77} \lor \neg \left(y.re \leq 1.1 \cdot 10^{-129}\right) \land y.re \leq 2.25 \cdot 10^{-11}:\\
\;\;\;\;t_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.55000000000000004e-77 or 1.10000000000000001e-129 < y.re < 2.25e-11Initial program 43.0%
Simplified77.3%
*-commutative77.3%
hypot-udef44.0%
fma-def43.0%
add-cube-cbrt41.9%
pow241.9%
*-commutative41.9%
hypot-udef41.9%
fma-def41.9%
Applied egg-rr78.1%
Taylor expanded in y.im around 0 81.3%
if -1.55000000000000004e-77 < y.re < 1.10000000000000001e-129 or 2.25e-11 < y.re Initial program 43.2%
Simplified82.7%
*-commutative82.7%
hypot-udef43.2%
fma-def43.2%
add-cube-cbrt38.4%
pow238.4%
*-commutative38.4%
hypot-udef38.4%
fma-def38.4%
Applied egg-rr75.9%
Taylor expanded in y.re around 0 38.4%
unpow238.4%
unpow238.4%
hypot-def74.8%
Simplified74.8%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)))
(if (or (<= y.re -3.9e-77) (not (<= y.re 1.4e-132)))
(*
(exp (- (* y.re (log (hypot x.re x.im))) t_0))
(sin (* y.re (atan2 x.im x.re))))
(/ (sin (* y.im (log (hypot x.im x.re)))) (exp t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -3.9e-77) || !(y_46_re <= 1.4e-132)) {
tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -3.9e-77) || !(y_46_re <= 1.4e-132)) {
tmp = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if (y_46_re <= -3.9e-77) or not (y_46_re <= 1.4e-132): tmp = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if ((y_46_re <= -3.9e-77) || !(y_46_re <= 1.4e-132)) tmp = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if ((y_46_re <= -3.9e-77) || ~((y_46_re <= 1.4e-132))) tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.9e-77], N[Not[LessEqual[y$46$re, 1.4e-132]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-77} \lor \neg \left(y.re \leq 1.4 \cdot 10^{-132}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t_0}}\\
\end{array}
\end{array}
if y.re < -3.89999999999999979e-77 or 1.40000000000000001e-132 < y.re Initial program 44.8%
Simplified80.2%
*-commutative80.2%
hypot-udef45.4%
fma-def44.8%
add-cube-cbrt40.5%
pow240.5%
*-commutative40.5%
hypot-udef40.5%
fma-def40.5%
Applied egg-rr75.2%
Taylor expanded in y.im around 0 77.2%
if -3.89999999999999979e-77 < y.re < 1.40000000000000001e-132Initial program 39.9%
exp-diff39.9%
+-rgt-identity39.9%
+-rgt-identity39.9%
exp-to-pow39.9%
hypot-def39.9%
*-commutative39.9%
exp-prod39.6%
+-commutative39.6%
*-commutative39.6%
Simplified80.7%
associate-*l/80.6%
associate-/l*80.7%
fma-udef80.7%
*-commutative80.7%
hypot-udef39.6%
+-commutative39.6%
*-commutative39.6%
hypot-udef80.7%
fma-def80.7%
Applied egg-rr80.7%
Taylor expanded in y.re around 0 33.9%
+-commutative33.9%
unpow233.9%
unpow233.9%
hypot-def72.1%
hypot-def33.9%
unpow233.9%
unpow233.9%
+-commutative33.9%
unpow233.9%
unpow233.9%
hypot-def72.1%
Simplified72.1%
Final simplification75.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -2.65e+14)
(* t_0 (sin (fabs (* y.re (atan2 x.im x.re)))))
(if (<= y.re 2.8e-40)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(* (sin (* (sqrt y.re) (* (atan2 x.im x.re) (sqrt y.re)))) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.65e+14) {
tmp = t_0 * sin(fabs((y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 2.8e-40) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = sin((sqrt(y_46_re) * (atan2(x_46_im, x_46_re) * sqrt(y_46_re)))) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.65e+14) {
tmp = t_0 * Math.sin(Math.abs((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 2.8e-40) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = Math.sin((Math.sqrt(y_46_re) * (Math.atan2(x_46_im, x_46_re) * Math.sqrt(y_46_re)))) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.65e+14: tmp = t_0 * math.sin(math.fabs((y_46_re * math.atan2(x_46_im, x_46_re)))) elif y_46_re <= 2.8e-40: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = math.sin((math.sqrt(y_46_re) * (math.atan2(x_46_im, x_46_re) * math.sqrt(y_46_re)))) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.65e+14) tmp = Float64(t_0 * sin(abs(Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 2.8e-40) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(sin(Float64(sqrt(y_46_re) * Float64(atan(x_46_im, x_46_re) * sqrt(y_46_re)))) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.65e+14) tmp = t_0 * sin(abs((y_46_re * atan2(x_46_im, x_46_re)))); elseif (y_46_re <= 2.8e-40) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = sin((sqrt(y_46_re) * (atan2(x_46_im, x_46_re) * sqrt(y_46_re)))) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.65e+14], N[(t$95$0 * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.8e-40], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Sqrt[y$46$re], $MachinePrecision] * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Sqrt[y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.65 \cdot 10^{+14}:\\
\;\;\;\;t_0 \cdot \sin \left(\left|y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right|\right)\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\sqrt{y.re} \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sqrt{y.re}\right)\right) \cdot t_0\\
\end{array}
\end{array}
if y.re < -2.65e14Initial program 40.8%
exp-diff38.8%
+-rgt-identity38.8%
+-rgt-identity38.8%
exp-to-pow38.8%
hypot-def38.8%
*-commutative38.8%
exp-prod34.7%
+-commutative34.7%
*-commutative34.7%
Simplified69.4%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-def75.6%
Simplified75.6%
add-sqr-sqrt34.7%
sqrt-unprod43.0%
pow243.0%
*-commutative43.0%
Applied egg-rr43.0%
*-commutative43.0%
unpow243.0%
rem-sqrt-square79.7%
Simplified79.7%
if -2.65e14 < y.re < 2.8e-40Initial program 39.2%
exp-diff38.4%
+-rgt-identity38.4%
+-rgt-identity38.4%
exp-to-pow38.4%
hypot-def38.4%
*-commutative38.4%
exp-prod38.2%
+-commutative38.2%
*-commutative38.2%
Simplified75.3%
associate-*l/75.2%
associate-/l*75.3%
fma-udef75.3%
*-commutative75.3%
hypot-udef38.2%
+-commutative38.2%
*-commutative38.2%
hypot-udef75.3%
fma-def75.3%
Applied egg-rr75.3%
Taylor expanded in y.re around 0 30.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def63.1%
hypot-def30.7%
unpow230.7%
unpow230.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def63.1%
Simplified63.1%
if 2.8e-40 < y.re Initial program 51.3%
exp-diff39.4%
+-rgt-identity39.4%
+-rgt-identity39.4%
exp-to-pow39.4%
hypot-def39.4%
*-commutative39.4%
exp-prod39.4%
+-commutative39.4%
*-commutative39.4%
Simplified65.7%
Taylor expanded in y.im around 0 59.2%
unpow259.2%
unpow259.2%
hypot-def63.0%
Simplified63.0%
*-commutative63.0%
add-exp-log22.0%
Applied egg-rr22.0%
add-exp-log63.0%
add-sqr-sqrt62.9%
associate-*r*66.8%
Applied egg-rr66.8%
Final simplification67.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.65e+14)
(* (pow (hypot x.im x.re) y.re) (sin (fabs t_0)))
(if (<= y.re 2.8e-40)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(/ (pow (hypot x.re x.im) y.re) (/ 1.0 (sin t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.65e+14) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(t_0));
} else if (y_46_re <= 2.8e-40) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 / sin(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.65e+14) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(Math.abs(t_0));
} else if (y_46_re <= 2.8e-40) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 / Math.sin(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -2.65e+14: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(math.fabs(t_0)) elif y_46_re <= 2.8e-40: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 / math.sin(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.65e+14) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(t_0))); elseif (y_46_re <= 2.8e-40) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 / sin(t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -2.65e+14) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(t_0)); elseif (y_46_re <= 2.8e-40) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) / (1.0 / sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.65e+14], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.8e-40], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.65 \cdot 10^{+14}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\frac{1}{\sin t_0}}\\
\end{array}
\end{array}
if y.re < -2.65e14Initial program 40.8%
exp-diff38.8%
+-rgt-identity38.8%
+-rgt-identity38.8%
exp-to-pow38.8%
hypot-def38.8%
*-commutative38.8%
exp-prod34.7%
+-commutative34.7%
*-commutative34.7%
Simplified69.4%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-def75.6%
Simplified75.6%
add-sqr-sqrt34.7%
sqrt-unprod43.0%
pow243.0%
*-commutative43.0%
Applied egg-rr43.0%
*-commutative43.0%
unpow243.0%
rem-sqrt-square79.7%
Simplified79.7%
if -2.65e14 < y.re < 2.8e-40Initial program 39.2%
exp-diff38.4%
+-rgt-identity38.4%
+-rgt-identity38.4%
exp-to-pow38.4%
hypot-def38.4%
*-commutative38.4%
exp-prod38.2%
+-commutative38.2%
*-commutative38.2%
Simplified75.3%
associate-*l/75.2%
associate-/l*75.3%
fma-udef75.3%
*-commutative75.3%
hypot-udef38.2%
+-commutative38.2%
*-commutative38.2%
hypot-udef75.3%
fma-def75.3%
Applied egg-rr75.3%
Taylor expanded in y.re around 0 30.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def63.1%
hypot-def30.7%
unpow230.7%
unpow230.7%
+-commutative30.7%
unpow230.7%
unpow230.7%
hypot-def63.1%
Simplified63.1%
if 2.8e-40 < y.re Initial program 51.3%
exp-diff39.4%
+-rgt-identity39.4%
+-rgt-identity39.4%
exp-to-pow39.4%
hypot-def39.4%
*-commutative39.4%
exp-prod39.4%
+-commutative39.4%
*-commutative39.4%
Simplified65.7%
associate-*l/65.7%
associate-/l*65.7%
fma-udef65.7%
*-commutative65.7%
hypot-udef39.4%
+-commutative39.4%
*-commutative39.4%
hypot-udef65.7%
fma-def65.7%
Applied egg-rr65.7%
Taylor expanded in y.im around 0 63.0%
Final simplification66.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1.3e+161) (not (<= y.im 5.4e+56)))
(log (+ 1.0 (expm1 t_0)))
(/ (pow (hypot x.re x.im) y.re) (/ 1.0 (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.3e+161) || !(y_46_im <= 5.4e+56)) {
tmp = log((1.0 + expm1(t_0)));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 / sin(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.3e+161) || !(y_46_im <= 5.4e+56)) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 / Math.sin(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -1.3e+161) or not (y_46_im <= 5.4e+56): tmp = math.log((1.0 + math.expm1(t_0))) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (1.0 / math.sin(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1.3e+161) || !(y_46_im <= 5.4e+56)) tmp = log(Float64(1.0 + expm1(t_0))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 / sin(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.3e+161], N[Not[LessEqual[y$46$im, 5.4e+56]], $MachinePrecision]], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{+161} \lor \neg \left(y.im \leq 5.4 \cdot 10^{+56}\right):\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\frac{1}{\sin t_0}}\\
\end{array}
\end{array}
if y.im < -1.2999999999999999e161 or 5.40000000000000019e56 < y.im Initial program 33.0%
exp-diff29.3%
+-rgt-identity29.3%
+-rgt-identity29.3%
exp-to-pow29.3%
hypot-def29.3%
*-commutative29.3%
exp-prod28.9%
+-commutative28.9%
*-commutative28.9%
Simplified53.5%
Taylor expanded in y.im around 0 32.9%
+-commutative32.9%
unpow232.9%
unpow232.9%
Simplified32.9%
Taylor expanded in y.re around 0 5.1%
log1p-expm1-u21.4%
log1p-udef49.7%
*-commutative49.7%
Applied egg-rr49.7%
if -1.2999999999999999e161 < y.im < 5.40000000000000019e56Initial program 47.7%
exp-diff43.1%
+-rgt-identity43.1%
+-rgt-identity43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.0%
+-commutative42.0%
*-commutative42.0%
Simplified79.4%
associate-*l/79.4%
associate-/l*79.4%
fma-udef79.4%
*-commutative79.4%
hypot-udef42.0%
+-commutative42.0%
*-commutative42.0%
hypot-udef79.4%
fma-def79.4%
Applied egg-rr79.4%
Taylor expanded in y.im around 0 51.9%
Final simplification51.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -6.4e+162) (not (<= y.im 2.1e+59)))
(log (+ 1.0 (expm1 t_0)))
(* (sin t_0) (pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -6.4e+162) || !(y_46_im <= 2.1e+59)) {
tmp = log((1.0 + expm1(t_0)));
} else {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -6.4e+162) || !(y_46_im <= 2.1e+59)) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -6.4e+162) or not (y_46_im <= 2.1e+59): tmp = math.log((1.0 + math.expm1(t_0))) else: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -6.4e+162) || !(y_46_im <= 2.1e+59)) tmp = log(Float64(1.0 + expm1(t_0))); else tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -6.4e+162], N[Not[LessEqual[y$46$im, 2.1e+59]], $MachinePrecision]], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -6.4 \cdot 10^{+162} \lor \neg \left(y.im \leq 2.1 \cdot 10^{+59}\right):\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -6.4000000000000002e162 or 2.09999999999999984e59 < y.im Initial program 33.0%
exp-diff29.3%
+-rgt-identity29.3%
+-rgt-identity29.3%
exp-to-pow29.3%
hypot-def29.3%
*-commutative29.3%
exp-prod28.9%
+-commutative28.9%
*-commutative28.9%
Simplified53.5%
Taylor expanded in y.im around 0 32.9%
+-commutative32.9%
unpow232.9%
unpow232.9%
Simplified32.9%
Taylor expanded in y.re around 0 5.1%
log1p-expm1-u21.4%
log1p-udef49.7%
*-commutative49.7%
Applied egg-rr49.7%
if -6.4000000000000002e162 < y.im < 2.09999999999999984e59Initial program 47.7%
exp-diff43.1%
+-rgt-identity43.1%
+-rgt-identity43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.0%
+-commutative42.0%
*-commutative42.0%
Simplified79.4%
Taylor expanded in y.im around 0 48.3%
unpow248.3%
unpow248.3%
hypot-def51.9%
Simplified51.9%
Final simplification51.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow (- (* (/ (* x.re x.re) x.im) -0.5) x.im) y.re)))
(t_3 (log (+ 1.0 (expm1 t_0)))))
(if (<= y.im -6.7e+66)
t_3
(if (<= y.im -3.2e-254)
t_2
(if (<= y.im 7.9e-249)
(* t_1 (pow x.im y.re))
(if (<= y.im 4.7e+69) t_2 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re);
double t_3 = log((1.0 + expm1(t_0)));
double tmp;
if (y_46_im <= -6.7e+66) {
tmp = t_3;
} else if (y_46_im <= -3.2e-254) {
tmp = t_2;
} else if (y_46_im <= 7.9e-249) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_im <= 4.7e+69) {
tmp = t_2;
} 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_1 * Math.pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re);
double t_3 = Math.log((1.0 + Math.expm1(t_0)));
double tmp;
if (y_46_im <= -6.7e+66) {
tmp = t_3;
} else if (y_46_im <= -3.2e-254) {
tmp = t_2;
} else if (y_46_im <= 7.9e-249) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_im <= 4.7e+69) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = t_1 * math.pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re) t_3 = math.log((1.0 + math.expm1(t_0))) tmp = 0 if y_46_im <= -6.7e+66: tmp = t_3 elif y_46_im <= -3.2e-254: tmp = t_2 elif y_46_im <= 7.9e-249: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_im <= 4.7e+69: tmp = t_2 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im) ^ y_46_re)) t_3 = log(Float64(1.0 + expm1(t_0))) tmp = 0.0 if (y_46_im <= -6.7e+66) tmp = t_3; elseif (y_46_im <= -3.2e-254) tmp = t_2; elseif (y_46_im <= 7.9e-249) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_im <= 4.7e+69) tmp = t_2; else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * -0.5), $MachinePrecision] - x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -6.7e+66], t$95$3, If[LessEqual[y$46$im, -3.2e-254], t$95$2, If[LessEqual[y$46$im, 7.9e-249], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.7e+69], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := t_1 \cdot {\left(\frac{x.re \cdot x.re}{x.im} \cdot -0.5 - x.im\right)}^{y.re}\\
t_3 := \log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{if}\;y.im \leq -6.7 \cdot 10^{+66}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -3.2 \cdot 10^{-254}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 7.9 \cdot 10^{-249}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.im \leq 4.7 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.im < -6.69999999999999969e66 or 4.69999999999999996e69 < y.im Initial program 34.8%
exp-diff26.9%
+-rgt-identity26.9%
+-rgt-identity26.9%
exp-to-pow26.9%
hypot-def26.9%
*-commutative26.9%
exp-prod26.6%
+-commutative26.6%
*-commutative26.6%
Simplified46.9%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
Simplified35.7%
Taylor expanded in y.re around 0 4.7%
log1p-expm1-u25.9%
log1p-udef48.0%
*-commutative48.0%
Applied egg-rr48.0%
if -6.69999999999999969e66 < y.im < -3.2e-254 or 7.89999999999999962e-249 < y.im < 4.69999999999999996e69Initial program 46.3%
exp-diff44.0%
+-rgt-identity44.0%
+-rgt-identity44.0%
exp-to-pow44.0%
hypot-def44.0%
*-commutative44.0%
exp-prod42.6%
+-commutative42.6%
*-commutative42.6%
Simplified87.3%
Taylor expanded in y.im around 0 46.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in x.im around -inf 45.2%
+-commutative45.2%
mul-1-neg45.2%
unsub-neg45.2%
*-commutative45.2%
unpow245.2%
Simplified45.2%
if -3.2e-254 < y.im < 7.89999999999999962e-249Initial program 66.3%
exp-diff66.3%
+-rgt-identity66.3%
+-rgt-identity66.3%
exp-to-pow66.3%
hypot-def66.3%
*-commutative66.3%
exp-prod66.3%
+-commutative66.3%
*-commutative66.3%
Simplified88.5%
Taylor expanded in y.im around 0 64.8%
+-commutative64.8%
unpow264.8%
unpow264.8%
Simplified64.8%
Taylor expanded in x.re around 0 64.6%
Final simplification47.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (log (+ 1.0 (expm1 t_0)))))
(if (<= y.im -3.5e+67)
t_2
(if (<= y.im -2e-256)
(* t_1 (pow (- (* (/ (* x.re x.re) x.im) -0.5) x.im) y.re))
(if (<= y.im 2.8e-245)
(* t_1 (pow x.im y.re))
(if (<= y.im 1.2e+59)
(* t_1 (pow (- (/ (* (* x.im x.im) -0.5) x.re) x.re) y.re))
t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = log((1.0 + expm1(t_0)));
double tmp;
if (y_46_im <= -3.5e+67) {
tmp = t_2;
} else if (y_46_im <= -2e-256) {
tmp = t_1 * pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re);
} else if (y_46_im <= 2.8e-245) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_im <= 1.2e+59) {
tmp = t_1 * pow(((((x_46_im * x_46_im) * -0.5) / x_46_re) - x_46_re), y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.log((1.0 + Math.expm1(t_0)));
double tmp;
if (y_46_im <= -3.5e+67) {
tmp = t_2;
} else if (y_46_im <= -2e-256) {
tmp = t_1 * Math.pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re);
} else if (y_46_im <= 2.8e-245) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_im <= 1.2e+59) {
tmp = t_1 * Math.pow(((((x_46_im * x_46_im) * -0.5) / x_46_re) - x_46_re), y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.log((1.0 + math.expm1(t_0))) tmp = 0 if y_46_im <= -3.5e+67: tmp = t_2 elif y_46_im <= -2e-256: tmp = t_1 * math.pow(((((x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im), y_46_re) elif y_46_im <= 2.8e-245: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_im <= 1.2e+59: tmp = t_1 * math.pow(((((x_46_im * x_46_im) * -0.5) / x_46_re) - x_46_re), y_46_re) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = log(Float64(1.0 + expm1(t_0))) tmp = 0.0 if (y_46_im <= -3.5e+67) tmp = t_2; elseif (y_46_im <= -2e-256) tmp = Float64(t_1 * (Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * -0.5) - x_46_im) ^ y_46_re)); elseif (y_46_im <= 2.8e-245) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_im <= 1.2e+59) tmp = Float64(t_1 * (Float64(Float64(Float64(Float64(x_46_im * x_46_im) * -0.5) / x_46_re) - x_46_re) ^ y_46_re)); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3.5e+67], t$95$2, If[LessEqual[y$46$im, -2e-256], N[(t$95$1 * N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * -0.5), $MachinePrecision] - x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.8e-245], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e+59], N[(t$95$1 * N[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] * -0.5), $MachinePrecision] / x$46$re), $MachinePrecision] - x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := \log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{if}\;y.im \leq -3.5 \cdot 10^{+67}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-256}:\\
\;\;\;\;t_1 \cdot {\left(\frac{x.re \cdot x.re}{x.im} \cdot -0.5 - x.im\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 2.8 \cdot 10^{-245}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+59}:\\
\;\;\;\;t_1 \cdot {\left(\frac{\left(x.im \cdot x.im\right) \cdot -0.5}{x.re} - x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -3.5e67 or 1.2000000000000001e59 < y.im Initial program 35.0%
exp-diff27.4%
+-rgt-identity27.4%
+-rgt-identity27.4%
exp-to-pow27.4%
hypot-def27.4%
*-commutative27.4%
exp-prod27.1%
+-commutative27.1%
*-commutative27.1%
Simplified47.9%
Taylor expanded in y.im around 0 36.0%
+-commutative36.0%
unpow236.0%
unpow236.0%
Simplified36.0%
Taylor expanded in y.re around 0 4.7%
log1p-expm1-u25.5%
log1p-udef48.1%
*-commutative48.1%
Applied egg-rr48.1%
if -3.5e67 < y.im < -1.99999999999999995e-256Initial program 50.0%
exp-diff48.5%
+-rgt-identity48.5%
+-rgt-identity48.5%
exp-to-pow48.5%
hypot-def48.5%
*-commutative48.5%
exp-prod45.7%
+-commutative45.7%
*-commutative45.7%
Simplified87.0%
Taylor expanded in y.im around 0 46.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in x.im around -inf 47.3%
+-commutative47.3%
mul-1-neg47.3%
unsub-neg47.3%
*-commutative47.3%
unpow247.3%
Simplified47.3%
if -1.99999999999999995e-256 < y.im < 2.8000000000000001e-245Initial program 66.3%
exp-diff66.3%
+-rgt-identity66.3%
+-rgt-identity66.3%
exp-to-pow66.3%
hypot-def66.3%
*-commutative66.3%
exp-prod66.3%
+-commutative66.3%
*-commutative66.3%
Simplified88.5%
Taylor expanded in y.im around 0 64.8%
+-commutative64.8%
unpow264.8%
unpow264.8%
Simplified64.8%
Taylor expanded in x.re around 0 64.6%
if 2.8000000000000001e-245 < y.im < 1.2000000000000001e59Initial program 42.1%
exp-diff38.9%
+-rgt-identity38.9%
+-rgt-identity38.9%
exp-to-pow38.9%
hypot-def38.9%
*-commutative38.9%
exp-prod38.9%
+-commutative38.9%
*-commutative38.9%
Simplified87.3%
Taylor expanded in y.im around 0 46.3%
+-commutative46.3%
unpow246.3%
unpow246.3%
Simplified46.3%
Taylor expanded in x.re around -inf 44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-*r/44.3%
unpow244.3%
Simplified44.3%
Final simplification48.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow x.re y.re)))
(t_3 (log1p (expm1 t_0))))
(if (<= y.re -52000000000000.0)
t_2
(if (<= y.re 4.65e-178)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 3.9e+35)
t_3
(if (<= y.re 8.8e+126)
t_2
(if (<= y.re 1.05e+135) t_3 (* t_1 (pow x.im y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(x_46_re, y_46_re);
double t_3 = log1p(expm1(t_0));
double tmp;
if (y_46_re <= -52000000000000.0) {
tmp = t_2;
} else if (y_46_re <= 4.65e-178) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 3.9e+35) {
tmp = t_3;
} else if (y_46_re <= 8.8e+126) {
tmp = t_2;
} else if (y_46_re <= 1.05e+135) {
tmp = t_3;
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_1 * Math.pow(x_46_re, y_46_re);
double t_3 = Math.log1p(Math.expm1(t_0));
double tmp;
if (y_46_re <= -52000000000000.0) {
tmp = t_2;
} else if (y_46_re <= 4.65e-178) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 3.9e+35) {
tmp = t_3;
} else if (y_46_re <= 8.8e+126) {
tmp = t_2;
} else if (y_46_re <= 1.05e+135) {
tmp = t_3;
} else {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = t_1 * math.pow(x_46_re, y_46_re) t_3 = math.log1p(math.expm1(t_0)) tmp = 0 if y_46_re <= -52000000000000.0: tmp = t_2 elif y_46_re <= 4.65e-178: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= 3.9e+35: tmp = t_3 elif y_46_re <= 8.8e+126: tmp = t_2 elif y_46_re <= 1.05e+135: tmp = t_3 else: tmp = t_1 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (x_46_re ^ y_46_re)) t_3 = log1p(expm1(t_0)) tmp = 0.0 if (y_46_re <= -52000000000000.0) tmp = t_2; elseif (y_46_re <= 4.65e-178) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 3.9e+35) tmp = t_3; elseif (y_46_re <= 8.8e+126) tmp = t_2; elseif (y_46_re <= 1.05e+135) tmp = t_3; else tmp = Float64(t_1 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -52000000000000.0], t$95$2, If[LessEqual[y$46$re, 4.65e-178], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 3.9e+35], t$95$3, If[LessEqual[y$46$re, 8.8e+126], t$95$2, If[LessEqual[y$46$re, 1.05e+135], t$95$3, N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := t_1 \cdot {x.re}^{y.re}\\
t_3 := \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{if}\;y.re \leq -52000000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.65 \cdot 10^{-178}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 3.9 \cdot 10^{+35}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+135}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.2e13 or 3.8999999999999999e35 < y.re < 8.79999999999999994e126Initial program 48.6%
exp-diff37.1%
+-rgt-identity37.1%
+-rgt-identity37.1%
exp-to-pow37.1%
hypot-def37.1%
*-commutative37.1%
exp-prod34.3%
+-commutative34.3%
*-commutative34.3%
Simplified64.3%
Taylor expanded in y.im around 0 74.5%
+-commutative74.5%
unpow274.5%
unpow274.5%
Simplified74.5%
Taylor expanded in x.im around 0 59.0%
if -5.2e13 < y.re < 4.64999999999999994e-178Initial program 39.5%
exp-diff39.5%
+-rgt-identity39.5%
+-rgt-identity39.5%
exp-to-pow39.5%
hypot-def39.5%
*-commutative39.5%
exp-prod39.4%
+-commutative39.4%
*-commutative39.4%
Simplified77.9%
Taylor expanded in y.im around 0 23.7%
+-commutative23.7%
unpow223.7%
unpow223.7%
Simplified23.7%
Taylor expanded in y.re around 0 14.7%
expm1-log1p-u14.7%
expm1-udef28.8%
*-commutative28.8%
Applied egg-rr28.8%
if 4.64999999999999994e-178 < y.re < 3.8999999999999999e35 or 8.79999999999999994e126 < y.re < 1.05000000000000005e135Initial program 45.1%
exp-diff41.7%
+-rgt-identity41.7%
+-rgt-identity41.7%
exp-to-pow41.7%
hypot-def41.7%
*-commutative41.7%
exp-prod41.4%
+-commutative41.4%
*-commutative41.4%
Simplified74.8%
Taylor expanded in y.im around 0 30.4%
+-commutative30.4%
unpow230.4%
unpow230.4%
Simplified30.4%
Taylor expanded in y.re around 0 26.7%
*-commutative26.7%
log1p-expm1-u38.2%
Applied egg-rr38.2%
if 1.05000000000000005e135 < y.re Initial program 37.9%
exp-diff34.5%
+-rgt-identity34.5%
+-rgt-identity34.5%
exp-to-pow34.5%
hypot-def34.5%
*-commutative34.5%
exp-prod34.5%
+-commutative34.5%
*-commutative34.5%
Simplified58.6%
Taylor expanded in y.im around 0 62.1%
+-commutative62.1%
unpow262.1%
unpow262.1%
Simplified62.1%
Taylor expanded in x.re around 0 55.6%
Final simplification42.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (sin t_0) (pow x.im y.re)))
(t_2 (expm1 t_0))
(t_3 (log (+ 1.0 t_2))))
(if (<= y.im -2.05e-13)
t_3
(if (<= y.im -5.4e-293)
t_1
(if (<= y.im 3.2e+29) (log1p t_2) (if (<= y.im 2.2e+57) 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double t_2 = expm1(t_0);
double t_3 = log((1.0 + t_2));
double tmp;
if (y_46_im <= -2.05e-13) {
tmp = t_3;
} else if (y_46_im <= -5.4e-293) {
tmp = t_1;
} else if (y_46_im <= 3.2e+29) {
tmp = log1p(t_2);
} else if (y_46_im <= 2.2e+57) {
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double t_2 = Math.expm1(t_0);
double t_3 = Math.log((1.0 + t_2));
double tmp;
if (y_46_im <= -2.05e-13) {
tmp = t_3;
} else if (y_46_im <= -5.4e-293) {
tmp = t_1;
} else if (y_46_im <= 3.2e+29) {
tmp = Math.log1p(t_2);
} else if (y_46_im <= 2.2e+57) {
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(x_46_im, y_46_re) t_2 = math.expm1(t_0) t_3 = math.log((1.0 + t_2)) tmp = 0 if y_46_im <= -2.05e-13: tmp = t_3 elif y_46_im <= -5.4e-293: tmp = t_1 elif y_46_im <= 3.2e+29: tmp = math.log1p(t_2) elif y_46_im <= 2.2e+57: 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) t_2 = expm1(t_0) t_3 = log(Float64(1.0 + t_2)) tmp = 0.0 if (y_46_im <= -2.05e-13) tmp = t_3; elseif (y_46_im <= -5.4e-293) tmp = t_1; elseif (y_46_im <= 3.2e+29) tmp = log1p(t_2); elseif (y_46_im <= 2.2e+57) tmp = t_1; else tmp = t_3; 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[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Exp[t$95$0] - 1), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[(1.0 + t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.05e-13], t$95$3, If[LessEqual[y$46$im, -5.4e-293], t$95$1, If[LessEqual[y$46$im, 3.2e+29], N[Log[1 + t$95$2], $MachinePrecision], If[LessEqual[y$46$im, 2.2e+57], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0 \cdot {x.im}^{y.re}\\
t_2 := \mathsf{expm1}\left(t_0\right)\\
t_3 := \log \left(1 + t_2\right)\\
\mathbf{if}\;y.im \leq -2.05 \cdot 10^{-13}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -5.4 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 3.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{log1p}\left(t_2\right)\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.im < -2.0500000000000001e-13 or 2.2000000000000001e57 < y.im Initial program 37.2%
exp-diff30.0%
+-rgt-identity30.0%
+-rgt-identity30.0%
exp-to-pow30.0%
hypot-def30.0%
*-commutative30.0%
exp-prod28.1%
+-commutative28.1%
*-commutative28.1%
Simplified49.5%
Taylor expanded in y.im around 0 37.4%
+-commutative37.4%
unpow237.4%
unpow237.4%
Simplified37.4%
Taylor expanded in y.re around 0 4.4%
log1p-expm1-u22.3%
log1p-udef44.2%
*-commutative44.2%
Applied egg-rr44.2%
if -2.0500000000000001e-13 < y.im < -5.40000000000000005e-293 or 3.19999999999999987e29 < y.im < 2.2000000000000001e57Initial program 52.2%
exp-diff49.2%
+-rgt-identity49.2%
+-rgt-identity49.2%
exp-to-pow49.2%
hypot-def49.2%
*-commutative49.2%
exp-prod49.2%
+-commutative49.2%
*-commutative49.2%
Simplified92.4%
Taylor expanded in y.im around 0 49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
Simplified49.8%
Taylor expanded in x.re around 0 36.8%
if -5.40000000000000005e-293 < y.im < 3.19999999999999987e29Initial program 45.1%
exp-diff45.1%
+-rgt-identity45.1%
+-rgt-identity45.1%
exp-to-pow45.1%
hypot-def45.1%
*-commutative45.1%
exp-prod45.1%
+-commutative45.1%
*-commutative45.1%
Simplified91.9%
Taylor expanded in y.im around 0 48.6%
+-commutative48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in y.re around 0 24.1%
*-commutative24.1%
log1p-expm1-u37.5%
Applied egg-rr37.5%
Final simplification40.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -45000000000000.0)
(* t_1 (pow x.re y.re))
(if (<= y.re 7.2e-176)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 7e-8) t_0 (* t_1 (pow (- x.im) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -45000000000000.0) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 7.2e-176) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 7e-8) {
tmp = t_0;
} else {
tmp = t_1 * pow(-x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -45000000000000.0) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 7.2e-176) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 7e-8) {
tmp = t_0;
} else {
tmp = t_1 * Math.pow(-x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -45000000000000.0: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 7.2e-176: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= 7e-8: tmp = t_0 else: tmp = t_1 * math.pow(-x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -45000000000000.0) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 7.2e-176) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 7e-8) tmp = t_0; else tmp = Float64(t_1 * (Float64(-x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -45000000000000.0], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.2e-176], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 7e-8], t$95$0, N[(t$95$1 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
\mathbf{if}\;y.re \leq -45000000000000:\\
\;\;\;\;t_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.2 \cdot 10^{-176}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(-x.im\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -4.5e13Initial program 41.2%
exp-diff37.3%
+-rgt-identity37.3%
+-rgt-identity37.3%
exp-to-pow37.3%
hypot-def37.3%
*-commutative37.3%
exp-prod33.3%
+-commutative33.3%
*-commutative33.3%
Simplified68.6%
Taylor expanded in y.im around 0 74.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
Simplified74.7%
Taylor expanded in x.im around 0 57.2%
if -4.5e13 < y.re < 7.2000000000000005e-176Initial program 39.5%
exp-diff39.5%
+-rgt-identity39.5%
+-rgt-identity39.5%
exp-to-pow39.5%
hypot-def39.5%
*-commutative39.5%
exp-prod39.4%
+-commutative39.4%
*-commutative39.4%
Simplified77.9%
Taylor expanded in y.im around 0 23.7%
+-commutative23.7%
unpow223.7%
unpow223.7%
Simplified23.7%
Taylor expanded in y.re around 0 14.7%
expm1-log1p-u14.7%
expm1-udef28.8%
*-commutative28.8%
Applied egg-rr28.8%
if 7.2000000000000005e-176 < y.re < 7.00000000000000048e-8Initial program 46.9%
exp-diff46.9%
+-rgt-identity46.9%
+-rgt-identity46.9%
exp-to-pow46.9%
hypot-def46.9%
*-commutative46.9%
exp-prod46.5%
+-commutative46.5%
*-commutative46.5%
Simplified77.7%
Taylor expanded in y.im around 0 26.8%
+-commutative26.8%
unpow226.8%
unpow226.8%
Simplified26.8%
Taylor expanded in y.re around 0 33.3%
if 7.00000000000000048e-8 < y.re Initial program 47.6%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
+-commutative33.3%
*-commutative33.3%
Simplified58.7%
Taylor expanded in y.im around 0 60.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
Simplified60.5%
Taylor expanded in x.im around -inf 51.3%
mul-1-neg51.3%
Simplified51.3%
Final simplification40.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -9.5e-111)
(* t_0 (pow (- x.re) y.re))
(if (<= x.re 1.95e-27)
(* t_0 (pow (- x.im) y.re))
(* t_0 (pow x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -9.5e-111) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else if (x_46_re <= 1.95e-27) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-9.5d-111)) then
tmp = t_0 * (-x_46re ** y_46re)
else if (x_46re <= 1.95d-27) then
tmp = t_0 * (-x_46im ** y_46re)
else
tmp = t_0 * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -9.5e-111) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else if (x_46_re <= 1.95e-27) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -9.5e-111: tmp = t_0 * math.pow(-x_46_re, y_46_re) elif x_46_re <= 1.95e-27: tmp = t_0 * math.pow(-x_46_im, y_46_re) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -9.5e-111) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); elseif (x_46_re <= 1.95e-27) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -9.5e-111) tmp = t_0 * (-x_46_re ^ y_46_re); elseif (x_46_re <= 1.95e-27) tmp = t_0 * (-x_46_im ^ y_46_re); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -9.5e-111], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.95e-27], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -9.5 \cdot 10^{-111}:\\
\;\;\;\;t_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 1.95 \cdot 10^{-27}:\\
\;\;\;\;t_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -9.4999999999999995e-111Initial program 41.0%
exp-diff35.7%
+-rgt-identity35.7%
+-rgt-identity35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod35.7%
+-commutative35.7%
*-commutative35.7%
Simplified76.7%
Taylor expanded in y.im around 0 41.8%
+-commutative41.8%
unpow241.8%
unpow241.8%
Simplified41.8%
Taylor expanded in x.re around -inf 38.0%
mul-1-neg38.0%
Simplified38.0%
if -9.4999999999999995e-111 < x.re < 1.94999999999999986e-27Initial program 52.3%
exp-diff46.9%
+-rgt-identity46.9%
+-rgt-identity46.9%
exp-to-pow46.9%
hypot-def46.9%
*-commutative46.9%
exp-prod46.7%
+-commutative46.7%
*-commutative46.7%
Simplified74.9%
Taylor expanded in y.im around 0 51.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
Simplified51.0%
Taylor expanded in x.im around -inf 46.4%
mul-1-neg46.4%
Simplified46.4%
if 1.94999999999999986e-27 < x.re Initial program 33.6%
exp-diff32.2%
+-rgt-identity32.2%
+-rgt-identity32.2%
exp-to-pow32.2%
hypot-def32.2%
*-commutative32.2%
exp-prod29.1%
+-commutative29.1%
*-commutative29.1%
Simplified59.1%
Taylor expanded in y.im around 0 35.7%
+-commutative35.7%
unpow235.7%
unpow235.7%
Simplified35.7%
Taylor expanded in x.im around 0 34.8%
Final simplification40.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -4.5e-11) (not (<= y.im 1.28e-49)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -4.5e-11) || !(y_46_im <= 1.28e-49)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -4.5e-11) || !(y_46_im <= 1.28e-49)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -4.5e-11) or not (y_46_im <= 1.28e-49): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -4.5e-11) || !(y_46_im <= 1.28e-49)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.5e-11], N[Not[LessEqual[y$46$im, 1.28e-49]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -4.5 \cdot 10^{-11} \lor \neg \left(y.im \leq 1.28 \cdot 10^{-49}\right):\\
\;\;\;\;\log \left(1 + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t_0\right)\\
\end{array}
\end{array}
if y.im < -4.5e-11 or 1.28e-49 < y.im Initial program 37.9%
exp-diff30.5%
+-rgt-identity30.5%
+-rgt-identity30.5%
exp-to-pow30.5%
hypot-def30.5%
*-commutative30.5%
exp-prod28.9%
+-commutative28.9%
*-commutative28.9%
Simplified52.9%
Taylor expanded in y.im around 0 38.8%
+-commutative38.8%
unpow238.8%
unpow238.8%
Simplified38.8%
Taylor expanded in y.re around 0 4.3%
log1p-expm1-u22.6%
log1p-udef41.0%
*-commutative41.0%
Applied egg-rr41.0%
if -4.5e-11 < y.im < 1.28e-49Initial program 50.4%
exp-diff50.4%
+-rgt-identity50.4%
+-rgt-identity50.4%
exp-to-pow50.4%
hypot-def50.4%
*-commutative50.4%
exp-prod50.4%
+-commutative50.4%
*-commutative50.4%
Simplified96.9%
Taylor expanded in y.im around 0 49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
Simplified49.9%
Taylor expanded in y.re around 0 25.7%
*-commutative25.7%
log1p-expm1-u31.8%
Applied egg-rr31.8%
Final simplification37.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -9.5e-21) (not (<= y.im 1e+78)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -9.5e-21) || !(y_46_im <= 1e+78)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -9.5e-21) || !(y_46_im <= 1e+78)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -9.5e-21) || !(y_46_im <= 1e+78)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -9.5e-21], N[Not[LessEqual[y$46$im, 1e+78]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-21} \lor \neg \left(y.im \leq 10^{+78}\right):\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -9.4999999999999994e-21 or 1.00000000000000001e78 < y.im Initial program 37.8%
exp-diff30.4%
+-rgt-identity30.4%
+-rgt-identity30.4%
exp-to-pow30.4%
hypot-def30.4%
*-commutative30.4%
exp-prod28.6%
+-commutative28.6%
*-commutative28.6%
Simplified48.7%
Taylor expanded in y.im around 0 37.9%
+-commutative37.9%
unpow237.9%
unpow237.9%
Simplified37.9%
Taylor expanded in y.re around 0 4.4%
add-cbrt-cube33.3%
pow333.3%
*-commutative33.3%
Applied egg-rr33.3%
if -9.4999999999999994e-21 < y.im < 1.00000000000000001e78Initial program 48.0%
exp-diff46.5%
+-rgt-identity46.5%
+-rgt-identity46.5%
exp-to-pow46.5%
hypot-def46.5%
*-commutative46.5%
exp-prod46.5%
+-commutative46.5%
*-commutative46.5%
Simplified92.2%
Taylor expanded in y.im around 0 48.5%
+-commutative48.5%
unpow248.5%
unpow248.5%
Simplified48.5%
Taylor expanded in y.re around 0 21.5%
*-commutative21.5%
log1p-expm1-u30.7%
Applied egg-rr30.7%
Final simplification31.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 43.1%
exp-diff38.8%
+-rgt-identity38.8%
+-rgt-identity38.8%
exp-to-pow38.8%
hypot-def38.8%
*-commutative38.8%
exp-prod37.9%
+-commutative37.9%
*-commutative37.9%
Simplified71.3%
Taylor expanded in y.im around 0 43.4%
+-commutative43.4%
unpow243.4%
unpow243.4%
Simplified43.4%
Taylor expanded in y.re around 0 13.3%
*-commutative13.3%
log1p-expm1-u26.5%
Applied egg-rr26.5%
Final simplification26.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 43.1%
exp-diff38.8%
+-rgt-identity38.8%
+-rgt-identity38.8%
exp-to-pow38.8%
hypot-def38.8%
*-commutative38.8%
exp-prod37.9%
+-commutative37.9%
*-commutative37.9%
Simplified71.3%
Taylor expanded in y.im around 0 43.4%
+-commutative43.4%
unpow243.4%
unpow243.4%
Simplified43.4%
Taylor expanded in y.re around 0 13.3%
Final simplification13.3%
herbie shell --seed 2023193
(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)))))