
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(if (<= x.re 2.45e+126)
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (pow (pow (cbrt (cbrt t_1)) 3.0) 3.0)))
(* (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re))))) (sin t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= 2.45e+126) {
tmp = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(pow(pow(cbrt(cbrt(t_1)), 3.0), 3.0));
} else {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= 2.45e+126) tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(((cbrt(cbrt(t_1)) ^ 3.0) ^ 3.0))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 2.45e+126], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq 2.45 \cdot 10^{+126}:\\
\;\;\;\;e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left({\left({\left(\sqrt[3]{\sqrt[3]{t\_1}}\right)}^{3}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin t\_1\\
\end{array}
\end{array}
if x.re < 2.45e126Initial program 45.7%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod41.9%
fma-def41.9%
hypot-def68.8%
*-commutative68.8%
Simplified68.8%
add-sqr-sqrt68.8%
unpow-prod-down68.8%
Applied egg-rr68.8%
pow-sqr68.8%
Simplified68.8%
add-cube-cbrt69.3%
pow369.3%
Applied egg-rr69.3%
add-cube-cbrt71.7%
pow373.0%
Applied egg-rr73.0%
add-exp-log73.0%
log-div73.0%
log-pow76.3%
pow-unpow76.3%
log-pow76.3%
pow276.3%
add-sqr-sqrt76.3%
add-log-exp82.4%
*-commutative82.4%
Applied egg-rr82.4%
if 2.45e126 < x.re Initial program 5.9%
fma-neg5.9%
hypot-def5.9%
distribute-rgt-neg-out5.9%
fma-def5.9%
hypot-def76.4%
*-commutative76.4%
Simplified76.4%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= x.im 1.35e+149)
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(/
(pow (hypot x.re x.im) y.re)
(pow (sqrt (exp y.im)) (* (atan2 x.im x.re) 2.0)))
(sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 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_re, x_46_im));
double tmp;
if (x_46_im <= 1.35e+149) {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(sqrt(exp(y_46_im)), (atan2(x_46_im, x_46_re) * 2.0))) * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_im <= 1.35e+149) tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (sqrt(exp(y_46_im)) ^ Float64(atan(x_46_im, x_46_re) * 2.0))) * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, 1.35e+149], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Sqrt[N[Exp[y$46$im], $MachinePrecision]], $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;x.im \leq 1.35 \cdot 10^{+149}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(\sqrt{e^{y.im}}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot 2\right)}} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < 1.35e149Initial program 45.0%
fma-neg45.0%
hypot-def45.0%
distribute-rgt-neg-out45.0%
fma-def45.0%
hypot-def78.9%
*-commutative78.9%
Simplified78.9%
if 1.35e149 < x.im Initial program 3.2%
exp-diff3.2%
exp-to-pow3.2%
hypot-def3.2%
*-commutative3.2%
exp-prod3.2%
fma-def3.2%
hypot-def58.2%
*-commutative58.2%
Simplified58.2%
add-sqr-sqrt58.2%
unpow-prod-down58.2%
Applied egg-rr58.2%
pow-sqr58.2%
Simplified58.2%
add-cube-cbrt70.8%
pow370.8%
Applied egg-rr70.8%
Taylor expanded in y.re around 0 3.2%
unpow1/33.2%
unpow23.2%
unpow23.2%
hypot-def74.3%
Simplified74.3%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -8.5)
(* t_1 (sin t_0))
(if (<= y.re 1.8e+42)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -8.5) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 1.8e+42) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -8.5) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 1.8e+42) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.8e+42], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -8.5:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+42}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -8.5Initial program 43.5%
Taylor expanded in y.im around 0 84.8%
if -8.5 < y.re < 1.8e42Initial program 40.4%
exp-diff40.4%
exp-to-pow40.4%
hypot-def40.4%
*-commutative40.4%
exp-prod39.6%
fma-def39.6%
hypot-def76.6%
*-commutative76.6%
Simplified76.6%
if 1.8e42 < y.re Initial program 36.6%
Taylor expanded in y.re around 0 35.2%
unpow235.2%
unpow235.2%
hypot-def71.8%
Simplified71.8%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 39.9%
fma-neg39.9%
hypot-def39.9%
distribute-rgt-neg-out39.9%
fma-def39.9%
hypot-def76.6%
*-commutative76.6%
Simplified76.6%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* y.im (atan2 x.im x.re))))
(if (<= y.im -88000000.0)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im 2.1e+27)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ t_1 1.0)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(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 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -88000000.0) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 2.1e+27) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_1 + 1.0));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(pow(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 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -88000000.0) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= 2.1e+27) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_1 + 1.0))); else 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)) * 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -88000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.1e+27], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $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 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -88000000:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+27}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_1 + 1}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -8.8e7Initial program 35.6%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in y.re around 0 59.8%
*-commutative59.8%
distribute-rgt-neg-in59.8%
exp-prod61.6%
Simplified61.6%
if -8.8e7 < y.im < 2.09999999999999995e27Initial program 42.8%
exp-diff42.8%
exp-to-pow42.8%
hypot-def42.8%
*-commutative42.8%
exp-prod42.5%
fma-def42.5%
hypot-def83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y.im around 0 84.5%
if 2.09999999999999995e27 < y.im Initial program 35.3%
Taylor expanded in y.im around 0 60.0%
*-commutative60.0%
add-cube-cbrt66.4%
pow366.4%
*-commutative66.4%
Applied egg-rr66.4%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))))
(if (<= y.im -4200000000.0)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im 3e+16)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4200000000.0) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3e+16) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -4200000000.0) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= 3e+16) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4200000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3e+16], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4200000000:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+16}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -4.2e9Initial program 35.6%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in y.re around 0 59.8%
*-commutative59.8%
distribute-rgt-neg-in59.8%
exp-prod61.6%
Simplified61.6%
if -4.2e9 < y.im < 3e16Initial program 43.1%
exp-diff43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.9%
fma-def42.9%
hypot-def84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y.im around 0 85.4%
if 3e16 < y.im Initial program 34.7%
Taylor expanded in y.re around 0 36.7%
unpow236.7%
unpow236.7%
hypot-def63.5%
Simplified63.5%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -3.7e-9)
(* t_1 (sin t_0))
(if (<= y.re 7.5e+18)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* y.im (- (atan2 x.im x.re)))))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -3.7e-9) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 7.5e+18) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -3.7e-9) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 7.5e+18) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-9], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+18], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-9}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+18}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.7e-9Initial program 45.5%
Taylor expanded in y.im around 0 82.5%
if -3.7e-9 < y.re < 7.5e18Initial program 39.5%
fma-neg39.5%
hypot-def39.5%
distribute-rgt-neg-out39.5%
fma-def39.5%
hypot-def80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in y.re around 0 78.4%
neg-mul-178.4%
*-commutative78.4%
distribute-rgt-neg-in78.4%
Simplified78.4%
if 7.5e18 < y.re Initial program 36.8%
Taylor expanded in y.re around 0 35.5%
unpow235.5%
unpow235.5%
hypot-def69.8%
Simplified69.8%
Final simplification76.7%
(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 -3.8e-9) (not (<= y.re 520.0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -3.8e-9) || !(y_46_re <= 520.0)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -3.8e-9) || !(y_46_re <= 520.0)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.8e-9], N[Not[LessEqual[y$46$re, 520.0]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $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 -3.8 \cdot 10^{-9} \lor \neg \left(y.re \leq 520\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.re < -3.80000000000000011e-9 or 520 < y.re Initial program 40.5%
Taylor expanded in y.im around 0 71.0%
if -3.80000000000000011e-9 < y.re < 520Initial program 39.3%
fma-neg39.3%
hypot-def39.3%
distribute-rgt-neg-out39.3%
fma-def39.3%
hypot-def81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y.re around 0 80.4%
neg-mul-180.4%
*-commutative80.4%
distribute-rgt-neg-in80.4%
Simplified80.4%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_2 (sin (- t_1 (* y.im (log (/ -1.0 x.re)))))))
(t_4
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
(if (<= x.re -2.8e+83)
t_3
(if (<= x.re -7.2e+49)
t_4
(if (<= x.re -1.75e-77)
t_3
(if (<= x.re -2.5e-218)
t_4
(if (<= x.re -1.4e-254)
(log1p (expm1 t_1))
(if (<= x.re -1.85e-302)
(* (sin t_1) (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.re 6e-255)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.im)) t_0)))
(if (<= x.re 8.8e-244)
(* t_2 (sin (- t_1 (* y.im (log (/ -1.0 x.im))))))
(if (<= x.re 1.46e-229)
(cbrt (pow t_1 3.0))
(* t_2 (sin (+ t_1 (* y.im (log x.re))))))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
double t_4 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -2.8e+83) {
tmp = t_3;
} else if (x_46_re <= -7.2e+49) {
tmp = t_4;
} else if (x_46_re <= -1.75e-77) {
tmp = t_3;
} else if (x_46_re <= -2.5e-218) {
tmp = t_4;
} else if (x_46_re <= -1.4e-254) {
tmp = log1p(expm1(t_1));
} else if (x_46_re <= -1.85e-302) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_re <= 6e-255) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0));
} else if (x_46_re <= 8.8e-244) {
tmp = t_2 * sin((t_1 - (y_46_im * log((-1.0 / x_46_im)))));
} else if (x_46_re <= 1.46e-229) {
tmp = cbrt(pow(t_1, 3.0));
} else {
tmp = t_2 * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_2 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
double t_4 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -2.8e+83) {
tmp = t_3;
} else if (x_46_re <= -7.2e+49) {
tmp = t_4;
} else if (x_46_re <= -1.75e-77) {
tmp = t_3;
} else if (x_46_re <= -2.5e-218) {
tmp = t_4;
} else if (x_46_re <= -1.4e-254) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (x_46_re <= -1.85e-302) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_re <= 6e-255) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else if (x_46_re <= 8.8e-244) {
tmp = t_2 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_im)))));
} else if (x_46_re <= 1.46e-229) {
tmp = Math.cbrt(Math.pow(t_1, 3.0));
} else {
tmp = t_2 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_2 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))) t_4 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) tmp = 0.0 if (x_46_re <= -2.8e+83) tmp = t_3; elseif (x_46_re <= -7.2e+49) tmp = t_4; elseif (x_46_re <= -1.75e-77) tmp = t_3; elseif (x_46_re <= -2.5e-218) tmp = t_4; elseif (x_46_re <= -1.4e-254) tmp = log1p(expm1(t_1)); elseif (x_46_re <= -1.85e-302) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_re <= 6e-255) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); elseif (x_46_re <= 8.8e-244) tmp = Float64(t_2 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_im)))))); elseif (x_46_re <= 1.46e-229) tmp = cbrt((t_1 ^ 3.0)); else tmp = Float64(t_2 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.8e+83], t$95$3, If[LessEqual[x$46$re, -7.2e+49], t$95$4, If[LessEqual[x$46$re, -1.75e-77], t$95$3, If[LessEqual[x$46$re, -2.5e-218], t$95$4, If[LessEqual[x$46$re, -1.4e-254], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, -1.85e-302], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 6e-255], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 8.8e-244], N[(t$95$2 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.46e-229], N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t\_2 \cdot \sin \left(t\_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
t_4 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;x.re \leq -2.8 \cdot 10^{+83}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -7.2 \cdot 10^{+49}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -1.75 \cdot 10^{-77}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -2.5 \cdot 10^{-218}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -1.4 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;x.re \leq -1.85 \cdot 10^{-302}:\\
\;\;\;\;\sin t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 6 \cdot 10^{-255}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t\_0}\\
\mathbf{elif}\;x.re \leq 8.8 \cdot 10^{-244}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_1 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.re \leq 1.46 \cdot 10^{-229}:\\
\;\;\;\;\sqrt[3]{{t\_1}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.8e83 or -7.19999999999999993e49 < x.re < -1.75000000000000006e-77Initial program 48.3%
exp-diff43.3%
exp-to-pow43.3%
hypot-def43.3%
*-commutative43.3%
exp-prod43.3%
fma-def43.3%
hypot-def76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 60.6%
unpow260.6%
unpow260.6%
hypot-def63.2%
Simplified63.2%
Taylor expanded in x.re around -inf 61.5%
+-commutative61.5%
mul-1-neg61.5%
unsub-neg61.5%
Simplified61.5%
if -2.8e83 < x.re < -7.19999999999999993e49 or -1.75000000000000006e-77 < x.re < -2.50000000000000021e-218Initial program 43.3%
Taylor expanded in y.im around 0 70.3%
Taylor expanded in y.re around 0 63.9%
*-commutative63.9%
distribute-rgt-neg-in63.9%
Simplified63.9%
if -2.50000000000000021e-218 < x.re < -1.39999999999999992e-254Initial program 25.0%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in y.re around 0 4.6%
*-commutative4.6%
distribute-rgt-neg-in4.6%
Simplified4.6%
Taylor expanded in y.im around 0 5.3%
log1p-expm1-u63.5%
Applied egg-rr63.5%
if -1.39999999999999992e-254 < x.re < -1.85e-302Initial program 58.5%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in x.im around -inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -1.85e-302 < x.re < 6.00000000000000004e-255Initial program 13.3%
Taylor expanded in y.re around 0 13.3%
unpow213.3%
unpow213.3%
hypot-def34.4%
Simplified34.4%
Taylor expanded in x.re around 0 46.7%
if 6.00000000000000004e-255 < x.re < 8.79999999999999939e-244Initial program 50.0%
exp-diff50.0%
exp-to-pow50.0%
hypot-def50.0%
*-commutative50.0%
exp-prod50.0%
fma-def50.0%
hypot-def99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in y.im around 0 51.2%
unpow251.2%
unpow251.2%
hypot-def99.2%
Simplified99.2%
Taylor expanded in x.im around -inf 99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
Simplified99.2%
if 8.79999999999999939e-244 < x.re < 1.46e-229Initial program 0.0%
Taylor expanded in y.im around 0 25.9%
Taylor expanded in y.re around 0 52.3%
*-commutative52.3%
distribute-rgt-neg-in52.3%
Simplified52.3%
Taylor expanded in y.im around 0 28.6%
*-commutative28.6%
add-cbrt-cube100.0%
pow3100.0%
*-commutative100.0%
Applied egg-rr100.0%
if 1.46e-229 < x.re Initial program 38.9%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod36.4%
fma-def36.4%
hypot-def68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 56.0%
unpow256.0%
unpow256.0%
hypot-def71.1%
Simplified71.1%
Taylor expanded in x.im around 0 67.4%
Final simplification65.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_1 (sin (- t_0 (* y.im (log (/ -1.0 x.re)))))))
(t_3
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
(if (<= x.re -2.2e+83)
t_2
(if (<= x.re -3.9e+50)
t_3
(if (<= x.re -6.5e-75)
t_2
(if (<= x.re -1.05e-218)
t_3
(if (<= x.re 2.4e-302)
(* (sin t_0) t_1)
(if (<= x.re 2.6e-289)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re)))))
(* t_1 (sin (+ t_0 (* y.im (log x.re)))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
double t_3 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -2.2e+83) {
tmp = t_2;
} else if (x_46_re <= -3.9e+50) {
tmp = t_3;
} else if (x_46_re <= -6.5e-75) {
tmp = t_2;
} else if (x_46_re <= -1.05e-218) {
tmp = t_3;
} else if (x_46_re <= 2.4e-302) {
tmp = sin(t_0) * t_1;
} else if (x_46_re <= 2.6e-289) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
double t_3 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -2.2e+83) {
tmp = t_2;
} else if (x_46_re <= -3.9e+50) {
tmp = t_3;
} else if (x_46_re <= -6.5e-75) {
tmp = t_2;
} else if (x_46_re <= -1.05e-218) {
tmp = t_3;
} else if (x_46_re <= 2.4e-302) {
tmp = Math.sin(t_0) * t_1;
} else if (x_46_re <= 2.6e-289) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_re)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = t_1 * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) t_3 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) tmp = 0 if x_46_re <= -2.2e+83: tmp = t_2 elif x_46_re <= -3.9e+50: tmp = t_3 elif x_46_re <= -6.5e-75: tmp = t_2 elif x_46_re <= -1.05e-218: tmp = t_3 elif x_46_re <= 2.4e-302: tmp = math.sin(t_0) * t_1 elif x_46_re <= 2.6e-289: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_re)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) else: tmp = t_1 * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_1 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))) t_3 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) tmp = 0.0 if (x_46_re <= -2.2e+83) tmp = t_2; elseif (x_46_re <= -3.9e+50) tmp = t_3; elseif (x_46_re <= -6.5e-75) tmp = t_2; elseif (x_46_re <= -1.05e-218) tmp = t_3; elseif (x_46_re <= 2.4e-302) tmp = Float64(sin(t_0) * t_1); elseif (x_46_re <= 2.6e-289) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = t_1 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); t_3 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); tmp = 0.0; if (x_46_re <= -2.2e+83) tmp = t_2; elseif (x_46_re <= -3.9e+50) tmp = t_3; elseif (x_46_re <= -6.5e-75) tmp = t_2; elseif (x_46_re <= -1.05e-218) tmp = t_3; elseif (x_46_re <= 2.4e-302) tmp = sin(t_0) * t_1; elseif (x_46_re <= 2.6e-289) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))); else tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.2e+83], t$95$2, If[LessEqual[x$46$re, -3.9e+50], t$95$3, If[LessEqual[x$46$re, -6.5e-75], t$95$2, If[LessEqual[x$46$re, -1.05e-218], t$95$3, If[LessEqual[x$46$re, 2.4e-302], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2.6e-289], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_1 \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
t_3 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;x.re \leq -2.2 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -3.9 \cdot 10^{+50}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -6.5 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -1.05 \cdot 10^{-218}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-302}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-289}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.19999999999999999e83 or -3.89999999999999967e50 < x.re < -6.5000000000000002e-75Initial program 48.3%
exp-diff43.3%
exp-to-pow43.3%
hypot-def43.3%
*-commutative43.3%
exp-prod43.3%
fma-def43.3%
hypot-def76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 60.6%
unpow260.6%
unpow260.6%
hypot-def63.2%
Simplified63.2%
Taylor expanded in x.re around -inf 61.5%
+-commutative61.5%
mul-1-neg61.5%
unsub-neg61.5%
Simplified61.5%
if -2.19999999999999999e83 < x.re < -3.89999999999999967e50 or -6.5000000000000002e-75 < x.re < -1.04999999999999997e-218Initial program 41.9%
Taylor expanded in y.im around 0 68.0%
Taylor expanded in y.re around 0 62.0%
*-commutative62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
if -1.04999999999999997e-218 < x.re < 2.40000000000000022e-302Initial program 41.3%
Taylor expanded in y.im around 0 63.9%
Taylor expanded in y.im around 0 48.6%
unpow248.6%
unpow248.6%
hypot-def53.7%
Simplified53.7%
if 2.40000000000000022e-302 < x.re < 2.5999999999999999e-289Initial program 16.7%
Taylor expanded in y.re around 0 16.7%
unpow216.7%
unpow216.7%
hypot-def35.4%
Simplified35.4%
Taylor expanded in x.re around inf 83.1%
if 2.5999999999999999e-289 < x.re Initial program 36.7%
exp-diff36.0%
exp-to-pow36.0%
hypot-def36.0%
*-commutative36.0%
exp-prod34.5%
fma-def34.5%
hypot-def67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-def68.8%
Simplified68.8%
Taylor expanded in x.im around 0 65.5%
Final simplification63.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -66000000000.0)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im 2.9e+26)
(*
(pow (hypot x.im x.re) y.re)
(sin (+ t_0 (* (log (hypot x.re x.im)) y.im))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -66000000000.0) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 2.9e+26) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -66000000000.0) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 2.9e+26) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((t_0 + (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)));
} else {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -66000000000.0: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) elif y_46_im <= 2.9e+26: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((t_0 + (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) else: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -66000000000.0) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_im <= 2.9e+26) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(t_0 + Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_im <= -66000000000.0) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); elseif (y_46_im <= 2.9e+26) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((t_0 + (log(hypot(x_46_re, x_46_im)) * y_46_im))); else tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -66000000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.9e+26], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $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}\\
\mathbf{if}\;y.im \leq -66000000000:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.im \leq 2.9 \cdot 10^{+26}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(t\_0 + \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\end{array}
\end{array}
if y.im < -6.6e10Initial program 35.6%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in y.re around 0 59.8%
*-commutative59.8%
distribute-rgt-neg-in59.8%
exp-prod61.6%
Simplified61.6%
if -6.6e10 < y.im < 2.9e26Initial program 42.8%
exp-diff42.8%
exp-to-pow42.8%
hypot-def42.8%
*-commutative42.8%
exp-prod42.5%
fma-def42.5%
hypot-def83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y.im around 0 62.7%
unpow262.7%
unpow262.7%
hypot-def83.9%
Simplified83.9%
fma-udef83.9%
Applied egg-rr83.9%
if 2.9e26 < y.im Initial program 35.3%
Taylor expanded in y.im around 0 60.0%
Final simplification74.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -480000000000.0) (not (<= y.im 1.1e+50)))
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(*
(pow (hypot x.im x.re) y.re)
(sin (+ (* y.re (atan2 x.im x.re)) (* (log (hypot x.re x.im)) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -480000000000.0) || !(y_46_im <= 1.1e+50)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -480000000000.0) || !(y_46_im <= 1.1e+50)) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(((y_46_re * Math.atan2(x_46_im, x_46_re)) + (Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -480000000000.0) or not (y_46_im <= 1.1e+50): tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(((y_46_re * math.atan2(x_46_im, x_46_re)) + (math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -480000000000.0) || !(y_46_im <= 1.1e+50)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -480000000000.0) || ~((y_46_im <= 1.1e+50))) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (log(hypot(x_46_re, x_46_im)) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -480000000000.0], N[Not[LessEqual[y$46$im, 1.1e+50]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -480000000000 \lor \neg \left(y.im \leq 1.1 \cdot 10^{+50}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.im < -4.8e11 or 1.10000000000000008e50 < y.im Initial program 35.2%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in y.re around 0 55.2%
*-commutative55.2%
distribute-rgt-neg-in55.2%
exp-prod57.1%
Simplified57.1%
if -4.8e11 < y.im < 1.10000000000000008e50Initial program 42.9%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.6%
fma-def42.6%
hypot-def83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-def83.5%
Simplified83.5%
fma-udef83.5%
Applied egg-rr83.5%
Final simplification73.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (* t_2 t_3)))
(if (<= x.re -3.5e+83)
t_4
(if (<= x.re -420000000.0)
t_0
(if (<= x.re -8.3e-78)
t_4
(if (<= x.re -3.2e-218)
t_0
(if (<= x.re -1.35e-254)
(log1p (expm1 t_1))
(if (<= x.re 4.5e-308)
(*
t_2
(exp (- (* y.re (log (- x.im))) (* y.im (atan2 x.im x.re)))))
(* t_3 (sin (+ t_1 (* y.im (log x.re)))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_2 * t_3;
double tmp;
if (x_46_re <= -3.5e+83) {
tmp = t_4;
} else if (x_46_re <= -420000000.0) {
tmp = t_0;
} else if (x_46_re <= -8.3e-78) {
tmp = t_4;
} else if (x_46_re <= -3.2e-218) {
tmp = t_0;
} else if (x_46_re <= -1.35e-254) {
tmp = log1p(expm1(t_1));
} else if (x_46_re <= 4.5e-308) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = t_3 * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_2 * t_3;
double tmp;
if (x_46_re <= -3.5e+83) {
tmp = t_4;
} else if (x_46_re <= -420000000.0) {
tmp = t_0;
} else if (x_46_re <= -8.3e-78) {
tmp = t_4;
} else if (x_46_re <= -3.2e-218) {
tmp = t_0;
} else if (x_46_re <= -1.35e-254) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (x_46_re <= 4.5e-308) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = t_3 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = t_2 * t_3 tmp = 0 if x_46_re <= -3.5e+83: tmp = t_4 elif x_46_re <= -420000000.0: tmp = t_0 elif x_46_re <= -8.3e-78: tmp = t_4 elif x_46_re <= -3.2e-218: tmp = t_0 elif x_46_re <= -1.35e-254: tmp = math.log1p(math.expm1(t_1)) elif x_46_re <= 4.5e-308: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) else: tmp = t_3 * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = Float64(t_2 * t_3) tmp = 0.0 if (x_46_re <= -3.5e+83) tmp = t_4; elseif (x_46_re <= -420000000.0) tmp = t_0; elseif (x_46_re <= -8.3e-78) tmp = t_4; elseif (x_46_re <= -3.2e-218) tmp = t_0; elseif (x_46_re <= -1.35e-254) tmp = log1p(expm1(t_1)); elseif (x_46_re <= 4.5e-308) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = Float64(t_3 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $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[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, If[LessEqual[x$46$re, -3.5e+83], t$95$4, If[LessEqual[x$46$re, -420000000.0], t$95$0, If[LessEqual[x$46$re, -8.3e-78], t$95$4, If[LessEqual[x$46$re, -3.2e-218], t$95$0, If[LessEqual[x$46$re, -1.35e-254], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, 4.5e-308], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := t\_2 \cdot t\_3\\
\mathbf{if}\;x.re \leq -3.5 \cdot 10^{+83}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -420000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -8.3 \cdot 10^{-78}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.re \leq -3.2 \cdot 10^{-218}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -1.35 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;x.re \leq 4.5 \cdot 10^{-308}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -3.49999999999999977e83 or -4.2e8 < x.re < -8.2999999999999999e-78Initial program 46.4%
Taylor expanded in y.im around 0 61.3%
Taylor expanded in y.im around 0 58.0%
unpow258.0%
unpow258.0%
hypot-def54.8%
Simplified54.8%
if -3.49999999999999977e83 < x.re < -4.2e8 or -8.2999999999999999e-78 < x.re < -3.2000000000000001e-218Initial program 47.0%
Taylor expanded in y.im around 0 65.2%
Taylor expanded in y.re around 0 59.7%
*-commutative59.7%
distribute-rgt-neg-in59.7%
Simplified59.7%
if -3.2000000000000001e-218 < x.re < -1.35000000000000003e-254Initial program 25.0%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in y.re around 0 4.6%
*-commutative4.6%
distribute-rgt-neg-in4.6%
Simplified4.6%
Taylor expanded in y.im around 0 5.3%
log1p-expm1-u63.5%
Applied egg-rr63.5%
if -1.35000000000000003e-254 < x.re < 4.50000000000000009e-308Initial program 53.2%
Taylor expanded in y.im around 0 73.6%
Taylor expanded in x.im around -inf 72.8%
mul-1-neg72.8%
Simplified72.8%
if 4.50000000000000009e-308 < x.re Initial program 35.7%
exp-diff34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod32.8%
fma-def32.8%
hypot-def67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y.im around 0 52.7%
unpow252.7%
unpow252.7%
hypot-def68.3%
Simplified68.3%
Taylor expanded in x.im around 0 63.4%
Final simplification61.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_1 (sin (- t_0 (* y.im (log (/ -1.0 x.re)))))))
(t_3
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
(if (<= x.re -4.2e+84)
t_2
(if (<= x.re -9.5e+51)
t_3
(if (<= x.re -1.85e-72)
t_2
(if (<= x.re -1.25e-217)
t_3
(if (<= x.re -8.4e-255)
(log1p (expm1 t_0))
(if (<= x.re -1.6e-308)
(*
(sin t_0)
(exp (- (* y.re (log (- x.im))) (* y.im (atan2 x.im x.re)))))
(* t_1 (sin (+ t_0 (* y.im (log x.re)))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
double t_3 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -4.2e+84) {
tmp = t_2;
} else if (x_46_re <= -9.5e+51) {
tmp = t_3;
} else if (x_46_re <= -1.85e-72) {
tmp = t_2;
} else if (x_46_re <= -1.25e-217) {
tmp = t_3;
} else if (x_46_re <= -8.4e-255) {
tmp = log1p(expm1(t_0));
} else if (x_46_re <= -1.6e-308) {
tmp = sin(t_0) * exp(((y_46_re * log(-x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_1 * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
double t_3 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -4.2e+84) {
tmp = t_2;
} else if (x_46_re <= -9.5e+51) {
tmp = t_3;
} else if (x_46_re <= -1.85e-72) {
tmp = t_2;
} else if (x_46_re <= -1.25e-217) {
tmp = t_3;
} else if (x_46_re <= -8.4e-255) {
tmp = Math.log1p(Math.expm1(t_0));
} else if (x_46_re <= -1.6e-308) {
tmp = Math.sin(t_0) * Math.exp(((y_46_re * Math.log(-x_46_im)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = t_1 * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) t_3 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) tmp = 0 if x_46_re <= -4.2e+84: tmp = t_2 elif x_46_re <= -9.5e+51: tmp = t_3 elif x_46_re <= -1.85e-72: tmp = t_2 elif x_46_re <= -1.25e-217: tmp = t_3 elif x_46_re <= -8.4e-255: tmp = math.log1p(math.expm1(t_0)) elif x_46_re <= -1.6e-308: tmp = math.sin(t_0) * math.exp(((y_46_re * math.log(-x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) else: tmp = t_1 * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_1 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))) t_3 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) tmp = 0.0 if (x_46_re <= -4.2e+84) tmp = t_2; elseif (x_46_re <= -9.5e+51) tmp = t_3; elseif (x_46_re <= -1.85e-72) tmp = t_2; elseif (x_46_re <= -1.25e-217) tmp = t_3; elseif (x_46_re <= -8.4e-255) tmp = log1p(expm1(t_0)); elseif (x_46_re <= -1.6e-308) tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -4.2e+84], t$95$2, If[LessEqual[x$46$re, -9.5e+51], t$95$3, If[LessEqual[x$46$re, -1.85e-72], t$95$2, If[LessEqual[x$46$re, -1.25e-217], t$95$3, If[LessEqual[x$46$re, -8.4e-255], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, -1.6e-308], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_1 \cdot \sin \left(t\_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
t_3 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;x.re \leq -4.2 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -9.5 \cdot 10^{+51}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -1.85 \cdot 10^{-72}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -1.25 \cdot 10^{-217}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -8.4 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-308}:\\
\;\;\;\;\sin t\_0 \cdot e^{y.re \cdot \log \left(-x.im\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.20000000000000037e84 or -9.4999999999999999e51 < x.re < -1.8499999999999999e-72Initial program 48.3%
exp-diff43.3%
exp-to-pow43.3%
hypot-def43.3%
*-commutative43.3%
exp-prod43.3%
fma-def43.3%
hypot-def76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 60.6%
unpow260.6%
unpow260.6%
hypot-def63.2%
Simplified63.2%
Taylor expanded in x.re around -inf 61.5%
+-commutative61.5%
mul-1-neg61.5%
unsub-neg61.5%
Simplified61.5%
if -4.20000000000000037e84 < x.re < -9.4999999999999999e51 or -1.8499999999999999e-72 < x.re < -1.2500000000000001e-217Initial program 43.3%
Taylor expanded in y.im around 0 70.3%
Taylor expanded in y.re around 0 63.9%
*-commutative63.9%
distribute-rgt-neg-in63.9%
Simplified63.9%
if -1.2500000000000001e-217 < x.re < -8.3999999999999999e-255Initial program 25.0%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in y.re around 0 4.6%
*-commutative4.6%
distribute-rgt-neg-in4.6%
Simplified4.6%
Taylor expanded in y.im around 0 5.3%
log1p-expm1-u63.5%
Applied egg-rr63.5%
if -8.3999999999999999e-255 < x.re < -1.6000000000000001e-308Initial program 58.5%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in x.im around -inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -1.6000000000000001e-308 < x.re Initial program 35.4%
exp-diff34.1%
exp-to-pow34.1%
hypot-def34.1%
*-commutative34.1%
exp-prod32.6%
fma-def32.6%
hypot-def66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 53.0%
unpow253.0%
unpow253.0%
hypot-def68.5%
Simplified68.5%
Taylor expanded in x.im around 0 63.0%
Final simplification63.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* (sin t_1) t_2)))
(if (<= x.re -7.5e+84)
t_3
(if (<= x.re -1020000000.0)
t_0
(if (<= x.re -2.7e-72)
t_3
(if (<= x.re -1.38e-219)
t_0
(if (<= x.re 4.8e-245)
t_3
(if (<= x.re 1.46e-229)
(cbrt (pow t_1 3.0))
(* t_2 (sin (+ t_1 (* y.im (log x.re)))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = sin(t_1) * t_2;
double tmp;
if (x_46_re <= -7.5e+84) {
tmp = t_3;
} else if (x_46_re <= -1020000000.0) {
tmp = t_0;
} else if (x_46_re <= -2.7e-72) {
tmp = t_3;
} else if (x_46_re <= -1.38e-219) {
tmp = t_0;
} else if (x_46_re <= 4.8e-245) {
tmp = t_3;
} else if (x_46_re <= 1.46e-229) {
tmp = cbrt(pow(t_1, 3.0));
} else {
tmp = t_2 * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.sin(t_1) * t_2;
double tmp;
if (x_46_re <= -7.5e+84) {
tmp = t_3;
} else if (x_46_re <= -1020000000.0) {
tmp = t_0;
} else if (x_46_re <= -2.7e-72) {
tmp = t_3;
} else if (x_46_re <= -1.38e-219) {
tmp = t_0;
} else if (x_46_re <= 4.8e-245) {
tmp = t_3;
} else if (x_46_re <= 1.46e-229) {
tmp = Math.cbrt(Math.pow(t_1, 3.0));
} else {
tmp = t_2 * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(sin(t_1) * t_2) tmp = 0.0 if (x_46_re <= -7.5e+84) tmp = t_3; elseif (x_46_re <= -1020000000.0) tmp = t_0; elseif (x_46_re <= -2.7e-72) tmp = t_3; elseif (x_46_re <= -1.38e-219) tmp = t_0; elseif (x_46_re <= 4.8e-245) tmp = t_3; elseif (x_46_re <= 1.46e-229) tmp = cbrt((t_1 ^ 3.0)); else tmp = Float64(t_2 * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[x$46$re, -7.5e+84], t$95$3, If[LessEqual[x$46$re, -1020000000.0], t$95$0, If[LessEqual[x$46$re, -2.7e-72], t$95$3, If[LessEqual[x$46$re, -1.38e-219], t$95$0, If[LessEqual[x$46$re, 4.8e-245], t$95$3, If[LessEqual[x$46$re, 1.46e-229], N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := \sin t\_1 \cdot t\_2\\
\mathbf{if}\;x.re \leq -7.5 \cdot 10^{+84}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -1020000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -2.7 \cdot 10^{-72}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -1.38 \cdot 10^{-219}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 4.8 \cdot 10^{-245}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq 1.46 \cdot 10^{-229}:\\
\;\;\;\;\sqrt[3]{{t\_1}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -7.5000000000000001e84 or -1.02e9 < x.re < -2.7e-72 or -1.37999999999999996e-219 < x.re < 4.8e-245Initial program 41.4%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in y.im around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def51.8%
Simplified51.8%
if -7.5000000000000001e84 < x.re < -1.02e9 or -2.7e-72 < x.re < -1.37999999999999996e-219Initial program 45.6%
Taylor expanded in y.im around 0 63.4%
Taylor expanded in y.re around 0 58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
Simplified58.1%
if 4.8e-245 < x.re < 1.46e-229Initial program 0.0%
Taylor expanded in y.im around 0 20.9%
Taylor expanded in y.re around 0 42.5%
*-commutative42.5%
distribute-rgt-neg-in42.5%
Simplified42.5%
Taylor expanded in y.im around 0 23.6%
*-commutative23.6%
add-cbrt-cube80.8%
pow380.8%
*-commutative80.8%
Applied egg-rr80.8%
if 1.46e-229 < x.re Initial program 38.9%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod36.4%
fma-def36.4%
hypot-def68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 56.0%
unpow256.0%
unpow256.0%
hypot-def71.1%
Simplified71.1%
Taylor expanded in x.im around 0 67.4%
Final simplification61.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (sin t_1) (pow (hypot x.im x.re) y.re))))
(if (<= x.re -4.1e+83)
t_2
(if (<= x.re -390000000.0)
t_0
(if (<= x.re -1e-77)
t_2
(if (<= x.re -2.2e-218)
t_0
(if (<= x.re 1.25e-190)
t_2
(* (sin (+ t_1 (* y.im (log x.re)))) (pow x.re y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -4.1e+83) {
tmp = t_2;
} else if (x_46_re <= -390000000.0) {
tmp = t_0;
} else if (x_46_re <= -1e-77) {
tmp = t_2;
} else if (x_46_re <= -2.2e-218) {
tmp = t_0;
} else if (x_46_re <= 1.25e-190) {
tmp = t_2;
} else {
tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (x_46_re <= -4.1e+83) {
tmp = t_2;
} else if (x_46_re <= -390000000.0) {
tmp = t_0;
} else if (x_46_re <= -1e-77) {
tmp = t_2;
} else if (x_46_re <= -2.2e-218) {
tmp = t_0;
} else if (x_46_re <= 1.25e-190) {
tmp = t_2;
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if x_46_re <= -4.1e+83: tmp = t_2 elif x_46_re <= -390000000.0: tmp = t_0 elif x_46_re <= -1e-77: tmp = t_2 elif x_46_re <= -2.2e-218: tmp = t_0 elif x_46_re <= 1.25e-190: tmp = t_2 else: tmp = math.sin((t_1 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (x_46_re <= -4.1e+83) tmp = t_2; elseif (x_46_re <= -390000000.0) tmp = t_0; elseif (x_46_re <= -1e-77) tmp = t_2; elseif (x_46_re <= -2.2e-218) tmp = t_0; elseif (x_46_re <= 1.25e-190) tmp = t_2; else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (x_46_re <= -4.1e+83) tmp = t_2; elseif (x_46_re <= -390000000.0) tmp = t_0; elseif (x_46_re <= -1e-77) tmp = t_2; elseif (x_46_re <= -2.2e-218) tmp = t_0; elseif (x_46_re <= 1.25e-190) tmp = t_2; else tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $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[Sin[t$95$1], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -4.1e+83], t$95$2, If[LessEqual[x$46$re, -390000000.0], t$95$0, If[LessEqual[x$46$re, -1e-77], t$95$2, If[LessEqual[x$46$re, -2.2e-218], t$95$0, If[LessEqual[x$46$re, 1.25e-190], t$95$2, N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -4.1 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -390000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -2.2 \cdot 10^{-218}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_1 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -4.1000000000000001e83 or -3.9e8 < x.re < -9.9999999999999993e-78 or -2.20000000000000007e-218 < x.re < 1.25000000000000009e-190Initial program 37.6%
Taylor expanded in y.im around 0 59.1%
Taylor expanded in y.im around 0 53.7%
unpow253.7%
unpow253.7%
hypot-def53.1%
Simplified53.1%
if -4.1000000000000001e83 < x.re < -3.9e8 or -9.9999999999999993e-78 < x.re < -2.20000000000000007e-218Initial program 45.6%
Taylor expanded in y.im around 0 63.4%
Taylor expanded in y.re around 0 58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
Simplified58.1%
if 1.25000000000000009e-190 < x.re Initial program 40.4%
exp-diff40.4%
exp-to-pow40.4%
hypot-def40.4%
*-commutative40.4%
exp-prod38.5%
fma-def38.5%
hypot-def69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in y.im around 0 54.0%
unpow254.0%
unpow254.0%
hypot-def70.7%
Simplified70.7%
Taylor expanded in x.im around 0 64.6%
Final simplification58.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -8e-5) (not (<= y.re 520.0))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8e-5) || !(y_46_re <= 520.0)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8e-5) || !(y_46_re <= 520.0)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -8e-5) or not (y_46_re <= 520.0): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -8e-5) || !(y_46_re <= 520.0)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -8e-5) || ~((y_46_re <= 520.0))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -8e-5], N[Not[LessEqual[y$46$re, 520.0]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8 \cdot 10^{-5} \lor \neg \left(y.re \leq 520\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -8.00000000000000065e-5 or 520 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 71.4%
Taylor expanded in y.im around 0 68.3%
unpow268.3%
unpow268.3%
hypot-def68.3%
Simplified68.3%
if -8.00000000000000065e-5 < y.re < 520Initial program 40.3%
Taylor expanded in y.im around 0 32.8%
Taylor expanded in y.re around 0 41.3%
*-commutative41.3%
distribute-rgt-neg-in41.3%
Simplified41.3%
Final simplification54.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 8.5e+86) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))) (log (pow (exp (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 tmp;
if (y_46_re <= 8.5e+86) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
} else {
tmp = log(pow(exp(atan2(x_46_im, x_46_re)), y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= 8.5d+86) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
else
tmp = log((exp(atan2(x_46im, x_46re)) ** y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 8.5e+86) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.log(Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 8.5e+86: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) else: tmp = math.log(math.pow(math.exp(math.atan2(x_46_im, x_46_re)), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 8.5e+86) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); else tmp = log((exp(atan(x_46_im, x_46_re)) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 8.5e+86) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); else tmp = log((exp(atan2(x_46_im, x_46_re)) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 8.5e+86], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 8.5 \cdot 10^{+86}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < 8.5000000000000005e86Initial program 40.7%
Taylor expanded in y.im around 0 50.1%
Taylor expanded in y.re around 0 35.2%
*-commutative35.2%
distribute-rgt-neg-in35.2%
Simplified35.2%
if 8.5000000000000005e86 < y.re Initial program 37.3%
Taylor expanded in y.im around 0 59.3%
Taylor expanded in y.re around 0 14.0%
*-commutative14.0%
distribute-rgt-neg-in14.0%
Simplified14.0%
Taylor expanded in y.im around 0 2.8%
add-log-exp36.3%
*-commutative36.3%
exp-prod39.6%
Applied egg-rr39.6%
Final simplification36.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -7800000000000.0) (not (<= y.im 3.2e-67)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -7800000000000.0) || !(y_46_im <= 3.2e-67)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -7800000000000.0) || !(y_46_im <= 3.2e-67)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -7800000000000.0) or not (y_46_im <= 3.2e-67): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -7800000000000.0) || !(y_46_im <= 3.2e-67)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -7800000000000.0], N[Not[LessEqual[y$46$im, 3.2e-67]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -7800000000000 \lor \neg \left(y.im \leq 3.2 \cdot 10^{-67}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -7.8e12 or 3.20000000000000021e-67 < y.im Initial program 38.9%
Taylor expanded in y.im around 0 58.7%
Taylor expanded in y.re around 0 48.4%
*-commutative48.4%
distribute-rgt-neg-in48.4%
Simplified48.4%
Taylor expanded in y.im around 0 3.7%
*-commutative3.7%
log1p-expm1-u11.6%
log1p-udef29.0%
*-commutative29.0%
Applied egg-rr29.0%
if -7.8e12 < y.im < 3.20000000000000021e-67Initial program 40.8%
Taylor expanded in y.im around 0 46.8%
Taylor expanded in y.re around 0 15.1%
*-commutative15.1%
distribute-rgt-neg-in15.1%
Simplified15.1%
Taylor expanded in y.im around 0 15.1%
log1p-expm1-u27.2%
Applied egg-rr27.2%
Final simplification28.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.4e-146) (not (<= y.re 5e-147)))
(log1p (expm1 t_0))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -4.4e-146) || !(y_46_re <= 5e-147)) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -4.4e-146) || !(y_46_re <= 5e-147)) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -4.4e-146) || !(y_46_re <= 5e-147)) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -4.4e-146], N[Not[LessEqual[y$46$re, 5e-147]], $MachinePrecision]], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.4 \cdot 10^{-146} \lor \neg \left(y.re \leq 5 \cdot 10^{-147}\right):\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -4.4e-146 or 5.00000000000000013e-147 < y.re Initial program 39.8%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 27.8%
*-commutative27.8%
distribute-rgt-neg-in27.8%
Simplified27.8%
Taylor expanded in y.im around 0 10.5%
log1p-expm1-u23.9%
Applied egg-rr23.9%
if -4.4e-146 < y.re < 5.00000000000000013e-147Initial program 40.4%
Taylor expanded in y.im around 0 36.1%
Taylor expanded in y.re around 0 38.2%
*-commutative38.2%
distribute-rgt-neg-in38.2%
Simplified38.2%
Taylor expanded in y.im around 0 8.0%
*-commutative8.0%
add-cbrt-cube27.3%
pow327.3%
*-commutative27.3%
Applied egg-rr27.3%
Final simplification24.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 2.4e+87) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))) (log (+ 1.0 (expm1 (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 2.4e+87) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
} else {
tmp = log((1.0 + expm1((y_46_re * atan2(x_46_im, x_46_re)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 2.4e+87) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.log((1.0 + Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 2.4e+87: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) else: tmp = math.log((1.0 + math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 2.4e+87) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); else tmp = log(Float64(1.0 + expm1(Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 2.4e+87], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 2.4 \cdot 10^{+87}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < 2.39999999999999981e87Initial program 40.7%
Taylor expanded in y.im around 0 50.1%
Taylor expanded in y.re around 0 35.2%
*-commutative35.2%
distribute-rgt-neg-in35.2%
Simplified35.2%
if 2.39999999999999981e87 < y.re Initial program 37.3%
Taylor expanded in y.im around 0 59.3%
Taylor expanded in y.re around 0 14.0%
*-commutative14.0%
distribute-rgt-neg-in14.0%
Simplified14.0%
Taylor expanded in y.im around 0 2.8%
*-commutative2.8%
log1p-expm1-u34.6%
log1p-udef36.3%
*-commutative36.3%
Applied egg-rr36.3%
Final simplification35.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 39.9%
Taylor expanded in y.im around 0 52.2%
Taylor expanded in y.re around 0 30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
Simplified30.3%
Taylor expanded in y.im around 0 9.9%
log1p-expm1-u20.1%
Applied egg-rr20.1%
Final simplification20.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (- 1.0 (* y.im (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * (1.0 - (y_46_im * atan2(x_46_im, x_46_re))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * (1.0d0 - (y_46im * atan2(x_46im, x_46re))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 - (y_46_im * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 - (y_46_im * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 - Float64(y_46_im * atan(x_46_im, x_46_re))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 - (y_46_im * atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 39.9%
Taylor expanded in y.im around 0 52.2%
Taylor expanded in y.re around 0 30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
Simplified30.3%
Taylor expanded in y.im around 0 11.4%
neg-mul-111.4%
distribute-rgt-neg-in11.4%
Simplified11.4%
Final simplification11.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 39.9%
Taylor expanded in y.im around 0 52.2%
Taylor expanded in y.re around 0 30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
Simplified30.3%
Taylor expanded in y.im around 0 9.9%
Final simplification9.9%
herbie shell --seed 2024036
(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)))))