
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re)))
(t_1 (* y.re (* (atan2 x.im x.re) (pow (exp y.im) t_0))))
(t_2 (log (hypot x.re x.im)))
(t_3
(*
(exp (fma t_2 y.re (* y.im t_0)))
(sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -0.00017)
t_3
(if (<= y.im 2.7e-101)
(*
(sin (fma t_2 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 1.16e+151)
t_3
(if (<= y.im 2e+292)
(log1p (expm1 t_1))
(pow (pow t_1 3.0) 0.3333333333333333)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -atan2(x_46_im, x_46_re);
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), t_0));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (y_46_im * t_0))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -0.00017) {
tmp = t_3;
} else if (y_46_im <= 2.7e-101) {
tmp = sin(fma(t_2, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 1.16e+151) {
tmp = t_3;
} else if (y_46_im <= 2e+292) {
tmp = log1p(expm1(t_1));
} else {
tmp = pow(pow(t_1, 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(-atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ t_0))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(fma(t_2, y_46_re, Float64(y_46_im * t_0))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -0.00017) tmp = t_3; elseif (y_46_im <= 2.7e-101) tmp = Float64(sin(fma(t_2, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 1.16e+151) tmp = t_3; elseif (y_46_im <= 2e+292) tmp = log1p(expm1(t_1)); else tmp = (t_1 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(t$95$2 * y$46$re + N[(y$46$im * t$95$0), $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$im, -0.00017], t$95$3, If[LessEqual[y$46$im, 2.7e-101], N[(N[Sin[N[(t$95$2 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.16e+151], t$95$3, If[LessEqual[y$46$im, 2e+292], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{t\_0}\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, y.im \cdot t\_0\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -0.00017:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 2.7 \cdot 10^{-101}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.16 \cdot 10^{+151}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t\_1}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -1.7e-4 or 2.7000000000000002e-101 < y.im < 1.16000000000000004e151Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.im around inf 48.3%
unpow248.3%
unpow248.3%
hypot-undefine82.0%
Simplified82.0%
if -1.7e-4 < y.im < 2.7000000000000002e-101Initial program 35.7%
exp-diff35.7%
exp-to-pow35.7%
hypot-define35.7%
*-commutative35.7%
exp-prod35.7%
fma-define35.7%
hypot-define90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in y.im around 0 90.3%
if 1.16000000000000004e151 < y.im < 2e292Initial program 42.9%
Taylor expanded in y.im around 0 64.6%
Taylor expanded in y.re around 0 92.9%
distribute-rgt-neg-in92.9%
Simplified92.9%
log1p-expm1-u92.9%
*-commutative92.9%
exp-prod92.9%
Applied egg-rr92.9%
if 2e292 < y.im Initial program 20.0%
Taylor expanded in y.im around 0 20.6%
Taylor expanded in y.re around 0 60.0%
distribute-rgt-neg-in60.0%
Simplified60.0%
add-cbrt-cube60.0%
pow1/3100.0%
pow3100.0%
*-commutative100.0%
exp-prod100.0%
Applied egg-rr100.0%
Final simplification87.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re))))))
(t_2 (cbrt (* y.im t_0))))
(if (<= y.im -8.2e-10)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(* t_1 (sin (fma (pow t_2 2.0) t_2 (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double t_2 = cbrt((y_46_im * t_0));
double tmp;
if (y_46_im <= -8.2e-10) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin(fma(pow(t_2, 2.0), t_2, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) t_2 = cbrt(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -8.2e-10) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin(fma((t_2 ^ 2.0), t_2, 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_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e-10], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(N[Power[t$95$2, 2.0], $MachinePrecision] * t$95$2 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
t_2 := \sqrt[3]{y.im \cdot t\_0}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{-10}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left({t\_2}^{2}, t\_2, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -8.1999999999999996e-10Initial program 47.6%
cancel-sign-sub-inv47.6%
fma-define47.6%
hypot-define47.6%
distribute-lft-neg-in47.6%
distribute-rgt-neg-out47.6%
fma-define47.6%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.im around inf 47.6%
unpow247.6%
unpow247.6%
hypot-undefine85.8%
Simplified85.8%
if -8.1999999999999996e-10 < y.im Initial program 40.9%
cancel-sign-sub-inv40.9%
fma-define40.9%
hypot-define40.9%
distribute-lft-neg-in40.9%
distribute-rgt-neg-out40.9%
fma-define40.9%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
fma-undefine83.3%
hypot-define40.9%
*-commutative40.9%
add-cube-cbrt39.7%
pow339.7%
fma-define39.7%
hypot-define80.8%
Applied egg-rr80.8%
rem-cube-cbrt83.3%
hypot-define40.9%
+-commutative40.9%
hypot-undefine83.3%
fma-define83.3%
*-commutative83.3%
add-cube-cbrt84.6%
fma-define84.6%
Applied egg-rr84.6%
Final simplification84.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re))))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.re -3.7e+50)
(* t_1 (sin (pow (pow (cbrt (cbrt (fma y.im t_0 t_2))) 3.0) 3.0)))
(* t_1 (sin (fma t_0 y.im t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -3.7e+50) {
tmp = t_1 * sin(pow(pow(cbrt(cbrt(fma(y_46_im, t_0, t_2))), 3.0), 3.0));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, t_2));
}
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 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -3.7e+50) tmp = Float64(t_1 * sin(((cbrt(cbrt(fma(y_46_im, t_0, t_2))) ^ 3.0) ^ 3.0))); else tmp = Float64(t_1 * sin(fma(t_0, y_46_im, t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -3.7e+50], N[(t$95$1 * N[Sin[N[Power[N[Power[N[Power[N[Power[N[(y$46$im * t$95$0 + t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -3.7 \cdot 10^{+50}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left({\left(\sqrt[3]{\sqrt[3]{\mathsf{fma}\left(y.im, t\_0, t\_2\right)}}\right)}^{3}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if x.re < -3.7000000000000001e50Initial program 21.0%
cancel-sign-sub-inv21.0%
fma-define21.0%
hypot-define21.0%
distribute-lft-neg-in21.0%
distribute-rgt-neg-out21.0%
fma-define21.0%
hypot-define77.1%
*-commutative77.1%
Simplified77.1%
fma-undefine77.0%
hypot-define21.0%
*-commutative21.0%
add-cube-cbrt22.7%
pow324.4%
fma-define24.4%
hypot-define81.9%
Applied egg-rr81.9%
add-cube-cbrt88.1%
pow384.6%
fma-undefine84.6%
hypot-define24.3%
+-commutative24.3%
hypot-undefine84.6%
*-commutative84.6%
fma-define84.6%
hypot-undefine24.3%
+-commutative24.3%
hypot-define84.6%
Applied egg-rr84.6%
if -3.7000000000000001e50 < x.re Initial program 48.5%
cancel-sign-sub-inv48.5%
fma-define48.5%
hypot-define48.5%
distribute-lft-neg-in48.5%
distribute-rgt-neg-out48.5%
fma-define48.5%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.re -620000000000.0) (not (<= y.re 700000000000.0)))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_re <= -620000000000.0) || !(y_46_re <= 700000000000.0)) {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_re <= -620000000000.0) || !(y_46_re <= 700000000000.0)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -620000000000.0], N[Not[LessEqual[y$46$re, 700000000000.0]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -620000000000 \lor \neg \left(y.re \leq 700000000000\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -6.2e11 or 7e11 < y.re Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define39.5%
hypot-define77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in y.im around inf 41.9%
unpow241.9%
unpow241.9%
hypot-undefine83.7%
Simplified83.7%
if -6.2e11 < y.re < 7e11Initial program 45.2%
exp-diff45.2%
exp-to-pow45.2%
hypot-define45.2%
*-commutative45.2%
exp-prod44.9%
fma-define44.8%
hypot-define88.1%
*-commutative88.1%
Simplified88.1%
Final simplification85.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im -0.00017)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 260000.0)
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* y.im (atan2 x.im x.re)))))
(* t_1 (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 t_1 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -0.00017) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 260000.0) {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * 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)) t_1 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -0.00017) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 260000.0) tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * 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]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.00017], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 260000.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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 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)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.im \leq -0.00017:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 260000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -1.7e-4Initial program 48.5%
cancel-sign-sub-inv48.5%
fma-define48.5%
hypot-define48.5%
distribute-lft-neg-in48.5%
distribute-rgt-neg-out48.5%
fma-define48.5%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around inf 48.5%
unpow248.5%
unpow248.5%
hypot-undefine85.5%
Simplified85.5%
if -1.7e-4 < y.im < 2.6e5Initial program 39.9%
exp-diff39.9%
exp-to-pow39.9%
hypot-define39.9%
*-commutative39.9%
exp-prod39.9%
fma-define39.9%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.im around 0 87.5%
if 2.6e5 < y.im Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
fma-undefine75.8%
hypot-define42.4%
*-commutative42.4%
add-cube-cbrt42.4%
pow343.8%
fma-define43.8%
hypot-define77.4%
Applied egg-rr77.4%
Taylor expanded in y.im around inf 45.3%
+-commutative45.3%
unpow245.3%
unpow245.3%
hypot-undefine78.9%
Simplified78.9%
Final simplification84.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -0.00017) (not (<= y.im 260000.0)))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* y.im (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -0.00017) || !(y_46_im <= 260000.0)) {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (y_46_im * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -0.00017) || !(y_46_im <= 260000.0)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(y_46_im * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.00017], N[Not[LessEqual[y$46$im, 260000.0]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -0.00017 \lor \neg \left(y.im \leq 260000\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.im < -1.7e-4 or 2.6e5 < y.im Initial program 45.1%
cancel-sign-sub-inv45.1%
fma-define45.1%
hypot-define45.1%
distribute-lft-neg-in45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around inf 45.1%
unpow245.1%
unpow245.1%
hypot-undefine81.8%
Simplified81.8%
if -1.7e-4 < y.im < 2.6e5Initial program 39.9%
exp-diff39.9%
exp-to-pow39.9%
hypot-define39.9%
*-commutative39.9%
exp-prod39.9%
fma-define39.9%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.im around 0 87.5%
Final simplification84.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.im -3.2e-34)
(/ (sin (* y.im t_0)) (pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.im 8.8e-16)
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 5e+127)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(log1p
(expm1
(*
y.re
(*
(atan2 x.im x.re)
(pow (exp y.im) (- (atan2 x.im x.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = sin((y_46_im * t_0)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 8.8e-16) {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 5e+127) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = log1p(expm1((y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -3.2e-34) tmp = Float64(sin(Float64(y_46_im * t_0)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 8.8e-16) tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 5e+127) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = log1p(expm1(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3.2e-34], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8.8e-16], 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e+127], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot t\_0\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-16}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+127}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.20000000000000003e-34Initial program 46.8%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod30.5%
fma-define30.5%
hypot-define55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y.im around inf 32.3%
unpow246.8%
unpow246.8%
hypot-undefine84.3%
Simplified57.3%
Taylor expanded in y.re around 0 41.5%
+-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine72.0%
exp-prod73.5%
Simplified73.5%
if -3.20000000000000003e-34 < y.im < 8.80000000000000001e-16Initial program 39.7%
exp-diff39.8%
exp-to-pow39.8%
hypot-define39.8%
*-commutative39.8%
exp-prod39.8%
fma-define39.7%
hypot-define88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in y.im around 0 88.9%
if 8.80000000000000001e-16 < y.im < 5.0000000000000004e127Initial program 46.8%
Taylor expanded in y.re around 0 46.8%
unpow246.8%
unpow246.8%
hypot-undefine78.5%
Simplified78.5%
if 5.0000000000000004e127 < y.im Initial program 40.5%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in y.re around 0 83.9%
distribute-rgt-neg-in83.9%
Simplified83.9%
log1p-expm1-u83.9%
*-commutative83.9%
exp-prod86.6%
Applied egg-rr86.6%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im -3.2e-34)
(/ (sin (* y.im t_1)) (pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.im 1850000000.0)
(* (sin (fma t_1 y.im t_0)) (pow (hypot x.re x.im) y.re))
(if (<= y.im 3.8e+130)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(log1p
(expm1
(*
y.re
(*
(atan2 x.im x.re)
(pow (exp y.im) (- (atan2 x.im x.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = sin((y_46_im * t_1)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1850000000.0) {
tmp = sin(fma(t_1, y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 3.8e+130) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = log1p(expm1((y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -3.2e-34) tmp = Float64(sin(Float64(y_46_im * t_1)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 1850000000.0) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 3.8e+130) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); else tmp = log1p(expm1(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3.2e-34], N[(N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1850000000.0], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+130], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot t\_1\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq 1850000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+130}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.20000000000000003e-34Initial program 46.8%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod30.5%
fma-define30.5%
hypot-define55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y.im around inf 32.3%
unpow246.8%
unpow246.8%
hypot-undefine84.3%
Simplified57.3%
Taylor expanded in y.re around 0 41.5%
+-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine72.0%
exp-prod73.5%
Simplified73.5%
if -3.20000000000000003e-34 < y.im < 1.85e9Initial program 40.9%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod40.7%
fma-define40.7%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.im around 0 87.0%
if 1.85e9 < y.im < 3.8000000000000002e130Initial program 42.9%
Taylor expanded in y.im around 0 78.7%
if 3.8000000000000002e130 < y.im Initial program 40.5%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in y.re around 0 83.9%
distribute-rgt-neg-in83.9%
Simplified83.9%
log1p-expm1-u83.9%
*-commutative83.9%
exp-prod86.6%
Applied egg-rr86.6%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -3.2e-34)
(/
(sin (* y.im (log (hypot x.re x.im))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.im 1800000000.0)
(*
(pow (hypot x.re x.im) y.re)
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(if (<= y.im 1.12e+133)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re))))
(log1p
(expm1
(*
y.re
(* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1800000000.0) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_im <= 1.12e+133) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = log1p(expm1((y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re))))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1800000000.0) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_im <= 1.12e+133) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.log1p(Math.expm1((y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re))))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -3.2e-34: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_im <= 1800000000.0: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) elif y_46_im <= 1.12e+133: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.log1p(math.expm1((y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -3.2e-34) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 1800000000.0) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re)))))); elseif (y_46_im <= 1.12e+133) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = log1p(expm1(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -3.2e-34], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1800000000.0], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.12e+133], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq 1800000000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{+133}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.20000000000000003e-34Initial program 46.8%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod30.5%
fma-define30.5%
hypot-define55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y.im around inf 32.3%
unpow246.8%
unpow246.8%
hypot-undefine84.3%
Simplified57.3%
Taylor expanded in y.re around 0 41.5%
+-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine72.0%
exp-prod73.5%
Simplified73.5%
if -3.20000000000000003e-34 < y.im < 1.8e9Initial program 40.9%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod40.7%
fma-define40.7%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around inf 40.7%
+-commutative40.7%
associate-/l*40.7%
unpow240.7%
unpow240.7%
hypot-undefine86.5%
Simplified86.5%
Taylor expanded in y.im around 0 63.5%
+-commutative60.0%
unpow260.0%
unpow260.0%
hypot-undefine70.8%
Simplified86.3%
if 1.8e9 < y.im < 1.12e133Initial program 42.9%
Taylor expanded in y.im around 0 78.7%
if 1.12e133 < y.im Initial program 40.5%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in y.re around 0 83.9%
distribute-rgt-neg-in83.9%
Simplified83.9%
log1p-expm1-u83.9%
*-commutative83.9%
exp-prod86.6%
Applied egg-rr86.6%
Final simplification82.7%
(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 (* t_0 (pow (hypot x.re x.im) y.re)))
(t_2 (- (atan2 x.im x.re)))
(t_3
(log1p (expm1 (* y.re (* (atan2 x.im x.re) (pow (exp y.im) t_2)))))))
(if (<= y.re -1.65)
t_1
(if (<= y.re -5.7e-117)
t_3
(if (<= y.re 6.2e-178)
(* t_0 (exp (* y.im t_2)))
(if (<= y.re 2.7e+101) t_3 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = t_0 * pow(hypot(x_46_re, x_46_im), y_46_re);
double t_2 = -atan2(x_46_im, x_46_re);
double t_3 = log1p(expm1((y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), t_2)))));
double tmp;
if (y_46_re <= -1.65) {
tmp = t_1;
} else if (y_46_re <= -5.7e-117) {
tmp = t_3;
} else if (y_46_re <= 6.2e-178) {
tmp = t_0 * exp((y_46_im * t_2));
} else if (y_46_re <= 2.7e+101) {
tmp = t_3;
} 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_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = -Math.atan2(x_46_im, x_46_re);
double t_3 = Math.log1p(Math.expm1((y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), t_2)))));
double tmp;
if (y_46_re <= -1.65) {
tmp = t_1;
} else if (y_46_re <= -5.7e-117) {
tmp = t_3;
} else if (y_46_re <= 6.2e-178) {
tmp = t_0 * Math.exp((y_46_im * t_2));
} else if (y_46_re <= 2.7e+101) {
tmp = t_3;
} 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_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = -math.atan2(x_46_im, x_46_re) t_3 = math.log1p(math.expm1((y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), t_2))))) tmp = 0 if y_46_re <= -1.65: tmp = t_1 elif y_46_re <= -5.7e-117: tmp = t_3 elif y_46_re <= 6.2e-178: tmp = t_0 * math.exp((y_46_im * t_2)) elif y_46_re <= 2.7e+101: tmp = t_3 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_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re)) t_2 = Float64(-atan(x_46_im, x_46_re)) t_3 = log1p(expm1(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ t_2))))) tmp = 0.0 if (y_46_re <= -1.65) tmp = t_1; elseif (y_46_re <= -5.7e-117) tmp = t_3; elseif (y_46_re <= 6.2e-178) tmp = Float64(t_0 * exp(Float64(y_46_im * t_2))); elseif (y_46_re <= 2.7e+101) tmp = t_3; 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[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[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$3 = N[Log[1 + N[(Exp[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.65], t$95$1, If[LessEqual[y$46$re, -5.7e-117], t$95$3, If[LessEqual[y$46$re, 6.2e-178], N[(t$95$0 * N[Exp[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+101], t$95$3, t$95$1]]]]]]]]
\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 := t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{t\_2}\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.65:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -5.7 \cdot 10^{-117}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-178}:\\
\;\;\;\;t\_0 \cdot e^{y.im \cdot t\_2}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.6499999999999999 or 2.70000000000000006e101 < y.re Initial program 38.9%
exp-diff29.6%
exp-to-pow29.6%
hypot-define29.6%
*-commutative29.6%
exp-prod29.6%
fma-define29.6%
hypot-define62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in y.im around inf 33.3%
unpow241.7%
unpow241.7%
hypot-undefine87.0%
Simplified67.6%
Taylor expanded in y.im around 0 78.8%
+-commutative78.8%
unpow278.8%
unpow278.8%
hypot-undefine78.8%
Simplified78.8%
if -1.6499999999999999 < y.re < -5.6999999999999999e-117 or 6.1999999999999999e-178 < y.re < 2.70000000000000006e101Initial program 44.5%
Taylor expanded in y.im around 0 55.8%
Taylor expanded in y.re around 0 64.9%
distribute-rgt-neg-in64.9%
Simplified64.9%
log1p-expm1-u70.6%
*-commutative70.6%
exp-prod71.7%
Applied egg-rr71.7%
if -5.6999999999999999e-117 < y.re < 6.1999999999999999e-178Initial program 45.5%
exp-diff45.5%
exp-to-pow45.5%
hypot-define45.5%
*-commutative45.5%
exp-prod45.3%
fma-define45.3%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y.im around inf 41.9%
unpow242.1%
unpow242.1%
hypot-undefine78.4%
Simplified77.8%
Taylor expanded in y.re around 0 78.5%
rec-exp78.4%
distribute-rgt-neg-in78.4%
Simplified78.4%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re))))))
(t_1 (pow (hypot x.re x.im) y.re)))
(if (<= y.im -3.2e-34)
(/
(sin (* y.im (log (hypot x.re x.im))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.im 1.2e+20)
(*
t_1
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(if (<= y.im 3.8e+44)
(pow (pow t_0 3.0) 0.3333333333333333)
(if (<= y.im 6.4e+57)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(log1p (expm1 t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1.2e+20) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_im <= 3.8e+44) {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 6.4e+57) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -3.2e-34) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1.2e+20) {
tmp = t_1 * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_im <= 3.8e+44) {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 6.4e+57) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_im <= -3.2e-34: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_im <= 1.2e+20: tmp = t_1 * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) elif y_46_im <= 3.8e+44: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) elif y_46_im <= 6.4e+57: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_im <= -3.2e-34) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= 1.2e+20) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re)))))); elseif (y_46_im <= 3.8e+44) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 6.4e+57) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -3.2e-34], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e+20], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+44], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, 6.4e+57], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+44}:\\
\;\;\;\;{\left({t\_0}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+57}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -3.20000000000000003e-34Initial program 46.8%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod30.5%
fma-define30.5%
hypot-define55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y.im around inf 32.3%
unpow246.8%
unpow246.8%
hypot-undefine84.3%
Simplified57.3%
Taylor expanded in y.re around 0 41.5%
+-commutative41.5%
unpow241.5%
unpow241.5%
hypot-undefine72.0%
exp-prod73.5%
Simplified73.5%
if -3.20000000000000003e-34 < y.im < 1.2e20Initial program 40.5%
exp-diff40.5%
exp-to-pow40.5%
hypot-define40.5%
*-commutative40.5%
exp-prod40.2%
fma-define40.2%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.re around inf 40.2%
+-commutative40.2%
associate-/l*40.2%
unpow240.2%
unpow240.2%
hypot-undefine84.7%
Simplified84.7%
Taylor expanded in y.im around 0 62.4%
+-commutative59.7%
unpow259.7%
unpow259.7%
hypot-undefine70.3%
Simplified84.5%
if 1.2e20 < y.im < 3.8000000000000002e44Initial program 50.0%
Taylor expanded in y.im around 0 80.3%
Taylor expanded in y.re around 0 70.2%
distribute-rgt-neg-in70.2%
Simplified70.2%
add-cbrt-cube70.3%
pow1/390.3%
pow390.3%
*-commutative90.3%
exp-prod90.3%
Applied egg-rr90.3%
if 3.8000000000000002e44 < y.im < 6.40000000000000059e57Initial program 40.0%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.im around 0 100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-undefine100.0%
Simplified100.0%
if 6.40000000000000059e57 < y.im Initial program 41.3%
Taylor expanded in y.im around 0 61.2%
Taylor expanded in y.re around 0 78.5%
distribute-rgt-neg-in78.5%
Simplified78.5%
log1p-expm1-u78.4%
*-commutative78.4%
exp-prod80.6%
Applied egg-rr80.6%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* (sin (* y.im (log (hypot x.im x.re)))) t_0)))
(if (<= y.im -3500000000.0)
(/
(sin (* y.im (log (hypot x.re x.im))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.im -1.1e-211)
t_1
(if (<= y.im 1.32e-253)
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 1.15e+97)
t_1
(*
y.re
(* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -3500000000.0) {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.1e-211) {
tmp = t_1;
} else if (y_46_im <= 1.32e-253) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 1.15e+97) {
tmp = t_1;
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -3500000000.0) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.1e-211) {
tmp = t_1;
} else if (y_46_im <= 1.32e-253) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 1.15e+97) {
tmp = t_1;
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 tmp = 0 if y_46_im <= -3500000000.0: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_im <= -1.1e-211: tmp = t_1 elif y_46_im <= 1.32e-253: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 1.15e+97: tmp = t_1 else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0) tmp = 0.0 if (y_46_im <= -3500000000.0) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= -1.1e-211) tmp = t_1; elseif (y_46_im <= 1.32e-253) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 1.15e+97) tmp = t_1; else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; tmp = 0.0; if (y_46_im <= -3500000000.0) tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); elseif (y_46_im <= -1.1e-211) tmp = t_1; elseif (y_46_im <= 1.32e-253) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 1.15e+97) tmp = t_1; else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $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] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -3500000000.0], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.1e-211], t$95$1, If[LessEqual[y$46$im, 1.32e-253], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+97], t$95$1, N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{if}\;y.im \leq -3500000000:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.im \leq -1.1 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.32 \cdot 10^{-253}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.im < -3.5e9Initial program 49.4%
exp-diff32.4%
exp-to-pow32.4%
hypot-define32.4%
*-commutative32.4%
exp-prod32.2%
fma-define32.2%
hypot-define56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in y.im around inf 34.1%
unpow249.4%
unpow249.4%
hypot-undefine85.2%
Simplified58.6%
Taylor expanded in y.re around 0 43.9%
+-commutative43.9%
unpow243.9%
unpow243.9%
hypot-undefine74.2%
exp-prod75.8%
Simplified75.8%
if -3.5e9 < y.im < -1.09999999999999999e-211 or 1.32000000000000007e-253 < y.im < 1.15000000000000003e97Initial program 41.2%
exp-diff37.9%
exp-to-pow37.9%
hypot-define37.9%
*-commutative37.9%
exp-prod37.6%
fma-define37.6%
hypot-define75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y.im around inf 35.2%
unpow238.8%
unpow238.8%
hypot-undefine76.9%
Simplified69.1%
Taylor expanded in y.im around 0 60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-undefine70.8%
Simplified70.8%
if -1.09999999999999999e-211 < y.im < 1.32000000000000007e-253Initial program 39.0%
Taylor expanded in y.im around 0 62.3%
Taylor expanded in y.im around 0 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-undefine81.9%
Simplified81.9%
if 1.15000000000000003e97 < y.im Initial program 40.0%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in y.re around 0 82.6%
distribute-rgt-neg-in82.6%
Simplified82.6%
Final simplification75.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (pow (hypot x.re x.im) y.re))
(t_2 (* (sin (* y.im (log (hypot x.im x.re)))) t_1)))
(if (<= y.im -540000000000.0)
t_0
(if (<= y.im -9.5e-212)
t_2
(if (<= y.im 1.22e-253)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 4.4e+98) t_2 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
double tmp;
if (y_46_im <= -540000000000.0) {
tmp = t_0;
} else if (y_46_im <= -9.5e-212) {
tmp = t_2;
} else if (y_46_im <= 1.22e-253) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 4.4e+98) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
double tmp;
if (y_46_im <= -540000000000.0) {
tmp = t_0;
} else if (y_46_im <= -9.5e-212) {
tmp = t_2;
} else if (y_46_im <= 1.22e-253) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 4.4e+98) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_1 tmp = 0 if y_46_im <= -540000000000.0: tmp = t_0 elif y_46_im <= -9.5e-212: tmp = t_2 elif y_46_im <= 1.22e-253: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 4.4e+98: tmp = t_2 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re t_2 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1) tmp = 0.0 if (y_46_im <= -540000000000.0) tmp = t_0; elseif (y_46_im <= -9.5e-212) tmp = t_2; elseif (y_46_im <= 1.22e-253) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 4.4e+98) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = hypot(x_46_re, x_46_im) ^ y_46_re; t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1; tmp = 0.0; if (y_46_im <= -540000000000.0) tmp = t_0; elseif (y_46_im <= -9.5e-212) tmp = t_2; elseif (y_46_im <= 1.22e-253) tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 4.4e+98) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = 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$1), $MachinePrecision]}, If[LessEqual[y$46$im, -540000000000.0], t$95$0, If[LessEqual[y$46$im, -9.5e-212], t$95$2, If[LessEqual[y$46$im, 1.22e-253], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.4e+98], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{if}\;y.im \leq -540000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -9.5 \cdot 10^{-212}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{-253}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{+98}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -5.4e11 or 4.40000000000000017e98 < y.im Initial program 44.8%
Taylor expanded in y.im around 0 63.4%
Taylor expanded in y.re around 0 75.3%
distribute-rgt-neg-in75.3%
Simplified75.3%
if -5.4e11 < y.im < -9.50000000000000029e-212 or 1.22e-253 < y.im < 4.40000000000000017e98Initial program 41.7%
exp-diff38.5%
exp-to-pow38.5%
hypot-define38.5%
*-commutative38.5%
exp-prod38.1%
fma-define38.1%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around inf 35.7%
unpow239.3%
unpow239.3%
hypot-undefine77.1%
Simplified69.4%
Taylor expanded in y.im around 0 59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-undefine70.2%
Simplified70.2%
if -9.50000000000000029e-212 < y.im < 1.22e-253Initial program 39.0%
Taylor expanded in y.im around 0 62.3%
Taylor expanded in y.im around 0 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-undefine81.9%
Simplified81.9%
Final simplification73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* t_1 t_0))
(t_3 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -3900000000.0)
(* t_1 t_3)
(if (<= y.im -1.6e-212)
t_2
(if (<= y.im 1.32e-253)
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 4.5e+113) t_2 (* y.re (* (atan2 x.im x.re) t_3))))))))
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_re, x_46_im), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = t_1 * t_0;
double t_3 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3900000000.0) {
tmp = t_1 * t_3;
} else if (y_46_im <= -1.6e-212) {
tmp = t_2;
} else if (y_46_im <= 1.32e-253) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 4.5e+113) {
tmp = t_2;
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * 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.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = t_1 * t_0;
double t_3 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3900000000.0) {
tmp = t_1 * t_3;
} else if (y_46_im <= -1.6e-212) {
tmp = t_2;
} else if (y_46_im <= 1.32e-253) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 4.5e+113) {
tmp = t_2;
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_3);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = t_1 * t_0 t_3 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -3900000000.0: tmp = t_1 * t_3 elif y_46_im <= -1.6e-212: tmp = t_2 elif y_46_im <= 1.32e-253: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 4.5e+113: tmp = t_2 else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_3) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(t_1 * t_0) t_3 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -3900000000.0) tmp = Float64(t_1 * t_3); elseif (y_46_im <= -1.6e-212) tmp = t_2; elseif (y_46_im <= 1.32e-253) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 4.5e+113) tmp = t_2; else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_3)); 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_re, x_46_im) ^ y_46_re; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = t_1 * t_0; t_3 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -3900000000.0) tmp = t_1 * t_3; elseif (y_46_im <= -1.6e-212) tmp = t_2; elseif (y_46_im <= 1.32e-253) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 4.5e+113) tmp = t_2; else tmp = y_46_re * (atan2(x_46_im, x_46_re) * 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $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$1 * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3900000000.0], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, -1.6e-212], t$95$2, If[LessEqual[y$46$im, 1.32e-253], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.5e+113], t$95$2, N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := t\_1 \cdot t\_0\\
t_3 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -3900000000:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;y.im \leq -1.6 \cdot 10^{-212}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.32 \cdot 10^{-253}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+113}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_3\right)\\
\end{array}
\end{array}
if y.im < -3.9e9Initial program 49.4%
exp-diff32.4%
exp-to-pow32.4%
hypot-define32.4%
*-commutative32.4%
exp-prod32.2%
fma-define32.2%
hypot-define56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in y.im around inf 34.1%
unpow249.4%
unpow249.4%
hypot-undefine85.2%
Simplified58.6%
Taylor expanded in y.re around 0 74.2%
rec-exp74.2%
distribute-rgt-neg-in74.2%
Simplified74.2%
if -3.9e9 < y.im < -1.5999999999999999e-212 or 1.32000000000000007e-253 < y.im < 4.5000000000000001e113Initial program 41.2%
exp-diff37.9%
exp-to-pow37.9%
hypot-define37.9%
*-commutative37.9%
exp-prod37.6%
fma-define37.6%
hypot-define75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y.im around inf 35.2%
unpow238.8%
unpow238.8%
hypot-undefine76.9%
Simplified69.1%
Taylor expanded in y.im around 0 60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-undefine70.8%
Simplified70.8%
if -1.5999999999999999e-212 < y.im < 1.32000000000000007e-253Initial program 39.0%
Taylor expanded in y.im around 0 62.3%
Taylor expanded in y.im around 0 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-undefine81.9%
Simplified81.9%
if 4.5000000000000001e113 < y.im Initial program 40.0%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in y.re around 0 82.6%
distribute-rgt-neg-in82.6%
Simplified82.6%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (* (log (hypot x.re x.im)) (pow (hypot x.re x.im) y.re))))
(t_1
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
(if (<= y.im -7.5e+67)
t_1
(if (<= y.im -1.9e-270)
t_0
(if (<= y.im 4.8e-291)
(* (sin (* y.re (atan2 x.im x.re))) (pow (- x.re) y.re))
(if (<= y.im 450000.0) 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 = y_46_im * (log(hypot(x_46_re, x_46_im)) * pow(hypot(x_46_re, x_46_im), y_46_re));
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -7.5e+67) {
tmp = t_1;
} else if (y_46_im <= -1.9e-270) {
tmp = t_0;
} else if (y_46_im <= 4.8e-291) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(-x_46_re, y_46_re);
} else if (y_46_im <= 450000.0) {
tmp = 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 = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
double t_1 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -7.5e+67) {
tmp = t_1;
} else if (y_46_im <= -1.9e-270) {
tmp = t_0;
} else if (y_46_im <= 4.8e-291) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(-x_46_re, y_46_re);
} else if (y_46_im <= 450000.0) {
tmp = t_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_im * (math.log(math.hypot(x_46_re, x_46_im)) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) t_1 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -7.5e+67: tmp = t_1 elif y_46_im <= -1.9e-270: tmp = t_0 elif y_46_im <= 4.8e-291: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(-x_46_re, y_46_re) elif y_46_im <= 450000.0: tmp = t_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_im * Float64(log(hypot(x_46_re, x_46_im)) * (hypot(x_46_re, x_46_im) ^ y_46_re))) t_1 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_im <= -7.5e+67) tmp = t_1; elseif (y_46_im <= -1.9e-270) tmp = t_0; elseif (y_46_im <= 4.8e-291) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (Float64(-x_46_re) ^ y_46_re)); elseif (y_46_im <= 450000.0) tmp = 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 = y_46_im * (log(hypot(x_46_re, x_46_im)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); t_1 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -7.5e+67) tmp = t_1; elseif (y_46_im <= -1.9e-270) tmp = t_0; elseif (y_46_im <= 4.8e-291) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (-x_46_re ^ y_46_re); elseif (y_46_im <= 450000.0) tmp = 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[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7.5e+67], t$95$1, If[LessEqual[y$46$im, -1.9e-270], t$95$0, If[LessEqual[y$46$im, 4.8e-291], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 450000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right)\\
t_1 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{-270}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{-291}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 450000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -7.5000000000000005e67 or 4.5e5 < y.im Initial program 42.3%
Taylor expanded in y.im around 0 65.1%
Taylor expanded in y.re around 0 72.7%
distribute-rgt-neg-in72.7%
Simplified72.7%
if -7.5000000000000005e67 < y.im < -1.90000000000000021e-270 or 4.80000000000000025e-291 < y.im < 4.5e5Initial program 42.6%
exp-diff41.2%
exp-to-pow41.2%
hypot-define41.2%
*-commutative41.2%
exp-prod41.1%
fma-define41.1%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around inf 37.6%
unpow238.4%
unpow238.4%
hypot-undefine74.3%
Simplified72.8%
Taylor expanded in y.im around 0 47.3%
+-commutative47.3%
unpow247.3%
unpow247.3%
hypot-undefine60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
hypot-undefine70.5%
Simplified70.5%
if -1.90000000000000021e-270 < y.im < 4.80000000000000025e-291Initial program 39.8%
Taylor expanded in y.im around 0 80.2%
Taylor expanded in x.re around -inf 62.6%
mul-1-neg62.6%
Simplified62.6%
Taylor expanded in y.im around 0 82.7%
Final simplification71.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (pow (hypot x.re x.im) y.re))
(t_2 (* y.im (* (log (hypot x.re x.im)) t_1))))
(if (<= y.im -1.7e+68)
t_0
(if (<= y.im -9.5e-213)
t_2
(if (<= y.im 1.35e-254)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 260000.0) t_2 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_2 = y_46_im * (log(hypot(x_46_re, x_46_im)) * t_1);
double tmp;
if (y_46_im <= -1.7e+68) {
tmp = t_0;
} else if (y_46_im <= -9.5e-213) {
tmp = t_2;
} else if (y_46_im <= 1.35e-254) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 260000.0) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = y_46_im * (Math.log(Math.hypot(x_46_re, x_46_im)) * t_1);
double tmp;
if (y_46_im <= -1.7e+68) {
tmp = t_0;
} else if (y_46_im <= -9.5e-213) {
tmp = t_2;
} else if (y_46_im <= 1.35e-254) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 260000.0) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = y_46_im * (math.log(math.hypot(x_46_re, x_46_im)) * t_1) tmp = 0 if y_46_im <= -1.7e+68: tmp = t_0 elif y_46_im <= -9.5e-213: tmp = t_2 elif y_46_im <= 1.35e-254: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 260000.0: tmp = t_2 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re t_2 = Float64(y_46_im * Float64(log(hypot(x_46_re, x_46_im)) * t_1)) tmp = 0.0 if (y_46_im <= -1.7e+68) tmp = t_0; elseif (y_46_im <= -9.5e-213) tmp = t_2; elseif (y_46_im <= 1.35e-254) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 260000.0) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = hypot(x_46_re, x_46_im) ^ y_46_re; t_2 = y_46_im * (log(hypot(x_46_re, x_46_im)) * t_1); tmp = 0.0; if (y_46_im <= -1.7e+68) tmp = t_0; elseif (y_46_im <= -9.5e-213) tmp = t_2; elseif (y_46_im <= 1.35e-254) tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 260000.0) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.7e+68], t$95$0, If[LessEqual[y$46$im, -9.5e-213], t$95$2, If[LessEqual[y$46$im, 1.35e-254], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 260000.0], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot t\_1\right)\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -9.5 \cdot 10^{-213}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-254}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 260000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.70000000000000008e68 or 2.6e5 < y.im Initial program 42.3%
Taylor expanded in y.im around 0 65.1%
Taylor expanded in y.re around 0 72.7%
distribute-rgt-neg-in72.7%
Simplified72.7%
if -1.70000000000000008e68 < y.im < -9.50000000000000055e-213 or 1.35000000000000003e-254 < y.im < 2.6e5Initial program 43.7%
exp-diff41.9%
exp-to-pow41.9%
hypot-define41.9%
*-commutative41.9%
exp-prod41.7%
fma-define41.7%
hypot-define80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in y.im around inf 39.0%
unpow240.0%
unpow240.0%
hypot-undefine75.8%
Simplified73.9%
Taylor expanded in y.im around 0 48.6%
+-commutative48.6%
unpow248.6%
unpow248.6%
hypot-undefine60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-undefine71.0%
Simplified71.0%
if -9.50000000000000055e-213 < y.im < 1.35000000000000003e-254Initial program 39.0%
Taylor expanded in y.im around 0 62.3%
Taylor expanded in y.im around 0 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-undefine81.9%
Simplified81.9%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.8e+17) (not (<= y.re 4.3e+80))) (* (sin (* y.re (atan2 x.im x.re))) (pow (- x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.8e+17) || !(y_46_re <= 4.3e+80)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(-x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-4.8d+17)) .or. (.not. (y_46re <= 4.3d+80))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (-x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.8e+17) || !(y_46_re <= 4.3e+80)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(-x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.8e+17) or not (y_46_re <= 4.3e+80): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(-x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.8e+17) || !(y_46_re <= 4.3e+80)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -4.8e+17) || ~((y_46_re <= 4.3e+80))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (-x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.8e+17], N[Not[LessEqual[y$46$re, 4.3e+80]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{+17} \lor \neg \left(y.re \leq 4.3 \cdot 10^{+80}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -4.8e17 or 4.30000000000000004e80 < y.re Initial program 36.9%
Taylor expanded in y.im around 0 74.0%
Taylor expanded in x.re around -inf 37.0%
mul-1-neg37.0%
Simplified37.0%
Taylor expanded in y.im around 0 58.0%
if -4.8e17 < y.re < 4.30000000000000004e80Initial program 46.5%
Taylor expanded in y.im around 0 42.3%
Taylor expanded in y.re around 0 54.7%
distribute-rgt-neg-in54.7%
Simplified54.7%
Final simplification56.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -1.2e+26) (not (<= y.re 0.0022)))
(* (sin t_0) (pow (- x.re) y.re))
(log (+ 1.0 (expm1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.2e+26) || !(y_46_re <= 0.0022)) {
tmp = sin(t_0) * pow(-x_46_re, y_46_re);
} else {
tmp = log((1.0 + expm1(t_0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.2e+26) || !(y_46_re <= 0.0022)) {
tmp = Math.sin(t_0) * Math.pow(-x_46_re, y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1(t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -1.2e+26) or not (y_46_re <= 0.0022): tmp = math.sin(t_0) * math.pow(-x_46_re, y_46_re) else: tmp = math.log((1.0 + math.expm1(t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -1.2e+26) || !(y_46_re <= 0.0022)) tmp = Float64(sin(t_0) * (Float64(-x_46_re) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.2e+26], N[Not[LessEqual[y$46$re, 0.0022]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+26} \lor \neg \left(y.re \leq 0.0022\right):\\
\;\;\;\;\sin t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -1.20000000000000002e26 or 0.00220000000000000013 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 76.0%
Taylor expanded in x.re around -inf 36.6%
mul-1-neg36.6%
Simplified36.6%
Taylor expanded in y.im around 0 56.2%
if -1.20000000000000002e26 < y.re < 0.00220000000000000013Initial program 45.2%
Taylor expanded in y.im around 0 35.7%
Taylor expanded in y.re around 0 54.4%
distribute-rgt-neg-in54.4%
Simplified54.4%
Taylor expanded in y.im around 0 22.9%
*-commutative22.9%
log1p-expm1-u23.7%
log1p-undefine30.3%
Applied egg-rr30.3%
Final simplification43.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -5e+32) (not (<= y.im 1.45e-174)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -5e+32) || !(y_46_im <= 1.45e-174)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -5e+32) || !(y_46_im <= 1.45e-174)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -5e+32) or not (y_46_im <= 1.45e-174): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -5e+32) || !(y_46_im <= 1.45e-174)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -5e+32], N[Not[LessEqual[y$46$im, 1.45e-174]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+32} \lor \neg \left(y.im \leq 1.45 \cdot 10^{-174}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -4.9999999999999997e32 or 1.45000000000000005e-174 < y.im Initial program 45.2%
Taylor expanded in y.im around 0 57.8%
Taylor expanded in y.re around 0 53.0%
distribute-rgt-neg-in53.0%
Simplified53.0%
Taylor expanded in y.im around 0 5.7%
*-commutative5.7%
log1p-expm1-u17.2%
log1p-undefine37.5%
Applied egg-rr37.5%
if -4.9999999999999997e32 < y.im < 1.45000000000000005e-174Initial program 38.1%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in y.re around 0 27.8%
distribute-rgt-neg-in27.8%
Simplified27.8%
Taylor expanded in y.im around 0 25.0%
*-commutative25.0%
log1p-expm1-u34.1%
Applied egg-rr34.1%
Final simplification36.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -2.6e-55) (not (<= y.im 8.5e-14)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -2.6e-55) || !(y_46_im <= 8.5e-14)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -2.6e-55) || !(y_46_im <= 8.5e-14)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -2.6e-55) || !(y_46_im <= 8.5e-14)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2.6e-55], N[Not[LessEqual[y$46$im, 8.5e-14]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{-55} \lor \neg \left(y.im \leq 8.5 \cdot 10^{-14}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -2.5999999999999999e-55 or 8.50000000000000038e-14 < y.im Initial program 44.4%
Taylor expanded in y.im around 0 63.3%
Taylor expanded in y.re around 0 62.7%
distribute-rgt-neg-in62.7%
Simplified62.7%
Taylor expanded in y.im around 0 5.3%
*-commutative5.3%
add-cbrt-cube25.1%
pow325.1%
Applied egg-rr25.1%
if -2.5999999999999999e-55 < y.im < 8.50000000000000038e-14Initial program 40.2%
Taylor expanded in y.im around 0 48.4%
Taylor expanded in y.re around 0 22.1%
distribute-rgt-neg-in22.1%
Simplified22.1%
Taylor expanded in y.im around 0 22.1%
*-commutative22.1%
log1p-expm1-u34.1%
Applied egg-rr34.1%
Final simplification29.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -3.8e-54) (not (<= y.im 1.36e+14)))
(sqrt (pow t_0 2.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.8e-54) || !(y_46_im <= 1.36e+14)) {
tmp = sqrt(pow(t_0, 2.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.8e-54) || !(y_46_im <= 1.36e+14)) {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -3.8e-54) or not (y_46_im <= 1.36e+14): tmp = math.sqrt(math.pow(t_0, 2.0)) else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3.8e-54) || !(y_46_im <= 1.36e+14)) tmp = sqrt((t_0 ^ 2.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.8e-54], N[Not[LessEqual[y$46$im, 1.36e+14]], $MachinePrecision]], N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.8 \cdot 10^{-54} \lor \neg \left(y.im \leq 1.36 \cdot 10^{+14}\right):\\
\;\;\;\;\sqrt{{t\_0}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -3.8000000000000002e-54 or 1.36e14 < y.im Initial program 43.3%
Taylor expanded in y.im around 0 64.4%
Taylor expanded in y.re around 0 64.5%
distribute-rgt-neg-in64.5%
Simplified64.5%
Taylor expanded in y.im around 0 5.4%
*-commutative5.4%
add-sqr-sqrt3.8%
sqrt-unprod24.9%
pow224.9%
Applied egg-rr24.9%
if -3.8000000000000002e-54 < y.im < 1.36e14Initial program 41.4%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in y.re around 0 22.5%
distribute-rgt-neg-in22.5%
Simplified22.5%
Taylor expanded in y.im around 0 21.0%
*-commutative21.0%
log1p-expm1-u33.9%
Applied egg-rr33.9%
Final simplification29.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.4%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in y.re around 0 43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Taylor expanded in y.im around 0 13.4%
*-commutative13.4%
log1p-expm1-u23.9%
Applied egg-rr23.9%
Final simplification23.9%
(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 42.4%
Taylor expanded in y.im around 0 56.0%
Taylor expanded in y.re around 0 43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Taylor expanded in y.im around 0 13.4%
Final simplification13.4%
herbie shell --seed 2024071
(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)))))