
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 6.6e+211)
(*
(exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(pow (hypot x.im x.re) y.re)
(sin
(fabs
(fma y.re (atan2 x.im x.re) (* 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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 6.6e+211) {
tmp = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(fma(y_46_re, atan2(x_46_im, x_46_re), (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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 6.6e+211) tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(fma(y_46_re, atan(x_46_im, x_46_re), 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 6.6e+211], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 6.6 \cdot 10^{+211}:\\
\;\;\;\;e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\right)\\
\end{array}
\end{array}
if y.re < 6.59999999999999966e211Initial program 40.4%
Simplified85.4%
if 6.59999999999999966e211 < y.re Initial program 23.8%
exp-diff9.5%
+-rgt-identity9.5%
+-rgt-identity9.5%
exp-to-pow9.5%
hypot-def9.5%
*-commutative9.5%
exp-prod9.5%
+-commutative9.5%
*-commutative9.5%
Simplified23.8%
Taylor expanded in y.im around 0 42.9%
unpow242.9%
unpow242.9%
hypot-def42.9%
Simplified42.9%
fma-udef42.9%
*-commutative42.9%
hypot-udef23.8%
+-commutative23.8%
add-sqr-sqrt4.8%
sqrt-unprod0.0%
pow20.0%
*-commutative0.0%
hypot-udef9.5%
fma-def9.5%
Applied egg-rr9.5%
unpow29.5%
rem-sqrt-square81.0%
fma-udef81.0%
log-pow23.8%
+-commutative23.8%
*-commutative23.8%
log-pow81.0%
fma-udef81.0%
hypot-def42.9%
unpow242.9%
unpow242.9%
+-commutative42.9%
unpow242.9%
unpow242.9%
hypot-def81.0%
Simplified81.0%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* y.re t_3) t_0))))
(if (<= y.re -7000.0)
(* t_4 (sin t_2))
(if (<= y.re 1.86)
(/ (sin (fma (log (hypot x.re x.im)) y.im t_2)) (exp t_0))
(if (<= y.re 4.5e+210)
(* t_4 (sin t_1))
(if (<= y.re 3.3e+305)
(*
(pow (hypot x.im x.re) y.re)
(sin (fabs (fma y.re (atan2 x.im x.re) t_1))))
(* y.im t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((y_46_re * t_3) - t_0));
double tmp;
if (y_46_re <= -7000.0) {
tmp = t_4 * sin(t_2);
} else if (y_46_re <= 1.86) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) / exp(t_0);
} else if (y_46_re <= 4.5e+210) {
tmp = t_4 * sin(t_1);
} else if (y_46_re <= 3.3e+305) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(fma(y_46_re, atan2(x_46_im, x_46_re), t_1)));
} else {
tmp = y_46_im * t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(y_46_re * t_3) - t_0)) tmp = 0.0 if (y_46_re <= -7000.0) tmp = Float64(t_4 * sin(t_2)); elseif (y_46_re <= 1.86) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) / exp(t_0)); elseif (y_46_re <= 4.5e+210) tmp = Float64(t_4 * sin(t_1)); elseif (y_46_re <= 3.3e+305) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(fma(y_46_re, atan(x_46_im, x_46_re), t_1)))); else tmp = Float64(y_46_im * t_3); 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7000.0], N[(t$95$4 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.86], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.5e+210], N[(t$95$4 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+305], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * t$95$3), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{y.re \cdot t_3 - t_0}\\
\mathbf{if}\;y.re \leq -7000:\\
\;\;\;\;t_4 \cdot \sin t_2\\
\mathbf{elif}\;y.re \leq 1.86:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_2\right)\right)}{e^{t_0}}\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{+210}:\\
\;\;\;\;t_4 \cdot \sin t_1\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+305}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_1\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot t_3\\
\end{array}
\end{array}
if y.re < -7e3Initial program 41.2%
Taylor expanded in y.im around 0 85.4%
if -7e3 < y.re < 1.8600000000000001Initial program 40.7%
*-commutative40.7%
exp-diff39.9%
associate-*r/39.9%
associate-/l*39.9%
fma-def39.9%
hypot-def52.5%
*-commutative52.5%
Simplified82.9%
Taylor expanded in y.re around 0 84.3%
if 1.8600000000000001 < y.re < 4.50000000000000004e210Initial program 37.8%
Taylor expanded in y.re around 0 43.2%
unpow243.2%
unpow243.2%
hypot-def73.1%
Simplified73.1%
if 4.50000000000000004e210 < y.re < 3.29999999999999999e305Initial program 25.0%
exp-diff10.0%
+-rgt-identity10.0%
+-rgt-identity10.0%
exp-to-pow10.0%
hypot-def10.0%
*-commutative10.0%
exp-prod10.0%
+-commutative10.0%
*-commutative10.0%
Simplified20.0%
Taylor expanded in y.im around 0 40.0%
unpow240.0%
unpow240.0%
hypot-def40.0%
Simplified40.0%
fma-udef40.0%
*-commutative40.0%
hypot-udef25.0%
+-commutative25.0%
add-sqr-sqrt5.0%
sqrt-unprod0.0%
pow20.0%
*-commutative0.0%
hypot-udef10.0%
fma-def10.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square85.0%
fma-udef85.0%
log-pow25.0%
+-commutative25.0%
*-commutative25.0%
log-pow85.0%
fma-udef85.0%
hypot-def45.0%
unpow245.0%
unpow245.0%
+-commutative45.0%
unpow245.0%
unpow245.0%
hypot-def85.0%
Simplified85.0%
if 3.29999999999999999e305 < y.re Initial program 0.0%
exp-diff0.0%
+-rgt-identity0.0%
+-rgt-identity0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
+-commutative0.0%
*-commutative0.0%
Simplified100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in y.re around 0 0.0%
unpow20.0%
unpow20.0%
hypot-def3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
Simplified100.0%
Final simplification83.1%
(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)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -7000.0)
(* t_2 (sin t_3))
(if (<= y.re 2.1)
(/ (sin (fma (log (hypot x.re x.im)) y.im t_3)) (pow E t_0))
(if (<= y.re 6.2e+211)
(* t_2 (sin t_4))
(if (<= y.re 3.3e+305)
(*
(pow (hypot x.im x.re) y.re)
(sin (fabs (fma y.re (atan2 x.im x.re) t_4))))
(* y.im t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = 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));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -7000.0) {
tmp = t_2 * sin(t_3);
} else if (y_46_re <= 2.1) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_3)) / pow(((double) M_E), t_0);
} else if (y_46_re <= 6.2e+211) {
tmp = t_2 * sin(t_4);
} else if (y_46_re <= 3.3e+305) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(fma(y_46_re, atan2(x_46_im, x_46_re), t_4)));
} else {
tmp = y_46_im * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(y_46_re * t_1) - t_0)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -7000.0) tmp = Float64(t_2 * sin(t_3)); elseif (y_46_re <= 2.1) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_3)) / (exp(1) ^ t_0)); elseif (y_46_re <= 6.2e+211) tmp = Float64(t_2 * sin(t_4)); elseif (y_46_re <= 3.3e+305) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(fma(y_46_re, atan(x_46_im, x_46_re), t_4)))); else tmp = Float64(y_46_im * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7000.0], N[(t$95$2 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision] / N[Power[E, t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+211], N[(t$95$2 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+305], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * t$95$1), $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}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -7000:\\
\;\;\;\;t_2 \cdot \sin t_3\\
\mathbf{elif}\;y.re \leq 2.1:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_3\right)\right)}{{e}^{t_0}}\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+211}:\\
\;\;\;\;t_2 \cdot \sin t_4\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+305}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_4\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot t_1\\
\end{array}
\end{array}
if y.re < -7e3Initial program 41.2%
Taylor expanded in y.im around 0 85.4%
if -7e3 < y.re < 2.10000000000000009Initial program 40.7%
*-commutative40.7%
exp-diff39.9%
associate-*r/39.9%
associate-/l*39.9%
fma-def39.9%
hypot-def52.5%
*-commutative52.5%
Simplified82.9%
add-cube-cbrt82.9%
exp-prod82.9%
pow282.9%
Applied egg-rr82.9%
Taylor expanded in y.re around 0 84.3%
pow-base-184.3%
exp-prod84.3%
Simplified84.3%
if 2.10000000000000009 < y.re < 6.2000000000000003e211Initial program 37.8%
Taylor expanded in y.re around 0 43.2%
unpow243.2%
unpow243.2%
hypot-def73.1%
Simplified73.1%
if 6.2000000000000003e211 < y.re < 3.29999999999999999e305Initial program 25.0%
exp-diff10.0%
+-rgt-identity10.0%
+-rgt-identity10.0%
exp-to-pow10.0%
hypot-def10.0%
*-commutative10.0%
exp-prod10.0%
+-commutative10.0%
*-commutative10.0%
Simplified20.0%
Taylor expanded in y.im around 0 40.0%
unpow240.0%
unpow240.0%
hypot-def40.0%
Simplified40.0%
fma-udef40.0%
*-commutative40.0%
hypot-udef25.0%
+-commutative25.0%
add-sqr-sqrt5.0%
sqrt-unprod0.0%
pow20.0%
*-commutative0.0%
hypot-udef10.0%
fma-def10.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square85.0%
fma-udef85.0%
log-pow25.0%
+-commutative25.0%
*-commutative25.0%
log-pow85.0%
fma-udef85.0%
hypot-def45.0%
unpow245.0%
unpow245.0%
+-commutative45.0%
unpow245.0%
unpow245.0%
hypot-def85.0%
Simplified85.0%
if 3.29999999999999999e305 < y.re Initial program 0.0%
exp-diff0.0%
+-rgt-identity0.0%
+-rgt-identity0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
+-commutative0.0%
*-commutative0.0%
Simplified100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in y.re around 0 0.0%
unpow20.0%
unpow20.0%
hypot-def3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
Simplified100.0%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= y.re -7000.0)
(* t_2 (sin t_1))
(if (<= y.re 3.3)
(/ (sin (fma (log (hypot x.re x.im)) y.im t_1)) (exp t_0))
(* t_2 (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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -7000.0) {
tmp = t_2 * sin(t_1);
} else if (y_46_re <= 3.3) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) / exp(t_0);
} else {
tmp = t_2 * 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 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (y_46_re <= -7000.0) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_re <= 3.3) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) / exp(t_0)); else tmp = Float64(t_2 * 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[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7000.0], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{if}\;y.re \leq -7000:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\mathbf{elif}\;y.re \leq 3.3:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)}{e^{t_0}}\\
\mathbf{else}:\\
\;\;\;\;t_2 \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 < -7e3Initial program 41.2%
Taylor expanded in y.im around 0 85.4%
if -7e3 < y.re < 3.2999999999999998Initial program 40.7%
*-commutative40.7%
exp-diff39.9%
associate-*r/39.9%
associate-/l*39.9%
fma-def39.9%
hypot-def52.5%
*-commutative52.5%
Simplified82.9%
Taylor expanded in y.re around 0 84.3%
if 3.2999999999999998 < y.re Initial program 32.8%
Taylor expanded in y.re around 0 39.7%
unpow239.7%
unpow239.7%
hypot-def69.0%
Simplified69.0%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im))))
(if (<= y.re -7000.0)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(if (<= y.re 6.9e+31)
(/ (sin (fma t_2 y.im t_1)) (exp t_0))
(*
(pow (hypot x.im x.re) y.re)
(sin (fma y.re (atan2 x.im x.re) (* t_2 y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -7000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else if (y_46_re <= 6.9e+31) {
tmp = sin(fma(t_2, y_46_im, t_1)) / exp(t_0);
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_2 * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -7000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_1)); elseif (y_46_re <= 6.9e+31) tmp = Float64(sin(fma(t_2, y_46_im, t_1)) / exp(t_0)); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_2 * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.9e+31], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$2 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -7000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin t_1\\
\mathbf{elif}\;y.re \leq 6.9 \cdot 10^{+31}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right)}{e^{t_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_2 \cdot y.im\right)\right)\\
\end{array}
\end{array}
if y.re < -7e3Initial program 41.2%
Taylor expanded in y.im around 0 85.4%
if -7e3 < y.re < 6.8999999999999999e31Initial program 41.3%
*-commutative41.3%
exp-diff39.8%
associate-*r/39.8%
associate-/l*39.8%
fma-def39.8%
hypot-def52.1%
*-commutative52.1%
Simplified81.8%
Taylor expanded in y.re around 0 83.2%
if 6.8999999999999999e31 < y.re Initial program 30.9%
exp-diff23.6%
+-rgt-identity23.6%
+-rgt-identity23.6%
exp-to-pow23.6%
hypot-def23.6%
*-commutative23.6%
exp-prod23.6%
+-commutative23.6%
*-commutative23.6%
Simplified45.5%
Taylor expanded in y.im around 0 58.3%
unpow258.3%
unpow258.3%
hypot-def58.3%
Simplified58.3%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -4.1e+86) (not (<= y.im 8.2e+21)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(*
(pow (hypot x.im x.re) y.re)
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.1e+86) || !(y_46_im <= 8.2e+21)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -4.1e+86) || !(y_46_im <= 8.2e+21)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -4.1e+86], N[Not[LessEqual[y$46$im, 8.2e+21]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.1 \cdot 10^{+86} \lor \neg \left(y.im \leq 8.2 \cdot 10^{+21}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\end{array}
\end{array}
if y.im < -4.0999999999999999e86 or 8.2e21 < y.im Initial program 33.5%
Taylor expanded in y.im around 0 57.4%
if -4.0999999999999999e86 < y.im < 8.2e21Initial program 43.5%
exp-diff42.8%
+-rgt-identity42.8%
+-rgt-identity42.8%
exp-to-pow42.8%
hypot-def42.8%
*-commutative42.8%
exp-prod42.0%
+-commutative42.0%
*-commutative42.0%
Simplified84.9%
Taylor expanded in y.im around 0 62.2%
unpow262.2%
unpow262.2%
hypot-def84.8%
Simplified84.8%
Final simplification72.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -9.6e-81)
(* t_0 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 4.2e-129)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_1))
(* t_0 (sin (+ t_1 (* y.im (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -9.6e-81) {
tmp = t_0 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 4.2e-129) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_1);
} else {
tmp = t_0 * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -9.6e-81) {
tmp = t_0 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 4.2e-129) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(t_1);
} else {
tmp = t_0 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -9.6e-81: tmp = t_0 * math.sin((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= 4.2e-129: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(t_1) else: tmp = t_0 * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -9.6e-81) tmp = Float64(t_0 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 4.2e-129) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_1)); else tmp = Float64(t_0 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -9.6e-81) tmp = t_0 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= 4.2e-129) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_1); else tmp = t_0 * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -9.6e-81], N[(t$95$0 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 4.2e-129], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -9.6 \cdot 10^{-81}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{-129}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.5999999999999996e-81Initial program 30.4%
exp-diff24.3%
+-rgt-identity24.3%
+-rgt-identity24.3%
exp-to-pow24.3%
hypot-def24.3%
*-commutative24.3%
exp-prod24.3%
+-commutative24.3%
*-commutative24.3%
Simplified73.0%
Taylor expanded in y.im around 0 49.7%
unpow249.7%
unpow249.7%
hypot-def60.2%
Simplified60.2%
Taylor expanded in x.re around -inf 56.2%
+-commutative56.2%
mul-1-neg56.2%
unsub-neg56.2%
*-commutative56.2%
Simplified56.2%
if -9.5999999999999996e-81 < x.re < 4.2e-129Initial program 48.9%
Taylor expanded in y.im around 0 62.5%
if 4.2e-129 < x.re Initial program 36.3%
exp-diff35.0%
+-rgt-identity35.0%
+-rgt-identity35.0%
exp-to-pow35.0%
hypot-def35.0%
*-commutative35.0%
exp-prod33.4%
+-commutative33.4%
*-commutative33.4%
Simplified69.0%
Taylor expanded in y.im around 0 57.4%
unpow257.4%
unpow257.4%
hypot-def64.4%
Simplified64.4%
Taylor expanded in x.im around 0 63.5%
Final simplification60.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= x.re -5e-309)
(*
t_0
(sin (fma y.re (atan2 x.im x.re) (* y.im (- (log (/ -1.0 x.re)))))))
(* t_0 (sin (+ (* y.re (atan2 x.im x.re)) (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -5e-309) {
tmp = t_0 * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * -log((-1.0 / x_46_re)))));
} else {
tmp = t_0 * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -5e-309) tmp = Float64(t_0 * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * Float64(-log(Float64(-1.0 / x_46_re))))))); else tmp = Float64(t_0 * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * (-N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;t_0 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(-\log \left(\frac{-1}{x.re}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.9999999999999995e-309Initial program 39.1%
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%
Simplified73.8%
Taylor expanded in y.im around 0 48.8%
unpow248.8%
unpow248.8%
hypot-def58.6%
Simplified58.6%
Taylor expanded in x.re around -inf 52.7%
mul-1-neg52.7%
*-commutative52.7%
distribute-rgt-neg-in52.7%
Simplified52.7%
if -4.9999999999999995e-309 < x.re Initial program 39.0%
exp-diff35.6%
+-rgt-identity35.6%
+-rgt-identity35.6%
exp-to-pow35.6%
hypot-def35.6%
*-commutative35.6%
exp-prod34.5%
+-commutative34.5%
*-commutative34.5%
Simplified68.0%
Taylor expanded in y.im around 0 58.6%
unpow258.6%
unpow258.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in x.im around 0 59.1%
Final simplification55.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -5e-309)
(* t_0 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(* t_0 (sin (+ t_1 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-309) {
tmp = t_0 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else {
tmp = t_0 * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-309) {
tmp = t_0 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else {
tmp = t_0 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -5e-309: tmp = t_0 * math.sin((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) else: tmp = t_0 * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -5e-309) tmp = Float64(t_0 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); else tmp = Float64(t_0 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -5e-309) tmp = t_0 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re))))); else tmp = t_0 * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(t$95$0 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.9999999999999995e-309Initial program 39.1%
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%
Simplified73.8%
Taylor expanded in y.im around 0 48.8%
unpow248.8%
unpow248.8%
hypot-def58.6%
Simplified58.6%
Taylor expanded in x.re around -inf 52.7%
+-commutative52.7%
mul-1-neg52.7%
unsub-neg52.7%
*-commutative52.7%
Simplified52.7%
if -4.9999999999999995e-309 < x.re Initial program 39.0%
exp-diff35.6%
+-rgt-identity35.6%
+-rgt-identity35.6%
exp-to-pow35.6%
hypot-def35.6%
*-commutative35.6%
exp-prod34.5%
+-commutative34.5%
*-commutative34.5%
Simplified68.0%
Taylor expanded in y.im around 0 58.6%
unpow258.6%
unpow258.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in x.im around 0 59.1%
Final simplification55.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -9.5e-109) (not (<= y.re 2.5e-115))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (log1p (expm1 (sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.5e-109) || !(y_46_re <= 2.5e-115)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = log1p(expm1(sin((y_46_im * log(hypot(x_46_im, x_46_re))))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -9.5e-109) || !(y_46_re <= 2.5e-115)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.log1p(Math.expm1(Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -9.5e-109) or not (y_46_re <= 2.5e-115): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.log1p(math.expm1(math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -9.5e-109) || !(y_46_re <= 2.5e-115)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = log1p(expm1(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_] := If[Or[LessEqual[y$46$re, -9.5e-109], N[Not[LessEqual[y$46$re, 2.5e-115]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-109} \lor \neg \left(y.re \leq 2.5 \cdot 10^{-115}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -9.49999999999999933e-109 or 2.5000000000000001e-115 < y.re Initial program 40.3%
exp-diff33.6%
+-rgt-identity33.6%
+-rgt-identity33.6%
exp-to-pow33.6%
hypot-def33.6%
*-commutative33.6%
exp-prod32.9%
+-commutative32.9%
*-commutative32.9%
Simplified66.6%
Taylor expanded in y.im around 0 61.0%
unpow261.0%
unpow261.0%
hypot-def67.6%
Simplified67.6%
Taylor expanded in y.re around inf 61.7%
if -9.49999999999999933e-109 < y.re < 2.5000000000000001e-115Initial program 36.1%
exp-diff36.1%
+-rgt-identity36.1%
+-rgt-identity36.1%
exp-to-pow36.1%
hypot-def36.1%
*-commutative36.1%
exp-prod36.0%
+-commutative36.0%
*-commutative36.0%
Simplified81.5%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def44.9%
Simplified44.9%
Taylor expanded in y.re around 0 20.1%
unpow220.1%
unpow220.1%
hypot-def39.9%
*-commutative39.9%
Simplified39.9%
log1p-expm1-u39.9%
*-commutative39.9%
Applied egg-rr39.9%
Final simplification55.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -3e-110) (not (<= y.re 3.2e-116))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (sin (* y.im (log (hypot x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3e-110) || !(y_46_re <= 3.2e-116)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * 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))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3e-110) || !(y_46_re <= 3.2e-116)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3e-110) or not (y_46_re <= 3.2e-116): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3e-110) || !(y_46_re <= 3.2e-116)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3e-110) || ~((y_46_re <= 3.2e-116))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * 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)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3e-110], N[Not[LessEqual[y$46$re, 3.2e-116]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3 \cdot 10^{-110} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-116}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.99999999999999986e-110 or 3.20000000000000009e-116 < y.re Initial program 40.3%
exp-diff33.6%
+-rgt-identity33.6%
+-rgt-identity33.6%
exp-to-pow33.6%
hypot-def33.6%
*-commutative33.6%
exp-prod32.9%
+-commutative32.9%
*-commutative32.9%
Simplified66.6%
Taylor expanded in y.im around 0 61.0%
unpow261.0%
unpow261.0%
hypot-def67.6%
Simplified67.6%
Taylor expanded in y.re around inf 61.7%
if -2.99999999999999986e-110 < y.re < 3.20000000000000009e-116Initial program 36.1%
exp-diff36.1%
+-rgt-identity36.1%
+-rgt-identity36.1%
exp-to-pow36.1%
hypot-def36.1%
*-commutative36.1%
exp-prod36.0%
+-commutative36.0%
*-commutative36.0%
Simplified81.5%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def44.9%
Simplified44.9%
Taylor expanded in y.re around 0 20.1%
unpow220.1%
unpow220.1%
hypot-def39.9%
*-commutative39.9%
Simplified39.9%
Final simplification55.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -7000.0)
(- (sin (log (pow (/ -1.0 x.im) y.im))))
(if (<= y.re 3.15e-258)
(sin (* y.im (log (hypot x.im x.re))))
(* y.im (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -7000.0) {
tmp = -sin(log(pow((-1.0 / x_46_im), y_46_im)));
} else if (y_46_re <= 3.15e-258) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -7000.0) {
tmp = -Math.sin(Math.log(Math.pow((-1.0 / x_46_im), y_46_im)));
} else if (y_46_re <= 3.15e-258) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -7000.0: tmp = -math.sin(math.log(math.pow((-1.0 / x_46_im), y_46_im))) elif y_46_re <= 3.15e-258: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = y_46_im * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -7000.0) tmp = Float64(-sin(log((Float64(-1.0 / x_46_im) ^ y_46_im)))); elseif (y_46_re <= 3.15e-258) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(y_46_im * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -7000.0) tmp = -sin(log(((-1.0 / x_46_im) ^ y_46_im))); elseif (y_46_re <= 3.15e-258) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -7000.0], (-N[Sin[N[Log[N[Power[N[(-1.0 / x$46$im), $MachinePrecision], y$46$im], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), If[LessEqual[y$46$re, 3.15e-258], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7000:\\
\;\;\;\;-\sin \log \left({\left(\frac{-1}{x.im}\right)}^{y.im}\right)\\
\mathbf{elif}\;y.re \leq 3.15 \cdot 10^{-258}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\end{array}
\end{array}
if y.re < -7e3Initial program 41.2%
exp-diff32.4%
+-rgt-identity32.4%
+-rgt-identity32.4%
exp-to-pow32.4%
hypot-def32.4%
*-commutative32.4%
exp-prod30.9%
+-commutative30.9%
*-commutative30.9%
Simplified67.6%
Taylor expanded in y.im around 0 81.1%
unpow281.1%
unpow281.1%
hypot-def81.1%
Simplified81.1%
Taylor expanded in y.re around 0 1.5%
unpow21.5%
unpow21.5%
hypot-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x.im around -inf 1.5%
mul-1-neg1.5%
*-commutative1.5%
sin-neg1.5%
rem-log-exp17.7%
*-commutative17.7%
exp-to-pow17.7%
Simplified17.7%
if -7e3 < y.re < 3.14999999999999987e-258Initial program 37.4%
exp-diff36.1%
+-rgt-identity36.1%
+-rgt-identity36.1%
exp-to-pow36.1%
hypot-def36.1%
*-commutative36.1%
exp-prod36.0%
+-commutative36.0%
*-commutative36.0%
Simplified84.3%
Taylor expanded in y.im around 0 40.8%
unpow240.8%
unpow240.8%
hypot-def53.7%
Simplified53.7%
Taylor expanded in y.re around 0 17.7%
unpow217.7%
unpow217.7%
hypot-def35.4%
*-commutative35.4%
Simplified35.4%
if 3.14999999999999987e-258 < y.re Initial program 38.8%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod34.2%
+-commutative34.2%
*-commutative34.2%
Simplified64.0%
Taylor expanded in y.im around 0 45.1%
unpow245.1%
unpow245.1%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.re around 0 4.8%
unpow24.8%
unpow24.8%
hypot-def8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in y.im around 0 22.3%
unpow222.3%
unpow222.3%
Simplified22.3%
Final simplification25.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 6.7e-259) (sin (* y.im (log (hypot x.im x.re)))) (* y.im (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 6.7e-259) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 6.7e-259) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_im * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 6.7e-259: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = y_46_im * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 6.7e-259) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(y_46_im * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 6.7e-259) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 6.7e-259], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 6.7 \cdot 10^{-259}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\end{array}
\end{array}
if y.re < 6.69999999999999954e-259Initial program 39.2%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod33.6%
+-commutative33.6%
*-commutative33.6%
Simplified76.5%
Taylor expanded in y.im around 0 59.7%
unpow259.7%
unpow259.7%
hypot-def66.6%
Simplified66.6%
Taylor expanded in y.re around 0 10.1%
unpow210.1%
unpow210.1%
hypot-def20.5%
*-commutative20.5%
Simplified20.5%
if 6.69999999999999954e-259 < y.re Initial program 38.8%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod34.2%
+-commutative34.2%
*-commutative34.2%
Simplified64.0%
Taylor expanded in y.im around 0 45.1%
unpow245.1%
unpow245.1%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.re around 0 4.8%
unpow24.8%
unpow24.8%
hypot-def8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in y.im around 0 22.3%
unpow222.3%
unpow222.3%
Simplified22.3%
Final simplification21.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 2.6e-258) (* y.im (log (hypot x.im x.re))) (* y.im (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 2.6e-258) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 2.6e-258) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = y_46_im * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 2.6e-258: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = y_46_im * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 2.6e-258) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(y_46_im * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 2.6e-258) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 2.6e-258], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 2.6 \cdot 10^{-258}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\end{array}
\end{array}
if y.re < 2.60000000000000018e-258Initial program 39.2%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod33.6%
+-commutative33.6%
*-commutative33.6%
Simplified76.5%
Taylor expanded in y.im around 0 59.7%
unpow259.7%
unpow259.7%
hypot-def66.6%
Simplified66.6%
Taylor expanded in y.re around 0 10.1%
unpow210.1%
unpow210.1%
hypot-def20.5%
*-commutative20.5%
Simplified20.5%
Taylor expanded in y.im around 0 12.3%
unpow212.3%
unpow212.3%
hypot-def19.3%
Simplified19.3%
if 2.60000000000000018e-258 < y.re Initial program 38.8%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod34.2%
+-commutative34.2%
*-commutative34.2%
Simplified64.0%
Taylor expanded in y.im around 0 45.1%
unpow245.1%
unpow245.1%
hypot-def53.3%
Simplified53.3%
Taylor expanded in y.re around 0 4.8%
unpow24.8%
unpow24.8%
hypot-def8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in y.im around 0 22.3%
unpow222.3%
unpow222.3%
Simplified22.3%
Final simplification20.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 1.45e-154) (sin (* y.im (log x.re))) (sin (* y.im (log x.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 1.45e-154) {
tmp = sin((y_46_im * log(x_46_re)));
} else {
tmp = sin((y_46_im * log(x_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 1.45d-154) then
tmp = sin((y_46im * log(x_46re)))
else
tmp = sin((y_46im * log(x_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 1.45e-154) {
tmp = Math.sin((y_46_im * Math.log(x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 1.45e-154: tmp = math.sin((y_46_im * math.log(x_46_re))) else: tmp = math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= 1.45e-154) tmp = sin(Float64(y_46_im * log(x_46_re))); else tmp = sin(Float64(y_46_im * log(x_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 1.45e-154) tmp = sin((y_46_im * log(x_46_re))); else tmp = sin((y_46_im * log(x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 1.45e-154], N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 1.45 \cdot 10^{-154}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < 1.45e-154Initial program 38.2%
exp-diff34.7%
+-rgt-identity34.7%
+-rgt-identity34.7%
exp-to-pow34.7%
hypot-def34.7%
*-commutative34.7%
exp-prod33.9%
+-commutative33.9%
*-commutative33.9%
Simplified69.2%
Taylor expanded in y.im around 0 52.2%
unpow252.2%
unpow252.2%
hypot-def60.7%
Simplified60.7%
Taylor expanded in y.re around 0 8.1%
unpow28.1%
unpow28.1%
hypot-def15.8%
*-commutative15.8%
Simplified15.8%
Taylor expanded in x.im around 0 7.1%
if 1.45e-154 < x.im Initial program 40.6%
exp-diff33.6%
+-rgt-identity33.6%
+-rgt-identity33.6%
exp-to-pow33.6%
hypot-def33.6%
*-commutative33.6%
exp-prod33.6%
+-commutative33.6%
*-commutative33.6%
Simplified74.7%
Taylor expanded in y.im around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def60.9%
Simplified60.9%
Taylor expanded in y.re around 0 7.2%
unpow27.2%
unpow27.2%
hypot-def14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x.re around 0 12.6%
Final simplification9.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log (hypot x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * log(hypot(x_46_im, x_46_re));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * math.log(math.hypot(x_46_im, x_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(hypot(x_46_im, x_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)
\end{array}
Initial program 39.0%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod33.8%
+-commutative33.8%
*-commutative33.8%
Simplified71.1%
Taylor expanded in y.im around 0 53.4%
unpow253.4%
unpow253.4%
hypot-def60.8%
Simplified60.8%
Taylor expanded in y.re around 0 7.8%
unpow27.8%
unpow27.8%
hypot-def15.3%
*-commutative15.3%
Simplified15.3%
Taylor expanded in y.im around 0 16.7%
unpow216.7%
unpow216.7%
hypot-def14.6%
Simplified14.6%
Final simplification14.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.im (log x.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_im * log(x_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = sin((y_46im * log(x_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_im * Math.log(x_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_im * math.log(x_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_im * log(x_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_im * log(x_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.im \cdot \log x.im\right)
\end{array}
Initial program 39.0%
exp-diff34.3%
+-rgt-identity34.3%
+-rgt-identity34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod33.8%
+-commutative33.8%
*-commutative33.8%
Simplified71.1%
Taylor expanded in y.im around 0 53.4%
unpow253.4%
unpow253.4%
hypot-def60.8%
Simplified60.8%
Taylor expanded in y.re around 0 7.8%
unpow27.8%
unpow27.8%
hypot-def15.3%
*-commutative15.3%
Simplified15.3%
Taylor expanded in x.re around 0 4.7%
Final simplification4.7%
herbie shell --seed 2023189
(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)))))