
(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 23 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) y.im)))
(if (or (<= y.re -7200000.0) (not (<= y.re 2.55e-8)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ (+ 1.0 (exp t_0)) -1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -7200000.0) || !(y_46_re <= 2.55e-8)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + exp(t_0)) + -1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if ((y_46_re <= -7200000.0) || !(y_46_re <= 2.55e-8)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(1.0 + exp(t_0)) + -1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -7200000.0], N[Not[LessEqual[y$46$re, 2.55e-8]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(1.0 + N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -7200000 \lor \neg \left(y.re \leq 2.55 \cdot 10^{-8}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\left(1 + e^{t\_0}\right) + -1}\\
\end{array}
\end{array}
if y.re < -7.2e6 or 2.55e-8 < y.re Initial program 41.5%
Taylor expanded in y.re around 0 45.2%
*-commutative45.2%
unpow245.2%
unpow245.2%
hypot-undefine80.8%
Simplified80.8%
if -7.2e6 < y.re < 2.55e-8Initial program 43.8%
exp-diff43.8%
exp-to-pow43.8%
hypot-define43.8%
*-commutative43.8%
exp-prod43.7%
fma-define43.7%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
expm1-log1p-u78.7%
expm1-undefine78.7%
add-sqr-sqrt40.0%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod21.5%
add-sqr-sqrt46.3%
exp-prod46.9%
*-commutative46.9%
exp-prod46.9%
add-sqr-sqrt24.6%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod40.7%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
Taylor expanded in x.im around 0 79.3%
Final simplification80.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 2.55e-8)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 2.55e-8) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 2.55e-8) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 2.55e-8], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 2.55 \cdot 10^{-8}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < 2.55e-8Initial program 42.5%
fmm-def42.5%
hypot-define42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
if 2.55e-8 < y.re Initial program 42.9%
Taylor expanded in y.re around 0 48.6%
*-commutative48.6%
unpow248.6%
unpow248.6%
hypot-undefine74.3%
Simplified74.3%
Final simplification78.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.re -26000000.0) (not (<= y.re 2.55e-8)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -26000000.0) || !(y_46_re <= 2.55e-8)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_re <= -26000000.0) || !(y_46_re <= 2.55e-8)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_im * t_0));
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if (y_46_re <= -26000000.0) or not (y_46_re <= 2.55e-8): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_im * t_0)) else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -26000000.0) || !(y_46_re <= 2.55e-8)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if ((y_46_re <= -26000000.0) || ~((y_46_re <= 2.55e-8))) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * t_0)); else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -26000000.0], N[Not[LessEqual[y$46$re, 2.55e-8]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -26000000 \lor \neg \left(y.re \leq 2.55 \cdot 10^{-8}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\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}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.re < -2.6e7 or 2.55e-8 < y.re Initial program 41.5%
Taylor expanded in y.re around 0 45.2%
*-commutative45.2%
unpow245.2%
unpow245.2%
hypot-undefine80.8%
Simplified80.8%
if -2.6e7 < y.re < 2.55e-8Initial program 43.8%
exp-diff43.8%
exp-to-pow43.8%
hypot-define43.8%
*-commutative43.8%
exp-prod43.7%
fma-define43.7%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.im around inf 43.8%
unpow243.8%
unpow243.8%
hypot-undefine78.7%
associate-/l*78.7%
Simplified78.7%
Final simplification79.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)))
(if (or (<= y.re -0.9) (not (<= y.re 6e-15)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ 1.0 (+ (+ 1.0 (exp t_0)) -1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -0.9) || !(y_46_re <= 6e-15)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (1.0 / ((1.0 + exp(t_0)) + -1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if ((y_46_re <= -0.9) || !(y_46_re <= 6e-15)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64(1.0 / Float64(Float64(1.0 + exp(t_0)) + -1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -0.9], N[Not[LessEqual[y$46$re, 6e-15]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(1.0 + N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -0.9 \lor \neg \left(y.re \leq 6 \cdot 10^{-15}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{1}{\left(1 + e^{t\_0}\right) + -1}\\
\end{array}
\end{array}
if y.re < -0.900000000000000022 or 6e-15 < y.re Initial program 41.3%
Taylor expanded in y.re around 0 44.9%
*-commutative44.9%
unpow244.9%
unpow244.9%
hypot-undefine79.8%
Simplified79.8%
if -0.900000000000000022 < y.re < 6e-15Initial program 44.1%
exp-diff44.1%
exp-to-pow44.1%
hypot-define44.1%
*-commutative44.1%
exp-prod44.0%
fma-define44.0%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
expm1-log1p-u79.0%
expm1-undefine79.0%
add-sqr-sqrt39.3%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod22.0%
add-sqr-sqrt46.6%
exp-prod47.2%
*-commutative47.2%
exp-prod47.2%
add-sqr-sqrt25.3%
sqrt-unprod59.9%
sqr-neg59.9%
sqrt-unprod40.0%
add-sqr-sqrt77.1%
Applied egg-rr77.1%
Taylor expanded in x.im around 0 79.6%
Taylor expanded in y.re around 0 79.6%
Final simplification79.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -90000000.0) (not (<= y.re 3.5)))
(* (sin (* y.im (log (hypot x.im x.re)))) (pow (hypot x.im x.re) y.re))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(/ 1.0 (+ (+ 1.0 (exp (* (atan2 x.im x.re) y.im))) -1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -90000000.0) || !(y_46_re <= 3.5)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (1.0 / ((1.0 + exp((atan2(x_46_im, x_46_re) * y_46_im))) + -1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -90000000.0) || !(y_46_re <= 3.5)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64(1.0 / Float64(Float64(1.0 + exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) + -1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -90000000.0], N[Not[LessEqual[y$46$re, 3.5]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(1.0 + N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -90000000 \lor \neg \left(y.re \leq 3.5\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{1}{\left(1 + e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right) + -1}\\
\end{array}
\end{array}
if y.re < -9e7 or 3.5 < y.re Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine71.3%
Simplified71.3%
expm1-log1p-u38.7%
hypot-define20.5%
*-commutative20.5%
fma-define20.5%
+-commutative20.5%
*-commutative20.5%
fma-define20.5%
*-commutative20.5%
hypot-define38.7%
Applied egg-rr38.7%
Taylor expanded in y.re around 0 43.2%
unpow243.2%
unpow243.2%
hypot-undefine79.6%
Simplified79.6%
if -9e7 < y.re < 3.5Initial program 45.2%
exp-diff44.4%
exp-to-pow44.4%
hypot-define44.4%
*-commutative44.4%
exp-prod44.3%
fma-define44.3%
hypot-define78.4%
*-commutative78.4%
Simplified78.4%
expm1-log1p-u78.4%
expm1-undefine78.4%
add-sqr-sqrt39.8%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod21.0%
add-sqr-sqrt45.2%
exp-prod45.8%
*-commutative45.8%
exp-prod45.8%
add-sqr-sqrt24.0%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod40.5%
add-sqr-sqrt76.6%
Applied egg-rr76.6%
Taylor expanded in x.im around 0 79.0%
Taylor expanded in y.re around 0 79.0%
Final simplification79.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3
(* (/ (pow (hypot x.re x.im) y.re) (+ (+ 1.0 (exp t_0)) -1.0)) t_1)))
(if (<= y.re -7000000.0)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_1)
(if (<= y.re -2.15e-152)
t_3
(if (<= y.re 1.4e-80)
(* t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 4.3e+14) t_3 (* t_2 (pow (hypot 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = (pow(hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + exp(t_0)) + -1.0)) * t_1;
double tmp;
if (y_46_re <= -7000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
} else if (y_46_re <= -2.15e-152) {
tmp = t_3;
} else if (y_46_re <= 1.4e-80) {
tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 4.3e+14) {
tmp = t_3;
} else {
tmp = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + Math.exp(t_0)) + -1.0)) * t_1;
double tmp;
if (y_46_re <= -7000000.0) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
} else if (y_46_re <= -2.15e-152) {
tmp = t_3;
} else if (y_46_re <= 1.4e-80) {
tmp = t_2 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 4.3e+14) {
tmp = t_3;
} else {
tmp = t_2 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + math.exp(t_0)) + -1.0)) * t_1 tmp = 0 if y_46_re <= -7000000.0: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1 elif y_46_re <= -2.15e-152: tmp = t_3 elif y_46_re <= 1.4e-80: tmp = t_2 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 4.3e+14: tmp = t_3 else: tmp = t_2 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(1.0 + exp(t_0)) + -1.0)) * t_1) tmp = 0.0 if (y_46_re <= -7000000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_1); elseif (y_46_re <= -2.15e-152) tmp = t_3; elseif (y_46_re <= 1.4e-80) tmp = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 4.3e+14) tmp = t_3; else tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = ((hypot(x_46_re, x_46_im) ^ y_46_re) / ((1.0 + exp(t_0)) + -1.0)) * t_1; tmp = 0.0; if (y_46_re <= -7000000.0) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1; elseif (y_46_re <= -2.15e-152) tmp = t_3; elseif (y_46_re <= 1.4e-80) tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 4.3e+14) tmp = t_3; else tmp = t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(1.0 + N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -7000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, -2.15e-152], t$95$3, If[LessEqual[y$46$re, 1.4e-80], N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.3e+14], t$95$3, N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\left(1 + e^{t\_0}\right) + -1} \cdot t\_1\\
\mathbf{if}\;y.re \leq -7000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_1\\
\mathbf{elif}\;y.re \leq -2.15 \cdot 10^{-152}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{-80}:\\
\;\;\;\;t\_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 4.3 \cdot 10^{+14}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -7e6Initial program 40.0%
Taylor expanded in y.im around 0 86.2%
if -7e6 < y.re < -2.1499999999999999e-152 or 1.39999999999999995e-80 < y.re < 4.3e14Initial program 44.7%
exp-diff44.7%
exp-to-pow44.7%
hypot-define44.7%
*-commutative44.7%
exp-prod44.7%
fma-define44.7%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
expm1-log1p-u84.0%
expm1-undefine84.0%
add-sqr-sqrt33.3%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod24.2%
add-sqr-sqrt42.1%
exp-prod42.1%
*-commutative42.1%
exp-prod42.1%
add-sqr-sqrt24.2%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod35.4%
add-sqr-sqrt82.1%
Applied egg-rr82.1%
Taylor expanded in x.im around 0 83.9%
Taylor expanded in y.im around 0 81.9%
if -2.1499999999999999e-152 < y.re < 1.39999999999999995e-80Initial program 44.8%
fmm-def44.8%
hypot-define44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.re around 0 41.9%
neg-mul-141.9%
distribute-lft-neg-in41.9%
*-commutative41.9%
unpow241.9%
unpow241.9%
hypot-undefine69.5%
Simplified69.5%
if 4.3e14 < y.re Initial program 41.2%
fmm-def41.2%
hypot-define41.2%
distribute-rgt-neg-out41.2%
fma-define41.2%
hypot-define64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-undefine61.8%
Simplified61.8%
expm1-log1p-u22.1%
hypot-define13.2%
*-commutative13.2%
fma-define13.2%
+-commutative13.2%
*-commutative13.2%
fma-define13.2%
*-commutative13.2%
hypot-define22.1%
Applied egg-rr22.1%
Taylor expanded in y.re around 0 47.1%
unpow247.1%
unpow247.1%
hypot-undefine73.6%
Simplified73.6%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(/
(pow (hypot x.re x.im) y.re)
(+ (+ 1.0 (exp (* (atan2 x.im x.re) y.im))) -1.0))
(sin (* y.re (atan2 x.im x.re)))))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* t_1 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -75000000.0)
t_2
(if (<= y.re -2.1e-152)
t_0
(if (<= y.re 5.3e-89)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 3e+15) t_0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (pow(hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + exp((atan2(x_46_im, x_46_re) * y_46_im))) + -1.0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -75000000.0) {
tmp = t_2;
} else if (y_46_re <= -2.1e-152) {
tmp = t_0;
} else if (y_46_re <= 5.3e-89) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 3e+15) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im))) + -1.0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -75000000.0) {
tmp = t_2;
} else if (y_46_re <= -2.1e-152) {
tmp = t_0;
} else if (y_46_re <= 5.3e-89) {
tmp = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 3e+15) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / ((1.0 + math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))) + -1.0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -75000000.0: tmp = t_2 elif y_46_re <= -2.1e-152: tmp = t_0 elif y_46_re <= 5.3e-89: tmp = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 3e+15: tmp = t_0 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(1.0 + exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) + -1.0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -75000000.0) tmp = t_2; elseif (y_46_re <= -2.1e-152) tmp = t_0; elseif (y_46_re <= 5.3e-89) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 3e+15) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((hypot(x_46_re, x_46_im) ^ y_46_re) / ((1.0 + exp((atan2(x_46_im, x_46_re) * y_46_im))) + -1.0)) * sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -75000000.0) tmp = t_2; elseif (y_46_re <= -2.1e-152) tmp = t_0; elseif (y_46_re <= 5.3e-89) tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 3e+15) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(1.0 + N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -75000000.0], t$95$2, If[LessEqual[y$46$re, -2.1e-152], t$95$0, If[LessEqual[y$46$re, 5.3e-89], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3e+15], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\left(1 + e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right) + -1} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -75000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.1 \cdot 10^{-152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 5.3 \cdot 10^{-89}:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -7.5e7 or 3e15 < y.re Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 70.8%
unpow270.8%
unpow270.8%
hypot-undefine70.8%
Simplified70.8%
expm1-log1p-u38.4%
hypot-define20.3%
*-commutative20.3%
fma-define20.3%
+-commutative20.3%
*-commutative20.3%
fma-define20.3%
*-commutative20.3%
hypot-define38.4%
Applied egg-rr38.4%
Taylor expanded in y.re around 0 42.9%
unpow242.9%
unpow242.9%
hypot-undefine79.0%
Simplified79.0%
if -7.5e7 < y.re < -2.09999999999999999e-152 or 5.3000000000000001e-89 < y.re < 3e15Initial program 44.7%
exp-diff44.7%
exp-to-pow44.7%
hypot-define44.7%
*-commutative44.7%
exp-prod44.7%
fma-define44.7%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
expm1-log1p-u84.0%
expm1-undefine84.0%
add-sqr-sqrt33.3%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod24.2%
add-sqr-sqrt42.1%
exp-prod42.1%
*-commutative42.1%
exp-prod42.1%
add-sqr-sqrt24.2%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod35.4%
add-sqr-sqrt82.1%
Applied egg-rr82.1%
Taylor expanded in x.im around 0 83.9%
Taylor expanded in y.im around 0 81.9%
if -2.09999999999999999e-152 < y.re < 5.3000000000000001e-89Initial program 44.8%
fmm-def44.8%
hypot-define44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.re around 0 41.9%
neg-mul-141.9%
distribute-lft-neg-in41.9%
*-commutative41.9%
unpow241.9%
unpow241.9%
hypot-undefine69.5%
Simplified69.5%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (sin (* y.im t_0))))
(if (<= y.im -9.5e-9)
(* t_1 (pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= y.im 2.85e+104)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (/ y.im (/ y.re t_0))))))
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -9.5e-9) {
tmp = t_1 * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (y_46_im <= 2.85e+104) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im / (y_46_re / t_0)))));
} else {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -9.5e-9) {
tmp = t_1 * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= 2.85e+104) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im / (y_46_re / t_0)))));
} else {
tmp = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_im * t_0)) tmp = 0 if y_46_im <= -9.5e-9: tmp = t_1 * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) elif y_46_im <= 2.85e+104: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im / (y_46_re / t_0))))) else: tmp = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -9.5e-9) tmp = Float64(t_1 * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (y_46_im <= 2.85e+104) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im / Float64(y_46_re / t_0)))))); else tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_im * t_0)); tmp = 0.0; if (y_46_im <= -9.5e-9) tmp = t_1 * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)); elseif (y_46_im <= 2.85e+104) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im / (y_46_re / t_0))))); else tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -9.5e-9], N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.85e+104], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im / N[(y$46$re / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq 2.85 \cdot 10^{+104}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{y.im}{\frac{y.re}{t\_0}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -9.5000000000000007e-9Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y.re around 0 33.5%
neg-mul-133.5%
distribute-rgt-neg-in33.5%
mul-1-neg33.5%
exp-prod34.9%
mul-1-neg34.9%
*-commutative34.9%
unpow234.9%
unpow234.9%
hypot-undefine61.5%
Simplified61.5%
if -9.5000000000000007e-9 < y.im < 2.84999999999999993e104Initial program 46.0%
fmm-def46.0%
hypot-define46.0%
distribute-rgt-neg-out46.0%
fma-define46.0%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 67.2%
unpow267.2%
unpow267.2%
hypot-undefine82.2%
Simplified82.2%
Taylor expanded in y.re around inf 44.6%
+-commutative44.6%
associate-/l*43.9%
unpow243.9%
unpow243.9%
hypot-undefine81.5%
Simplified81.5%
clear-num81.5%
un-div-inv82.1%
Applied egg-rr82.1%
if 2.84999999999999993e104 < y.im Initial program 36.0%
fmm-def36.0%
hypot-define36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y.re around 0 33.9%
neg-mul-133.9%
distribute-lft-neg-in33.9%
*-commutative33.9%
unpow233.9%
unpow233.9%
hypot-undefine55.5%
Simplified55.5%
Final simplification72.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (sin (* y.im t_0))))
(if (<= y.im -9.5e-9)
(* t_1 (pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= y.im 3.3e+107)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -9.5e-9) {
tmp = t_1 * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (y_46_im <= 3.3e+107) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -9.5e-9) {
tmp = t_1 * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= 3.3e+107) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_im * t_0)) tmp = 0 if y_46_im <= -9.5e-9: tmp = t_1 * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) elif y_46_im <= 3.3e+107: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -9.5e-9) tmp = Float64(t_1 * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (y_46_im <= 3.3e+107) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_im * t_0)); tmp = 0.0; if (y_46_im <= -9.5e-9) tmp = t_1 * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)); elseif (y_46_im <= 3.3e+107) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -9.5e-9], N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.3e+107], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq 3.3 \cdot 10^{+107}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -9.5000000000000007e-9Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y.re around 0 33.5%
neg-mul-133.5%
distribute-rgt-neg-in33.5%
mul-1-neg33.5%
exp-prod34.9%
mul-1-neg34.9%
*-commutative34.9%
unpow234.9%
unpow234.9%
hypot-undefine61.5%
Simplified61.5%
if -9.5000000000000007e-9 < y.im < 3.30000000000000032e107Initial program 46.0%
fmm-def46.0%
hypot-define46.0%
distribute-rgt-neg-out46.0%
fma-define46.0%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around 0 67.2%
unpow267.2%
unpow267.2%
hypot-undefine82.2%
Simplified82.2%
Taylor expanded in y.re around inf 44.6%
+-commutative44.6%
associate-/l*43.9%
unpow243.9%
unpow243.9%
hypot-undefine81.5%
Simplified81.5%
if 3.30000000000000032e107 < y.im Initial program 36.0%
fmm-def36.0%
hypot-define36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y.re around 0 33.9%
neg-mul-133.9%
distribute-lft-neg-in33.9%
*-commutative33.9%
unpow233.9%
unpow233.9%
hypot-undefine55.5%
Simplified55.5%
Final simplification72.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (or (<= y.re -90000000.0) (not (<= y.re 3.2)))
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if ((y_46_re <= -90000000.0) || !(y_46_re <= 3.2)) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if ((y_46_re <= -90000000.0) || !(y_46_re <= 3.2)) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if (y_46_re <= -90000000.0) or not (y_46_re <= 3.2): tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_re <= -90000000.0) || !(y_46_re <= 3.2)) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if ((y_46_re <= -90000000.0) || ~((y_46_re <= 3.2))) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -90000000.0], N[Not[LessEqual[y$46$re, 3.2]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -90000000 \lor \neg \left(y.re \leq 3.2\right):\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -9e7 or 3.2000000000000002 < y.re Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in y.im around 0 71.3%
unpow271.3%
unpow271.3%
hypot-undefine71.3%
Simplified71.3%
expm1-log1p-u38.7%
hypot-define20.5%
*-commutative20.5%
fma-define20.5%
+-commutative20.5%
*-commutative20.5%
fma-define20.5%
*-commutative20.5%
hypot-define38.7%
Applied egg-rr38.7%
Taylor expanded in y.re around 0 43.2%
unpow243.2%
unpow243.2%
hypot-undefine79.6%
Simplified79.6%
if -9e7 < y.re < 3.2000000000000002Initial program 45.2%
fmm-def45.2%
hypot-define45.2%
distribute-rgt-neg-out45.2%
fma-define45.2%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.re around 0 34.3%
neg-mul-134.3%
distribute-lft-neg-in34.3%
*-commutative34.3%
unpow234.3%
unpow234.3%
hypot-undefine60.4%
Simplified60.4%
Final simplification70.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.re -9e-6) (not (<= y.re 2.85)))
(* (sin (* y.im t_0)) (pow (hypot x.im x.re) y.re))
(sin (fma y.im t_0 (* 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_im, x_46_re));
double tmp;
if ((y_46_re <= -9e-6) || !(y_46_re <= 2.85)) {
tmp = sin((y_46_im * t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin(fma(y_46_im, t_0, (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_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -9e-6) || !(y_46_re <= 2.85)) tmp = Float64(sin(Float64(y_46_im * t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = sin(fma(y_46_im, t_0, 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -9e-6], N[Not[LessEqual[y$46$re, 2.85]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{-6} \lor \neg \left(y.re \leq 2.85\right):\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.re < -9.00000000000000023e-6 or 2.85000000000000009 < y.re Initial program 41.2%
fmm-def41.2%
hypot-define41.2%
distribute-rgt-neg-out41.2%
fma-define41.2%
hypot-define74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in y.im around 0 70.0%
unpow270.0%
unpow270.0%
hypot-undefine70.7%
Simplified70.7%
expm1-log1p-u39.1%
hypot-define20.6%
*-commutative20.6%
fma-define20.6%
+-commutative20.6%
*-commutative20.6%
fma-define20.6%
*-commutative20.6%
hypot-define39.1%
Applied egg-rr39.1%
Taylor expanded in y.re around 0 42.7%
unpow242.7%
unpow242.7%
hypot-undefine78.1%
Simplified78.1%
if -9.00000000000000023e-6 < y.re < 2.85000000000000009Initial program 44.2%
fmm-def44.2%
hypot-define44.2%
distribute-rgt-neg-out44.2%
fma-define44.2%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 35.8%
unpow235.8%
unpow235.8%
hypot-undefine46.9%
Simplified46.9%
add-sqr-sqrt24.4%
sqrt-unprod21.5%
pow221.5%
hypot-define10.9%
*-commutative10.9%
fma-define10.9%
+-commutative10.9%
*-commutative10.9%
fma-define10.9%
*-commutative10.9%
hypot-define21.5%
Applied egg-rr21.5%
unpow221.5%
rem-sqrt-square26.0%
fma-define26.0%
+-commutative26.0%
fma-define26.0%
hypot-undefine12.7%
unpow212.7%
unpow212.7%
+-commutative12.7%
unpow212.7%
unpow212.7%
hypot-undefine26.0%
Simplified26.0%
Taylor expanded in y.re around 0 12.7%
fma-define12.7%
unpow212.7%
unpow212.7%
hypot-undefine26.0%
rem-square-sqrt24.4%
fabs-sqr24.4%
rem-square-sqrt46.9%
Simplified46.9%
Final simplification63.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.re -2.4e-92) (not (<= y.re 5.5e-78)))
(* (pow (hypot x.im x.re) y.re) (sin t_0))
(sin (fma y.im (log (hypot x.im x.re)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.4e-92) || !(y_46_re <= 5.5e-78)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_0);
} else {
tmp = sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), 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 <= -2.4e-92) || !(y_46_re <= 5.5e-78)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_0)); else tmp = sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), 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, -2.4e-92], N[Not[LessEqual[y$46$re, 5.5e-78]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-92} \lor \neg \left(y.re \leq 5.5 \cdot 10^{-78}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -2.4000000000000001e-92 or 5.50000000000000017e-78 < y.re Initial program 40.7%
fmm-def40.7%
hypot-define40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 61.5%
unpow261.5%
unpow261.5%
hypot-undefine61.5%
Simplified61.5%
if -2.4000000000000001e-92 < y.re < 5.50000000000000017e-78Initial program 46.5%
fmm-def46.5%
hypot-define46.5%
distribute-rgt-neg-out46.5%
fma-define46.5%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 35.1%
unpow235.1%
unpow235.1%
hypot-undefine50.9%
Simplified50.9%
add-sqr-sqrt27.5%
sqrt-unprod22.7%
pow222.7%
hypot-define11.8%
*-commutative11.8%
fma-define11.8%
+-commutative11.8%
*-commutative11.8%
fma-define11.8%
*-commutative11.8%
hypot-define22.7%
Applied egg-rr22.7%
unpow222.7%
rem-sqrt-square28.9%
fma-define28.9%
+-commutative28.9%
fma-define28.9%
hypot-undefine14.3%
unpow214.3%
unpow214.3%
+-commutative14.3%
unpow214.3%
unpow214.3%
hypot-undefine28.9%
Simplified28.9%
Taylor expanded in y.re around 0 14.3%
fma-define14.3%
unpow214.3%
unpow214.3%
hypot-undefine28.9%
rem-square-sqrt27.5%
fabs-sqr27.5%
rem-square-sqrt50.9%
Simplified50.9%
Final simplification58.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= x.im -1.55e+26)
(* t_1 (pow (- x.im) y.re))
(if (<= x.im -1.6e-31)
(log (+ 1.0 (expm1 t_0)))
(if (<= x.im 3.6e-262)
(* t_1 (pow (- x.re) y.re))
(* (pow (hypot x.im x.re) y.re) (sin (* y.im (log x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (x_46_im <= -1.55e+26) {
tmp = t_1 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= -1.6e-31) {
tmp = log((1.0 + expm1(t_0)));
} else if (x_46_im <= 3.6e-262) {
tmp = t_1 * pow(-x_46_re, y_46_re);
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (x_46_im <= -1.55e+26) {
tmp = t_1 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= -1.6e-31) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else if (x_46_im <= 3.6e-262) {
tmp = t_1 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if x_46_im <= -1.55e+26: tmp = t_1 * math.pow(-x_46_im, y_46_re) elif x_46_im <= -1.6e-31: tmp = math.log((1.0 + math.expm1(t_0))) elif x_46_im <= 3.6e-262: tmp = t_1 * math.pow(-x_46_re, y_46_re) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (x_46_im <= -1.55e+26) tmp = Float64(t_1 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= -1.6e-31) tmp = log(Float64(1.0 + expm1(t_0))); elseif (x_46_im <= 3.6e-262) tmp = Float64(t_1 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$im, -1.55e+26], N[(t$95$1 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.6e-31], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 3.6e-262], N[(t$95$1 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;x.im \leq -1.55 \cdot 10^{+26}:\\
\;\;\;\;t\_1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq -1.6 \cdot 10^{-31}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{elif}\;x.im \leq 3.6 \cdot 10^{-262}:\\
\;\;\;\;t\_1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -1.55e26Initial program 31.4%
fmm-def31.4%
hypot-define31.4%
distribute-rgt-neg-out31.4%
fma-define31.4%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-undefine46.7%
Simplified46.7%
Taylor expanded in x.im around -inf 46.7%
mul-1-neg46.7%
Simplified46.7%
if -1.55e26 < x.im < -1.60000000000000009e-31Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in y.im around 0 19.9%
unpow219.9%
unpow219.9%
hypot-undefine20.3%
Simplified20.3%
Taylor expanded in y.re around 0 9.9%
log1p-expm1-u32.5%
log1p-undefine54.6%
Applied egg-rr54.6%
if -1.60000000000000009e-31 < x.im < 3.5999999999999998e-262Initial program 48.6%
fmm-def48.6%
hypot-define48.6%
distribute-rgt-neg-out48.6%
fma-define48.6%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.im around 0 56.6%
unpow256.6%
unpow256.6%
hypot-undefine56.8%
Simplified56.8%
Taylor expanded in x.re around -inf 53.2%
mul-1-neg53.2%
Simplified53.2%
if 3.5999999999999998e-262 < x.im Initial program 46.2%
fmm-def46.2%
hypot-define46.2%
distribute-rgt-neg-out46.2%
fma-define46.2%
hypot-define75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine55.0%
Simplified55.0%
Taylor expanded in x.re around 0 54.4%
Taylor expanded in y.re around 0 50.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -2.1e-160) (not (<= y.re 4.4e-89))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (sin (* (log (hypot x.re x.im)) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.1e-160) || !(y_46_re <= 4.4e-89)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.1e-160) || !(y_46_re <= 4.4e-89)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.1e-160) or not (y_46_re <= 4.4e-89): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.1e-160) || !(y_46_re <= 4.4e-89)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.1e-160) || ~((y_46_re <= 4.4e-89))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.1e-160], N[Not[LessEqual[y$46$re, 4.4e-89]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.1 \cdot 10^{-160} \lor \neg \left(y.re \leq 4.4 \cdot 10^{-89}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -2.1e-160 or 4.40000000000000024e-89 < y.re Initial program 42.0%
fmm-def42.0%
hypot-define42.0%
distribute-rgt-neg-out42.0%
fma-define42.0%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y.im around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine60.4%
Simplified60.4%
if -2.1e-160 < y.re < 4.40000000000000024e-89Initial program 44.0%
fmm-def44.0%
hypot-define44.0%
distribute-rgt-neg-out44.0%
fma-define44.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 31.3%
unpow231.3%
unpow231.3%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 23.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-undefine42.9%
Simplified42.9%
Final simplification55.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))) (t_1 (* t_0 (pow x.re y.re))))
(if (<= y.re -3.8e+163)
(* t_0 (pow x.im y.re))
(if (<= y.re -5e+14)
t_1
(if (<= y.re -4.2e-162)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 2.2e-35) (sin (* (log (hypot x.re x.im)) y.im)) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -3.8e+163) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= -5e+14) {
tmp = t_1;
} else if (y_46_re <= -4.2e-162) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.2e-35) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -3.8e+163) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= -5e+14) {
tmp = t_1;
} else if (y_46_re <= -4.2e-162) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.2e-35) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = t_0 * math.pow(x_46_re, y_46_re) tmp = 0 if y_46_re <= -3.8e+163: tmp = t_0 * math.pow(x_46_im, y_46_re) elif y_46_re <= -5e+14: tmp = t_1 elif y_46_re <= -4.2e-162: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.2e-35: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.8e+163) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= -5e+14) tmp = t_1; elseif (y_46_re <= -4.2e-162) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.2e-35) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = t_0 * (x_46_re ^ y_46_re); tmp = 0.0; if (y_46_re <= -3.8e+163) tmp = t_0 * (x_46_im ^ y_46_re); elseif (y_46_re <= -5e+14) tmp = t_1; elseif (y_46_re <= -4.2e-162) tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.2e-35) tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.8e+163], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -5e+14], t$95$1, If[LessEqual[y$46$re, -4.2e-162], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.2e-35], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+163}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq -5 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -4.2 \cdot 10^{-162}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-35}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -3.80000000000000008e163Initial program 39.3%
fmm-def39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 85.8%
unpow285.8%
unpow285.8%
hypot-undefine85.8%
Simplified85.8%
Taylor expanded in x.re around 0 71.5%
*-commutative71.5%
Simplified71.5%
if -3.80000000000000008e163 < y.re < -5e14 or 2.19999999999999994e-35 < y.re Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in y.im around 0 63.1%
unpow263.1%
unpow263.1%
hypot-undefine62.2%
Simplified62.2%
Taylor expanded in x.im around 0 50.4%
*-commutative50.4%
Simplified50.4%
if -5e14 < y.re < -4.2e-162Initial program 49.5%
fmm-def49.5%
hypot-define49.5%
distribute-rgt-neg-out49.5%
fma-define49.5%
hypot-define86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in y.im around 0 48.1%
unpow248.1%
unpow248.1%
hypot-undefine45.7%
Simplified45.7%
Taylor expanded in y.re around 0 38.5%
add-log-exp40.9%
Applied egg-rr40.9%
if -4.2e-162 < y.re < 2.19999999999999994e-35Initial program 41.6%
fmm-def41.6%
hypot-define41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around 0 29.2%
unpow229.2%
unpow229.2%
hypot-undefine47.1%
Simplified47.1%
Taylor expanded in y.re around 0 20.6%
+-commutative20.6%
unpow220.6%
unpow220.6%
hypot-undefine38.4%
Simplified38.4%
Final simplification47.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log x.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -5.3e+23)
(* t_2 (pow (- x.im) y.re))
(if (<= x.im -5.6e-31)
(log (+ 1.0 (expm1 t_1)))
(if (<= x.im 3.7e-262)
(* t_2 (pow (- x.re) y.re))
(if (<= x.im 8.5e-13)
(* t_0 (pow x.re y.re))
(* t_0 (pow x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(x_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -5.3e+23) {
tmp = t_2 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= -5.6e-31) {
tmp = log((1.0 + expm1(t_1)));
} else if (x_46_im <= 3.7e-262) {
tmp = t_2 * pow(-x_46_re, y_46_re);
} else if (x_46_im <= 8.5e-13) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(x_46_im)));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -5.3e+23) {
tmp = t_2 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= -5.6e-31) {
tmp = Math.log((1.0 + Math.expm1(t_1)));
} else if (x_46_im <= 3.7e-262) {
tmp = t_2 * Math.pow(-x_46_re, y_46_re);
} else if (x_46_im <= 8.5e-13) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(x_46_im))) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -5.3e+23: tmp = t_2 * math.pow(-x_46_im, y_46_re) elif x_46_im <= -5.6e-31: tmp = math.log((1.0 + math.expm1(t_1))) elif x_46_im <= 3.7e-262: tmp = t_2 * math.pow(-x_46_re, y_46_re) elif x_46_im <= 8.5e-13: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(x_46_im))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -5.3e+23) tmp = Float64(t_2 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= -5.6e-31) tmp = log(Float64(1.0 + expm1(t_1))); elseif (x_46_im <= 3.7e-262) tmp = Float64(t_2 * (Float64(-x_46_re) ^ y_46_re)); elseif (x_46_im <= 8.5e-13) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -5.3e+23], N[(t$95$2 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -5.6e-31], N[Log[N[(1.0 + N[(Exp[t$95$1] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 3.7e-262], N[(t$95$2 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 8.5e-13], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.im\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;x.im \leq -5.3 \cdot 10^{+23}:\\
\;\;\;\;t\_2 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq -5.6 \cdot 10^{-31}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq 3.7 \cdot 10^{-262}:\\
\;\;\;\;t\_2 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 8.5 \cdot 10^{-13}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.3000000000000001e23Initial program 31.4%
fmm-def31.4%
hypot-define31.4%
distribute-rgt-neg-out31.4%
fma-define31.4%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-undefine46.7%
Simplified46.7%
Taylor expanded in x.im around -inf 46.7%
mul-1-neg46.7%
Simplified46.7%
if -5.3000000000000001e23 < x.im < -5.5999999999999998e-31Initial program 47.0%
fmm-def47.0%
hypot-define47.0%
distribute-rgt-neg-out47.0%
fma-define47.0%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in y.im around 0 19.9%
unpow219.9%
unpow219.9%
hypot-undefine20.3%
Simplified20.3%
Taylor expanded in y.re around 0 9.9%
log1p-expm1-u32.5%
log1p-undefine54.6%
Applied egg-rr54.6%
if -5.5999999999999998e-31 < x.im < 3.7e-262Initial program 48.6%
fmm-def48.6%
hypot-define48.6%
distribute-rgt-neg-out48.6%
fma-define48.6%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.im around 0 56.6%
unpow256.6%
unpow256.6%
hypot-undefine56.8%
Simplified56.8%
Taylor expanded in x.re around -inf 53.2%
mul-1-neg53.2%
Simplified53.2%
if 3.7e-262 < x.im < 8.5000000000000001e-13Initial program 51.4%
fmm-def51.4%
hypot-define51.4%
distribute-rgt-neg-out51.4%
fma-define51.4%
hypot-define66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in y.im around 0 54.0%
unpow254.0%
unpow254.0%
hypot-undefine54.4%
Simplified54.4%
Taylor expanded in x.re around 0 52.7%
Taylor expanded in y.re around 0 50.7%
Taylor expanded in x.im around 0 50.1%
*-commutative50.1%
Simplified50.1%
if 8.5000000000000001e-13 < x.im Initial program 41.8%
fmm-def41.8%
hypot-define41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.im around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine55.4%
Simplified55.4%
Taylor expanded in x.re around 0 55.8%
Taylor expanded in y.re around 0 49.4%
Taylor expanded in x.re around 0 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification50.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log x.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -5.5e+23)
(* t_2 (pow (- x.im) y.re))
(if (<= x.im -1.1e-47)
(log (+ 1.0 (expm1 t_1)))
(if (<= x.im 1.35e-281)
(* t_2 (pow x.re y.re))
(if (<= x.im 4e-13)
(* t_0 (pow x.re y.re))
(* t_0 (pow x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(x_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -5.5e+23) {
tmp = t_2 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= -1.1e-47) {
tmp = log((1.0 + expm1(t_1)));
} else if (x_46_im <= 1.35e-281) {
tmp = t_2 * pow(x_46_re, y_46_re);
} else if (x_46_im <= 4e-13) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(x_46_im)));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -5.5e+23) {
tmp = t_2 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= -1.1e-47) {
tmp = Math.log((1.0 + Math.expm1(t_1)));
} else if (x_46_im <= 1.35e-281) {
tmp = t_2 * Math.pow(x_46_re, y_46_re);
} else if (x_46_im <= 4e-13) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(x_46_im))) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -5.5e+23: tmp = t_2 * math.pow(-x_46_im, y_46_re) elif x_46_im <= -1.1e-47: tmp = math.log((1.0 + math.expm1(t_1))) elif x_46_im <= 1.35e-281: tmp = t_2 * math.pow(x_46_re, y_46_re) elif x_46_im <= 4e-13: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(x_46_im))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -5.5e+23) tmp = Float64(t_2 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= -1.1e-47) tmp = log(Float64(1.0 + expm1(t_1))); elseif (x_46_im <= 1.35e-281) tmp = Float64(t_2 * (x_46_re ^ y_46_re)); elseif (x_46_im <= 4e-13) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -5.5e+23], N[(t$95$2 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.1e-47], N[Log[N[(1.0 + N[(Exp[t$95$1] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 1.35e-281], N[(t$95$2 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4e-13], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.im\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;x.im \leq -5.5 \cdot 10^{+23}:\\
\;\;\;\;t\_2 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq -1.1 \cdot 10^{-47}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq 1.35 \cdot 10^{-281}:\\
\;\;\;\;t\_2 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;x.im \leq 4 \cdot 10^{-13}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.50000000000000004e23Initial program 31.4%
fmm-def31.4%
hypot-define31.4%
distribute-rgt-neg-out31.4%
fma-define31.4%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-undefine46.7%
Simplified46.7%
Taylor expanded in x.im around -inf 46.7%
mul-1-neg46.7%
Simplified46.7%
if -5.50000000000000004e23 < x.im < -1.10000000000000009e-47Initial program 45.3%
fmm-def45.3%
hypot-define45.3%
distribute-rgt-neg-out45.3%
fma-define45.3%
hypot-define72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in y.im around 0 23.1%
unpow223.1%
unpow223.1%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in y.re around 0 10.9%
log1p-expm1-u28.3%
log1p-undefine47.1%
Applied egg-rr47.1%
if -1.10000000000000009e-47 < x.im < 1.34999999999999995e-281Initial program 49.4%
fmm-def49.4%
hypot-define49.4%
distribute-rgt-neg-out49.4%
fma-define49.4%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.im around 0 58.9%
unpow258.9%
unpow258.9%
hypot-undefine57.3%
Simplified57.3%
Taylor expanded in x.im around 0 51.2%
*-commutative51.2%
Simplified51.2%
if 1.34999999999999995e-281 < x.im < 4.0000000000000001e-13Initial program 51.3%
fmm-def51.3%
hypot-define51.3%
distribute-rgt-neg-out51.3%
fma-define51.3%
hypot-define68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in y.im around 0 53.9%
unpow253.9%
unpow253.9%
hypot-undefine56.2%
Simplified56.2%
Taylor expanded in x.re around 0 54.6%
Taylor expanded in y.re around 0 48.8%
Taylor expanded in x.im around 0 48.0%
*-commutative48.0%
Simplified48.0%
if 4.0000000000000001e-13 < x.im Initial program 41.8%
fmm-def41.8%
hypot-define41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.im around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine55.4%
Simplified55.4%
Taylor expanded in x.re around 0 55.8%
Taylor expanded in y.re around 0 49.4%
Taylor expanded in x.re around 0 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification48.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re))))
(if (<= y.re -5.2e-37)
t_0
(if (<= y.re -2.7e-159)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 2.8e-84) (sin (* (log (hypot x.re x.im)) y.im)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -5.2e-37) {
tmp = t_0;
} else if (y_46_re <= -2.7e-159) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.8e-84) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -5.2e-37) {
tmp = t_0;
} else if (y_46_re <= -2.7e-159) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.8e-84) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -5.2e-37: tmp = t_0 elif y_46_re <= -2.7e-159: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.8e-84: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -5.2e-37) tmp = t_0; elseif (y_46_re <= -2.7e-159) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.8e-84) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); 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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -5.2e-37) tmp = t_0; elseif (y_46_re <= -2.7e-159) tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.8e-84) tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im)); 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[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.2e-37], t$95$0, If[LessEqual[y$46$re, -2.7e-159], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.8e-84], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{-37}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -2.7 \cdot 10^{-159}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-84}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -5.19999999999999959e-37 or 2.79999999999999982e-84 < y.re Initial program 41.4%
fmm-def41.4%
hypot-define41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.im around 0 62.8%
unpow262.8%
unpow262.8%
hypot-undefine62.8%
Simplified62.8%
Taylor expanded in x.re around 0 43.8%
*-commutative43.8%
Simplified43.8%
if -5.19999999999999959e-37 < y.re < -2.7e-159Initial program 45.7%
fmm-def45.7%
hypot-define45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-undefine46.9%
Simplified46.9%
Taylor expanded in y.re around 0 46.9%
add-log-exp50.3%
Applied egg-rr50.3%
if -2.7e-159 < y.re < 2.79999999999999982e-84Initial program 44.0%
fmm-def44.0%
hypot-define44.0%
distribute-rgt-neg-out44.0%
fma-define44.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 31.3%
unpow231.3%
unpow231.3%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 23.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-undefine42.9%
Simplified42.9%
Final simplification44.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log x.im)))))
(if (<= x.im -5.5e-48)
(log (+ 1.0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (<= x.im 3.3e-262)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= x.im 6.5e-13)
(* t_0 (pow x.re y.re))
(* t_0 (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(x_46_im)));
double tmp;
if (x_46_im <= -5.5e-48) {
tmp = log((1.0 + expm1((y_46_re * atan2(x_46_im, x_46_re)))));
} else if (x_46_im <= 3.3e-262) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (x_46_im <= 6.5e-13) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(x_46_im)));
double tmp;
if (x_46_im <= -5.5e-48) {
tmp = Math.log((1.0 + Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)))));
} else if (x_46_im <= 3.3e-262) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (x_46_im <= 6.5e-13) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(x_46_im))) tmp = 0 if x_46_im <= -5.5e-48: tmp = math.log((1.0 + math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))) elif x_46_im <= 3.3e-262: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif x_46_im <= 6.5e-13: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(x_46_im))) tmp = 0.0 if (x_46_im <= -5.5e-48) tmp = log(Float64(1.0 + expm1(Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (x_46_im <= 3.3e-262) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (x_46_im <= 6.5e-13) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5.5e-48], N[Log[N[(1.0 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 3.3e-262], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.5e-13], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{if}\;x.im \leq -5.5 \cdot 10^{-48}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;x.im \leq 3.3 \cdot 10^{-262}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;x.im \leq 6.5 \cdot 10^{-13}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.50000000000000047e-48Initial program 34.3%
fmm-def34.3%
hypot-define34.3%
distribute-rgt-neg-out34.3%
fma-define34.3%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 39.7%
unpow239.7%
unpow239.7%
hypot-undefine40.9%
Simplified40.9%
Taylor expanded in y.re around 0 12.9%
log1p-expm1-u23.6%
log1p-undefine26.8%
Applied egg-rr26.8%
if -5.50000000000000047e-48 < x.im < 3.3000000000000003e-262Initial program 50.2%
fmm-def50.2%
hypot-define50.2%
distribute-rgt-neg-out50.2%
fma-define50.2%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 59.6%
unpow259.6%
unpow259.6%
hypot-undefine59.8%
Simplified59.8%
Taylor expanded in y.re around 0 20.1%
add-log-exp34.0%
Applied egg-rr34.0%
if 3.3000000000000003e-262 < x.im < 6.49999999999999957e-13Initial program 51.4%
fmm-def51.4%
hypot-define51.4%
distribute-rgt-neg-out51.4%
fma-define51.4%
hypot-define66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in y.im around 0 54.0%
unpow254.0%
unpow254.0%
hypot-undefine54.4%
Simplified54.4%
Taylor expanded in x.re around 0 52.7%
Taylor expanded in y.re around 0 50.7%
Taylor expanded in x.im around 0 50.1%
*-commutative50.1%
Simplified50.1%
if 6.49999999999999957e-13 < x.im Initial program 41.8%
fmm-def41.8%
hypot-define41.8%
distribute-rgt-neg-out41.8%
fma-define41.8%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.im around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine55.4%
Simplified55.4%
Taylor expanded in x.re around 0 55.8%
Taylor expanded in y.re around 0 49.4%
Taylor expanded in x.re around 0 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification37.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (+ 1.0 (expm1 (* y.re (atan2 x.im x.re)))))))
(if (<= y.re -3.7e-26)
t_0
(if (<= y.re -5.5e-158)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 2.9e-73) (sin (* (log (hypot x.re x.im)) y.im)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log((1.0 + expm1((y_46_re * atan2(x_46_im, x_46_re)))));
double tmp;
if (y_46_re <= -3.7e-26) {
tmp = t_0;
} else if (y_46_re <= -5.5e-158) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.9e-73) {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
} 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 = Math.log((1.0 + Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)))));
double tmp;
if (y_46_re <= -3.7e-26) {
tmp = t_0;
} else if (y_46_re <= -5.5e-158) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.9e-73) {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log((1.0 + math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))) tmp = 0 if y_46_re <= -3.7e-26: tmp = t_0 elif y_46_re <= -5.5e-158: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.9e-73: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(1.0 + expm1(Float64(y_46_re * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -3.7e-26) tmp = t_0; elseif (y_46_re <= -5.5e-158) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.9e-73) tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); else tmp = t_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[(1.0 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-26], t$95$0, If[LessEqual[y$46$re, -5.5e-158], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.9e-73], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(1 + \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-26}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -5.5 \cdot 10^{-158}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{-73}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.6999999999999999e-26 or 2.9e-73 < y.re Initial program 41.6%
fmm-def41.6%
hypot-define41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y.im around 0 63.3%
unpow263.3%
unpow263.3%
hypot-undefine62.1%
Simplified62.1%
Taylor expanded in y.re around 0 9.0%
log1p-expm1-u27.7%
log1p-undefine32.1%
Applied egg-rr32.1%
if -3.6999999999999999e-26 < y.re < -5.50000000000000025e-158Initial program 46.0%
fmm-def46.0%
hypot-define46.0%
distribute-rgt-neg-out46.0%
fma-define46.0%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 50.3%
unpow250.3%
unpow250.3%
hypot-undefine50.4%
Simplified50.4%
Taylor expanded in y.re around 0 50.4%
add-log-exp50.4%
Applied egg-rr50.4%
if -5.50000000000000025e-158 < y.re < 2.9e-73Initial program 43.4%
fmm-def43.4%
hypot-define43.4%
distribute-rgt-neg-out43.4%
fma-define43.4%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 30.9%
unpow230.9%
unpow230.9%
hypot-undefine50.7%
Simplified50.7%
Taylor expanded in y.re around 0 22.7%
+-commutative22.7%
unpow222.7%
unpow222.7%
hypot-undefine42.4%
Simplified42.4%
Final simplification37.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -2.75e-160) (not (<= y.re 1.2e-86))) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (sin (* (log (hypot x.re x.im)) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.75e-160) || !(y_46_re <= 1.2e-86)) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.75e-160) || !(y_46_re <= 1.2e-86)) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.75e-160) or not (y_46_re <= 1.2e-86): tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.75e-160) || !(y_46_re <= 1.2e-86)) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.75e-160], N[Not[LessEqual[y$46$re, 1.2e-86]], $MachinePrecision]], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.75 \cdot 10^{-160} \lor \neg \left(y.re \leq 1.2 \cdot 10^{-86}\right):\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -2.75e-160 or 1.20000000000000007e-86 < y.re Initial program 42.0%
fmm-def42.0%
hypot-define42.0%
distribute-rgt-neg-out42.0%
fma-define42.0%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y.im around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine60.4%
Simplified60.4%
Taylor expanded in y.re around 0 16.2%
log1p-expm1-u31.8%
Applied egg-rr31.8%
if -2.75e-160 < y.re < 1.20000000000000007e-86Initial program 44.0%
fmm-def44.0%
hypot-define44.0%
distribute-rgt-neg-out44.0%
fma-define44.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 31.3%
unpow231.3%
unpow231.3%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 23.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-undefine42.9%
Simplified42.9%
Final simplification34.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 46.4%
unpow246.4%
unpow246.4%
hypot-undefine46.6%
Simplified46.6%
Taylor expanded in y.re around 0 14.6%
log1p-expm1-u25.9%
Applied egg-rr25.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.6%
fmm-def42.6%
hypot-define42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around 0 46.4%
unpow246.4%
unpow246.4%
hypot-undefine46.6%
Simplified46.6%
Taylor expanded in y.re around 0 14.6%
herbie shell --seed 2024179
(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)))))