
(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.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (cbrt (log (hypot x.re x.im))))
(t_4 (cbrt t_0)))
(if (<= x.im -1.62e-208)
(* (exp (- (* (log (- x.im)) y.re) t_2)) (sin (fma y.im t_0 t_1)))
(if (<= x.im 1.25e+127)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
(sin
(+
(*
y.im
(log
(pow (pow (exp (cbrt (pow t_3 4.0))) (cbrt (pow t_3 2.0))) t_3)))
t_1)))
(*
(exp (- (* y.re (log x.im)) t_2))
(sin (fma y.re (atan2 x.im x.re) (* y.im (* t_4 (pow t_4 2.0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = cbrt(log(hypot(x_46_re, x_46_im)));
double t_4 = cbrt(t_0);
double tmp;
if (x_46_im <= -1.62e-208) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1));
} else if (x_46_im <= 1.25e+127) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * sin(((y_46_im * log(pow(pow(exp(cbrt(pow(t_3, 4.0))), cbrt(pow(t_3, 2.0))), t_3))) + t_1));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * (t_4 * pow(t_4, 2.0)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = cbrt(log(hypot(x_46_re, x_46_im))) t_4 = cbrt(t_0) tmp = 0.0 if (x_46_im <= -1.62e-208) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1))); elseif (x_46_im <= 1.25e+127) 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_2)) * sin(Float64(Float64(y_46_im * log(((exp(cbrt((t_3 ^ 4.0))) ^ cbrt((t_3 ^ 2.0))) ^ t_3))) + t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * Float64(t_4 * (t_4 ^ 2.0)))))); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$0, 1/3], $MachinePrecision]}, If[LessEqual[x$46$im, -1.62e-208], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.25e+127], 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$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$im * N[Log[N[Power[N[Power[N[Exp[N[Power[N[Power[t$95$3, 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$3, 2.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision], t$95$3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$4 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := \sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\\
t_4 := \sqrt[3]{t_0}\\
\mathbf{if}\;x.im \leq -1.62 \cdot 10^{-208}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_2} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, t_1\right)\right)\\
\mathbf{elif}\;x.im \leq 1.25 \cdot 10^{+127}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot \sin \left(y.im \cdot \log \left({\left({\left(e^{\sqrt[3]{{t_3}^{4}}}\right)}^{\left(\sqrt[3]{{t_3}^{2}}\right)}\right)}^{t_3}\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(t_4 \cdot {t_4}^{2}\right)\right)\right)\\
\end{array}
\end{array}
if x.im < -1.6200000000000001e-208Initial program 37.8%
Taylor expanded in x.im around -inf 36.1%
mul-1-neg36.1%
Simplified36.1%
Taylor expanded in y.im around inf 36.1%
fma-def36.1%
unpow236.1%
unpow236.1%
hypot-def77.5%
Simplified77.5%
if -1.6200000000000001e-208 < x.im < 1.2500000000000001e127Initial program 55.8%
add-exp-log55.8%
add-cube-cbrt58.5%
exp-prod58.5%
pow258.5%
hypot-def58.5%
hypot-def77.5%
Applied egg-rr77.5%
add-cube-cbrt75.5%
exp-prod75.4%
cbrt-unprod78.3%
pow-prod-up78.5%
metadata-eval78.5%
Applied egg-rr78.5%
if 1.2500000000000001e127 < x.im Initial program 10.5%
add-exp-log10.5%
add-cube-cbrt13.2%
exp-prod13.2%
pow213.2%
hypot-def13.2%
hypot-def56.3%
Applied egg-rr56.3%
Taylor expanded in y.im around inf 53.7%
fma-def53.7%
*-commutative53.7%
log-pow53.7%
unpow1/351.0%
hypot-def10.5%
unpow210.5%
unpow210.5%
+-commutative10.5%
unpow210.5%
unpow210.5%
hypot-def51.0%
Simplified56.3%
Taylor expanded in x.re around 0 91.7%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (cbrt t_0))
(t_2 (sin (fma y.re (atan2 x.im x.re) (* y.im (* t_1 (pow t_1 2.0))))))
(t_3 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -3.2e-209)
(*
(exp (- (* (log (- x.im)) y.re) t_3))
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
(if (<= x.im 2.05e-16)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_3))
t_2)
(* (exp (- (* y.re (log x.im)) t_3)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = cbrt(t_0);
double t_2 = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * (t_1 * pow(t_1, 2.0)))));
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -3.2e-209) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_3)) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))));
} else if (x_46_im <= 2.05e-16) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3)) * t_2;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_3)) * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = cbrt(t_0) t_2 = sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * Float64(t_1 * (t_1 ^ 2.0))))) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -3.2e-209) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_3)) * sin(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (x_46_im <= 2.05e-16) 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_3)) * t_2); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$1 * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -3.2e-209], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.05e-16], 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$3), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sqrt[3]{t_0}\\
t_2 := \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(t_1 \cdot {t_1}^{2}\right)\right)\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -3.2 \cdot 10^{-209}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_3} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;x.im \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_3} \cdot t_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_3} \cdot t_2\\
\end{array}
\end{array}
if x.im < -3.2000000000000001e-209Initial program 37.8%
Taylor expanded in x.im around -inf 36.1%
mul-1-neg36.1%
Simplified36.1%
Taylor expanded in y.im around inf 36.1%
fma-def36.1%
unpow236.1%
unpow236.1%
hypot-def77.5%
Simplified77.5%
if -3.2000000000000001e-209 < x.im < 2.05000000000000003e-16Initial program 54.4%
add-exp-log54.4%
add-cube-cbrt56.7%
exp-prod56.7%
pow256.7%
hypot-def56.8%
hypot-def78.7%
Applied egg-rr78.7%
Taylor expanded in y.im around inf 45.7%
fma-def45.7%
*-commutative45.7%
log-pow45.7%
unpow1/345.8%
hypot-def28.3%
unpow228.3%
unpow228.3%
+-commutative28.3%
unpow228.3%
unpow228.3%
hypot-def45.8%
Simplified78.7%
if 2.05000000000000003e-16 < x.im Initial program 29.4%
add-exp-log29.4%
add-cube-cbrt32.5%
exp-prod32.5%
pow232.5%
hypot-def32.5%
hypot-def62.7%
Applied egg-rr62.7%
Taylor expanded in y.im around inf 61.1%
fma-def61.1%
*-commutative61.1%
log-pow61.1%
unpow1/359.5%
hypot-def29.3%
unpow229.3%
unpow229.3%
+-commutative29.3%
unpow229.3%
unpow229.3%
hypot-def59.5%
Simplified62.7%
Taylor expanded in x.re around 0 84.8%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (cbrt t_0))
(t_2 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -3.75e-208)
(*
(exp (- (* (log (- x.im)) y.re) t_2))
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
(if (<= x.im 1.2e+74)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
(sin (fma y.re (atan2 x.im x.re) (* y.im t_0))))
(*
(exp (- (* y.re (log x.im)) t_2))
(sin (fma y.re (atan2 x.im x.re) (* y.im (* t_1 (pow t_1 2.0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = cbrt(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -3.75e-208) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))));
} else if (x_46_im <= 1.2e+74) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_0)));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * (t_1 * pow(t_1, 2.0)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = cbrt(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -3.75e-208) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (x_46_im <= 1.2e+74) 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_2)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_0)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * Float64(t_1 * (t_1 ^ 2.0)))))); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -3.75e-208], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.2e+74], 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$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$1 * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sqrt[3]{t_0}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -3.75 \cdot 10^{-208}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_2} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;x.im \leq 1.2 \cdot 10^{+74}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(t_1 \cdot {t_1}^{2}\right)\right)\right)\\
\end{array}
\end{array}
if x.im < -3.7499999999999999e-208Initial program 37.8%
Taylor expanded in x.im around -inf 36.1%
mul-1-neg36.1%
Simplified36.1%
Taylor expanded in y.im around inf 36.1%
fma-def36.1%
unpow236.1%
unpow236.1%
hypot-def77.5%
Simplified77.5%
if -3.7499999999999999e-208 < x.im < 1.20000000000000004e74Initial program 53.3%
add-exp-log53.3%
add-cube-cbrt55.3%
exp-prod55.3%
pow255.3%
hypot-def55.3%
hypot-def76.8%
Applied egg-rr76.8%
Taylor expanded in y.im around inf 47.9%
fma-def47.9%
*-commutative47.9%
log-pow47.9%
unpow1/346.8%
hypot-def28.2%
unpow228.2%
unpow228.2%
+-commutative28.2%
unpow228.2%
unpow228.2%
hypot-def46.8%
Simplified76.8%
Taylor expanded in y.re around inf 74.8%
if 1.20000000000000004e74 < x.im Initial program 25.9%
add-exp-log25.9%
add-cube-cbrt29.9%
exp-prod29.9%
pow229.9%
hypot-def29.9%
hypot-def62.7%
Applied egg-rr62.7%
Taylor expanded in y.im around inf 60.5%
fma-def60.5%
*-commutative60.5%
log-pow60.5%
unpow1/360.6%
hypot-def29.8%
unpow229.8%
unpow229.8%
+-commutative29.8%
unpow229.8%
unpow229.8%
hypot-def60.6%
Simplified62.7%
Taylor expanded in x.re around 0 89.6%
Final simplification78.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -3.7e-209)
(* (exp (- (* (log (- x.im)) y.re) t_2)) (sin (fma y.im t_0 t_1)))
(if (<= x.im 2.1e+126)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
(sin (fma y.re (atan2 x.im x.re) (* y.im t_0))))
(* (exp (- (* y.re (log x.im)) t_2)) (sin (pow (cbrt t_1) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -3.7e-209) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1));
} else if (x_46_im <= 2.1e+126) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_0)));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(pow(cbrt(t_1), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -3.7e-209) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1))); elseif (x_46_im <= 2.1e+126) 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_2)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_0)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin((cbrt(t_1) ^ 3.0))); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -3.7e-209], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.1e+126], 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$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -3.7 \cdot 10^{-209}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_2} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, t_1\right)\right)\\
\mathbf{elif}\;x.im \leq 2.1 \cdot 10^{+126}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -3.6999999999999998e-209Initial program 37.8%
Taylor expanded in x.im around -inf 36.1%
mul-1-neg36.1%
Simplified36.1%
Taylor expanded in y.im around inf 36.1%
fma-def36.1%
unpow236.1%
unpow236.1%
hypot-def77.5%
Simplified77.5%
if -3.6999999999999998e-209 < x.im < 2.0999999999999999e126Initial program 56.3%
add-exp-log56.3%
add-cube-cbrt59.0%
exp-prod59.0%
pow259.0%
hypot-def59.1%
hypot-def78.3%
Applied egg-rr78.3%
Taylor expanded in y.im around inf 52.3%
fma-def52.3%
*-commutative52.3%
log-pow52.3%
unpow1/351.4%
hypot-def34.8%
unpow234.8%
unpow234.8%
+-commutative34.8%
unpow234.8%
unpow234.8%
hypot-def51.4%
Simplified78.3%
Taylor expanded in y.re around inf 75.5%
if 2.0999999999999999e126 < x.im Initial program 10.3%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in x.re around 0 75.1%
*-commutative75.1%
add-cube-cbrt77.6%
pow380.2%
Applied egg-rr80.2%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -4.4e-209)
(* (exp (- (* (log (- x.im)) y.re) t_2)) (sin (fma y.im t_0 t_1)))
(if (<= x.im 2.6e+78)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
(sin (* y.im t_0)))
(* (exp (- (* y.re (log x.im)) t_2)) (sin (pow (cbrt t_1) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -4.4e-209) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1));
} else if (x_46_im <= 2.6e+78) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * sin((y_46_im * t_0));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(pow(cbrt(t_1), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -4.4e-209) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_2)) * sin(fma(y_46_im, t_0, t_1))); elseif (x_46_im <= 2.6e+78) 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_2)) * sin(Float64(y_46_im * t_0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin((cbrt(t_1) ^ 3.0))); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -4.4e-209], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.6e+78], 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$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -4.4 \cdot 10^{-209}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_2} \cdot \sin \left(\mathsf{fma}\left(y.im, t_0, t_1\right)\right)\\
\mathbf{elif}\;x.im \leq 2.6 \cdot 10^{+78}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot \sin \left(y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -4.40000000000000019e-209Initial program 37.8%
Taylor expanded in x.im around -inf 36.1%
mul-1-neg36.1%
Simplified36.1%
Taylor expanded in y.im around inf 36.1%
fma-def36.1%
unpow236.1%
unpow236.1%
hypot-def77.5%
Simplified77.5%
if -4.40000000000000019e-209 < x.im < 2.6e78Initial program 53.8%
Taylor expanded in y.re around 0 48.8%
unpow26.7%
unpow26.7%
hypot-def8.0%
Simplified69.0%
if 2.6e78 < x.im Initial program 24.4%
Taylor expanded in y.im around 0 60.1%
Taylor expanded in x.re around 0 74.2%
*-commutative74.2%
add-cube-cbrt76.3%
pow378.3%
Applied egg-rr78.3%
Final simplification74.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (- x.im)))
(t_2 (sin (+ t_0 (* t_1 y.im))))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_3))))
(if (<= x.im -51000000000.0)
(* (exp (- (* t_1 y.re) t_3)) t_2)
(if (<= x.im -6.8e-90)
(* t_4 t_0)
(if (<= x.im -5.9e-180)
(* t_4 t_2)
(if (<= x.im 1.02e+85)
(* t_4 (sin (* y.im (log (hypot x.im x.re)))))
(*
(exp (- (* y.re (log x.im)) t_3))
(sin (pow (cbrt t_0) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_im);
double t_2 = sin((t_0 + (t_1 * y_46_im)));
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3));
double tmp;
if (x_46_im <= -51000000000.0) {
tmp = exp(((t_1 * y_46_re) - t_3)) * t_2;
} else if (x_46_im <= -6.8e-90) {
tmp = t_4 * t_0;
} else if (x_46_im <= -5.9e-180) {
tmp = t_4 * t_2;
} else if (x_46_im <= 1.02e+85) {
tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_3)) * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(-x_46_im);
double t_2 = Math.sin((t_0 + (t_1 * y_46_im)));
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3));
double tmp;
if (x_46_im <= -51000000000.0) {
tmp = Math.exp(((t_1 * y_46_re) - t_3)) * t_2;
} else if (x_46_im <= -6.8e-90) {
tmp = t_4 * t_0;
} else if (x_46_im <= -5.9e-180) {
tmp = t_4 * t_2;
} else if (x_46_im <= 1.02e+85) {
tmp = t_4 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_3)) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(Float64(-x_46_im)) t_2 = sin(Float64(t_0 + Float64(t_1 * y_46_im))) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_3)) tmp = 0.0 if (x_46_im <= -51000000000.0) tmp = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_3)) * t_2); elseif (x_46_im <= -6.8e-90) tmp = Float64(t_4 * t_0); elseif (x_46_im <= -5.9e-180) tmp = Float64(t_4 * t_2); elseif (x_46_im <= 1.02e+85) tmp = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3)) * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[(-x$46$im)], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(t$95$0 + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = 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$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -51000000000.0], N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$im, -6.8e-90], N[(t$95$4 * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, -5.9e-180], N[(t$95$4 * t$95$2), $MachinePrecision], If[LessEqual[x$46$im, 1.02e+85], N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.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(-x.im\right)\\
t_2 := \sin \left(t_0 + t_1 \cdot y.im\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_3}\\
\mathbf{if}\;x.im \leq -51000000000:\\
\;\;\;\;e^{t_1 \cdot y.re - t_3} \cdot t_2\\
\mathbf{elif}\;x.im \leq -6.8 \cdot 10^{-90}:\\
\;\;\;\;t_4 \cdot t_0\\
\mathbf{elif}\;x.im \leq -5.9 \cdot 10^{-180}:\\
\;\;\;\;t_4 \cdot t_2\\
\mathbf{elif}\;x.im \leq 1.02 \cdot 10^{+85}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_3} \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -5.1e10Initial program 31.2%
Taylor expanded in x.im around -inf 31.2%
mul-1-neg31.2%
Simplified31.2%
Taylor expanded in x.im around -inf 86.5%
mul-1-neg31.2%
Simplified86.5%
if -5.1e10 < x.im < -6.79999999999999988e-90Initial program 42.2%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in y.re around 0 54.4%
if -6.79999999999999988e-90 < x.im < -5.9000000000000003e-180Initial program 63.9%
Taylor expanded in x.im around -inf 74.3%
mul-1-neg64.0%
Simplified74.3%
if -5.9000000000000003e-180 < x.im < 1.02e85Initial program 51.1%
Taylor expanded in y.re around 0 46.3%
unpow26.3%
unpow26.3%
hypot-def10.6%
Simplified67.6%
if 1.02e85 < x.im Initial program 24.4%
Taylor expanded in y.im around 0 60.1%
Taylor expanded in x.re around 0 74.2%
*-commutative74.2%
add-cube-cbrt76.3%
pow378.3%
Applied egg-rr78.3%
Final simplification73.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (- x.im)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (* (exp (- (* t_1 y.re) t_2)) (sin (+ t_0 (* t_1 y.im)))))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(if (<= x.im -22500000000.0)
t_3
(if (<= x.im -3.2e-93)
(* t_4 t_0)
(if (<= x.im -2.26e-181)
t_3
(if (<= x.im 2.25e+84)
(* t_4 (sin (* y.im (log (hypot x.im x.re)))))
(*
(exp (- (* y.re (log x.im)) t_2))
(sin (pow (cbrt t_0) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_im);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((t_1 * y_46_re) - t_2)) * sin((t_0 + (t_1 * y_46_im)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_im <= -22500000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.2e-93) {
tmp = t_4 * t_0;
} else if (x_46_im <= -2.26e-181) {
tmp = t_3;
} else if (x_46_im <= 2.25e+84) {
tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(-x_46_im);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((t_1 * y_46_re) - t_2)) * Math.sin((t_0 + (t_1 * y_46_im)));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_im <= -22500000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.2e-93) {
tmp = t_4 * t_0;
} else if (x_46_im <= -2.26e-181) {
tmp = t_3;
} else if (x_46_im <= 2.25e+84) {
tmp = t_4 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2)) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(Float64(-x_46_im)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_2)) * sin(Float64(t_0 + Float64(t_1 * y_46_im)))) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2)) tmp = 0.0 if (x_46_im <= -22500000000.0) tmp = t_3; elseif (x_46_im <= -3.2e-93) tmp = Float64(t_4 * t_0); elseif (x_46_im <= -2.26e-181) tmp = t_3; elseif (x_46_im <= 2.25e+84) tmp = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[(-x$46$im)], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -22500000000.0], t$95$3, If[LessEqual[x$46$im, -3.2e-93], N[(t$95$4 * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, -2.26e-181], t$95$3, If[LessEqual[x$46$im, 2.25e+84], N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.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(-x.im\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{t_1 \cdot y.re - t_2} \cdot \sin \left(t_0 + t_1 \cdot y.im\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
\mathbf{if}\;x.im \leq -22500000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq -3.2 \cdot 10^{-93}:\\
\;\;\;\;t_4 \cdot t_0\\
\mathbf{elif}\;x.im \leq -2.26 \cdot 10^{-181}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 2.25 \cdot 10^{+84}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -2.25e10 or -3.1999999999999999e-93 < x.im < -2.25999999999999993e-181Initial program 38.7%
Taylor expanded in x.im around -inf 38.7%
mul-1-neg38.7%
Simplified38.7%
Taylor expanded in x.im around -inf 83.7%
mul-1-neg38.7%
Simplified83.7%
if -2.25e10 < x.im < -3.1999999999999999e-93Initial program 42.2%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in y.re around 0 54.4%
if -2.25999999999999993e-181 < x.im < 2.2499999999999999e84Initial program 51.1%
Taylor expanded in y.re around 0 46.3%
unpow26.3%
unpow26.3%
hypot-def10.6%
Simplified67.6%
if 2.2499999999999999e84 < x.im Initial program 24.4%
Taylor expanded in y.im around 0 60.1%
Taylor expanded in x.re around 0 74.2%
*-commutative74.2%
add-cube-cbrt76.3%
pow378.3%
Applied egg-rr78.3%
Final simplification73.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (- x.im)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (* (exp (- (* t_1 y.re) t_2)) (sin (+ t_0 (* t_1 y.im)))))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(if (<= x.im -122000000000.0)
t_3
(if (<= x.im -3.8e-90)
(* t_4 t_0)
(if (<= x.im -1.45e-152)
t_3
(if (<= x.im 6.2e-28)
(* t_4 (sin t_0))
(*
(exp (- (* y.re (log x.im)) t_2))
(sin (pow (cbrt t_0) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_im);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((t_1 * y_46_re) - t_2)) * sin((t_0 + (t_1 * y_46_im)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_im <= -122000000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.8e-90) {
tmp = t_4 * t_0;
} else if (x_46_im <= -1.45e-152) {
tmp = t_3;
} else if (x_46_im <= 6.2e-28) {
tmp = t_4 * sin(t_0);
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(-x_46_im);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((t_1 * y_46_re) - t_2)) * Math.sin((t_0 + (t_1 * y_46_im)));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_im <= -122000000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.8e-90) {
tmp = t_4 * t_0;
} else if (x_46_im <= -1.45e-152) {
tmp = t_3;
} else if (x_46_im <= 6.2e-28) {
tmp = t_4 * Math.sin(t_0);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2)) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(Float64(-x_46_im)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_2)) * sin(Float64(t_0 + Float64(t_1 * y_46_im)))) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2)) tmp = 0.0 if (x_46_im <= -122000000000.0) tmp = t_3; elseif (x_46_im <= -3.8e-90) tmp = Float64(t_4 * t_0); elseif (x_46_im <= -1.45e-152) tmp = t_3; elseif (x_46_im <= 6.2e-28) tmp = Float64(t_4 * sin(t_0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[(-x$46$im)], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -122000000000.0], t$95$3, If[LessEqual[x$46$im, -3.8e-90], N[(t$95$4 * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, -1.45e-152], t$95$3, If[LessEqual[x$46$im, 6.2e-28], N[(t$95$4 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.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(-x.im\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{t_1 \cdot y.re - t_2} \cdot \sin \left(t_0 + t_1 \cdot y.im\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
\mathbf{if}\;x.im \leq -122000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq -3.8 \cdot 10^{-90}:\\
\;\;\;\;t_4 \cdot t_0\\
\mathbf{elif}\;x.im \leq -1.45 \cdot 10^{-152}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 6.2 \cdot 10^{-28}:\\
\;\;\;\;t_4 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -1.22e11 or -3.8e-90 < x.im < -1.4500000000000001e-152Initial program 40.7%
Taylor expanded in x.im around -inf 40.7%
mul-1-neg40.7%
Simplified40.7%
Taylor expanded in x.im around -inf 85.4%
mul-1-neg40.7%
Simplified85.4%
if -1.22e11 < x.im < -3.8e-90Initial program 42.2%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in y.re around 0 54.4%
if -1.4500000000000001e-152 < x.im < 6.19999999999999984e-28Initial program 49.0%
Taylor expanded in y.im around 0 58.7%
if 6.19999999999999984e-28 < x.im Initial program 30.1%
Taylor expanded in y.im around 0 56.6%
Taylor expanded in x.re around 0 67.6%
*-commutative67.6%
add-cube-cbrt69.1%
pow370.7%
Applied egg-rr70.7%
Final simplification69.4%
(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 (- x.im)))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4 (* (exp (- (* t_2 y.re) t_3)) (sin (+ t_0 (* t_2 y.im)))))
(t_5
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_3))))
(if (<= x.im -51000000000.0)
t_4
(if (<= x.im -2.2e-90)
(* t_5 t_0)
(if (<= x.im -1.25e-149)
t_4
(if (<= x.im 3.7e-28)
(* t_5 t_1)
(* (exp (- (* y.re (log x.im)) t_3)) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = log(-x_46_im);
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((t_2 * y_46_re) - t_3)) * sin((t_0 + (t_2 * y_46_im)));
double t_5 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3));
double tmp;
if (x_46_im <= -51000000000.0) {
tmp = t_4;
} else if (x_46_im <= -2.2e-90) {
tmp = t_5 * t_0;
} else if (x_46_im <= -1.25e-149) {
tmp = t_4;
} else if (x_46_im <= 3.7e-28) {
tmp = t_5 * t_1;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_3)) * t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = log(-x_46im)
t_3 = atan2(x_46im, x_46re) * y_46im
t_4 = exp(((t_2 * y_46re) - t_3)) * sin((t_0 + (t_2 * y_46im)))
t_5 = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_3))
if (x_46im <= (-51000000000.0d0)) then
tmp = t_4
else if (x_46im <= (-2.2d-90)) then
tmp = t_5 * t_0
else if (x_46im <= (-1.25d-149)) then
tmp = t_4
else if (x_46im <= 3.7d-28) then
tmp = t_5 * t_1
else
tmp = exp(((y_46re * log(x_46im)) - t_3)) * t_1
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.log(-x_46_im);
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = Math.exp(((t_2 * y_46_re) - t_3)) * Math.sin((t_0 + (t_2 * y_46_im)));
double t_5 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3));
double tmp;
if (x_46_im <= -51000000000.0) {
tmp = t_4;
} else if (x_46_im <= -2.2e-90) {
tmp = t_5 * t_0;
} else if (x_46_im <= -1.25e-149) {
tmp = t_4;
} else if (x_46_im <= 3.7e-28) {
tmp = t_5 * t_1;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_3)) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.log(-x_46_im) t_3 = math.atan2(x_46_im, x_46_re) * y_46_im t_4 = math.exp(((t_2 * y_46_re) - t_3)) * math.sin((t_0 + (t_2 * y_46_im))) t_5 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3)) tmp = 0 if x_46_im <= -51000000000.0: tmp = t_4 elif x_46_im <= -2.2e-90: tmp = t_5 * t_0 elif x_46_im <= -1.25e-149: tmp = t_4 elif x_46_im <= 3.7e-28: tmp = t_5 * t_1 else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_3)) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = log(Float64(-x_46_im)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = Float64(exp(Float64(Float64(t_2 * y_46_re) - t_3)) * sin(Float64(t_0 + Float64(t_2 * y_46_im)))) t_5 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_3)) tmp = 0.0 if (x_46_im <= -51000000000.0) tmp = t_4; elseif (x_46_im <= -2.2e-90) tmp = Float64(t_5 * t_0); elseif (x_46_im <= -1.25e-149) tmp = t_4; elseif (x_46_im <= 3.7e-28) tmp = Float64(t_5 * t_1); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3)) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = log(-x_46_im); t_3 = atan2(x_46_im, x_46_re) * y_46_im; t_4 = exp(((t_2 * y_46_re) - t_3)) * sin((t_0 + (t_2 * y_46_im))); t_5 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_3)); tmp = 0.0; if (x_46_im <= -51000000000.0) tmp = t_4; elseif (x_46_im <= -2.2e-90) tmp = t_5 * t_0; elseif (x_46_im <= -1.25e-149) tmp = t_4; elseif (x_46_im <= 3.7e-28) tmp = t_5 * t_1; else tmp = exp(((y_46_re * log(x_46_im)) - t_3)) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Log[(-x$46$im)], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(t$95$2 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = 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$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -51000000000.0], t$95$4, If[LessEqual[x$46$im, -2.2e-90], N[(t$95$5 * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, -1.25e-149], t$95$4, If[LessEqual[x$46$im, 3.7e-28], N[(t$95$5 * t$95$1), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := \log \left(-x.im\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{t_2 \cdot y.re - t_3} \cdot \sin \left(t_0 + t_2 \cdot y.im\right)\\
t_5 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_3}\\
\mathbf{if}\;x.im \leq -51000000000:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq -2.2 \cdot 10^{-90}:\\
\;\;\;\;t_5 \cdot t_0\\
\mathbf{elif}\;x.im \leq -1.25 \cdot 10^{-149}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq 3.7 \cdot 10^{-28}:\\
\;\;\;\;t_5 \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_3} \cdot t_1\\
\end{array}
\end{array}
if x.im < -5.1e10 or -2.19999999999999986e-90 < x.im < -1.24999999999999992e-149Initial program 40.7%
Taylor expanded in x.im around -inf 40.7%
mul-1-neg40.7%
Simplified40.7%
Taylor expanded in x.im around -inf 85.4%
mul-1-neg40.7%
Simplified85.4%
if -5.1e10 < x.im < -2.19999999999999986e-90Initial program 42.2%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in y.re around 0 54.4%
if -1.24999999999999992e-149 < x.im < 3.7000000000000002e-28Initial program 49.0%
Taylor expanded in y.im around 0 58.7%
if 3.7000000000000002e-28 < x.im Initial program 30.1%
Taylor expanded in y.im around 0 56.6%
Taylor expanded in x.re around 0 67.6%
Final simplification68.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (- x.im)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (* (exp (- (* t_1 y.re) t_2)) (sin (+ t_0 (* t_1 y.im)))))
(t_4
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
t_0)))
(if (<= x.im -22500000000.0)
t_3
(if (<= x.im -3.5e-93)
t_4
(if (<= x.im -1.02e-149)
t_3
(if (<= x.im 5.6e+124)
t_4
(* (exp (- (* y.re (log x.im)) t_2)) (sin t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_im);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((t_1 * y_46_re) - t_2)) * sin((t_0 + (t_1 * y_46_im)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0;
double tmp;
if (x_46_im <= -22500000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.5e-93) {
tmp = t_4;
} else if (x_46_im <= -1.02e-149) {
tmp = t_3;
} else if (x_46_im <= 5.6e+124) {
tmp = t_4;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(t_0);
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = log(-x_46im)
t_2 = atan2(x_46im, x_46re) * y_46im
t_3 = exp(((t_1 * y_46re) - t_2)) * sin((t_0 + (t_1 * y_46im)))
t_4 = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_2)) * t_0
if (x_46im <= (-22500000000.0d0)) then
tmp = t_3
else if (x_46im <= (-3.5d-93)) then
tmp = t_4
else if (x_46im <= (-1.02d-149)) then
tmp = t_3
else if (x_46im <= 5.6d+124) then
tmp = t_4
else
tmp = exp(((y_46re * log(x_46im)) - t_2)) * sin(t_0)
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(-x_46_im);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((t_1 * y_46_re) - t_2)) * Math.sin((t_0 + (t_1 * y_46_im)));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0;
double tmp;
if (x_46_im <= -22500000000.0) {
tmp = t_3;
} else if (x_46_im <= -3.5e-93) {
tmp = t_4;
} else if (x_46_im <= -1.02e-149) {
tmp = t_3;
} else if (x_46_im <= 5.6e+124) {
tmp = t_4;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2)) * 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) t_1 = math.log(-x_46_im) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((t_1 * y_46_re) - t_2)) * math.sin((t_0 + (t_1 * y_46_im))) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0 tmp = 0 if x_46_im <= -22500000000.0: tmp = t_3 elif x_46_im <= -3.5e-93: tmp = t_4 elif x_46_im <= -1.02e-149: tmp = t_3 elif x_46_im <= 5.6e+124: tmp = t_4 else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_2)) * 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)) t_1 = log(Float64(-x_46_im)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_2)) * sin(Float64(t_0 + Float64(t_1 * y_46_im)))) t_4 = 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_2)) * t_0) tmp = 0.0 if (x_46_im <= -22500000000.0) tmp = t_3; elseif (x_46_im <= -3.5e-93) tmp = t_4; elseif (x_46_im <= -1.02e-149) tmp = t_3; elseif (x_46_im <= 5.6e+124) tmp = t_4; else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * 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); t_1 = log(-x_46_im); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((t_1 * y_46_re) - t_2)) * sin((t_0 + (t_1 * y_46_im))); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0; tmp = 0.0; if (x_46_im <= -22500000000.0) tmp = t_3; elseif (x_46_im <= -3.5e-93) tmp = t_4; elseif (x_46_im <= -1.02e-149) tmp = t_3; elseif (x_46_im <= 5.6e+124) tmp = t_4; else tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * 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]}, Block[{t$95$1 = N[Log[(-x$46$im)], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[x$46$im, -22500000000.0], t$95$3, If[LessEqual[x$46$im, -3.5e-93], t$95$4, If[LessEqual[x$46$im, -1.02e-149], t$95$3, If[LessEqual[x$46$im, 5.6e+124], t$95$4, N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(-x.im\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{t_1 \cdot y.re - t_2} \cdot \sin \left(t_0 + t_1 \cdot y.im\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot t_0\\
\mathbf{if}\;x.im \leq -22500000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq -3.5 \cdot 10^{-93}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq -1.02 \cdot 10^{-149}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 5.6 \cdot 10^{+124}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot \sin t_0\\
\end{array}
\end{array}
if x.im < -2.25e10 or -3.5e-93 < x.im < -1.0200000000000001e-149Initial program 40.7%
Taylor expanded in x.im around -inf 40.7%
mul-1-neg40.7%
Simplified40.7%
Taylor expanded in x.im around -inf 85.4%
mul-1-neg40.7%
Simplified85.4%
if -2.25e10 < x.im < -3.5e-93 or -1.0200000000000001e-149 < x.im < 5.59999999999999999e124Initial program 50.0%
Taylor expanded in y.im around 0 56.5%
Taylor expanded in y.re around 0 55.1%
if 5.59999999999999999e124 < x.im Initial program 10.3%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in x.re around 0 75.1%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -1.1e-175)
(*
(exp (- (* (log (- x.im)) y.re) t_1))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= x.im 1.7e+124)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
t_0)
(* (exp (- (* y.re (log x.im)) t_1)) (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -1.1e-175) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (x_46_im <= 1.7e+124) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_0;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_1)) * 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 t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -1.1e-175) {
tmp = Math.exp(((Math.log(-x_46_im) * y_46_re) - t_1)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (x_46_im <= 1.7e+124) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_0;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_1)) * 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) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_im <= -1.1e-175: tmp = math.exp(((math.log(-x_46_im) * y_46_re) - t_1)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif x_46_im <= 1.7e+124: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_0 else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_1)) * 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)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -1.1e-175) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_1)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (x_46_im <= 1.7e+124) 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_1)) * t_0); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_1)) * 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); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_im <= -1.1e-175) tmp = exp(((log(-x_46_im) * y_46_re) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (x_46_im <= 1.7e+124) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_0; else tmp = exp(((y_46_re * log(x_46_im)) - t_1)) * 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]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -1.1e-175], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $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], If[LessEqual[x$46$im, 1.7e+124], 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$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -1.1 \cdot 10^{-175}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_1} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{+124}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_1} \cdot \sin t_0\\
\end{array}
\end{array}
if x.im < -1.1e-175Initial program 40.7%
Taylor expanded in x.im around -inf 38.8%
mul-1-neg38.8%
Simplified38.8%
Taylor expanded in y.re around 0 34.8%
unpow234.8%
unpow234.8%
hypot-def69.8%
Simplified69.8%
if -1.1e-175 < x.im < 1.7e124Initial program 52.3%
Taylor expanded in y.im around 0 58.4%
Taylor expanded in y.re around 0 55.7%
if 1.7e124 < x.im Initial program 10.3%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in x.re around 0 75.1%
Final simplification64.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -46000000000.0)
(* (exp (- (* (log (- x.im)) y.re) t_2)) t_1)
(if (<= x.im 2.4e+124)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
t_0)
(* (exp (- (* y.re (log x.im)) t_2)) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -46000000000.0) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * t_1;
} else if (x_46_im <= 2.4e+124) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = atan2(x_46im, x_46re) * y_46im
if (x_46im <= (-46000000000.0d0)) then
tmp = exp(((log(-x_46im) * y_46re) - t_2)) * t_1
else if (x_46im <= 2.4d+124) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_2)) * t_0
else
tmp = exp(((y_46re * log(x_46im)) - t_2)) * t_1
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -46000000000.0) {
tmp = Math.exp(((Math.log(-x_46_im) * y_46_re) - t_2)) * t_1;
} else if (x_46_im <= 2.4e+124) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2)) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_im <= -46000000000.0: tmp = math.exp(((math.log(-x_46_im) * y_46_re) - t_2)) * t_1 elif x_46_im <= 2.4e+124: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0 else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_2)) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -46000000000.0) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_2)) * t_1); elseif (x_46_im <= 2.4e+124) 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_2)) * t_0); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_im <= -46000000000.0) tmp = exp(((log(-x_46_im) * y_46_re) - t_2)) * t_1; elseif (x_46_im <= 2.4e+124) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_0; else tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -46000000000.0], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$im, 2.4e+124], 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$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -46000000000:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_2} \cdot t_1\\
\mathbf{elif}\;x.im \leq 2.4 \cdot 10^{+124}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_2} \cdot t_1\\
\end{array}
\end{array}
if x.im < -4.6e10Initial program 31.2%
Taylor expanded in y.im around 0 46.7%
Taylor expanded in x.im around -inf 62.1%
mul-1-neg31.2%
Simplified62.1%
if -4.6e10 < x.im < 2.40000000000000006e124Initial program 53.0%
Taylor expanded in y.im around 0 55.7%
Taylor expanded in y.re around 0 54.4%
if 2.40000000000000006e124 < x.im Initial program 10.3%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in x.re around 0 75.1%
Final simplification59.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 (sin t_1)))
(if (<= x.re -1.2e-212)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.35e-244)
(* t_1 (exp (- t_0)))
(if (<= x.re 1.25e-208)
(* t_2 (pow x.im y.re))
(* t_2 (exp (- (* y.re (log x.re)) t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = sin(t_1);
double tmp;
if (x_46_re <= -1.2e-212) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.35e-244) {
tmp = t_1 * exp(-t_0);
} else if (x_46_re <= 1.25e-208) {
tmp = t_2 * pow(x_46_im, y_46_re);
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46re <= (-1.2d-212)) then
tmp = t_2 * exp(((y_46re * log(-x_46re)) - t_0))
else if (x_46re <= 2.35d-244) then
tmp = t_1 * exp(-t_0)
else if (x_46re <= 1.25d-208) then
tmp = t_2 * (x_46im ** y_46re)
else
tmp = t_2 * exp(((y_46re * log(x_46re)) - t_0))
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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_re <= -1.2e-212) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.35e-244) {
tmp = t_1 * Math.exp(-t_0);
} else if (x_46_re <= 1.25e-208) {
tmp = t_2 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_re <= -1.2e-212: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 2.35e-244: tmp = t_1 * math.exp(-t_0) elif x_46_re <= 1.25e-208: tmp = t_2 * math.pow(x_46_im, y_46_re) else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_re <= -1.2e-212) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.35e-244) tmp = Float64(t_1 * exp(Float64(-t_0))); elseif (x_46_re <= 1.25e-208) tmp = Float64(t_2 * (x_46_im ^ y_46_re)); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_re <= -1.2e-212) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 2.35e-244) tmp = t_1 * exp(-t_0); elseif (x_46_re <= 1.25e-208) tmp = t_2 * (x_46_im ^ y_46_re); else tmp = t_2 * exp(((y_46_re * log(x_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[(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[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -1.2e-212], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.35e-244], N[(t$95$1 * N[Exp[(-t$95$0)], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.25e-208], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.re \leq -1.2 \cdot 10^{-212}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.35 \cdot 10^{-244}:\\
\;\;\;\;t_1 \cdot e^{-t_0}\\
\mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-208}:\\
\;\;\;\;t_2 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - t_0}\\
\end{array}
\end{array}
if x.re < -1.19999999999999995e-212Initial program 43.8%
Taylor expanded in y.im around 0 56.1%
Taylor expanded in x.re around -inf 58.8%
mul-1-neg58.8%
Simplified58.8%
if -1.19999999999999995e-212 < x.re < 2.3499999999999999e-244Initial program 48.2%
Taylor expanded in y.im around 0 62.0%
Taylor expanded in x.re around 0 26.2%
Taylor expanded in y.re around 0 63.0%
*-commutative63.0%
distribute-rgt-neg-in63.0%
Simplified63.0%
if 2.3499999999999999e-244 < x.re < 1.24999999999999991e-208Initial program 36.4%
Taylor expanded in y.im around 0 55.4%
Taylor expanded in x.re around 0 19.2%
Taylor expanded in y.im around 0 55.6%
if 1.24999999999999991e-208 < x.re Initial program 36.2%
Taylor expanded in y.im around 0 48.2%
Taylor expanded in x.re around inf 54.1%
Final simplification57.3%
(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 (* (atan2 x.im x.re) y.im)))
(if (<= x.re 3.8e-246)
(* t_0 (exp (- t_2)))
(if (<= x.re 1.06e-207)
(* t_1 (pow x.im y.re))
(* t_1 (exp (- (* y.re (log x.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 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= 3.8e-246) {
tmp = t_0 * exp(-t_2);
} else if (x_46_re <= 1.06e-207) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_2));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = atan2(x_46im, x_46re) * y_46im
if (x_46re <= 3.8d-246) then
tmp = t_0 * exp(-t_2)
else if (x_46re <= 1.06d-207) then
tmp = t_1 * (x_46im ** y_46re)
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_2))
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= 3.8e-246) {
tmp = t_0 * Math.exp(-t_2);
} else if (x_46_re <= 1.06e-207) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - 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.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_re <= 3.8e-246: tmp = t_0 * math.exp(-t_2) elif x_46_re <= 1.06e-207: tmp = t_1 * math.pow(x_46_im, y_46_re) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - 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 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= 3.8e-246) tmp = Float64(t_0 * exp(Float64(-t_2))); elseif (x_46_re <= 1.06e-207) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_re <= 3.8e-246) tmp = t_0 * exp(-t_2); elseif (x_46_re <= 1.06e-207) tmp = t_1 * (x_46_im ^ y_46_re); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_2)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, 3.8e-246], N[(t$95$0 * N[Exp[(-t$95$2)], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.06e-207], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq 3.8 \cdot 10^{-246}:\\
\;\;\;\;t_0 \cdot e^{-t_2}\\
\mathbf{elif}\;x.re \leq 1.06 \cdot 10^{-207}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_2}\\
\end{array}
\end{array}
if x.re < 3.79999999999999976e-246Initial program 44.8%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in x.re around 0 21.8%
Taylor expanded in y.re around 0 42.2%
*-commutative42.2%
distribute-rgt-neg-in42.2%
Simplified42.2%
if 3.79999999999999976e-246 < x.re < 1.05999999999999997e-207Initial program 36.4%
Taylor expanded in y.im around 0 55.4%
Taylor expanded in x.re around 0 19.2%
Taylor expanded in y.im around 0 55.6%
if 1.05999999999999997e-207 < x.re Initial program 36.2%
Taylor expanded in y.im around 0 48.2%
Taylor expanded in x.re around inf 54.1%
Final simplification47.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.im -4e-307)
(* (exp (- (* (log (- x.im)) y.re) t_1)) t_0)
(* (exp (- (* y.re (log x.im)) t_1)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -4e-307) {
tmp = exp(((log(-x_46_im) * y_46_re) - t_1)) * t_0;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_1)) * t_0;
}
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) :: t_1
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
t_1 = atan2(x_46im, x_46re) * y_46im
if (x_46im <= (-4d-307)) then
tmp = exp(((log(-x_46im) * y_46re) - t_1)) * t_0
else
tmp = exp(((y_46re * log(x_46im)) - t_1)) * t_0
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 t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_im <= -4e-307) {
tmp = Math.exp(((Math.log(-x_46_im) * y_46_re) - t_1)) * t_0;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_1)) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_im <= -4e-307: tmp = math.exp(((math.log(-x_46_im) * y_46_re) - t_1)) * t_0 else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_1)) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_im <= -4e-307) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_im)) * y_46_re) - t_1)) * t_0); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_1)) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_im <= -4e-307) tmp = exp(((log(-x_46_im) * y_46_re) - t_1)) * t_0; else tmp = exp(((y_46_re * log(x_46_im)) - t_1)) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -4e-307], N[(N[Exp[N[(N[(N[Log[(-x$46$im)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -4 \cdot 10^{-307}:\\
\;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_1} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_1} \cdot t_0\\
\end{array}
\end{array}
if x.im < -3.99999999999999964e-307Initial program 39.2%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in x.im around -inf 49.8%
mul-1-neg35.7%
Simplified49.8%
if -3.99999999999999964e-307 < x.im Initial program 43.2%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in x.re around 0 50.1%
Final simplification50.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -4.9e+104) (not (<= y.re 1.42e+38)))
(* (sin t_0) (pow x.im y.re))
(* t_0 (exp (- (* (atan2 x.im x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -4.9e+104) || !(y_46_re <= 1.42e+38)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * exp(-(atan2(x_46_im, x_46_re) * y_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) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46re <= (-4.9d+104)) .or. (.not. (y_46re <= 1.42d+38))) then
tmp = sin(t_0) * (x_46im ** y_46re)
else
tmp = t_0 * exp(-(atan2(x_46im, x_46re) * y_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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -4.9e+104) || !(y_46_re <= 1.42e+38)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * Math.exp(-(Math.atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -4.9e+104) or not (y_46_re <= 1.42e+38): tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) else: tmp = t_0 * math.exp(-(math.atan2(x_46_im, x_46_re) * y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -4.9e+104) || !(y_46_re <= 1.42e+38)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(-Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -4.9e+104) || ~((y_46_re <= 1.42e+38))) tmp = sin(t_0) * (x_46_im ^ y_46_re); else tmp = t_0 * exp(-(atan2(x_46_im, x_46_re) * y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -4.9e+104], N[Not[LessEqual[y$46$re, 1.42e+38]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[(-N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.9 \cdot 10^{+104} \lor \neg \left(y.re \leq 1.42 \cdot 10^{+38}\right):\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{-\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < -4.89999999999999985e104 or 1.4200000000000001e38 < y.re Initial program 40.9%
Taylor expanded in y.im around 0 81.9%
Taylor expanded in x.re around 0 33.2%
Taylor expanded in y.im around 0 51.7%
if -4.89999999999999985e104 < y.re < 1.4200000000000001e38Initial program 41.2%
Taylor expanded in y.im around 0 39.0%
Taylor expanded in x.re around 0 17.8%
Taylor expanded in y.re around 0 45.1%
*-commutative45.1%
distribute-rgt-neg-in45.1%
Simplified45.1%
Final simplification47.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, 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
code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
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_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Initial program 41.1%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in x.re around 0 23.1%
Taylor expanded in y.im around 0 24.7%
Final simplification24.7%
herbie shell --seed 2023187
(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)))))