
(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 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re -1650000000.0)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.re 1700000.0)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (pow (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))) 3.0)))
(* (pow (hypot x.im x.re) y.re) (sin (pow (cbrt (* y.im 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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1650000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(pow(cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt((y_46_im * t_0)), 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 (y_46_re <= -1650000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_re <= 1700000.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin((cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(Float64(y_46_im * 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1650000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0), $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}\;y.re \leq -1650000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1.65e9Initial program 31.8%
Taylor expanded in y.re around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine87.9%
Simplified87.9%
if -1.65e9 < y.re < 1.7e6Initial program 43.1%
exp-diff42.3%
exp-to-pow42.3%
hypot-define42.3%
*-commutative42.3%
exp-prod42.0%
fma-define42.0%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
add-cube-cbrt82.0%
pow382.8%
fma-undefine82.8%
*-commutative82.8%
*-commutative82.8%
fma-define82.8%
Applied egg-rr82.8%
Taylor expanded in y.re around 0 83.4%
rec-exp83.4%
Simplified83.4%
if 1.7e6 < y.re Initial program 45.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod35.9%
fma-define34.4%
hypot-define46.9%
*-commutative46.9%
Simplified46.9%
add-cube-cbrt46.9%
pow345.3%
fma-undefine45.3%
*-commutative45.3%
*-commutative45.3%
fma-define45.3%
Applied egg-rr45.3%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in y.im around inf 40.7%
+-commutative40.7%
unpow240.7%
unpow240.7%
hypot-undefine67.3%
Simplified67.3%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) -0.2)
(* t_3 (sin (* y.im (log (hypot x.im x.re)))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= -0.2) {
tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= -0.2) tmp = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.2], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq -0.2:\\
\;\;\;\;t\_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -0.20000000000000001Initial program 40.8%
Taylor expanded in y.re around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine71.3%
Simplified71.3%
if -0.20000000000000001 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.3%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= y.re -1e+69)
(* t_0 (sin (* y.re (sqrt (pow (atan2 x.im x.re) 2.0)))))
(if (<= y.re -1e-58)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_1))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 3400000.0)
(/ (sin (* y.im (log (hypot x.im x.re)))) (exp t_1))
(* t_0 (sin (pow (cbrt (* y.im (log (hypot x.re x.im)))) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_re <= -1e+69) {
tmp = t_0 * sin((y_46_re * sqrt(pow(atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -1e-58) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3400000.0) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_1);
} else {
tmp = t_0 * sin(pow(cbrt((y_46_im * log(hypot(x_46_re, x_46_im)))), 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_re <= -1e+69) {
tmp = t_0 * Math.sin((y_46_re * Math.sqrt(Math.pow(Math.atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -1e-58) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_1)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3400000.0) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_1);
} else {
tmp = t_0 * Math.sin(Math.pow(Math.cbrt((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_re <= -1e+69) tmp = Float64(t_0 * sin(Float64(y_46_re * sqrt((atan(x_46_im, x_46_re) ^ 2.0))))); elseif (y_46_re <= -1e-58) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_1)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 3400000.0) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_1)); else tmp = Float64(t_0 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, -1e+69], N[(t$95$0 * N[Sin[N[(y$46$re * N[Sqrt[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1e-58], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3400000.0], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{+69}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt{{\tan^{-1}_* \frac{x.im}{x.re}}^{2}}\right)\\
\mathbf{elif}\;y.re \leq -1 \cdot 10^{-58}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_1} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 3400000:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1.0000000000000001e69Initial program 28.0%
cancel-sign-sub-inv28.0%
fma-define28.0%
hypot-define28.0%
distribute-lft-neg-in28.0%
distribute-rgt-neg-out28.0%
fma-define28.0%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.im around 0 76.1%
unpow276.1%
unpow276.1%
hypot-undefine76.1%
Simplified76.1%
add-sqr-sqrt48.1%
sqrt-unprod90.1%
pow290.1%
Applied egg-rr90.1%
if -1.0000000000000001e69 < y.re < -1e-58Initial program 44.4%
Taylor expanded in y.im around 0 85.6%
if -1e-58 < y.re < 3.4e6Initial program 42.8%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod41.7%
fma-define41.7%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 38.7%
unpow238.7%
unpow238.7%
hypot-undefine72.2%
Simplified72.2%
if 3.4e6 < y.re Initial program 45.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod35.9%
fma-define34.4%
hypot-define46.9%
*-commutative46.9%
Simplified46.9%
add-cube-cbrt46.9%
pow345.3%
fma-undefine45.3%
*-commutative45.3%
*-commutative45.3%
fma-define45.3%
Applied egg-rr45.3%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in y.im around inf 40.7%
+-commutative40.7%
unpow240.7%
unpow240.7%
hypot-undefine67.3%
Simplified67.3%
Final simplification75.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re -650.0)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.re 1700000.0)
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (hypot x.im x.re) y.re) (sin (pow (cbrt (* y.im 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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -650.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt((y_46_im * t_0)), 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 (y_46_re <= -650.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_re <= 1700000.0) tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(Float64(y_46_im * 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -650.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], N[(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] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0), $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}\;y.re \leq -650:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -650Initial program 32.4%
Taylor expanded in y.re around 0 41.2%
unpow241.2%
unpow241.2%
hypot-undefine86.8%
Simplified86.8%
if -650 < y.re < 1.7e6Initial program 43.0%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod41.9%
fma-define41.9%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.re around 0 80.8%
rec-exp83.9%
Simplified80.8%
if 1.7e6 < y.re Initial program 45.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod35.9%
fma-define34.4%
hypot-define46.9%
*-commutative46.9%
Simplified46.9%
add-cube-cbrt46.9%
pow345.3%
fma-undefine45.3%
*-commutative45.3%
*-commutative45.3%
fma-define45.3%
Applied egg-rr45.3%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in y.im around inf 40.7%
+-commutative40.7%
unpow240.7%
unpow240.7%
hypot-undefine67.3%
Simplified67.3%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (log (hypot x.re x.im))))
(if (<= y.re -1600.0)
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)
(if (<= y.re 6800000.0)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_0 (sin (pow (cbrt (* y.im t_1)) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1600.0) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
} else if (y_46_re <= 6800000.0) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0 * sin(pow(cbrt((y_46_im * t_1)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1600.0) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); elseif (y_46_re <= 6800000.0) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_0 * sin((cbrt(Float64(y_46_im * t_1)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1600.0], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 6800000.0], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1600:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 6800000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_1}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1600Initial program 32.4%
exp-diff27.9%
exp-to-pow27.9%
hypot-define27.9%
*-commutative27.9%
exp-prod27.9%
fma-define27.9%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
add-cube-cbrt70.6%
pow367.6%
fma-undefine67.6%
*-commutative67.6%
*-commutative67.6%
fma-define67.6%
Applied egg-rr67.6%
Taylor expanded in y.im around 0 78.1%
unpow278.1%
unpow278.1%
hypot-undefine78.1%
Simplified78.1%
Taylor expanded in y.re around 0 39.8%
unpow239.8%
unpow239.8%
hypot-undefine85.4%
Simplified85.4%
if -1600 < y.re < 6.8e6Initial program 43.0%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod41.9%
fma-define41.9%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.re around 0 80.8%
rec-exp83.9%
Simplified80.8%
if 6.8e6 < y.re Initial program 45.3%
exp-diff35.9%
exp-to-pow35.9%
hypot-define35.9%
*-commutative35.9%
exp-prod35.9%
fma-define34.4%
hypot-define46.9%
*-commutative46.9%
Simplified46.9%
add-cube-cbrt46.9%
pow345.3%
fma-undefine45.3%
*-commutative45.3%
*-commutative45.3%
fma-define45.3%
Applied egg-rr45.3%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-undefine62.6%
Simplified62.6%
Taylor expanded in y.im around inf 40.7%
+-commutative40.7%
unpow240.7%
unpow240.7%
hypot-undefine67.3%
Simplified67.3%
Final simplification78.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (sin t_0) t_1))
(t_3 (sin (* y.re (atan2 x.im x.re))))
(t_4
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_3)))
(if (<= y.im -1.1e+119)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_3)
(if (<= y.im -210.0)
t_4
(if (<= y.im -1.4e-66)
t_2
(if (<= y.im 1.3e-170)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (/ t_0 y.re)))))
(if (<= y.im 37.0) t_2 t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0) * t_1;
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_4 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
double tmp;
if (y_46_im <= -1.1e+119) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_3;
} else if (y_46_im <= -210.0) {
tmp = t_4;
} else if (y_46_im <= -1.4e-66) {
tmp = t_2;
} else if (y_46_im <= 1.3e-170) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (t_0 / y_46_re))));
} else if (y_46_im <= 37.0) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.log(Math.hypot(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 = Math.sin(t_0) * t_1;
double t_3 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_4 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
double tmp;
if (y_46_im <= -1.1e+119) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_3;
} else if (y_46_im <= -210.0) {
tmp = t_4;
} else if (y_46_im <= -1.4e-66) {
tmp = t_2;
} else if (y_46_im <= 1.3e-170) {
tmp = t_1 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (t_0 / y_46_re))));
} else if (y_46_im <= 37.0) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin(t_0) * t_1 t_3 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_4 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_3 tmp = 0 if y_46_im <= -1.1e+119: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_3 elif y_46_im <= -210.0: tmp = t_4 elif y_46_im <= -1.4e-66: tmp = t_2 elif y_46_im <= 1.3e-170: tmp = t_1 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (t_0 / y_46_re)))) elif y_46_im <= 37.0: tmp = t_2 else: tmp = t_4 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(t_0) * t_1) t_3 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_4 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3) tmp = 0.0 if (y_46_im <= -1.1e+119) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_3); elseif (y_46_im <= -210.0) tmp = t_4; elseif (y_46_im <= -1.4e-66) tmp = t_2; elseif (y_46_im <= 1.3e-170) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(t_0 / y_46_re))))); elseif (y_46_im <= 37.0) tmp = t_2; else tmp = t_4; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * log(hypot(x_46_im, x_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin(t_0) * t_1; t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_4 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3; tmp = 0.0; if (y_46_im <= -1.1e+119) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_3; elseif (y_46_im <= -210.0) tmp = t_4; elseif (y_46_im <= -1.4e-66) tmp = t_2; elseif (y_46_im <= 1.3e-170) tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (t_0 / y_46_re)))); elseif (y_46_im <= 37.0) tmp = t_2; else tmp = t_4; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $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[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$im, -1.1e+119], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, -210.0], t$95$4, If[LessEqual[y$46$im, -1.4e-66], t$95$2, If[LessEqual[y$46$im, 1.3e-170], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 37.0], t$95$2, t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t\_0 \cdot t\_1\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_4 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3\\
\mathbf{if}\;y.im \leq -1.1 \cdot 10^{+119}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_3\\
\mathbf{elif}\;y.im \leq -210:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq -1.4 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.3 \cdot 10^{-170}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{t\_0}{y.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 37:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.im < -1.1000000000000001e119Initial program 26.5%
exp-diff24.5%
exp-to-pow24.5%
hypot-define24.5%
*-commutative24.5%
exp-prod24.5%
fma-define24.5%
hypot-define65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in y.re around 0 66.1%
rec-exp65.6%
Simplified66.1%
Taylor expanded in x.re around 0 20.9%
Taylor expanded in y.im around 0 71.7%
if -1.1000000000000001e119 < y.im < -210 or 37 < y.im Initial program 43.8%
Taylor expanded in y.im around 0 65.9%
if -210 < y.im < -1.4e-66 or 1.3000000000000001e-170 < y.im < 37Initial program 39.3%
exp-diff39.3%
exp-to-pow39.3%
hypot-define39.3%
*-commutative39.3%
exp-prod39.3%
fma-define39.3%
hypot-define72.4%
*-commutative72.4%
Simplified72.4%
add-cube-cbrt83.6%
pow374.6%
fma-undefine74.6%
*-commutative74.6%
*-commutative74.6%
fma-define74.6%
Applied egg-rr74.6%
Taylor expanded in y.im around 0 54.7%
unpow254.7%
unpow254.7%
hypot-undefine74.6%
Simplified74.6%
Taylor expanded in y.re around 0 57.4%
unpow257.4%
unpow257.4%
hypot-undefine93.0%
Simplified93.0%
if -1.4e-66 < y.im < 1.3000000000000001e-170Initial program 46.3%
exp-diff46.3%
exp-to-pow46.3%
hypot-define46.3%
*-commutative46.3%
exp-prod46.3%
fma-define46.3%
hypot-define91.4%
*-commutative91.4%
Simplified91.4%
add-cube-cbrt90.8%
pow390.8%
fma-undefine90.8%
*-commutative90.8%
*-commutative90.8%
fma-define90.8%
Applied egg-rr90.8%
Taylor expanded in y.im around 0 69.3%
unpow269.3%
unpow269.3%
hypot-undefine90.8%
Simplified90.8%
pow1/348.9%
add-cube-cbrt47.7%
unpow-prod-down47.7%
pow247.7%
pow1/387.3%
Applied egg-rr87.3%
Taylor expanded in y.re around inf 46.3%
unpow246.3%
unpow246.3%
hypot-undefine91.4%
Simplified91.4%
Final simplification78.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))) (t_1 (* t_0 (pow x.im y.re))))
(if (<= y.re -1.2e+25)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (sqrt (pow (atan2 x.im x.re) 2.0)))))
(if (<= y.re -7.5e-47)
(* t_0 (pow x.re y.re))
(if (<= y.re 1700000.0)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 1.02e+261)
(* t_0 (pow (log (exp (hypot x.im x.re))) y.re))
(if (<= y.re 8.5e+283) (fabs t_1) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.2e+25) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * sqrt(pow(atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -7.5e-47) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 1700000.0) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.02e+261) {
tmp = t_0 * pow(log(exp(hypot(x_46_im, x_46_re))), y_46_re);
} else if (y_46_re <= 8.5e+283) {
tmp = fabs(t_1);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.2e+25) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.sqrt(Math.pow(Math.atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -7.5e-47) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 1700000.0) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.02e+261) {
tmp = t_0 * Math.pow(Math.log(Math.exp(Math.hypot(x_46_im, x_46_re))), y_46_re);
} else if (y_46_re <= 8.5e+283) {
tmp = Math.abs(t_1);
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -1.2e+25: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.sqrt(math.pow(math.atan2(x_46_im, x_46_re), 2.0)))) elif y_46_re <= -7.5e-47: tmp = t_0 * math.pow(x_46_re, y_46_re) elif y_46_re <= 1700000.0: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) elif y_46_re <= 1.02e+261: tmp = t_0 * math.pow(math.log(math.exp(math.hypot(x_46_im, x_46_re))), y_46_re) elif y_46_re <= 8.5e+283: tmp = math.fabs(t_1) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.2e+25) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * sqrt((atan(x_46_im, x_46_re) ^ 2.0))))); elseif (y_46_re <= -7.5e-47) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 1700000.0) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 1.02e+261) tmp = Float64(t_0 * (log(exp(hypot(x_46_im, x_46_re))) ^ y_46_re)); elseif (y_46_re <= 8.5e+283) tmp = abs(t_1); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -1.2e+25) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * sqrt((atan2(x_46_im, x_46_re) ^ 2.0)))); elseif (y_46_re <= -7.5e-47) tmp = t_0 * (x_46_re ^ y_46_re); elseif (y_46_re <= 1700000.0) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); elseif (y_46_re <= 1.02e+261) tmp = t_0 * (log(exp(hypot(x_46_im, x_46_re))) ^ y_46_re); elseif (y_46_re <= 8.5e+283) tmp = abs(t_1); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+25], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[Sqrt[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -7.5e-47], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.02e+261], N[(t$95$0 * N[Power[N[Log[N[Exp[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.5e+283], N[Abs[t$95$1], $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+25}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \sqrt{{\tan^{-1}_* \frac{x.im}{x.re}}^{2}}\right)\\
\mathbf{elif}\;y.re \leq -7.5 \cdot 10^{-47}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 1.02 \cdot 10^{+261}:\\
\;\;\;\;t\_0 \cdot {\log \left(e^{\mathsf{hypot}\left(x.im, x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+283}:\\
\;\;\;\;\left|t\_1\right|\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.19999999999999998e25Initial program 31.1%
cancel-sign-sub-inv31.1%
fma-define31.1%
hypot-define31.1%
distribute-lft-neg-in31.1%
distribute-rgt-neg-out31.1%
fma-define31.1%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 80.4%
unpow280.4%
unpow280.4%
hypot-undefine80.4%
Simplified80.4%
add-sqr-sqrt42.7%
sqrt-unprod90.2%
pow290.2%
Applied egg-rr90.2%
if -1.19999999999999998e25 < y.re < -7.49999999999999969e-47Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 58.2%
unpow258.2%
unpow258.2%
hypot-undefine72.0%
Simplified72.0%
Taylor expanded in x.im around 0 79.9%
if -7.49999999999999969e-47 < y.re < 1.7e6Initial program 42.1%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod41.0%
fma-define41.0%
hypot-define79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in y.re around 0 38.1%
unpow238.1%
unpow238.1%
hypot-undefine71.8%
Simplified71.8%
if 1.7e6 < y.re < 1.01999999999999993e261Initial program 46.9%
cancel-sign-sub-inv46.9%
fma-define46.9%
hypot-define46.9%
distribute-lft-neg-in46.9%
distribute-rgt-neg-out46.9%
fma-define44.9%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 69.5%
unpow269.5%
unpow269.5%
hypot-undefine69.5%
Simplified69.5%
add-log-exp69.5%
Applied egg-rr69.5%
if 1.01999999999999993e261 < y.re < 8.5000000000000008e283Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 8.5000000000000008e283 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* t_0 (pow x.im y.re))))
(if (<= y.re -8.2e+24)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re -9e-45)
(* t_0 (pow x.re y.re))
(if (<= y.re 7200000.0)
(/ t_1 (exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 1.1e+258)
(* t_0 (pow (log (exp (hypot x.im x.re))) y.re))
(if (<= y.re 1e+284) (fabs t_2) t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -8.2e+24) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -9e-45) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 7200000.0) {
tmp = t_1 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.1e+258) {
tmp = t_0 * pow(log(exp(hypot(x_46_im, x_46_re))), y_46_re);
} else if (y_46_re <= 1e+284) {
tmp = fabs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -8.2e+24) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -9e-45) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 7200000.0) {
tmp = t_1 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 1.1e+258) {
tmp = t_0 * Math.pow(Math.log(Math.exp(Math.hypot(x_46_im, x_46_re))), y_46_re);
} else if (y_46_re <= 1e+284) {
tmp = Math.abs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -8.2e+24: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= -9e-45: tmp = t_0 * math.pow(x_46_re, y_46_re) elif y_46_re <= 7200000.0: tmp = t_1 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) elif y_46_re <= 1.1e+258: tmp = t_0 * math.pow(math.log(math.exp(math.hypot(x_46_im, x_46_re))), y_46_re) elif y_46_re <= 1e+284: tmp = math.fabs(t_2) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -8.2e+24) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -9e-45) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 7200000.0) tmp = Float64(t_1 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 1.1e+258) tmp = Float64(t_0 * (log(exp(hypot(x_46_im, x_46_re))) ^ y_46_re)); elseif (y_46_re <= 1e+284) tmp = abs(t_2); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -8.2e+24) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -9e-45) tmp = t_0 * (x_46_re ^ y_46_re); elseif (y_46_re <= 7200000.0) tmp = t_1 / exp((atan2(x_46_im, x_46_re) * y_46_im)); elseif (y_46_re <= 1.1e+258) tmp = t_0 * (log(exp(hypot(x_46_im, x_46_re))) ^ y_46_re); elseif (y_46_re <= 1e+284) tmp = abs(t_2); else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.2e+24], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -9e-45], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7200000.0], N[(t$95$1 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e+258], N[(t$95$0 * N[Power[N[Log[N[Exp[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e+284], N[Abs[t$95$2], $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -8.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-45}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 7200000:\\
\;\;\;\;\frac{t\_1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+258}:\\
\;\;\;\;t\_0 \cdot {\log \left(e^{\mathsf{hypot}\left(x.im, x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 10^{+284}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -8.2000000000000002e24Initial program 31.1%
exp-diff26.2%
exp-to-pow26.2%
hypot-define26.2%
*-commutative26.2%
exp-prod26.2%
fma-define26.2%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
add-cube-cbrt73.8%
pow370.5%
fma-undefine70.5%
*-commutative70.5%
*-commutative70.5%
fma-define70.5%
Applied egg-rr70.5%
Taylor expanded in y.im around 0 82.0%
unpow282.0%
unpow282.0%
hypot-undefine82.0%
Simplified82.0%
Taylor expanded in y.re around 0 39.4%
unpow239.4%
unpow239.4%
hypot-undefine88.6%
Simplified88.6%
if -8.2000000000000002e24 < y.re < -8.9999999999999997e-45Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 58.2%
unpow258.2%
unpow258.2%
hypot-undefine72.0%
Simplified72.0%
Taylor expanded in x.im around 0 79.9%
if -8.9999999999999997e-45 < y.re < 7.2e6Initial program 42.1%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod41.0%
fma-define41.0%
hypot-define79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in y.re around 0 38.1%
unpow238.1%
unpow238.1%
hypot-undefine71.8%
Simplified71.8%
if 7.2e6 < y.re < 1.09999999999999991e258Initial program 46.9%
cancel-sign-sub-inv46.9%
fma-define46.9%
hypot-define46.9%
distribute-lft-neg-in46.9%
distribute-rgt-neg-out46.9%
fma-define44.9%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 69.5%
unpow269.5%
unpow269.5%
hypot-undefine69.5%
Simplified69.5%
add-log-exp69.5%
Applied egg-rr69.5%
if 1.09999999999999991e258 < y.re < 1.00000000000000008e284Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 1.00000000000000008e284 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.re (atan2 x.im x.re)))))
(t_2 (log (hypot x.im x.re))))
(if (<= y.im -6.6e+27)
t_1
(if (<= y.im 1.3e-174)
(* t_0 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_2 y.re))))))
(if (<= y.im 4.2e+29) (* (sin (* y.im t_2)) t_0) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -6.6e+27) {
tmp = t_1;
} else if (y_46_im <= 1.3e-174) {
tmp = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
} else if (y_46_im <= 4.2e+29) {
tmp = sin((y_46_im * t_2)) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -6.6e+27) {
tmp = t_1;
} else if (y_46_im <= 1.3e-174) {
tmp = t_0 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re)))));
} else if (y_46_im <= 4.2e+29) {
tmp = Math.sin((y_46_im * t_2)) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -6.6e+27: tmp = t_1 elif y_46_im <= 1.3e-174: tmp = t_0 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))) elif y_46_im <= 4.2e+29: tmp = math.sin((y_46_im * t_2)) * t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -6.6e+27) tmp = t_1; elseif (y_46_im <= 1.3e-174) tmp = Float64(t_0 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_2 / y_46_re)))))); elseif (y_46_im <= 4.2e+29) tmp = Float64(sin(Float64(y_46_im * t_2)) * t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -6.6e+27) tmp = t_1; elseif (y_46_im <= 1.3e-174) tmp = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_2 / y_46_re))))); elseif (y_46_im <= 4.2e+29) tmp = sin((y_46_im * t_2)) * t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -6.6e+27], t$95$1, If[LessEqual[y$46$im, 1.3e-174], N[(t$95$0 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e+29], N[(N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -6.6 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.3 \cdot 10^{-174}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_2}{y.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+29}:\\
\;\;\;\;\sin \left(y.im \cdot t\_2\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -6.5999999999999996e27 or 4.2000000000000003e29 < y.im Initial program 37.0%
exp-diff30.0%
exp-to-pow30.0%
hypot-define30.0%
*-commutative30.0%
exp-prod29.8%
fma-define29.0%
hypot-define53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in y.re around 0 53.7%
rec-exp58.9%
Simplified53.7%
Taylor expanded in x.re around 0 29.8%
Taylor expanded in y.im around 0 61.5%
if -6.5999999999999996e27 < y.im < 1.3000000000000001e-174Initial program 45.9%
exp-diff44.9%
exp-to-pow44.9%
hypot-define44.9%
*-commutative44.9%
exp-prod44.9%
fma-define44.9%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
add-cube-cbrt89.1%
pow387.1%
fma-undefine87.1%
*-commutative87.1%
*-commutative87.1%
fma-define87.1%
Applied egg-rr87.1%
Taylor expanded in y.im around 0 66.3%
unpow266.3%
unpow266.3%
hypot-undefine88.1%
Simplified88.1%
Taylor expanded in y.re around inf 44.9%
+-commutative44.9%
associate-/l*44.9%
unpow244.9%
unpow244.9%
hypot-undefine89.8%
Simplified89.8%
if 1.3000000000000001e-174 < y.im < 4.2000000000000003e29Initial program 39.2%
exp-diff39.2%
exp-to-pow39.2%
hypot-define39.2%
*-commutative39.2%
exp-prod39.2%
fma-define39.2%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
add-cube-cbrt77.8%
pow370.7%
fma-undefine70.7%
*-commutative70.7%
*-commutative70.7%
fma-define70.7%
Applied egg-rr70.7%
Taylor expanded in y.im around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine70.9%
Simplified70.9%
Taylor expanded in y.re around 0 53.7%
unpow253.7%
unpow253.7%
hypot-undefine88.5%
Simplified88.5%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.re (atan2 x.im x.re)))))
(t_2 (* y.im (log (hypot x.im x.re)))))
(if (<= y.im -6.2e+30)
t_1
(if (<= y.im 1.1e-170)
(* t_0 (sin (* y.re (+ (atan2 x.im x.re) (/ t_2 y.re)))))
(if (<= y.im 5e+30) (* (sin t_2) t_0) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -6.2e+30) {
tmp = t_1;
} else if (y_46_im <= 1.1e-170) {
tmp = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (t_2 / y_46_re))));
} else if (y_46_im <= 5e+30) {
tmp = sin(t_2) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -6.2e+30) {
tmp = t_1;
} else if (y_46_im <= 1.1e-170) {
tmp = t_0 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (t_2 / y_46_re))));
} else if (y_46_im <= 5e+30) {
tmp = Math.sin(t_2) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -6.2e+30: tmp = t_1 elif y_46_im <= 1.1e-170: tmp = t_0 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (t_2 / y_46_re)))) elif y_46_im <= 5e+30: tmp = math.sin(t_2) * t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= -6.2e+30) tmp = t_1; elseif (y_46_im <= 1.1e-170) tmp = Float64(t_0 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(t_2 / y_46_re))))); elseif (y_46_im <= 5e+30) tmp = Float64(sin(t_2) * t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = y_46_im * log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -6.2e+30) tmp = t_1; elseif (y_46_im <= 1.1e-170) tmp = t_0 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (t_2 / y_46_re)))); elseif (y_46_im <= 5e+30) tmp = sin(t_2) * t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.2e+30], t$95$1, If[LessEqual[y$46$im, 1.1e-170], N[(t$95$0 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e+30], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -6.2 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-170}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{t\_2}{y.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+30}:\\
\;\;\;\;\sin t\_2 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -6.1999999999999995e30 or 4.9999999999999998e30 < y.im Initial program 37.0%
exp-diff30.0%
exp-to-pow30.0%
hypot-define30.0%
*-commutative30.0%
exp-prod29.8%
fma-define29.0%
hypot-define53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in y.re around 0 53.7%
rec-exp58.9%
Simplified53.7%
Taylor expanded in x.re around 0 29.8%
Taylor expanded in y.im around 0 61.5%
if -6.1999999999999995e30 < y.im < 1.10000000000000007e-170Initial program 45.9%
exp-diff44.9%
exp-to-pow44.9%
hypot-define44.9%
*-commutative44.9%
exp-prod44.9%
fma-define44.9%
hypot-define88.8%
*-commutative88.8%
Simplified88.8%
add-cube-cbrt89.1%
pow387.1%
fma-undefine87.1%
*-commutative87.1%
*-commutative87.1%
fma-define87.1%
Applied egg-rr87.1%
Taylor expanded in y.im around 0 66.3%
unpow266.3%
unpow266.3%
hypot-undefine88.1%
Simplified88.1%
pow1/345.1%
add-cube-cbrt44.1%
unpow-prod-down44.1%
pow244.1%
pow1/386.0%
Applied egg-rr86.0%
Taylor expanded in y.re around inf 44.9%
unpow244.9%
unpow244.9%
hypot-undefine89.8%
Simplified89.8%
if 1.10000000000000007e-170 < y.im < 4.9999999999999998e30Initial program 39.2%
exp-diff39.2%
exp-to-pow39.2%
hypot-define39.2%
*-commutative39.2%
exp-prod39.2%
fma-define39.2%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
add-cube-cbrt77.8%
pow370.7%
fma-undefine70.7%
*-commutative70.7%
*-commutative70.7%
fma-define70.7%
Applied egg-rr70.7%
Taylor expanded in y.im around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine70.9%
Simplified70.9%
Taylor expanded in y.re around 0 53.7%
unpow253.7%
unpow253.7%
hypot-undefine88.5%
Simplified88.5%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (hypot x.im x.re) y.re)))
(t_2 (* (exp (* (atan2 x.im x.re) (- y.im))) (sin t_0))))
(if (<= y.im -240000000.0)
t_2
(if (<= y.im 6.7e-276)
t_1
(if (<= y.im 1.1e-261)
(log1p (expm1 t_0))
(if (<= y.im 3.2e+28) t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(t_0);
double tmp;
if (y_46_im <= -240000000.0) {
tmp = t_2;
} else if (y_46_im <= 6.7e-276) {
tmp = t_1;
} else if (y_46_im <= 1.1e-261) {
tmp = log1p(expm1(t_0));
} else if (y_46_im <= 3.2e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin(t_0);
double tmp;
if (y_46_im <= -240000000.0) {
tmp = t_2;
} else if (y_46_im <= 6.7e-276) {
tmp = t_1;
} else if (y_46_im <= 1.1e-261) {
tmp = Math.log1p(Math.expm1(t_0));
} else if (y_46_im <= 3.2e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin(t_0) tmp = 0 if y_46_im <= -240000000.0: tmp = t_2 elif y_46_im <= 6.7e-276: tmp = t_1 elif y_46_im <= 1.1e-261: tmp = math.log1p(math.expm1(t_0)) elif y_46_im <= 3.2e+28: tmp = t_1 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_2 = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(t_0)) tmp = 0.0 if (y_46_im <= -240000000.0) tmp = t_2; elseif (y_46_im <= 6.7e-276) tmp = t_1; elseif (y_46_im <= 1.1e-261) tmp = log1p(expm1(t_0)); elseif (y_46_im <= 3.2e+28) tmp = t_1; else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -240000000.0], t$95$2, If[LessEqual[y$46$im, 6.7e-276], t$95$1, If[LessEqual[y$46$im, 1.1e-261], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 3.2e+28], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin t\_0\\
\mathbf{if}\;y.im \leq -240000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 6.7 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-261}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{elif}\;y.im \leq 3.2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -2.4e8 or 3.2e28 < y.im Initial program 37.0%
exp-diff30.1%
exp-to-pow30.1%
hypot-define30.1%
*-commutative30.1%
exp-prod29.9%
fma-define29.1%
hypot-define53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in y.re around 0 54.1%
rec-exp58.3%
Simplified54.1%
Taylor expanded in x.re around 0 29.8%
Taylor expanded in y.im around 0 61.6%
if -2.4e8 < y.im < 6.69999999999999983e-276 or 1.1000000000000001e-261 < y.im < 3.2e28Initial program 43.9%
exp-diff43.1%
exp-to-pow43.1%
hypot-define43.1%
*-commutative43.1%
exp-prod43.1%
fma-define43.1%
hypot-define84.5%
*-commutative84.5%
Simplified84.5%
add-cube-cbrt87.3%
pow384.7%
fma-undefine84.7%
*-commutative84.7%
*-commutative84.7%
fma-define84.7%
Applied egg-rr84.7%
Taylor expanded in y.im around 0 66.4%
unpow266.4%
unpow266.4%
hypot-undefine85.6%
Simplified85.6%
Taylor expanded in y.re around 0 42.4%
unpow242.4%
unpow242.4%
hypot-undefine80.3%
Simplified80.3%
if 6.69999999999999983e-276 < y.im < 1.1000000000000001e-261Initial program 57.1%
cancel-sign-sub-inv57.1%
fma-define57.1%
hypot-define57.1%
distribute-lft-neg-in57.1%
distribute-rgt-neg-out57.1%
fma-define57.1%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 58.2%
unpow258.2%
unpow258.2%
hypot-undefine85.5%
Simplified85.5%
Taylor expanded in x.re around 0 57.1%
Taylor expanded in y.re around 0 86.5%
*-commutative86.5%
log1p-expm1-u99.8%
Applied egg-rr99.8%
Final simplification71.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (pow x.im y.re)))
(t_3 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.re -1.35e+24)
(* t_3 t_0)
(if (<= y.re -9e-45)
(* t_1 (pow x.re y.re))
(if (<= y.re 1700000.0)
(/ t_3 (exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 5.4e+259)
(* t_0 t_1)
(if (<= y.re 2e+289) (fabs t_2) t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * pow(x_46_im, y_46_re);
double t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.35e+24) {
tmp = t_3 * t_0;
} else if (y_46_re <= -9e-45) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 1700000.0) {
tmp = t_3 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 5.4e+259) {
tmp = t_0 * t_1;
} else if (y_46_re <= 2e+289) {
tmp = fabs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = t_1 * Math.pow(x_46_im, y_46_re);
double t_3 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.35e+24) {
tmp = t_3 * t_0;
} else if (y_46_re <= -9e-45) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 1700000.0) {
tmp = t_3 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 5.4e+259) {
tmp = t_0 * t_1;
} else if (y_46_re <= 2e+289) {
tmp = Math.abs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = t_1 * math.pow(x_46_im, y_46_re) t_3 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.35e+24: tmp = t_3 * t_0 elif y_46_re <= -9e-45: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 1700000.0: tmp = t_3 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) elif y_46_re <= 5.4e+259: tmp = t_0 * t_1 elif y_46_re <= 2e+289: tmp = math.fabs(t_2) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * (x_46_im ^ y_46_re)) t_3 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1.35e+24) tmp = Float64(t_3 * t_0); elseif (y_46_re <= -9e-45) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 1700000.0) tmp = Float64(t_3 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 5.4e+259) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 2e+289) tmp = abs(t_2); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = t_1 * (x_46_im ^ y_46_re); t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.35e+24) tmp = t_3 * t_0; elseif (y_46_re <= -9e-45) tmp = t_1 * (x_46_re ^ y_46_re); elseif (y_46_re <= 1700000.0) tmp = t_3 / exp((atan2(x_46_im, x_46_re) * y_46_im)); elseif (y_46_re <= 5.4e+259) tmp = t_0 * t_1; elseif (y_46_re <= 2e+289) tmp = abs(t_2); else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.35e+24], N[(t$95$3 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -9e-45], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], N[(t$95$3 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.4e+259], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2e+289], N[Abs[t$95$2], $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot {x.im}^{y.re}\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.35 \cdot 10^{+24}:\\
\;\;\;\;t\_3 \cdot t\_0\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-45}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;\frac{t\_3}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{+259}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+289}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.35e24Initial program 31.1%
exp-diff26.2%
exp-to-pow26.2%
hypot-define26.2%
*-commutative26.2%
exp-prod26.2%
fma-define26.2%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
add-cube-cbrt73.8%
pow370.5%
fma-undefine70.5%
*-commutative70.5%
*-commutative70.5%
fma-define70.5%
Applied egg-rr70.5%
Taylor expanded in y.im around 0 82.0%
unpow282.0%
unpow282.0%
hypot-undefine82.0%
Simplified82.0%
Taylor expanded in y.re around 0 39.4%
unpow239.4%
unpow239.4%
hypot-undefine88.6%
Simplified88.6%
if -1.35e24 < y.re < -8.9999999999999997e-45Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 58.2%
unpow258.2%
unpow258.2%
hypot-undefine72.0%
Simplified72.0%
Taylor expanded in x.im around 0 79.9%
if -8.9999999999999997e-45 < y.re < 1.7e6Initial program 42.1%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod41.0%
fma-define41.0%
hypot-define79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in y.re around 0 38.1%
unpow238.1%
unpow238.1%
hypot-undefine71.8%
Simplified71.8%
if 1.7e6 < y.re < 5.39999999999999975e259Initial program 46.9%
cancel-sign-sub-inv46.9%
fma-define46.9%
hypot-define46.9%
distribute-lft-neg-in46.9%
distribute-rgt-neg-out46.9%
fma-define44.9%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 69.5%
unpow269.5%
unpow269.5%
hypot-undefine69.5%
Simplified69.5%
if 5.39999999999999975e259 < y.re < 2.0000000000000001e289Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 2.0000000000000001e289 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* (exp (* (atan2 x.im x.re) (- y.im))) t_0))
(t_2 (* (pow (hypot x.im x.re) y.re) t_0))
(t_3 (* t_0 (pow x.im y.re))))
(if (<= y.re -8.2e-9)
(fabs t_2)
(if (<= y.re 1.06e-299)
t_1
(if (<= y.re 2e-157)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 2500000.0)
t_1
(if (<= y.re 1.26e+261)
t_2
(if (<= y.re 6.5e+288) (fabs t_3) t_3))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
double t_3 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -8.2e-9) {
tmp = fabs(t_2);
} else if (y_46_re <= 1.06e-299) {
tmp = t_1;
} else if (y_46_re <= 2e-157) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2500000.0) {
tmp = t_1;
} else if (y_46_re <= 1.26e+261) {
tmp = t_2;
} else if (y_46_re <= 6.5e+288) {
tmp = fabs(t_3);
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
double t_3 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -8.2e-9) {
tmp = Math.abs(t_2);
} else if (y_46_re <= 1.06e-299) {
tmp = t_1;
} else if (y_46_re <= 2e-157) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2500000.0) {
tmp = t_1;
} else if (y_46_re <= 1.26e+261) {
tmp = t_2;
} else if (y_46_re <= 6.5e+288) {
tmp = Math.abs(t_3);
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0 t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 t_3 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -8.2e-9: tmp = math.fabs(t_2) elif y_46_re <= 1.06e-299: tmp = t_1 elif y_46_re <= 2e-157: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 2500000.0: tmp = t_1 elif y_46_re <= 1.26e+261: tmp = t_2 elif y_46_re <= 6.5e+288: tmp = math.fabs(t_3) else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_0) t_2 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0) t_3 = Float64(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -8.2e-9) tmp = abs(t_2); elseif (y_46_re <= 1.06e-299) tmp = t_1; elseif (y_46_re <= 2e-157) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 2500000.0) tmp = t_1; elseif (y_46_re <= 1.26e+261) tmp = t_2; elseif (y_46_re <= 6.5e+288) tmp = abs(t_3); else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0; t_2 = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; t_3 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -8.2e-9) tmp = abs(t_2); elseif (y_46_re <= 1.06e-299) tmp = t_1; elseif (y_46_re <= 2e-157) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 2500000.0) tmp = t_1; elseif (y_46_re <= 1.26e+261) tmp = t_2; elseif (y_46_re <= 6.5e+288) tmp = abs(t_3); else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.2e-9], N[Abs[t$95$2], $MachinePrecision], If[LessEqual[y$46$re, 1.06e-299], t$95$1, If[LessEqual[y$46$re, 2e-157], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2500000.0], t$95$1, If[LessEqual[y$46$re, 1.26e+261], t$95$2, If[LessEqual[y$46$re, 6.5e+288], N[Abs[t$95$3], $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
t_3 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -8.2 \cdot 10^{-9}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{elif}\;y.re \leq 1.06 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.26 \cdot 10^{+261}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+288}:\\
\;\;\;\;\left|t\_3\right|\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -8.2000000000000006e-9Initial program 32.9%
cancel-sign-sub-inv32.9%
fma-define32.9%
hypot-define32.9%
distribute-lft-neg-in32.9%
distribute-rgt-neg-out32.9%
fma-define32.9%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.im around 0 77.3%
unpow277.3%
unpow277.3%
hypot-undefine78.7%
Simplified78.7%
add-sqr-sqrt48.6%
sqrt-unprod81.6%
pow281.6%
*-commutative81.6%
Applied egg-rr81.6%
add-sqr-sqrt81.5%
sqrt-unprod81.6%
pow281.6%
Applied egg-rr83.0%
unpow283.0%
rem-sqrt-square83.0%
hypot-undefine81.6%
unpow281.6%
unpow281.6%
+-commutative81.6%
unpow281.6%
unpow281.6%
hypot-define83.0%
Simplified83.0%
if -8.2000000000000006e-9 < y.re < 1.06e-299 or 1.99999999999999989e-157 < y.re < 2.5e6Initial program 40.8%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod39.6%
fma-define39.6%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.re around 0 78.5%
rec-exp84.1%
Simplified78.5%
Taylor expanded in x.re around 0 41.6%
Taylor expanded in y.im around 0 58.4%
if 1.06e-299 < y.re < 1.99999999999999989e-157Initial program 48.7%
exp-diff48.7%
exp-to-pow48.7%
hypot-define48.7%
*-commutative48.7%
exp-prod48.2%
fma-define48.2%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
add-cube-cbrt83.4%
pow383.5%
fma-undefine83.5%
*-commutative83.5%
*-commutative83.5%
fma-define83.5%
Applied egg-rr83.5%
Taylor expanded in y.im around 0 36.8%
unpow236.8%
unpow236.8%
hypot-undefine62.2%
Simplified62.2%
pow1/321.9%
add-cube-cbrt21.2%
unpow-prod-down21.2%
pow221.2%
pow1/357.0%
Applied egg-rr57.0%
Taylor expanded in y.re around 0 36.2%
unpow236.2%
unpow236.2%
hypot-undefine59.0%
Simplified59.0%
if 2.5e6 < y.re < 1.25999999999999991e261Initial program 46.9%
cancel-sign-sub-inv46.9%
fma-define46.9%
hypot-define46.9%
distribute-lft-neg-in46.9%
distribute-rgt-neg-out46.9%
fma-define44.9%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 69.5%
unpow269.5%
unpow269.5%
hypot-undefine69.5%
Simplified69.5%
if 1.25999999999999991e261 < y.re < 6.50000000000000018e288Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 6.50000000000000018e288 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification69.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow x.im y.re)))
(t_3 (* (pow (hypot x.im x.re) y.re) t_1)))
(if (<= y.re -3.2e-44)
t_3
(if (<= y.re -4.7e-160)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re -4.3e-163)
t_0
(if (<= y.re 2.1e-124)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 1700000.0)
(* (exp (* (atan2 x.im x.re) (- y.im))) (sin (* y.im (log x.im))))
(if (<= y.re 4.1e+260)
t_3
(if (<= y.re 5e+288) (fabs t_2) t_2)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(x_46_im, y_46_re);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -3.2e-44) {
tmp = t_3;
} else if (y_46_re <= -4.7e-160) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= -4.3e-163) {
tmp = t_0;
} else if (y_46_re <= 2.1e-124) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(x_46_im)));
} else if (y_46_re <= 4.1e+260) {
tmp = t_3;
} else if (y_46_re <= 5e+288) {
tmp = fabs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_1 * Math.pow(x_46_im, y_46_re);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_1;
double tmp;
if (y_46_re <= -3.2e-44) {
tmp = t_3;
} else if (y_46_re <= -4.7e-160) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= -4.3e-163) {
tmp = t_0;
} else if (y_46_re <= 2.1e-124) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(x_46_im)));
} else if (y_46_re <= 4.1e+260) {
tmp = t_3;
} else if (y_46_re <= 5e+288) {
tmp = Math.abs(t_2);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = t_1 * math.pow(x_46_im, y_46_re) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_1 tmp = 0 if y_46_re <= -3.2e-44: tmp = t_3 elif y_46_re <= -4.7e-160: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= -4.3e-163: tmp = t_0 elif y_46_re <= 2.1e-124: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 1700000.0: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * math.log(x_46_im))) elif y_46_re <= 4.1e+260: tmp = t_3 elif y_46_re <= 5e+288: tmp = math.fabs(t_2) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (x_46_im ^ y_46_re)) t_3 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1) tmp = 0.0 if (y_46_re <= -3.2e-44) tmp = t_3; elseif (y_46_re <= -4.7e-160) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= -4.3e-163) tmp = t_0; elseif (y_46_re <= 2.1e-124) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1700000.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_46_im * log(x_46_im)))); elseif (y_46_re <= 4.1e+260) tmp = t_3; elseif (y_46_re <= 5e+288) tmp = abs(t_2); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -3.2e-44], t$95$3, If[LessEqual[y$46$re, -4.7e-160], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, -4.3e-163], t$95$0, If[LessEqual[y$46$re, 2.1e-124], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.1e+260], t$95$3, If[LessEqual[y$46$re, 5e+288], N[Abs[t$95$2], $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_1 \cdot {x.im}^{y.re}\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{if}\;y.re \leq -3.2 \cdot 10^{-44}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -4.7 \cdot 10^{-160}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.re \leq -4.3 \cdot 10^{-163}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-124}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{+260}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+288}:\\
\;\;\;\;\left|t\_2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -3.19999999999999995e-44 or 1.7e6 < y.re < 4.10000000000000025e260Initial program 39.8%
cancel-sign-sub-inv39.8%
fma-define39.8%
hypot-define39.8%
distribute-lft-neg-in39.8%
distribute-rgt-neg-out39.8%
fma-define39.0%
hypot-define76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around 0 74.2%
unpow274.2%
unpow274.2%
hypot-undefine75.7%
Simplified75.7%
if -3.19999999999999995e-44 < y.re < -4.6999999999999998e-160Initial program 20.0%
cancel-sign-sub-inv20.0%
fma-define20.0%
hypot-define20.0%
distribute-lft-neg-in20.0%
distribute-rgt-neg-out20.0%
fma-define20.0%
hypot-define75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y.im around 0 27.4%
unpow227.4%
unpow227.4%
hypot-undefine13.4%
Simplified13.4%
Taylor expanded in x.re around 0 6.5%
Taylor expanded in y.re around 0 13.4%
expm1-log1p-u13.4%
expm1-undefine37.1%
*-commutative37.1%
Applied egg-rr37.1%
if -4.6999999999999998e-160 < y.re < -4.30000000000000009e-163Initial program 100.0%
cancel-sign-sub-inv100.0%
fma-define100.0%
hypot-define100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-out100.0%
fma-define100.0%
hypot-define100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-undefine100.0%
Simplified100.0%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 100.0%
if -4.30000000000000009e-163 < y.re < 2.1000000000000001e-124Initial program 47.8%
exp-diff47.8%
exp-to-pow47.8%
hypot-define47.8%
*-commutative47.8%
exp-prod47.5%
fma-define47.5%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
add-cube-cbrt85.4%
pow387.0%
fma-undefine87.0%
*-commutative87.0%
*-commutative87.0%
fma-define87.0%
Applied egg-rr87.0%
Taylor expanded in y.im around 0 32.2%
unpow232.2%
unpow232.2%
hypot-undefine51.5%
Simplified51.5%
pow1/320.3%
add-cube-cbrt19.8%
unpow-prod-down19.9%
pow219.9%
pow1/347.4%
Applied egg-rr47.4%
Taylor expanded in y.re around 0 25.5%
unpow225.5%
unpow225.5%
hypot-undefine44.9%
Simplified44.9%
if 2.1000000000000001e-124 < y.re < 1.7e6Initial program 39.4%
exp-diff36.2%
exp-to-pow36.2%
hypot-define36.2%
*-commutative36.2%
exp-prod35.7%
fma-define35.7%
hypot-define65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in y.re around 0 68.9%
rec-exp78.3%
Simplified68.9%
Taylor expanded in x.re around 0 55.9%
Taylor expanded in y.re around 0 48.9%
if 4.10000000000000025e260 < y.re < 5.0000000000000003e288Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 5.0000000000000003e288 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification62.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (+ (exp (log1p t_0)) -1.0))
(t_2 (sin t_0))
(t_3 (* (pow (hypot x.im x.re) y.re) t_2))
(t_4 (* t_2 (pow x.im y.re))))
(if (<= y.re -9.5e-45)
t_3
(if (<= y.re -1.02e-159)
t_1
(if (<= y.re -1.95e-165)
t_0
(if (<= y.re 1.2e-124)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 1700000.0)
t_1
(if (<= y.re 5.5e+259)
t_3
(if (<= y.re 1.3e+289) (fabs t_4) t_4)))))))))
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(log1p(t_0)) + -1.0;
double t_2 = sin(t_0);
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_2;
double t_4 = t_2 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -9.5e-45) {
tmp = t_3;
} else if (y_46_re <= -1.02e-159) {
tmp = t_1;
} else if (y_46_re <= -1.95e-165) {
tmp = t_0;
} else if (y_46_re <= 1.2e-124) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = t_1;
} else if (y_46_re <= 5.5e+259) {
tmp = t_3;
} else if (y_46_re <= 1.3e+289) {
tmp = fabs(t_4);
} else {
tmp = t_4;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(Math.log1p(t_0)) + -1.0;
double t_2 = Math.sin(t_0);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_2;
double t_4 = t_2 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -9.5e-45) {
tmp = t_3;
} else if (y_46_re <= -1.02e-159) {
tmp = t_1;
} else if (y_46_re <= -1.95e-165) {
tmp = t_0;
} else if (y_46_re <= 1.2e-124) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = t_1;
} else if (y_46_re <= 5.5e+259) {
tmp = t_3;
} else if (y_46_re <= 1.3e+289) {
tmp = Math.abs(t_4);
} else {
tmp = t_4;
}
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.exp(math.log1p(t_0)) + -1.0 t_2 = math.sin(t_0) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_2 t_4 = t_2 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -9.5e-45: tmp = t_3 elif y_46_re <= -1.02e-159: tmp = t_1 elif y_46_re <= -1.95e-165: tmp = t_0 elif y_46_re <= 1.2e-124: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 1700000.0: tmp = t_1 elif y_46_re <= 5.5e+259: tmp = t_3 elif y_46_re <= 1.3e+289: tmp = math.fabs(t_4) else: tmp = t_4 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(exp(log1p(t_0)) + -1.0) t_2 = sin(t_0) t_3 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_2) t_4 = Float64(t_2 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -9.5e-45) tmp = t_3; elseif (y_46_re <= -1.02e-159) tmp = t_1; elseif (y_46_re <= -1.95e-165) tmp = t_0; elseif (y_46_re <= 1.2e-124) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1700000.0) tmp = t_1; elseif (y_46_re <= 5.5e+259) tmp = t_3; elseif (y_46_re <= 1.3e+289) tmp = abs(t_4); else tmp = t_4; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-45], t$95$3, If[LessEqual[y$46$re, -1.02e-159], t$95$1, If[LessEqual[y$46$re, -1.95e-165], t$95$0, If[LessEqual[y$46$re, 1.2e-124], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], t$95$1, If[LessEqual[y$46$re, 5.5e+259], t$95$3, If[LessEqual[y$46$re, 1.3e+289], N[Abs[t$95$4], $MachinePrecision], t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
t_2 := \sin t\_0\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_2\\
t_4 := t\_2 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-45}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -1.02 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.95 \cdot 10^{-165}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-124}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{+259}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+289}:\\
\;\;\;\;\left|t\_4\right|\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.re < -9.5000000000000002e-45 or 1.7e6 < y.re < 5.50000000000000029e259Initial program 39.8%
cancel-sign-sub-inv39.8%
fma-define39.8%
hypot-define39.8%
distribute-lft-neg-in39.8%
distribute-rgt-neg-out39.8%
fma-define39.0%
hypot-define76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around 0 74.2%
unpow274.2%
unpow274.2%
hypot-undefine75.7%
Simplified75.7%
if -9.5000000000000002e-45 < y.re < -1.02e-159 or 1.19999999999999996e-124 < y.re < 1.7e6Initial program 31.8%
cancel-sign-sub-inv31.8%
fma-define31.8%
hypot-define31.8%
distribute-lft-neg-in31.8%
distribute-rgt-neg-out31.8%
fma-define31.8%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.im around 0 19.8%
unpow219.8%
unpow219.8%
hypot-undefine12.9%
Simplified12.9%
Taylor expanded in x.re around 0 7.7%
Taylor expanded in y.re around 0 12.9%
expm1-log1p-u12.9%
expm1-undefine35.2%
*-commutative35.2%
Applied egg-rr35.2%
if -1.02e-159 < y.re < -1.9499999999999999e-165Initial program 100.0%
cancel-sign-sub-inv100.0%
fma-define100.0%
hypot-define100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-out100.0%
fma-define100.0%
hypot-define100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-undefine100.0%
Simplified100.0%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 100.0%
if -1.9499999999999999e-165 < y.re < 1.19999999999999996e-124Initial program 47.8%
exp-diff47.8%
exp-to-pow47.8%
hypot-define47.8%
*-commutative47.8%
exp-prod47.5%
fma-define47.5%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
add-cube-cbrt85.4%
pow387.0%
fma-undefine87.0%
*-commutative87.0%
*-commutative87.0%
fma-define87.0%
Applied egg-rr87.0%
Taylor expanded in y.im around 0 32.2%
unpow232.2%
unpow232.2%
hypot-undefine51.5%
Simplified51.5%
pow1/320.3%
add-cube-cbrt19.8%
unpow-prod-down19.9%
pow219.9%
pow1/347.4%
Applied egg-rr47.4%
Taylor expanded in y.re around 0 25.5%
unpow225.5%
unpow225.5%
hypot-undefine44.9%
Simplified44.9%
if 5.50000000000000029e259 < y.re < 1.30000000000000004e289Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-define37.5%
hypot-define37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 37.7%
unpow237.7%
unpow237.7%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt50.0%
sqrt-unprod100.0%
pow2100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow2100.0%
rem-sqrt-square100.0%
Simplified100.0%
if 1.30000000000000004e289 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in x.re around 0 71.4%
Final simplification60.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* (exp (* (atan2 x.im x.re) (- y.im))) t_0))
(t_2 (* (pow (hypot x.im x.re) y.re) t_0)))
(if (<= y.re -5e-14)
t_2
(if (<= y.re 1.25e-299)
t_1
(if (<= y.re 2.15e-157)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 1700000.0) t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -5e-14) {
tmp = t_2;
} else if (y_46_re <= 1.25e-299) {
tmp = t_1;
} else if (y_46_re <= 2.15e-157) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -5e-14) {
tmp = t_2;
} else if (y_46_re <= 1.25e-299) {
tmp = t_1;
} else if (y_46_re <= 2.15e-157) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1700000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0 t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 tmp = 0 if y_46_re <= -5e-14: tmp = t_2 elif y_46_re <= 1.25e-299: tmp = t_1 elif y_46_re <= 2.15e-157: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 1700000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_0) t_2 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -5e-14) tmp = t_2; elseif (y_46_re <= 1.25e-299) tmp = t_1; elseif (y_46_re <= 2.15e-157) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1700000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0; t_2 = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -5e-14) tmp = t_2; elseif (y_46_re <= 1.25e-299) tmp = t_1; elseif (y_46_re <= 2.15e-157) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1700000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -5e-14], t$95$2, If[LessEqual[y$46$re, 1.25e-299], t$95$1, If[LessEqual[y$46$re, 2.15e-157], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1700000.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{-157}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1700000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -5.0000000000000002e-14 or 1.7e6 < y.re Initial program 39.3%
cancel-sign-sub-inv39.3%
fma-define39.3%
hypot-define39.3%
distribute-lft-neg-in39.3%
distribute-rgt-neg-out39.3%
fma-define38.5%
hypot-define74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine72.7%
Simplified72.7%
if -5.0000000000000002e-14 < y.re < 1.24999999999999989e-299 or 2.1499999999999999e-157 < y.re < 1.7e6Initial program 40.2%
exp-diff39.1%
exp-to-pow39.1%
hypot-define39.1%
*-commutative39.1%
exp-prod38.9%
fma-define38.9%
hypot-define77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in y.re around 0 78.6%
rec-exp84.2%
Simplified78.6%
Taylor expanded in x.re around 0 41.3%
Taylor expanded in y.im around 0 58.2%
if 1.24999999999999989e-299 < y.re < 2.1499999999999999e-157Initial program 48.7%
exp-diff48.7%
exp-to-pow48.7%
hypot-define48.7%
*-commutative48.7%
exp-prod48.2%
fma-define48.2%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
add-cube-cbrt83.4%
pow383.5%
fma-undefine83.5%
*-commutative83.5%
*-commutative83.5%
fma-define83.5%
Applied egg-rr83.5%
Taylor expanded in y.im around 0 36.8%
unpow236.8%
unpow236.8%
hypot-undefine62.2%
Simplified62.2%
pow1/321.9%
add-cube-cbrt21.2%
unpow-prod-down21.2%
pow221.2%
pow1/357.0%
Applied egg-rr57.0%
Taylor expanded in y.re around 0 36.2%
unpow236.2%
unpow236.2%
hypot-undefine59.0%
Simplified59.0%
Final simplification65.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -2.2e-58)
(* t_1 (pow x.re y.re))
(if (<= y.re 1.6e-123)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 26500000.0)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 1.4e+163)
(* t_1 (pow (- x.re) y.re))
(fabs (* t_1 (pow x.im y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -2.2e-58) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.6e-123) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 26500000.0) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 1.4e+163) {
tmp = t_1 * pow(-x_46_re, y_46_re);
} else {
tmp = fabs((t_1 * pow(x_46_im, y_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -2.2e-58) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.6e-123) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 26500000.0) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 1.4e+163) {
tmp = t_1 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = Math.abs((t_1 * Math.pow(x_46_im, y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -2.2e-58: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 1.6e-123: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 26500000.0: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= 1.4e+163: tmp = t_1 * math.pow(-x_46_re, y_46_re) else: tmp = math.fabs((t_1 * math.pow(x_46_im, y_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -2.2e-58) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 1.6e-123) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 26500000.0) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 1.4e+163) tmp = Float64(t_1 * (Float64(-x_46_re) ^ y_46_re)); else tmp = abs(Float64(t_1 * (x_46_im ^ y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e-58], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.6e-123], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 26500000.0], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 1.4e+163], N[(t$95$1 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[Abs[N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{-58}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-123}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 26500000:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+163}:\\
\;\;\;\;t\_1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1 \cdot {x.im}^{y.re}\right|\\
\end{array}
\end{array}
if y.re < -2.20000000000000006e-58Initial program 33.8%
cancel-sign-sub-inv33.8%
fma-define33.8%
hypot-define33.8%
distribute-lft-neg-in33.8%
distribute-rgt-neg-out33.8%
fma-define33.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-undefine76.9%
Simplified76.9%
Taylor expanded in x.im around 0 65.5%
if -2.20000000000000006e-58 < y.re < 1.59999999999999989e-123Initial program 44.1%
exp-diff44.1%
exp-to-pow44.1%
hypot-define44.1%
*-commutative44.1%
exp-prod43.9%
fma-define43.9%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
add-cube-cbrt85.0%
pow386.2%
fma-undefine86.2%
*-commutative86.2%
*-commutative86.2%
fma-define86.2%
Applied egg-rr86.2%
Taylor expanded in y.im around 0 32.5%
unpow232.5%
unpow232.5%
hypot-undefine49.6%
Simplified49.6%
pow1/319.0%
add-cube-cbrt18.7%
unpow-prod-down18.9%
pow218.9%
pow1/346.0%
Applied egg-rr46.0%
Taylor expanded in y.re around 0 20.0%
unpow220.0%
unpow220.0%
hypot-undefine40.2%
Simplified40.2%
if 1.59999999999999989e-123 < y.re < 2.65e7Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in y.im around 0 17.6%
unpow217.6%
unpow217.6%
hypot-undefine15.2%
Simplified15.2%
Taylor expanded in x.re around 0 11.4%
Taylor expanded in y.re around 0 12.3%
expm1-log1p-u12.3%
expm1-undefine33.1%
*-commutative33.1%
Applied egg-rr33.1%
if 2.65e7 < y.re < 1.40000000000000007e163Initial program 36.4%
cancel-sign-sub-inv36.4%
fma-define36.4%
hypot-define36.4%
distribute-lft-neg-in36.4%
distribute-rgt-neg-out36.4%
fma-define33.3%
hypot-define63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in y.im around 0 66.8%
unpow266.8%
unpow266.8%
hypot-undefine66.8%
Simplified66.8%
Taylor expanded in x.re around -inf 67.0%
mul-1-neg67.0%
Simplified67.0%
if 1.40000000000000007e163 < y.re Initial program 53.3%
cancel-sign-sub-inv53.3%
fma-define53.3%
hypot-define53.3%
distribute-lft-neg-in53.3%
distribute-rgt-neg-out53.3%
fma-define53.3%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around 0 63.4%
unpow263.4%
unpow263.4%
hypot-undefine63.4%
Simplified63.4%
Taylor expanded in x.re around 0 63.4%
add-sqr-sqrt46.8%
sqrt-unprod70.1%
pow270.1%
*-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
unpow270.1%
rem-sqrt-square70.1%
Simplified70.1%
Final simplification53.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -9.5e-58)
(* t_1 (pow x.re y.re))
(if (<= y.re 3.2e-123)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 1000000000.0)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 1e+164)
(* t_1 (pow (- x.re) y.re))
(* t_1 (pow x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -9.5e-58) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 3.2e-123) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1000000000.0) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 1e+164) {
tmp = t_1 * pow(-x_46_re, y_46_re);
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -9.5e-58) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 3.2e-123) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1000000000.0) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 1e+164) {
tmp = t_1 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -9.5e-58: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 3.2e-123: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 1000000000.0: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= 1e+164: tmp = t_1 * math.pow(-x_46_re, y_46_re) else: tmp = t_1 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -9.5e-58) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 3.2e-123) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1000000000.0) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 1e+164) tmp = Float64(t_1 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_1 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-58], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.2e-123], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1000000000.0], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 1e+164], N[(t$95$1 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-58}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-123}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1000000000:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 10^{+164}:\\
\;\;\;\;t\_1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -9.4999999999999994e-58Initial program 33.8%
cancel-sign-sub-inv33.8%
fma-define33.8%
hypot-define33.8%
distribute-lft-neg-in33.8%
distribute-rgt-neg-out33.8%
fma-define33.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-undefine76.9%
Simplified76.9%
Taylor expanded in x.im around 0 65.5%
if -9.4999999999999994e-58 < y.re < 3.19999999999999979e-123Initial program 44.1%
exp-diff44.1%
exp-to-pow44.1%
hypot-define44.1%
*-commutative44.1%
exp-prod43.9%
fma-define43.9%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
add-cube-cbrt85.0%
pow386.2%
fma-undefine86.2%
*-commutative86.2%
*-commutative86.2%
fma-define86.2%
Applied egg-rr86.2%
Taylor expanded in y.im around 0 32.5%
unpow232.5%
unpow232.5%
hypot-undefine49.6%
Simplified49.6%
pow1/319.0%
add-cube-cbrt18.7%
unpow-prod-down18.9%
pow218.9%
pow1/346.0%
Applied egg-rr46.0%
Taylor expanded in y.re around 0 20.0%
unpow220.0%
unpow220.0%
hypot-undefine40.2%
Simplified40.2%
if 3.19999999999999979e-123 < y.re < 1e9Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in y.im around 0 17.6%
unpow217.6%
unpow217.6%
hypot-undefine15.2%
Simplified15.2%
Taylor expanded in x.re around 0 11.4%
Taylor expanded in y.re around 0 12.3%
expm1-log1p-u12.3%
expm1-undefine33.1%
*-commutative33.1%
Applied egg-rr33.1%
if 1e9 < y.re < 1e164Initial program 35.3%
cancel-sign-sub-inv35.3%
fma-define35.3%
hypot-define35.3%
distribute-lft-neg-in35.3%
distribute-rgt-neg-out35.3%
fma-define32.4%
hypot-define61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-undefine64.8%
Simplified64.8%
Taylor expanded in x.re around -inf 65.1%
mul-1-neg65.1%
Simplified65.1%
if 1e164 < y.re Initial program 55.2%
cancel-sign-sub-inv55.2%
fma-define55.2%
hypot-define55.2%
distribute-lft-neg-in55.2%
distribute-rgt-neg-out55.2%
fma-define55.2%
hypot-define72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in y.im around 0 65.6%
unpow265.6%
unpow265.6%
hypot-undefine65.6%
Simplified65.6%
Taylor expanded in x.re around 0 65.6%
Final simplification53.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow x.re y.re))))
(if (<= y.re -3.1e-59)
t_2
(if (<= y.re 2.2e-121)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 0.37)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 4e+164) t_2 (* t_1 (pow x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -3.1e-59) {
tmp = t_2;
} else if (y_46_re <= 2.2e-121) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 0.37) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 4e+164) {
tmp = t_2;
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_1 * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -3.1e-59) {
tmp = t_2;
} else if (y_46_re <= 2.2e-121) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 0.37) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 4e+164) {
tmp = t_2;
} else {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = t_1 * math.pow(x_46_re, y_46_re) tmp = 0 if y_46_re <= -3.1e-59: tmp = t_2 elif y_46_re <= 2.2e-121: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 0.37: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_re <= 4e+164: tmp = t_2 else: tmp = t_1 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.1e-59) tmp = t_2; elseif (y_46_re <= 2.2e-121) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 0.37) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 4e+164) tmp = t_2; else tmp = Float64(t_1 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.1e-59], t$95$2, If[LessEqual[y$46$re, 2.2e-121], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 0.37], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 4e+164], t$95$2, N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_1 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-121}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 0.37:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.09999999999999999e-59 or 0.37 < y.re < 4e164Initial program 36.0%
cancel-sign-sub-inv36.0%
fma-define36.0%
hypot-define36.0%
distribute-lft-neg-in36.0%
distribute-rgt-neg-out36.0%
fma-define35.1%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine72.2%
Simplified72.2%
Taylor expanded in x.im around 0 63.7%
if -3.09999999999999999e-59 < y.re < 2.20000000000000021e-121Initial program 44.1%
exp-diff44.1%
exp-to-pow44.1%
hypot-define44.1%
*-commutative44.1%
exp-prod43.9%
fma-define43.9%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
add-cube-cbrt85.0%
pow386.2%
fma-undefine86.2%
*-commutative86.2%
*-commutative86.2%
fma-define86.2%
Applied egg-rr86.2%
Taylor expanded in y.im around 0 32.5%
unpow232.5%
unpow232.5%
hypot-undefine49.6%
Simplified49.6%
pow1/319.0%
add-cube-cbrt18.7%
unpow-prod-down18.9%
pow218.9%
pow1/346.0%
Applied egg-rr46.0%
Taylor expanded in y.re around 0 20.0%
unpow220.0%
unpow220.0%
hypot-undefine40.2%
Simplified40.2%
if 2.20000000000000021e-121 < y.re < 0.37Initial program 35.2%
cancel-sign-sub-inv35.2%
fma-define35.2%
hypot-define35.2%
distribute-lft-neg-in35.2%
distribute-rgt-neg-out35.2%
fma-define35.2%
hypot-define66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y.im around 0 15.8%
unpow215.8%
unpow215.8%
hypot-undefine13.2%
Simplified13.2%
Taylor expanded in x.re around 0 9.0%
Taylor expanded in y.re around 0 13.2%
expm1-log1p-u13.2%
expm1-undefine36.2%
*-commutative36.2%
Applied egg-rr36.2%
if 4e164 < y.re Initial program 55.2%
cancel-sign-sub-inv55.2%
fma-define55.2%
hypot-define55.2%
distribute-lft-neg-in55.2%
distribute-rgt-neg-out55.2%
fma-define55.2%
hypot-define72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in y.im around 0 65.6%
unpow265.6%
unpow265.6%
hypot-undefine65.6%
Simplified65.6%
Taylor expanded in x.re around 0 65.6%
Final simplification53.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.6)
(+ (exp (log1p t_1)) -1.0)
(if (<= y.im -2.1e-171)
t_0
(if (<= y.im 4.5e-251)
(log1p (expm1 t_1))
(if (<= y.im 23000000000000.0) t_0 (cbrt (pow t_1 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.6) {
tmp = exp(log1p(t_1)) + -1.0;
} else if (y_46_im <= -2.1e-171) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 23000000000000.0) {
tmp = t_0;
} else {
tmp = cbrt(pow(t_1, 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.6) {
tmp = Math.exp(Math.log1p(t_1)) + -1.0;
} else if (y_46_im <= -2.1e-171) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 23000000000000.0) {
tmp = t_0;
} else {
tmp = Math.cbrt(Math.pow(t_1, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.6) tmp = Float64(exp(log1p(t_1)) + -1.0); elseif (y_46_im <= -2.1e-171) tmp = t_0; elseif (y_46_im <= 4.5e-251) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 23000000000000.0) tmp = t_0; else tmp = cbrt((t_1 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.6], N[(N[Exp[N[Log[1 + t$95$1], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, -2.1e-171], t$95$0, If[LessEqual[y$46$im, 4.5e-251], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 23000000000000.0], t$95$0, N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.6:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_1\right)} + -1\\
\mathbf{elif}\;y.im \leq -2.1 \cdot 10^{-171}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-251}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 23000000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_1}^{3}}\\
\end{array}
\end{array}
if y.im < -2.60000000000000009Initial program 30.6%
cancel-sign-sub-inv30.6%
fma-define30.6%
hypot-define30.6%
distribute-lft-neg-in30.6%
distribute-rgt-neg-out30.6%
fma-define29.4%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 40.5%
unpow240.5%
unpow240.5%
hypot-undefine34.7%
Simplified34.7%
Taylor expanded in x.re around 0 27.2%
Taylor expanded in y.re around 0 6.5%
expm1-log1p-u6.2%
expm1-undefine30.3%
*-commutative30.3%
Applied egg-rr30.3%
if -2.60000000000000009 < y.im < -2.1e-171 or 4.49999999999999978e-251 < y.im < 2.3e13Initial program 42.4%
exp-diff42.4%
exp-to-pow42.4%
hypot-define42.4%
*-commutative42.4%
exp-prod42.4%
fma-define42.4%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
add-cube-cbrt87.8%
pow384.0%
fma-undefine84.0%
*-commutative84.0%
*-commutative84.0%
fma-define84.0%
Applied egg-rr84.0%
Taylor expanded in y.im around 0 62.8%
unpow262.8%
unpow262.8%
hypot-undefine84.0%
Simplified84.0%
pow1/341.0%
add-cube-cbrt41.0%
unpow-prod-down42.2%
pow242.2%
pow1/386.5%
Applied egg-rr86.5%
Taylor expanded in y.re around 0 18.4%
unpow218.4%
unpow218.4%
hypot-undefine38.6%
Simplified38.6%
if -2.1e-171 < y.im < 4.49999999999999978e-251Initial program 47.2%
cancel-sign-sub-inv47.2%
fma-define47.2%
hypot-define47.2%
distribute-lft-neg-in47.2%
distribute-rgt-neg-out47.2%
fma-define47.2%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in x.re around 0 40.0%
Taylor expanded in y.re around 0 36.1%
*-commutative36.1%
log1p-expm1-u45.9%
Applied egg-rr45.9%
if 2.3e13 < y.im Initial program 47.8%
cancel-sign-sub-inv47.8%
fma-define47.8%
hypot-define47.8%
distribute-lft-neg-in47.8%
distribute-rgt-neg-out47.8%
fma-define47.8%
hypot-define67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine39.0%
Simplified39.0%
Taylor expanded in x.re around 0 28.5%
Taylor expanded in y.re around 0 8.3%
add-cbrt-cube32.0%
pow332.0%
*-commutative32.0%
Applied egg-rr32.0%
Final simplification35.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -3.9e-29)
(sqrt (pow t_1 2.0))
(if (<= y.im -1.45e-170)
t_0
(if (<= y.im 4.5e-251)
(log1p (expm1 t_1))
(if (<= y.im 16000000000000.0) t_0 (cbrt (pow t_1 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -3.9e-29) {
tmp = sqrt(pow(t_1, 2.0));
} else if (y_46_im <= -1.45e-170) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 16000000000000.0) {
tmp = t_0;
} else {
tmp = cbrt(pow(t_1, 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -3.9e-29) {
tmp = Math.sqrt(Math.pow(t_1, 2.0));
} else if (y_46_im <= -1.45e-170) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 16000000000000.0) {
tmp = t_0;
} else {
tmp = Math.cbrt(Math.pow(t_1, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -3.9e-29) tmp = sqrt((t_1 ^ 2.0)); elseif (y_46_im <= -1.45e-170) tmp = t_0; elseif (y_46_im <= 4.5e-251) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 16000000000000.0) tmp = t_0; else tmp = cbrt((t_1 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.9e-29], N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, -1.45e-170], t$95$0, If[LessEqual[y$46$im, 4.5e-251], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 16000000000000.0], t$95$0, N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.9 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{{t\_1}^{2}}\\
\mathbf{elif}\;y.im \leq -1.45 \cdot 10^{-170}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-251}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 16000000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_1}^{3}}\\
\end{array}
\end{array}
if y.im < -3.8999999999999998e-29Initial program 29.9%
cancel-sign-sub-inv29.9%
fma-define29.9%
hypot-define29.9%
distribute-lft-neg-in29.9%
distribute-rgt-neg-out29.9%
fma-define28.6%
hypot-define71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in y.im around 0 39.5%
unpow239.5%
unpow239.5%
hypot-undefine33.9%
Simplified33.9%
Taylor expanded in x.re around 0 26.5%
Taylor expanded in y.re around 0 6.3%
add-sqr-sqrt3.9%
sqrt-unprod25.2%
pow225.2%
*-commutative25.2%
Applied egg-rr25.2%
if -3.8999999999999998e-29 < y.im < -1.45e-170 or 4.49999999999999978e-251 < y.im < 1.6e13Initial program 43.5%
exp-diff43.5%
exp-to-pow43.5%
hypot-define43.5%
*-commutative43.5%
exp-prod43.5%
fma-define43.5%
hypot-define88.2%
*-commutative88.2%
Simplified88.2%
add-cube-cbrt87.5%
pow384.9%
fma-undefine84.9%
*-commutative84.9%
*-commutative84.9%
fma-define84.9%
Applied egg-rr84.9%
Taylor expanded in y.im around 0 64.3%
unpow264.3%
unpow264.3%
hypot-undefine84.9%
Simplified84.9%
pow1/342.0%
add-cube-cbrt42.1%
unpow-prod-down43.3%
pow243.3%
pow1/387.5%
Applied egg-rr87.5%
Taylor expanded in y.re around 0 18.8%
unpow218.8%
unpow218.8%
hypot-undefine38.3%
Simplified38.3%
if -1.45e-170 < y.im < 4.49999999999999978e-251Initial program 47.2%
cancel-sign-sub-inv47.2%
fma-define47.2%
hypot-define47.2%
distribute-lft-neg-in47.2%
distribute-rgt-neg-out47.2%
fma-define47.2%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in x.re around 0 40.0%
Taylor expanded in y.re around 0 36.1%
*-commutative36.1%
log1p-expm1-u45.9%
Applied egg-rr45.9%
if 1.6e13 < y.im Initial program 47.8%
cancel-sign-sub-inv47.8%
fma-define47.8%
hypot-define47.8%
distribute-lft-neg-in47.8%
distribute-rgt-neg-out47.8%
fma-define47.8%
hypot-define67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine39.0%
Simplified39.0%
Taylor expanded in x.re around 0 28.5%
Taylor expanded in y.re around 0 8.3%
add-cbrt-cube32.0%
pow332.0%
*-commutative32.0%
Applied egg-rr32.0%
Final simplification33.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (cbrt (pow t_1 3.0))))
(if (<= y.im -14.0)
t_2
(if (<= y.im -2.8e-172)
t_0
(if (<= y.im 4.5e-251)
(log1p (expm1 t_1))
(if (<= y.im 16000000000000.0) t_0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = cbrt(pow(t_1, 3.0));
double tmp;
if (y_46_im <= -14.0) {
tmp = t_2;
} else if (y_46_im <= -2.8e-172) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 16000000000000.0) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.cbrt(Math.pow(t_1, 3.0));
double tmp;
if (y_46_im <= -14.0) {
tmp = t_2;
} else if (y_46_im <= -2.8e-172) {
tmp = t_0;
} else if (y_46_im <= 4.5e-251) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 16000000000000.0) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = cbrt((t_1 ^ 3.0)) tmp = 0.0 if (y_46_im <= -14.0) tmp = t_2; elseif (y_46_im <= -2.8e-172) tmp = t_0; elseif (y_46_im <= 4.5e-251) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 16000000000000.0) tmp = t_0; else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[y$46$im, -14.0], t$95$2, If[LessEqual[y$46$im, -2.8e-172], t$95$0, If[LessEqual[y$46$im, 4.5e-251], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 16000000000000.0], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sqrt[3]{{t\_1}^{3}}\\
\mathbf{if}\;y.im \leq -14:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -2.8 \cdot 10^{-172}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-251}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 16000000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -14 or 1.6e13 < y.im Initial program 38.0%
cancel-sign-sub-inv38.0%
fma-define38.0%
hypot-define38.0%
distribute-lft-neg-in38.0%
distribute-rgt-neg-out38.0%
fma-define37.3%
hypot-define69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in y.im around 0 41.8%
unpow241.8%
unpow241.8%
hypot-undefine36.6%
Simplified36.6%
Taylor expanded in x.re around 0 27.8%
Taylor expanded in y.re around 0 7.2%
add-cbrt-cube27.6%
pow327.6%
*-commutative27.6%
Applied egg-rr27.6%
if -14 < y.im < -2.80000000000000011e-172 or 4.49999999999999978e-251 < y.im < 1.6e13Initial program 42.4%
exp-diff42.4%
exp-to-pow42.4%
hypot-define42.4%
*-commutative42.4%
exp-prod42.4%
fma-define42.4%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
add-cube-cbrt87.8%
pow384.0%
fma-undefine84.0%
*-commutative84.0%
*-commutative84.0%
fma-define84.0%
Applied egg-rr84.0%
Taylor expanded in y.im around 0 62.8%
unpow262.8%
unpow262.8%
hypot-undefine84.0%
Simplified84.0%
pow1/341.0%
add-cube-cbrt41.0%
unpow-prod-down42.2%
pow242.2%
pow1/386.5%
Applied egg-rr86.5%
Taylor expanded in y.re around 0 18.4%
unpow218.4%
unpow218.4%
hypot-undefine38.6%
Simplified38.6%
if -2.80000000000000011e-172 < y.im < 4.49999999999999978e-251Initial program 47.2%
cancel-sign-sub-inv47.2%
fma-define47.2%
hypot-define47.2%
distribute-lft-neg-in47.2%
distribute-rgt-neg-out47.2%
fma-define47.2%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in x.re around 0 40.0%
Taylor expanded in y.re around 0 36.1%
*-commutative36.1%
log1p-expm1-u45.9%
Applied egg-rr45.9%
Final simplification33.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -1.15e-51)
t_1
(if (<= y.re 2.3e-124)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 3400000.0) (+ (exp (log1p t_0)) -1.0) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.15e-51) {
tmp = t_1;
} else if (y_46_re <= 2.3e-124) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 3400000.0) {
tmp = exp(log1p(t_0)) + -1.0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.15e-51) {
tmp = t_1;
} else if (y_46_re <= 2.3e-124) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 3400000.0) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -1.15e-51: tmp = t_1 elif y_46_re <= 2.3e-124: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 3400000.0: tmp = math.exp(math.log1p(t_0)) + -1.0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.15e-51) tmp = t_1; elseif (y_46_re <= 2.3e-124) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 3400000.0) tmp = Float64(exp(log1p(t_0)) + -1.0); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e-51], t$95$1, If[LessEqual[y$46$re, 2.3e-124], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 3400000.0], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-124}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 3400000:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0\right)} + -1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.15000000000000001e-51 or 3.4e6 < y.re Initial program 39.6%
cancel-sign-sub-inv39.6%
fma-define39.6%
hypot-define39.6%
distribute-lft-neg-in39.6%
distribute-rgt-neg-out39.6%
fma-define38.8%
hypot-define74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine72.8%
Simplified72.8%
Taylor expanded in x.re around 0 55.7%
if -1.15000000000000001e-51 < y.re < 2.30000000000000012e-124Initial program 43.1%
exp-diff43.1%
exp-to-pow43.1%
hypot-define43.1%
*-commutative43.1%
exp-prod42.9%
fma-define42.9%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
add-cube-cbrt85.4%
pow386.5%
fma-undefine86.5%
*-commutative86.5%
*-commutative86.5%
fma-define86.5%
Applied egg-rr86.5%
Taylor expanded in y.im around 0 33.0%
unpow233.0%
unpow233.0%
hypot-undefine48.5%
Simplified48.5%
pow1/318.6%
add-cube-cbrt18.2%
unpow-prod-down18.4%
pow218.4%
pow1/345.0%
Applied egg-rr45.0%
Taylor expanded in y.re around 0 19.6%
unpow219.6%
unpow219.6%
hypot-undefine39.3%
Simplified39.3%
if 2.30000000000000012e-124 < y.re < 3.4e6Initial program 39.4%
cancel-sign-sub-inv39.4%
fma-define39.4%
hypot-define39.4%
distribute-lft-neg-in39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.im around 0 15.0%
unpow215.0%
unpow215.0%
hypot-undefine12.5%
Simplified12.5%
Taylor expanded in x.re around 0 8.6%
Taylor expanded in y.re around 0 12.5%
expm1-log1p-u12.5%
expm1-undefine34.1%
*-commutative34.1%
Applied egg-rr34.1%
Final simplification47.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.5e-59) (not (<= y.re 5.8e-44))) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (sin (* y.im (log (hypot x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.5e-59) || !(y_46_re <= 5.8e-44)) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.5e-59) || !(y_46_re <= 5.8e-44)) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.5e-59) or not (y_46_re <= 5.8e-44): tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.5e-59) || !(y_46_re <= 5.8e-44)) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.5e-59], N[Not[LessEqual[y$46$re, 5.8e-44]], $MachinePrecision]], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-59} \lor \neg \left(y.re \leq 5.8 \cdot 10^{-44}\right):\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -4.50000000000000012e-59 or 5.8000000000000003e-44 < y.re Initial program 39.7%
cancel-sign-sub-inv39.7%
fma-define39.7%
hypot-define39.7%
distribute-lft-neg-in39.7%
distribute-rgt-neg-out39.7%
fma-define39.1%
hypot-define74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in y.im around 0 67.4%
unpow267.4%
unpow267.4%
hypot-undefine68.7%
Simplified68.7%
Taylor expanded in x.re around 0 52.7%
Taylor expanded in y.re around 0 9.8%
*-commutative9.8%
log1p-expm1-u24.1%
Applied egg-rr24.1%
if -4.50000000000000012e-59 < y.re < 5.8000000000000003e-44Initial program 42.1%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod42.0%
fma-define42.0%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
add-cube-cbrt82.6%
pow383.5%
fma-undefine83.5%
*-commutative83.5%
*-commutative83.5%
fma-define83.5%
Applied egg-rr83.5%
Taylor expanded in y.im around 0 33.4%
unpow233.4%
unpow233.4%
hypot-undefine44.9%
Simplified44.9%
pow1/317.8%
add-cube-cbrt17.4%
unpow-prod-down17.7%
pow217.7%
pow1/342.0%
Applied egg-rr42.0%
Taylor expanded in y.re around 0 18.7%
unpow218.7%
unpow218.7%
hypot-undefine36.5%
Simplified36.5%
Final simplification29.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2.9e-58)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 5.8e-44)
(sin (* y.im (log (hypot x.im x.re))))
(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) {
double tmp;
if (y_46_re <= -2.9e-58) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5.8e-44) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = log1p(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.9e-58) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5.8e-44) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.log1p(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.9e-58: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 5.8e-44: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = math.log1p(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.9e-58) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 5.8e-44) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = log1p(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.9e-58], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-44], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.9 \cdot 10^{-58}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-44}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -2.8999999999999999e-58Initial program 33.8%
cancel-sign-sub-inv33.8%
fma-define33.8%
hypot-define33.8%
distribute-lft-neg-in33.8%
distribute-rgt-neg-out33.8%
fma-define33.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-undefine76.9%
Simplified76.9%
Taylor expanded in x.re around 0 53.6%
Taylor expanded in y.re around 0 15.4%
add-log-exp29.1%
Applied egg-rr29.1%
if -2.8999999999999999e-58 < y.re < 5.8000000000000003e-44Initial program 42.1%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod42.0%
fma-define42.0%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
add-cube-cbrt82.6%
pow383.5%
fma-undefine83.5%
*-commutative83.5%
*-commutative83.5%
fma-define83.5%
Applied egg-rr83.5%
Taylor expanded in y.im around 0 33.4%
unpow233.4%
unpow233.4%
hypot-undefine44.9%
Simplified44.9%
pow1/317.8%
add-cube-cbrt17.4%
unpow-prod-down17.7%
pow217.7%
pow1/342.0%
Applied egg-rr42.0%
Taylor expanded in y.re around 0 18.7%
unpow218.7%
unpow218.7%
hypot-undefine36.5%
Simplified36.5%
if 5.8000000000000003e-44 < y.re Initial program 46.1%
cancel-sign-sub-inv46.1%
fma-define46.1%
hypot-define46.1%
distribute-lft-neg-in46.1%
distribute-rgt-neg-out46.1%
fma-define44.7%
hypot-define66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in y.im around 0 58.7%
unpow258.7%
unpow258.7%
hypot-undefine60.0%
Simplified60.0%
Taylor expanded in x.re around 0 51.8%
Taylor expanded in y.re around 0 3.8%
*-commutative3.8%
log1p-expm1-u24.5%
Applied egg-rr24.5%
Final simplification30.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.3%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-undefine45.9%
Simplified45.9%
Taylor expanded in x.re around 0 33.1%
Taylor expanded in y.re around 0 11.6%
*-commutative11.6%
log1p-expm1-u19.9%
Applied egg-rr19.9%
Final simplification19.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* 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 sin((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 = sin((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 Math.sin((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.sin((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 sin(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 = sin((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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.3%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-undefine45.9%
Simplified45.9%
Taylor expanded in x.im around 0 40.5%
Taylor expanded in y.re around 0 11.7%
Final simplification11.7%
(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 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.3%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y.im around 0 45.5%
unpow245.5%
unpow245.5%
hypot-undefine45.9%
Simplified45.9%
Taylor expanded in x.re around 0 33.1%
Taylor expanded in y.re around 0 11.6%
herbie shell --seed 2024110
(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)))))