
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 1.35e+74)
(*
(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 <= 1.35e+74) {
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 <= 1.35e+74) 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, 1.35e+74], 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 1.35 \cdot 10^{+74}:\\
\;\;\;\;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 < 1.3499999999999999e74Initial program 39.3%
cancel-sign-sub-inv39.3%
fma-define39.3%
hypot-define39.3%
distribute-lft-neg-in39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
if 1.3499999999999999e74 < y.re Initial program 37.5%
Taylor expanded in y.re around 0 37.5%
*-commutative37.5%
unpow237.5%
unpow237.5%
hypot-undefine75.0%
Simplified75.0%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -460000000.0) (not (<= y.re 0.00011)))
(*
(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)))))
(*
(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) (pow (exp y.im) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -460000000.0) || !(y_46_re <= 0.00011)) {
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))));
} 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) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -460000000.0) || !(y_46_re <= 0.00011)) 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))))); 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) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -460000000.0], N[Not[LessEqual[y$46$re, 0.00011]], $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], 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[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -460000000 \lor \neg \left(y.re \leq 0.00011\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 \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(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -4.6e8 or 1.10000000000000004e-4 < y.re Initial program 44.5%
Taylor expanded in y.re around 0 42.0%
*-commutative42.0%
unpow242.0%
unpow242.0%
hypot-undefine76.5%
Simplified76.5%
if -4.6e8 < y.re < 1.10000000000000004e-4Initial program 34.1%
exp-diff34.1%
exp-to-pow34.1%
hypot-define34.1%
*-commutative34.1%
exp-prod33.4%
fma-define33.4%
hypot-define79.6%
*-commutative79.6%
Simplified79.6%
Final simplification78.2%
(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.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.05e+29)
t_1
(if (<= y.im 2.2e+19)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 t_0)))
(if (<= y.im 2.05e+225)
t_1
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_2)))))))
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_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.05e+29) {
tmp = t_1;
} else if (y_46_im <= 2.2e+19) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + t_0));
} else if (y_46_im <= 2.05e+225) {
tmp = t_1;
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.05e+29) tmp = t_1; elseif (y_46_im <= 2.2e+19) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + t_0))); elseif (y_46_im <= 2.05e+225) tmp = t_1; else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_2)); 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]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e+29], t$95$1, If[LessEqual[y$46$im, 2.2e+19], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.05e+225], t$95$1, 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[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+19}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + t\_0}\\
\mathbf{elif}\;y.im \leq 2.05 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_2\\
\end{array}
\end{array}
if y.im < -1.0500000000000001e29 or 2.2e19 < y.im < 2.0499999999999999e225Initial program 34.9%
exp-diff31.3%
exp-to-pow31.3%
hypot-define31.3%
*-commutative31.3%
exp-prod30.3%
fma-define30.3%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
add-log-exp61.4%
Applied egg-rr61.4%
Taylor expanded in y.re around 0 32.3%
unpow232.3%
unpow232.3%
hypot-undefine67.0%
exp-prod70.3%
Simplified70.3%
if -1.0500000000000001e29 < y.im < 2.2e19Initial program 42.0%
exp-diff40.4%
exp-to-pow40.4%
hypot-define40.4%
*-commutative40.4%
exp-prod39.0%
fma-define39.0%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y.im around 0 86.6%
if 2.0499999999999999e225 < y.im Initial program 43.8%
Taylor expanded in y.im around 0 87.5%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.im -8.2e+46)
t_0
(if (<= y.im 4.2e+18)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.im x.re) y.re))
(if (<= y.im 9.2e+228)
t_0
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8.2e+46) {
tmp = t_0;
} else if (y_46_im <= 4.2e+18) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 9.2e+228) {
tmp = t_0;
} 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(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -8.2e+46) tmp = t_0; elseif (y_46_im <= 4.2e+18) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 9.2e+228) tmp = t_0; else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e+46], t$95$0, If[LessEqual[y$46$im, 4.2e+18], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.2e+228], t$95$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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+18}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 9.2 \cdot 10^{+228}:\\
\;\;\;\;t\_0\\
\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 t\_1\\
\end{array}
\end{array}
if y.im < -8.19999999999999999e46 or 4.2e18 < y.im < 9.20000000000000052e228Initial program 34.3%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod29.7%
fma-define29.7%
hypot-define61.0%
*-commutative61.0%
Simplified61.0%
add-log-exp61.0%
Applied egg-rr61.0%
Taylor expanded in y.re around 0 31.7%
unpow231.7%
unpow231.7%
hypot-undefine66.7%
exp-prod70.0%
Simplified70.0%
if -8.19999999999999999e46 < y.im < 4.2e18Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y.im around 0 59.3%
unpow259.3%
unpow259.3%
hypot-undefine86.6%
Simplified86.6%
if 9.20000000000000052e228 < y.im Initial program 43.8%
Taylor expanded in y.im around 0 87.5%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -9.4e-61) (not (<= y.re 1.15e-98)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 tmp;
if ((y_46_re <= -9.4e-61) || !(y_46_re <= 1.15e-98)) {
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_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 tmp;
if ((y_46_re <= -9.4e-61) || !(y_46_re <= 1.15e-98)) {
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_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * 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): tmp = 0 if (y_46_re <= -9.4e-61) or not (y_46_re <= 1.15e-98): 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_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * 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) tmp = 0.0 if ((y_46_re <= -9.4e-61) || !(y_46_re <= 1.15e-98)) 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_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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) tmp = 0.0; if ((y_46_re <= -9.4e-61) || ~((y_46_re <= 1.15e-98))) 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_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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_] := If[Or[LessEqual[y$46$re, -9.4e-61], N[Not[LessEqual[y$46$re, 1.15e-98]], $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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.4 \cdot 10^{-61} \lor \neg \left(y.re \leq 1.15 \cdot 10^{-98}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -9.3999999999999993e-61 or 1.15e-98 < y.re Initial program 43.6%
Taylor expanded in y.im around 0 67.1%
if -9.3999999999999993e-61 < y.re < 1.15e-98Initial program 31.7%
cancel-sign-sub-inv31.7%
fma-define31.7%
hypot-define31.7%
distribute-lft-neg-in31.7%
distribute-rgt-neg-out31.7%
fma-define31.7%
hypot-define81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.re around 0 25.7%
neg-mul-125.7%
distribute-lft-neg-in25.7%
*-commutative25.7%
unpow225.7%
unpow225.7%
hypot-undefine71.3%
Simplified71.3%
Final simplification68.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -4.1e-209)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.re 6.5e-218)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_1 (* y.im (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -4.1e-209) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 6.5e-218) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = log(((-1.0d0) / x_46re))
if (x_46re <= (-4.1d-209)) then
tmp = exp(((t_2 * -y_46re) - t_0)) * sin((t_1 - (y_46im * t_2)))
else if (x_46re <= 6.5d-218) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0)) * sin(t_1)
else
tmp = exp(((y_46re * log(x_46re)) - t_0)) * sin((t_1 + (y_46im * log(x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -4.1e-209) {
tmp = Math.exp(((t_2 * -y_46_re) - t_0)) * Math.sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 6.5e-218) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_1);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log((-1.0 / x_46_re)) tmp = 0 if x_46_re <= -4.1e-209: tmp = math.exp(((t_2 * -y_46_re) - t_0)) * math.sin((t_1 - (y_46_im * t_2))) elif x_46_re <= 6.5e-218: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_1) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -4.1e-209) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_re <= 6.5e-218) 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(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log((-1.0 / x_46_re)); tmp = 0.0; if (x_46_re <= -4.1e-209) tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2))); elseif (x_46_re <= 6.5e-218) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1); else tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -4.1e-209], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 6.5e-218], 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[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -4.1 \cdot 10^{-209}:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 6.5 \cdot 10^{-218}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.09999999999999977e-209Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-define41.6%
hypot-define41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in x.re around -inf 79.0%
+-commutative79.0%
neg-mul-179.0%
sub-neg79.0%
mul-1-neg79.0%
+-commutative79.0%
mul-1-neg79.0%
unsub-neg79.0%
*-commutative79.0%
Simplified79.0%
if -4.09999999999999977e-209 < x.re < 6.49999999999999983e-218Initial program 48.5%
Taylor expanded in y.im around 0 66.6%
if 6.49999999999999983e-218 < x.re Initial program 33.4%
cancel-sign-sub-inv33.4%
fma-define33.4%
hypot-define33.4%
distribute-lft-neg-in33.4%
distribute-rgt-neg-out33.4%
fma-define33.4%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in x.im around 0 65.1%
Final simplification71.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -3.4e-16)
t_0
(if (<= y.re 6.8e-89)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(log1p (expm1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.4e-16) {
tmp = t_0;
} else if (y_46_re <= 6.8e-89) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.4e-16) {
tmp = t_0;
} else if (y_46_re <= 6.8e-89) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.4e-16: tmp = t_0 elif y_46_re <= 6.8e-89: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.4e-16) tmp = t_0; elseif (y_46_re <= 6.8e-89) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e-16], t$95$0, If[LessEqual[y$46$re, 6.8e-89], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{-16}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.8 \cdot 10^{-89}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -3.4e-16Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y.im around 0 69.3%
unpow269.3%
unpow269.3%
hypot-undefine70.8%
Simplified70.8%
if -3.4e-16 < y.re < 6.8000000000000001e-89Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define32.9%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.re around 0 26.7%
neg-mul-126.7%
distribute-lft-neg-in26.7%
*-commutative26.7%
unpow226.7%
unpow226.7%
hypot-undefine69.3%
Simplified69.3%
if 6.8000000000000001e-89 < y.re Initial program 39.5%
cancel-sign-sub-inv39.5%
fma-define39.5%
hypot-define39.5%
distribute-lft-neg-in39.5%
distribute-rgt-neg-out39.5%
fma-define40.7%
hypot-define72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine52.5%
Simplified52.5%
log1p-expm1-u53.7%
Applied egg-rr53.7%
Final simplification64.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -4.2e-16) (not (<= y.re 6.8e-89)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(sin (* y.im (log (hypot x.im x.re))))
(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 tmp;
if ((y_46_re <= -4.2e-16) || !(y_46_re <= 6.8e-89)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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 tmp;
if ((y_46_re <= -4.2e-16) || !(y_46_re <= 6.8e-89)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.2e-16) or not (y_46_re <= 6.8e-89): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.2e-16) || !(y_46_re <= 6.8e-89)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * 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) tmp = 0.0; if ((y_46_re <= -4.2e-16) || ~((y_46_re <= 6.8e-89))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * 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_] := If[Or[LessEqual[y$46$re, -4.2e-16], N[Not[LessEqual[y$46$re, 6.8e-89]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-16} \lor \neg \left(y.re \leq 6.8 \cdot 10^{-89}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -4.2000000000000002e-16 or 6.8000000000000001e-89 < y.re Initial program 43.6%
cancel-sign-sub-inv43.6%
fma-define43.6%
hypot-define43.6%
distribute-lft-neg-in43.6%
distribute-rgt-neg-out43.6%
fma-define44.3%
hypot-define78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in y.im around 0 57.6%
unpow257.6%
unpow257.6%
hypot-undefine60.3%
Simplified60.3%
if -4.2000000000000002e-16 < y.re < 6.8000000000000001e-89Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define32.9%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.re around 0 26.7%
neg-mul-126.7%
distribute-lft-neg-in26.7%
*-commutative26.7%
unpow226.7%
unpow226.7%
hypot-undefine69.3%
Simplified69.3%
Final simplification64.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.8e-91) (not (<= y.re 1.8e-91))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (/ (sin (* y.im (log x.re))) (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 tmp;
if ((y_46_re <= -5.8e-91) || !(y_46_re <= 1.8e-91)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(x_46_re))) / 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 tmp;
if ((y_46_re <= -5.8e-91) || !(y_46_re <= 1.8e-91)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_re))) / 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): tmp = 0 if (y_46_re <= -5.8e-91) or not (y_46_re <= 1.8e-91): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(x_46_re))) / 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) tmp = 0.0 if ((y_46_re <= -5.8e-91) || !(y_46_re <= 1.8e-91)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(x_46_re))) / exp(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) tmp = 0.0; if ((y_46_re <= -5.8e-91) || ~((y_46_re <= 1.8e-91))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(x_46_re))) / 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_] := If[Or[LessEqual[y$46$re, -5.8e-91], N[Not[LessEqual[y$46$re, 1.8e-91]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{-91} \lor \neg \left(y.re \leq 1.8 \cdot 10^{-91}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\end{array}
\end{array}
if y.re < -5.8000000000000001e-91 or 1.8e-91 < y.re Initial program 45.4%
cancel-sign-sub-inv45.4%
fma-define45.4%
hypot-define45.4%
distribute-lft-neg-in45.4%
distribute-rgt-neg-out45.4%
fma-define46.0%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around 0 52.5%
unpow252.5%
unpow252.5%
hypot-undefine56.0%
Simplified56.0%
if -5.8000000000000001e-91 < y.re < 1.8e-91Initial program 27.7%
exp-diff27.7%
exp-to-pow27.7%
hypot-define27.7%
*-commutative27.7%
exp-prod27.7%
fma-define27.7%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
add-log-exp78.7%
Applied egg-rr78.7%
Taylor expanded in x.im around 0 28.5%
expm1-log1p-u15.1%
expm1-undefine15.1%
Applied egg-rr15.1%
expm1-define15.1%
Simplified15.1%
Taylor expanded in y.re around 0 26.9%
Final simplification45.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -1.3e-112) (not (<= y.re 6e-18)))
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.3e-112) || !(y_46_re <= 6e-18)) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.3e-112) || !(y_46_re <= 6e-18)) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -1.3e-112) || !(y_46_re <= 6e-18)) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.3e-112], N[Not[LessEqual[y$46$re, 6e-18]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-112} \lor \neg \left(y.re \leq 6 \cdot 10^{-18}\right):\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -1.29999999999999996e-112 or 5.99999999999999966e-18 < y.re Initial program 45.8%
cancel-sign-sub-inv45.8%
fma-define45.8%
hypot-define45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-out45.8%
fma-define46.5%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around 0 55.1%
unpow255.1%
unpow255.1%
hypot-undefine56.3%
Simplified56.3%
if -1.29999999999999996e-112 < y.re < 5.99999999999999966e-18Initial program 29.1%
cancel-sign-sub-inv29.1%
fma-define29.1%
hypot-define29.1%
distribute-lft-neg-in29.1%
distribute-rgt-neg-out29.1%
fma-define29.1%
hypot-define78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in y.im around 0 13.6%
unpow213.6%
unpow213.6%
hypot-undefine15.0%
Simplified15.0%
Taylor expanded in y.re around 0 15.0%
*-commutative15.0%
add-cbrt-cube28.1%
pow328.1%
*-commutative28.1%
Applied egg-rr28.1%
Final simplification44.8%
(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.6e+19) (not (<= y.re 265000000.0)))
(* (sin t_0) (pow x.re y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.6e+19) || !(y_46_re <= 265000000.0)) {
tmp = sin(t_0) * pow(x_46_re, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.6e+19) || !(y_46_re <= 265000000.0)) {
tmp = Math.sin(t_0) * Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -2.6e+19) || !(y_46_re <= 265000000.0)) tmp = Float64(sin(t_0) * (x_46_re ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.6e+19], N[Not[LessEqual[y$46$re, 265000000.0]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.6 \cdot 10^{+19} \lor \neg \left(y.re \leq 265000000\right):\\
\;\;\;\;\sin t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -2.6e19 or 2.65e8 < y.re Initial program 44.2%
cancel-sign-sub-inv44.2%
fma-define44.2%
hypot-define44.2%
distribute-lft-neg-in44.2%
distribute-rgt-neg-out44.2%
fma-define45.1%
hypot-define78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y.im around 0 65.7%
unpow265.7%
unpow265.7%
hypot-undefine65.7%
Simplified65.7%
Taylor expanded in x.im around 0 56.2%
*-commutative56.2%
Simplified56.2%
if -2.6e19 < y.re < 2.65e8Initial program 34.7%
cancel-sign-sub-inv34.7%
fma-define34.7%
hypot-define34.7%
distribute-lft-neg-in34.7%
distribute-rgt-neg-out34.7%
fma-define34.7%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around 0 16.3%
unpow216.3%
unpow216.3%
hypot-undefine18.7%
Simplified18.7%
Taylor expanded in y.re around 0 16.8%
*-commutative16.8%
add-cbrt-cube25.7%
pow325.7%
*-commutative25.7%
Applied egg-rr25.7%
Final simplification39.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -3.8e+76) (not (<= y.re 9800000.0)))
(* (sin t_0) (pow x.im y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -3.8e+76) || !(y_46_re <= 9800000.0)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -3.8e+76) || !(y_46_re <= 9800000.0)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -3.8e+76) || !(y_46_re <= 9800000.0)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.8e+76], N[Not[LessEqual[y$46$re, 9800000.0]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+76} \lor \neg \left(y.re \leq 9800000\right):\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -3.80000000000000024e76 or 9.8e6 < y.re Initial program 43.0%
cancel-sign-sub-inv43.0%
fma-define43.0%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.9%
hypot-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in y.im around 0 65.6%
unpow265.6%
unpow265.6%
hypot-undefine65.6%
Simplified65.6%
Taylor expanded in x.re around 0 52.8%
*-commutative52.8%
Simplified52.8%
if -3.80000000000000024e76 < y.re < 9.8e6Initial program 36.0%
cancel-sign-sub-inv36.0%
fma-define36.0%
hypot-define36.0%
distribute-lft-neg-in36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.im around 0 18.3%
unpow218.3%
unpow218.3%
hypot-undefine20.6%
Simplified20.6%
Taylor expanded in y.re around 0 16.3%
*-commutative16.3%
add-cbrt-cube26.1%
pow326.1%
*-commutative26.1%
Applied egg-rr26.1%
Final simplification37.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.8e-28)
(cbrt (pow t_0 3.0))
(if (<= y.im 1.9e+52)
(log1p (expm1 t_0))
(pow (pow t_0 6.0) 0.16666666666666666)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.8e-28) {
tmp = cbrt(pow(t_0, 3.0));
} else if (y_46_im <= 1.9e+52) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 6.0), 0.16666666666666666);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.8e-28) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else if (y_46_im <= 1.9e+52) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 6.0), 0.16666666666666666);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.8e-28) tmp = cbrt((t_0 ^ 3.0)); elseif (y_46_im <= 1.9e+52) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 6.0) ^ 0.16666666666666666; 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[LessEqual[y$46$im, -2.8e-28], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[y$46$im, 1.9e+52], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 6.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{-28}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t\_0}^{6}\right)}^{0.16666666666666666}\\
\end{array}
\end{array}
if y.im < -2.7999999999999998e-28Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 29.1%
unpow229.1%
unpow229.1%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in y.re around 0 3.5%
*-commutative3.5%
add-cbrt-cube27.8%
pow327.8%
*-commutative27.8%
Applied egg-rr27.8%
if -2.7999999999999998e-28 < y.im < 1.9e52Initial program 42.8%
cancel-sign-sub-inv42.8%
fma-define42.8%
hypot-define42.8%
distribute-lft-neg-in42.8%
distribute-rgt-neg-out42.8%
fma-define42.8%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 49.2%
unpow249.2%
unpow249.2%
hypot-undefine56.4%
Simplified56.4%
Taylor expanded in y.re around 0 20.3%
log1p-expm1-u34.8%
Applied egg-rr34.8%
if 1.9e52 < y.im Initial program 33.6%
cancel-sign-sub-inv33.6%
fma-define33.6%
hypot-define33.6%
distribute-lft-neg-in33.6%
distribute-rgt-neg-out33.6%
fma-define35.2%
hypot-define65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y.im around 0 28.3%
unpow228.3%
unpow228.3%
hypot-undefine21.2%
Simplified21.2%
Taylor expanded in y.re around 0 2.8%
add-exp-log1.5%
Applied egg-rr1.5%
rem-exp-log2.8%
rem-cbrt-cube19.1%
unpow1/325.0%
sqr-pow25.0%
pow-prod-down29.8%
pow-prod-up29.8%
metadata-eval29.8%
metadata-eval29.8%
Applied egg-rr29.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow t_0 3.0)))
(if (<= y.im -1.3e-27)
(cbrt t_1)
(if (<= y.im 1.22e+84)
(log1p (expm1 t_0))
(pow t_1 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(t_0, 3.0);
double tmp;
if (y_46_im <= -1.3e-27) {
tmp = cbrt(t_1);
} else if (y_46_im <= 1.22e+84) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(t_1, 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(t_0, 3.0);
double tmp;
if (y_46_im <= -1.3e-27) {
tmp = Math.cbrt(t_1);
} else if (y_46_im <= 1.22e+84) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(t_1, 0.3333333333333333);
}
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 = t_0 ^ 3.0 tmp = 0.0 if (y_46_im <= -1.3e-27) tmp = cbrt(t_1); elseif (y_46_im <= 1.22e+84) tmp = log1p(expm1(t_0)); else tmp = t_1 ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 3.0], $MachinePrecision]}, If[LessEqual[y$46$im, -1.3e-27], N[Power[t$95$1, 1/3], $MachinePrecision], If[LessEqual[y$46$im, 1.22e+84], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[t$95$1, 0.3333333333333333], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {t\_0}^{3}\\
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{-27}:\\
\;\;\;\;\sqrt[3]{t\_1}\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{+84}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{t\_1}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -1.30000000000000009e-27Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 29.1%
unpow229.1%
unpow229.1%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in y.re around 0 3.5%
*-commutative3.5%
add-cbrt-cube27.8%
pow327.8%
*-commutative27.8%
Applied egg-rr27.8%
if -1.30000000000000009e-27 < y.im < 1.2200000000000001e84Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-define41.6%
hypot-define41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y.im around 0 47.7%
unpow247.7%
unpow247.7%
hypot-undefine54.5%
Simplified54.5%
Taylor expanded in y.re around 0 19.4%
log1p-expm1-u34.0%
Applied egg-rr34.0%
if 1.2200000000000001e84 < y.im Initial program 35.4%
cancel-sign-sub-inv35.4%
fma-define35.4%
hypot-define35.4%
distribute-lft-neg-in35.4%
distribute-rgt-neg-out35.4%
fma-define37.2%
hypot-define67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y.im around 0 29.5%
unpow229.5%
unpow229.5%
hypot-undefine21.6%
Simplified21.6%
Taylor expanded in y.re around 0 2.9%
*-commutative2.9%
add-cbrt-cube20.9%
pow1/327.4%
pow327.4%
*-commutative27.4%
Applied egg-rr27.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.25e-27)
(cbrt (pow t_0 3.0))
(if (<= y.im 1.2e+122) (log1p (expm1 t_0)) (exp (log1p (+ 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.25e-27) {
tmp = cbrt(pow(t_0, 3.0));
} else if (y_46_im <= 1.2e+122) {
tmp = log1p(expm1(t_0));
} else {
tmp = exp(log1p((t_0 + -1.0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.25e-27) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else if (y_46_im <= 1.2e+122) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.exp(Math.log1p((t_0 + -1.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.25e-27) tmp = cbrt((t_0 ^ 3.0)); elseif (y_46_im <= 1.2e+122) tmp = log1p(expm1(t_0)); else tmp = exp(log1p(Float64(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.25e-27], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[y$46$im, 1.2e+122], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Exp[N[Log[1 + N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.25 \cdot 10^{-27}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t\_0 + -1\right)}\\
\end{array}
\end{array}
if y.im < -1.25e-27Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 29.1%
unpow229.1%
unpow229.1%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in y.re around 0 3.5%
*-commutative3.5%
add-cbrt-cube27.8%
pow327.8%
*-commutative27.8%
Applied egg-rr27.8%
if -1.25e-27 < y.im < 1.2000000000000001e122Initial program 40.4%
cancel-sign-sub-inv40.4%
fma-define40.4%
hypot-define40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 18.0%
log1p-expm1-u32.8%
Applied egg-rr32.8%
if 1.2000000000000001e122 < y.im Initial program 37.4%
cancel-sign-sub-inv37.4%
fma-define37.4%
hypot-define37.4%
distribute-lft-neg-in37.4%
distribute-rgt-neg-out37.4%
fma-define39.5%
hypot-define67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in y.im around 0 31.9%
unpow231.9%
unpow231.9%
hypot-undefine22.0%
Simplified22.0%
Taylor expanded in y.re around 0 2.9%
add-exp-log1.4%
Applied egg-rr1.4%
log1p-expm1-u13.7%
expm1-undefine13.7%
rem-exp-log24.9%
Applied egg-rr24.9%
Final simplification29.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -7.4e-28) (not (<= y.im 1.2e+122)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -7.4e-28) || !(y_46_im <= 1.2e+122)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -7.4e-28) || !(y_46_im <= 1.2e+122)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -7.4e-28) || !(y_46_im <= 1.2e+122)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -7.4e-28], N[Not[LessEqual[y$46$im, 1.2e+122]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -7.4 \cdot 10^{-28} \lor \neg \left(y.im \leq 1.2 \cdot 10^{+122}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -7.40000000000000039e-28 or 1.2000000000000001e122 < y.im Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define38.2%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 30.1%
unpow230.1%
unpow230.1%
hypot-undefine26.0%
Simplified26.0%
Taylor expanded in y.re around 0 3.3%
*-commutative3.3%
add-cbrt-cube25.3%
pow325.3%
*-commutative25.3%
Applied egg-rr25.3%
if -7.40000000000000039e-28 < y.im < 1.2000000000000001e122Initial program 40.4%
cancel-sign-sub-inv40.4%
fma-define40.4%
hypot-define40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 18.0%
log1p-expm1-u32.8%
Applied egg-rr32.8%
Final simplification29.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.5e-27)
(cbrt (pow t_0 3.0))
(if (<= y.im 1.2e+122) (log1p (expm1 t_0)) (sqrt (pow t_0 2.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.5e-27) {
tmp = cbrt(pow(t_0, 3.0));
} else if (y_46_im <= 1.2e+122) {
tmp = log1p(expm1(t_0));
} else {
tmp = sqrt(pow(t_0, 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.5e-27) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else if (y_46_im <= 1.2e+122) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.5e-27) tmp = cbrt((t_0 ^ 3.0)); elseif (y_46_im <= 1.2e+122) tmp = log1p(expm1(t_0)); else tmp = sqrt((t_0 ^ 2.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[LessEqual[y$46$im, -1.5e-27], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[y$46$im, 1.2e+122], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{-27}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{t\_0}^{2}}\\
\end{array}
\end{array}
if y.im < -1.5000000000000001e-27Initial program 37.3%
cancel-sign-sub-inv37.3%
fma-define37.3%
hypot-define37.3%
distribute-lft-neg-in37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 29.1%
unpow229.1%
unpow229.1%
hypot-undefine28.4%
Simplified28.4%
Taylor expanded in y.re around 0 3.5%
*-commutative3.5%
add-cbrt-cube27.8%
pow327.8%
*-commutative27.8%
Applied egg-rr27.8%
if -1.5000000000000001e-27 < y.im < 1.2000000000000001e122Initial program 40.4%
cancel-sign-sub-inv40.4%
fma-define40.4%
hypot-define40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around 0 45.3%
unpow245.3%
unpow245.3%
hypot-undefine51.6%
Simplified51.6%
Taylor expanded in y.re around 0 18.0%
log1p-expm1-u32.8%
Applied egg-rr32.8%
if 1.2000000000000001e122 < y.im Initial program 37.4%
cancel-sign-sub-inv37.4%
fma-define37.4%
hypot-define37.4%
distribute-lft-neg-in37.4%
distribute-rgt-neg-out37.4%
fma-define39.5%
hypot-define67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in y.im around 0 31.9%
unpow231.9%
unpow231.9%
hypot-undefine22.0%
Simplified22.0%
Taylor expanded in y.re around 0 2.9%
add-exp-log1.4%
Applied egg-rr1.4%
rem-exp-log2.9%
add-sqr-sqrt1.4%
sqrt-unprod21.3%
pow221.3%
Applied egg-rr21.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 1.1e-70) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.1e-70) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.1e-70) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 1.1e-70: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 1.1e-70) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 1.1e-70], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.1 \cdot 10^{-70}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 1.0999999999999999e-70Initial program 41.4%
cancel-sign-sub-inv41.4%
fma-define41.4%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define42.0%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 39.5%
unpow239.5%
unpow239.5%
hypot-undefine41.3%
Simplified41.3%
Taylor expanded in y.re around 0 12.4%
log1p-expm1-u26.8%
Applied egg-rr26.8%
if 1.0999999999999999e-70 < x.re Initial program 33.6%
cancel-sign-sub-inv33.6%
fma-define33.6%
hypot-define33.6%
distribute-lft-neg-in33.6%
distribute-rgt-neg-out33.6%
fma-define33.5%
hypot-define74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in y.im around 0 34.9%
unpow234.9%
unpow234.9%
hypot-undefine35.4%
Simplified35.4%
Taylor expanded in y.re around 0 8.1%
add-log-exp22.1%
Applied egg-rr22.1%
(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 38.9%
cancel-sign-sub-inv38.9%
fma-define38.9%
hypot-define38.9%
distribute-lft-neg-in38.9%
distribute-rgt-neg-out38.9%
fma-define39.3%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 38.1%
unpow238.1%
unpow238.1%
hypot-undefine39.4%
Simplified39.4%
Taylor expanded in y.re around 0 11.0%
log1p-expm1-u22.7%
Applied egg-rr22.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 38.9%
cancel-sign-sub-inv38.9%
fma-define38.9%
hypot-define38.9%
distribute-lft-neg-in38.9%
distribute-rgt-neg-out38.9%
fma-define39.3%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 38.1%
unpow238.1%
unpow238.1%
hypot-undefine39.4%
Simplified39.4%
Taylor expanded in y.re around 0 11.0%
herbie shell --seed 2024129
(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)))))