
(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 17 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 (* y.re (atan2 x.im x.re)))
(t_1 (* y.im (- (atan2 x.im x.re))))
(t_2 (* y.im (log (hypot x.im x.re))))
(t_3
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(t_4 (log (hypot x.re x.im))))
(if (<= y.re -0.56)
(* (sin t_2) t_3)
(if (<= y.re 3.7e-23)
(* (sin (fma t_4 y.im t_0)) (exp t_1))
(if (<= y.re 500000000000.0)
(* t_0 t_3)
(* (exp (fma t_4 y.re t_1)) t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * -atan2(x_46_im, x_46_re);
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_4 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -0.56) {
tmp = sin(t_2) * t_3;
} else if (y_46_re <= 3.7e-23) {
tmp = sin(fma(t_4, y_46_im, t_0)) * exp(t_1);
} else if (y_46_re <= 500000000000.0) {
tmp = t_0 * t_3;
} else {
tmp = exp(fma(t_4, y_46_re, t_1)) * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))) t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_3 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_4 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -0.56) tmp = Float64(sin(t_2) * t_3); elseif (y_46_re <= 3.7e-23) tmp = Float64(sin(fma(t_4, y_46_im, t_0)) * exp(t_1)); elseif (y_46_re <= 500000000000.0) tmp = Float64(t_0 * t_3); else tmp = Float64(exp(fma(t_4, y_46_re, t_1)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.56], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 3.7e-23], N[(N[Sin[N[(t$95$4 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 500000000000.0], N[(t$95$0 * t$95$3), $MachinePrecision], N[(N[Exp[N[(t$95$4 * y$46$re + t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -0.56:\\
\;\;\;\;\sin t\_2 \cdot t\_3\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_4, y.im, t\_0\right)\right) \cdot e^{t\_1}\\
\mathbf{elif}\;y.re \leq 500000000000:\\
\;\;\;\;t\_0 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_4, y.re, t\_1\right)} \cdot t\_2\\
\end{array}
\end{array}
if y.re < -0.56000000000000005Initial program 37.7%
Taylor expanded in y.re around 0 39.1%
unpow239.1%
unpow239.1%
hypot-undefine87.0%
Simplified87.0%
if -0.56000000000000005 < y.re < 3.7000000000000003e-23Initial program 45.1%
exp-diff45.1%
exp-to-pow45.1%
hypot-define45.1%
*-commutative45.1%
exp-prod44.9%
fma-define44.9%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around 0 87.3%
rec-exp87.3%
distribute-lft-neg-in87.3%
Simplified87.3%
if 3.7000000000000003e-23 < y.re < 5e11Initial program 40.0%
Taylor expanded in y.im around 0 50.2%
Taylor expanded in y.re around 0 74.3%
if 5e11 < y.re Initial program 40.0%
cancel-sign-sub-inv40.0%
fma-define40.0%
hypot-define40.0%
distribute-lft-neg-in40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in y.im around inf 44.0%
unpow244.0%
unpow244.0%
hypot-undefine80.0%
Simplified80.0%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine80.0%
Simplified80.0%
Final simplification85.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im -8.2e+23)
(* t_2 (sin t_0))
(if (<= y.im 9.5e-73)
(*
(sin (fma t_1 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))))
(* t_2 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -8.2e+23) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 9.5e-73) {
tmp = sin(fma(t_1, 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)));
} else {
tmp = t_2 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -8.2e+23) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 9.5e-73) tmp = Float64(sin(fma(t_1, 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)))); else tmp = Float64(t_2 * 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e+23], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.5e-73], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+23}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{-73}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, 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}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -8.19999999999999992e23Initial program 42.5%
cancel-sign-sub-inv42.5%
fma-define42.5%
hypot-define42.5%
distribute-lft-neg-in42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in y.im around inf 44.1%
unpow244.1%
unpow244.1%
hypot-undefine77.4%
Simplified77.4%
if -8.19999999999999992e23 < y.im < 9.50000000000000005e-73Initial program 43.6%
exp-diff43.6%
exp-to-pow43.6%
hypot-define43.6%
*-commutative43.6%
exp-prod43.6%
fma-define43.6%
hypot-define90.5%
*-commutative90.5%
Simplified90.5%
if 9.50000000000000005e-73 < y.im Initial program 39.0%
cancel-sign-sub-inv39.0%
fma-define39.0%
hypot-define39.0%
distribute-lft-neg-in39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y.im around inf 41.6%
unpow241.6%
unpow241.6%
hypot-undefine77.9%
Simplified77.9%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine78.3%
Simplified78.3%
Final simplification83.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im 2e-68)
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(* t_1 (* 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 t_1 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= 2e-68) {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * (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)) t_1 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= 2e-68) tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * 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]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 2e-68], N[(t$95$1 * 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[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.im \leq 2 \cdot 10^{-68}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < 2.00000000000000013e-68Initial program 43.2%
cancel-sign-sub-inv43.2%
fma-define43.2%
hypot-define43.2%
distribute-lft-neg-in43.2%
distribute-rgt-neg-out43.2%
fma-define43.2%
hypot-define85.0%
*-commutative85.0%
Simplified85.0%
if 2.00000000000000013e-68 < y.im Initial program 39.0%
cancel-sign-sub-inv39.0%
fma-define39.0%
hypot-define39.0%
distribute-lft-neg-in39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y.im around inf 41.6%
unpow241.6%
unpow241.6%
hypot-undefine77.9%
Simplified77.9%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine78.3%
Simplified78.3%
Final simplification83.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im -1e-5)
(* t_2 (sin t_0))
(if (<= y.im 1.25e-71)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.im x.re) y.re))
(* t_2 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1e-5) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 1.25e-71) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_2 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -1e-5) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 1.25e-71) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_2 * 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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1e-5], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.25e-71], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{-71}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -1.00000000000000008e-5Initial program 43.1%
cancel-sign-sub-inv43.1%
fma-define43.1%
hypot-define43.1%
distribute-lft-neg-in43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around inf 44.7%
unpow244.7%
unpow244.7%
hypot-undefine79.5%
Simplified79.5%
if -1.00000000000000008e-5 < y.im < 1.24999999999999999e-71Initial program 43.2%
exp-diff43.2%
exp-to-pow43.2%
hypot-define43.2%
*-commutative43.2%
exp-prod43.2%
fma-define43.2%
hypot-define90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y.im around 0 60.5%
unpow260.5%
unpow260.5%
hypot-undefine89.6%
Simplified89.6%
if 1.24999999999999999e-71 < y.im Initial program 39.0%
cancel-sign-sub-inv39.0%
fma-define39.0%
hypot-define39.0%
distribute-lft-neg-in39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y.im around inf 41.6%
unpow241.6%
unpow241.6%
hypot-undefine77.9%
Simplified77.9%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine78.3%
Simplified78.3%
Final simplification83.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* y.im (- (atan2 x.im x.re))))
(t_3 (* (exp (fma t_0 y.re t_2)) (* y.im (log (hypot x.im x.re))))))
(if (<= y.re -0.000215)
t_3
(if (<= y.re 3.7e-23)
(* (sin (fma t_0 y.im t_1)) (exp t_2))
(if (<= y.re 7000000000.0)
(*
t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = y_46_im * -atan2(x_46_im, x_46_re);
double t_3 = exp(fma(t_0, y_46_re, t_2)) * (y_46_im * log(hypot(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -0.000215) {
tmp = t_3;
} else if (y_46_re <= 3.7e-23) {
tmp = sin(fma(t_0, y_46_im, t_1)) * exp(t_2);
} else if (y_46_re <= 7000000000.0) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))) t_3 = Float64(exp(fma(t_0, y_46_re, t_2)) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -0.000215) tmp = t_3; elseif (y_46_re <= 3.7e-23) tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * exp(t_2)); elseif (y_46_re <= 7000000000.0) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(t$95$0 * y$46$re + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000215], t$95$3, If[LessEqual[y$46$re, 3.7e-23], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7000000000.0], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := e^{\mathsf{fma}\left(t\_0, y.re, t\_2\right)} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -0.000215:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right) \cdot e^{t\_2}\\
\mathbf{elif}\;y.re \leq 7000000000:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -2.14999999999999995e-4 or 7e9 < y.re Initial program 38.7%
cancel-sign-sub-inv38.7%
fma-define38.7%
hypot-define38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around inf 41.2%
unpow241.2%
unpow241.2%
hypot-undefine84.9%
Simplified84.9%
Taylor expanded in y.im around 0 58.0%
unpow258.0%
unpow258.0%
hypot-undefine82.4%
Simplified82.4%
if -2.14999999999999995e-4 < y.re < 3.7000000000000003e-23Initial program 45.1%
exp-diff45.1%
exp-to-pow45.1%
hypot-define45.1%
*-commutative45.1%
exp-prod44.9%
fma-define44.9%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around 0 87.3%
rec-exp87.3%
distribute-lft-neg-in87.3%
Simplified87.3%
if 3.7000000000000003e-23 < y.re < 7e9Initial program 40.0%
Taylor expanded in y.im around 0 50.2%
Taylor expanded in y.re around 0 74.3%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(t_2 (sin (fma (log (hypot x.re x.im)) y.im t_0))))
(if (<= y.re -1.86e-7)
(* t_1 (sin t_0))
(if (<= y.re 3.7e-23)
(* t_2 (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= y.re 1.55e+130)
(* t_0 t_1)
(* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
double tmp;
if (y_46_re <= -1.86e-7) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 3.7e-23) {
tmp = t_2 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.55e+130) {
tmp = t_0 * t_1;
} else {
tmp = t_2 * pow(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(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) tmp = 0.0 if (y_46_re <= -1.86e-7) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 3.7e-23) tmp = Float64(t_2 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_re <= 1.55e+130) tmp = Float64(t_0 * t_1); else tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.86e-7], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.7e-23], N[(t$95$2 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.55e+130], N[(t$95$0 * t$95$1), $MachinePrecision], 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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
\mathbf{if}\;y.re \leq -1.86 \cdot 10^{-7}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-23}:\\
\;\;\;\;t\_2 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{+130}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.86e-7Initial program 37.1%
Taylor expanded in y.im around 0 81.5%
if -1.86e-7 < y.re < 3.7000000000000003e-23Initial program 45.5%
exp-diff45.5%
exp-to-pow45.5%
hypot-define45.5%
*-commutative45.5%
exp-prod45.3%
fma-define45.3%
hypot-define87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y.re around 0 88.0%
rec-exp88.0%
distribute-lft-neg-in88.0%
Simplified88.0%
if 3.7000000000000003e-23 < y.re < 1.55e130Initial program 33.3%
Taylor expanded in y.im around 0 54.7%
Taylor expanded in y.re around 0 62.0%
if 1.55e130 < y.re Initial program 48.1%
exp-diff48.1%
exp-to-pow48.1%
hypot-define48.1%
*-commutative48.1%
exp-prod48.1%
fma-define48.1%
hypot-define74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y.im around 0 74.1%
unpow274.1%
unpow274.1%
hypot-undefine74.1%
Simplified74.1%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -5400.0) (not (<= y.im 1.55e+66)))
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(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 tmp;
if ((y_46_im <= -5400.0) || !(y_46_im <= 1.55e+66)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else {
tmp = 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_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -5400.0) || !(y_46_im <= 1.55e+66)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -5400.0], N[Not[LessEqual[y$46$im, 1.55e+66]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5400 \lor \neg \left(y.im \leq 1.55 \cdot 10^{+66}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -5400 or 1.55000000000000009e66 < y.im Initial program 41.0%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in y.re around 0 62.7%
*-commutative62.7%
distribute-rgt-neg-in62.7%
mul-1-neg62.7%
exp-prod64.4%
mul-1-neg64.4%
Simplified64.4%
if -5400 < y.im < 1.55000000000000009e66Initial program 42.6%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod41.3%
fma-define41.3%
hypot-define84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y.im around 0 60.0%
unpow260.0%
unpow260.0%
hypot-undefine85.2%
Simplified85.2%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3
(*
t_2
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))))
(if (<= x.re -2e+179)
(* (pow (hypot x.im x.re) y.re) (sin t_2))
(if (<= x.re -6.6e+59)
t_0
(if (<= x.re -2.5e-252)
t_3
(if (<= x.re -1e-283)
t_0
(if (<= x.re 4.4e-307)
t_3
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.re)) t_1))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double tmp;
if (x_46_re <= -2e+179) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_2);
} else if (x_46_re <= -6.6e+59) {
tmp = t_0;
} else if (x_46_re <= -2.5e-252) {
tmp = t_3;
} else if (x_46_re <= -1e-283) {
tmp = t_0;
} else if (x_46_re <= 4.4e-307) {
tmp = t_3;
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = t_2 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double tmp;
if (x_46_re <= -2e+179) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(t_2);
} else if (x_46_re <= -6.6e+59) {
tmp = t_0;
} else if (x_46_re <= -2.5e-252) {
tmp = t_3;
} else if (x_46_re <= -1e-283) {
tmp = t_0;
} else if (x_46_re <= 4.4e-307) {
tmp = t_3;
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = t_2 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) tmp = 0 if x_46_re <= -2e+179: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(t_2) elif x_46_re <= -6.6e+59: tmp = t_0 elif x_46_re <= -2.5e-252: tmp = t_3 elif x_46_re <= -1e-283: tmp = t_0 elif x_46_re <= 4.4e-307: tmp = t_3 else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1))) tmp = 0.0 if (x_46_re <= -2e+179) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_2)); elseif (x_46_re <= -6.6e+59) tmp = t_0; elseif (x_46_re <= -2.5e-252) tmp = t_3; elseif (x_46_re <= -1e-283) tmp = t_0; elseif (x_46_re <= 4.4e-307) tmp = t_3; else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)); tmp = 0.0; if (x_46_re <= -2e+179) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_2); elseif (x_46_re <= -6.6e+59) tmp = t_0; elseif (x_46_re <= -2.5e-252) tmp = t_3; elseif (x_46_re <= -1e-283) tmp = t_0; elseif (x_46_re <= 4.4e-307) tmp = t_3; else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2e+179], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -6.6e+59], t$95$0, If[LessEqual[x$46$re, -2.5e-252], t$95$3, If[LessEqual[x$46$re, -1e-283], t$95$0, If[LessEqual[x$46$re, 4.4e-307], t$95$3, N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t\_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1}\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{+179}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t\_2\\
\mathbf{elif}\;x.re \leq -6.6 \cdot 10^{+59}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -2.5 \cdot 10^{-252}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 4.4 \cdot 10^{-307}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -1.99999999999999996e179Initial program 0.0%
Taylor expanded in y.im around 0 55.8%
Taylor expanded in y.im around 0 55.8%
unpow255.8%
unpow255.8%
hypot-undefine61.3%
Simplified61.3%
if -1.99999999999999996e179 < x.re < -6.5999999999999999e59 or -2.50000000000000004e-252 < x.re < -9.99999999999999947e-284Initial program 31.3%
Taylor expanded in y.im around 0 40.2%
Taylor expanded in y.re around 0 64.2%
*-commutative64.2%
distribute-lft-neg-in64.2%
Simplified64.2%
if -6.5999999999999999e59 < x.re < -2.50000000000000004e-252 or -9.99999999999999947e-284 < x.re < 4.4e-307Initial program 59.4%
Taylor expanded in y.im around 0 68.8%
Taylor expanded in y.re around 0 66.7%
if 4.4e-307 < x.re Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around inf 40.9%
unpow240.9%
unpow240.9%
hypot-undefine74.4%
Simplified74.4%
Taylor expanded in x.im around 0 66.7%
+-commutative66.7%
neg-mul-166.7%
unsub-neg66.7%
Simplified66.7%
Final simplification65.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (sin t_1) (exp (- (* y.re (log (- x.im))) t_0)))))
(if (<= x.im -8.5e-89)
t_2
(if (<= x.im -4.8e-205)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im -1e-310)
t_2
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.im)) 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0));
double tmp;
if (x_46_im <= -8.5e-89) {
tmp = t_2;
} else if (x_46_im <= -4.8e-205) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= -1e-310) {
tmp = t_2;
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
double tmp;
if (x_46_im <= -8.5e-89) {
tmp = t_2;
} else if (x_46_im <= -4.8e-205) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= -1e-310) {
tmp = t_2;
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) tmp = 0 if x_46_im <= -8.5e-89: tmp = t_2 elif x_46_im <= -4.8e-205: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_im <= -1e-310: tmp = t_2 else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))) tmp = 0.0 if (x_46_im <= -8.5e-89) tmp = t_2; elseif (x_46_im <= -4.8e-205) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_im <= -1e-310) tmp = t_2; else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0)); tmp = 0.0; if (x_46_im <= -8.5e-89) tmp = t_2; elseif (x_46_im <= -4.8e-205) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= -1e-310) tmp = t_2; else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -8.5e-89], t$95$2, If[LessEqual[x$46$im, -4.8e-205], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1e-310], t$95$2, N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{if}\;x.im \leq -8.5 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.im \leq -4.8 \cdot 10^{-205}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;x.im \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -8.49999999999999937e-89 or -4.8000000000000004e-205 < x.im < -9.999999999999969e-311Initial program 39.4%
Taylor expanded in y.im around 0 50.9%
Taylor expanded in x.im around -inf 61.3%
mul-1-neg61.3%
Simplified61.3%
if -8.49999999999999937e-89 < x.im < -4.8000000000000004e-205Initial program 36.5%
Taylor expanded in y.im around 0 54.0%
Taylor expanded in y.re around 0 57.6%
if -9.999999999999969e-311 < x.im Initial program 45.3%
cancel-sign-sub-inv45.3%
fma-define45.3%
hypot-define45.3%
distribute-lft-neg-in45.3%
distribute-rgt-neg-out45.3%
fma-define45.3%
hypot-define83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in y.im around inf 41.5%
unpow241.5%
unpow241.5%
hypot-undefine77.5%
Simplified77.5%
Taylor expanded in x.re around 0 68.8%
+-commutative68.8%
neg-mul-168.8%
unsub-neg68.8%
*-commutative68.8%
Simplified68.8%
Final simplification64.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 (<= x.im -1e-310)
(*
t_0
(exp (- (* y.im (- (atan2 x.im x.re))) (* y.re (log (/ -1.0 x.im))))))
(* t_0 (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_im <= -1e-310) {
tmp = t_0 * exp(((y_46_im * -atan2(x_46_im, x_46_re)) - (y_46_re * log((-1.0 / x_46_im)))));
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_im <= -1e-310) {
tmp = t_0 * Math.exp(((y_46_im * -Math.atan2(x_46_im, x_46_re)) - (y_46_re * Math.log((-1.0 / x_46_im)))));
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_im)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if x_46_im <= -1e-310: tmp = t_0 * math.exp(((y_46_im * -math.atan2(x_46_im, x_46_re)) - (y_46_re * math.log((-1.0 / x_46_im))))) else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_im <= -1e-310) tmp = Float64(t_0 * exp(Float64(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))) - Float64(y_46_re * log(Float64(-1.0 / x_46_im)))))); else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (x_46_im <= -1e-310) tmp = t_0 * exp(((y_46_im * -atan2(x_46_im, x_46_re)) - (y_46_re * log((-1.0 / x_46_im))))); else tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1e-310], N[(t$95$0 * N[Exp[N[(N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision] - N[(y$46$re * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\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}\;x.im \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) - y.re \cdot \log \left(\frac{-1}{x.im}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if x.im < -9.999999999999969e-311Initial program 38.8%
cancel-sign-sub-inv38.8%
fma-define38.8%
hypot-define38.8%
distribute-lft-neg-in38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y.im around inf 37.0%
unpow237.0%
unpow237.0%
hypot-undefine71.9%
Simplified71.9%
Taylor expanded in x.im around -inf 62.2%
+-commutative62.2%
neg-mul-162.2%
sub-neg62.2%
mul-1-neg62.2%
*-commutative62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
if -9.999999999999969e-311 < x.im Initial program 45.3%
cancel-sign-sub-inv45.3%
fma-define45.3%
hypot-define45.3%
distribute-lft-neg-in45.3%
distribute-rgt-neg-out45.3%
fma-define45.3%
hypot-define83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in y.im around inf 41.5%
unpow241.5%
unpow241.5%
hypot-undefine77.5%
Simplified77.5%
Taylor expanded in x.re around 0 68.8%
+-commutative68.8%
neg-mul-168.8%
unsub-neg68.8%
*-commutative68.8%
Simplified68.8%
Final simplification65.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3
(*
t_2
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))))
(if (<= x.re -1.25e+180)
(* (pow (hypot x.im x.re) y.re) (sin t_2))
(if (<= x.re -1.45e+60)
t_0
(if (<= x.re -6.8e-252)
t_3
(if (<= x.re -3.4e-284)
t_0
(if (<= x.re 4.4e-308)
t_3
(*
(* y.im (log (hypot x.im x.re)))
(exp (- (* y.re (log x.re)) t_1))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double tmp;
if (x_46_re <= -1.25e+180) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_2);
} else if (x_46_re <= -1.45e+60) {
tmp = t_0;
} else if (x_46_re <= -6.8e-252) {
tmp = t_3;
} else if (x_46_re <= -3.4e-284) {
tmp = t_0;
} else if (x_46_re <= 4.4e-308) {
tmp = t_3;
} else {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - t_1));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = t_2 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double tmp;
if (x_46_re <= -1.25e+180) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(t_2);
} else if (x_46_re <= -1.45e+60) {
tmp = t_0;
} else if (x_46_re <= -6.8e-252) {
tmp = t_3;
} else if (x_46_re <= -3.4e-284) {
tmp = t_0;
} else if (x_46_re <= 4.4e-308) {
tmp = t_3;
} else {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = t_2 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) tmp = 0 if x_46_re <= -1.25e+180: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(t_2) elif x_46_re <= -1.45e+60: tmp = t_0 elif x_46_re <= -6.8e-252: tmp = t_3 elif x_46_re <= -3.4e-284: tmp = t_0 elif x_46_re <= 4.4e-308: tmp = t_3 else: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(x_46_re)) - t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1))) tmp = 0.0 if (x_46_re <= -1.25e+180) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_2)); elseif (x_46_re <= -1.45e+60) tmp = t_0; elseif (x_46_re <= -6.8e-252) tmp = t_3; elseif (x_46_re <= -3.4e-284) tmp = t_0; elseif (x_46_re <= 4.4e-308) tmp = t_3; else tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)); tmp = 0.0; if (x_46_re <= -1.25e+180) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_2); elseif (x_46_re <= -1.45e+60) tmp = t_0; elseif (x_46_re <= -6.8e-252) tmp = t_3; elseif (x_46_re <= -3.4e-284) tmp = t_0; elseif (x_46_re <= 4.4e-308) tmp = t_3; else tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.25e+180], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.45e+60], t$95$0, If[LessEqual[x$46$re, -6.8e-252], t$95$3, If[LessEqual[x$46$re, -3.4e-284], t$95$0, If[LessEqual[x$46$re, 4.4e-308], t$95$3, N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t\_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1}\\
\mathbf{if}\;x.re \leq -1.25 \cdot 10^{+180}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t\_2\\
\mathbf{elif}\;x.re \leq -1.45 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq -6.8 \cdot 10^{-252}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -3.4 \cdot 10^{-284}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 4.4 \cdot 10^{-308}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_1}\\
\end{array}
\end{array}
if x.re < -1.2499999999999999e180Initial program 0.0%
Taylor expanded in y.im around 0 55.8%
Taylor expanded in y.im around 0 55.8%
unpow255.8%
unpow255.8%
hypot-undefine61.3%
Simplified61.3%
if -1.2499999999999999e180 < x.re < -1.45e60 or -6.7999999999999999e-252 < x.re < -3.39999999999999991e-284Initial program 31.3%
Taylor expanded in y.im around 0 40.2%
Taylor expanded in y.re around 0 64.2%
*-commutative64.2%
distribute-lft-neg-in64.2%
Simplified64.2%
if -1.45e60 < x.re < -6.7999999999999999e-252 or -3.39999999999999991e-284 < x.re < 4.3999999999999999e-308Initial program 59.4%
Taylor expanded in y.im around 0 68.8%
Taylor expanded in y.re around 0 66.7%
if 4.3999999999999999e-308 < x.re Initial program 41.3%
cancel-sign-sub-inv41.3%
fma-define41.3%
hypot-define41.3%
distribute-lft-neg-in41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.im around inf 40.9%
unpow240.9%
unpow240.9%
hypot-undefine74.4%
Simplified74.4%
Taylor expanded in x.im around 0 66.7%
+-commutative66.7%
neg-mul-166.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in y.im around 0 41.1%
unpow245.7%
unpow245.7%
hypot-undefine69.4%
Simplified61.7%
Final simplification63.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))))
(t_1 (- (atan2 x.im x.re))))
(if (<= y.re -1.0)
t_0
(if (<= y.re -1.6e-276)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) t_1)))
(if (<= y.re 2.3e-249)
(*
(* y.im (log (hypot x.im x.re)))
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re)))))
(if (<= y.re 1.9e+16)
(* y.re (* (atan2 x.im x.re) (exp (* y.im t_1))))
t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = -atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1.0) {
tmp = t_0;
} else if (y_46_re <= -1.6e-276) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), t_1));
} else if (y_46_re <= 2.3e-249) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 1.9e+16) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * t_1)));
} 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.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)));
double t_1 = -Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1.0) {
tmp = t_0;
} else if (y_46_re <= -1.6e-276) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), t_1));
} else if (y_46_re <= 2.3e-249) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(x_46_re)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 1.9e+16) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * t_1)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = -math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -1.0: tmp = t_0 elif y_46_re <= -1.6e-276: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), t_1)) elif y_46_re <= 2.3e-249: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(x_46_re)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) elif y_46_re <= 1.9e+16: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * t_1))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_1 = Float64(-atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -1.0) tmp = t_0; elseif (y_46_re <= -1.6e-276) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ t_1))); elseif (y_46_re <= 2.3e-249) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 1.9e+16) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * t_1)))); 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 = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = -atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -1.0) tmp = t_0; elseif (y_46_re <= -1.6e-276) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ t_1)); elseif (y_46_re <= 2.3e-249) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))); elseif (y_46_re <= 1.9e+16) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * t_1))); 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[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]}, Block[{t$95$1 = (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, If[LessEqual[y$46$re, -1.0], t$95$0, If[LessEqual[y$46$re, -1.6e-276], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.3e-249], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.9e+16], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\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)\\
t_1 := -\tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -1.6 \cdot 10^{-276}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{t\_1}\right)\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-249}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{+16}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1 or 1.9e16 < y.re Initial program 39.7%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in y.im around 0 70.8%
unpow270.8%
unpow270.8%
hypot-undefine70.8%
Simplified70.8%
if -1 < y.re < -1.59999999999999995e-276Initial program 43.5%
Taylor expanded in y.im around 0 32.5%
Taylor expanded in y.re around 0 52.1%
*-commutative52.1%
distribute-rgt-neg-in52.1%
mul-1-neg52.1%
exp-prod52.2%
mul-1-neg52.2%
Simplified52.2%
if -1.59999999999999995e-276 < y.re < 2.2999999999999998e-249Initial program 66.4%
cancel-sign-sub-inv66.4%
fma-define66.4%
hypot-define66.4%
distribute-lft-neg-in66.4%
distribute-rgt-neg-out66.4%
fma-define66.4%
hypot-define91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y.im around inf 66.4%
unpow266.4%
unpow266.4%
hypot-undefine91.9%
Simplified91.9%
Taylor expanded in x.im around 0 58.6%
+-commutative58.6%
neg-mul-158.6%
unsub-neg58.6%
Simplified58.6%
Taylor expanded in y.im around 0 41.9%
unpow265.9%
unpow265.9%
hypot-undefine89.1%
Simplified55.9%
if 2.2999999999999998e-249 < y.re < 1.9e16Initial program 36.5%
Taylor expanded in y.im around 0 27.1%
Taylor expanded in y.re around 0 51.4%
*-commutative51.4%
distribute-lft-neg-in51.4%
Simplified51.4%
Final simplification60.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.1) (not (<= y.re 1.5e+14))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.1) || !(y_46_re <= 1.5e+14)) {
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 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.1) || !(y_46_re <= 1.5e+14)) {
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 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.1) or not (y_46_re <= 1.5e+14): 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 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1.1) || !(y_46_re <= 1.5e+14)) 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 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -1.1) || ~((y_46_re <= 1.5e+14))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1.1], N[Not[LessEqual[y$46$re, 1.5e+14]], $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[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.1 \lor \neg \left(y.re \leq 1.5 \cdot 10^{+14}\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}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -1.1000000000000001 or 1.5e14 < y.re Initial program 39.7%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in y.im around 0 70.8%
unpow270.8%
unpow270.8%
hypot-undefine70.8%
Simplified70.8%
if -1.1000000000000001 < y.re < 1.5e14Initial program 43.8%
Taylor expanded in y.im around 0 29.2%
Taylor expanded in y.re around 0 48.8%
*-commutative48.8%
distribute-rgt-neg-in48.8%
mul-1-neg48.8%
exp-prod48.8%
mul-1-neg48.8%
Simplified48.8%
Final simplification58.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -0.58) (not (<= y.re 1.8e+17))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.58) || !(y_46_re <= 1.8e+17)) {
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 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.58) || !(y_46_re <= 1.8e+17)) {
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 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -0.58) or not (y_46_re <= 1.8e+17): 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 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -0.58) || !(y_46_re <= 1.8e+17)) 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 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -0.58) || ~((y_46_re <= 1.8e+17))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -0.58], N[Not[LessEqual[y$46$re, 1.8e+17]], $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[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.58 \lor \neg \left(y.re \leq 1.8 \cdot 10^{+17}\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}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -0.57999999999999996 or 1.8e17 < y.re Initial program 39.7%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in y.im around 0 70.8%
unpow270.8%
unpow270.8%
hypot-undefine70.8%
Simplified70.8%
if -0.57999999999999996 < y.re < 1.8e17Initial program 43.8%
Taylor expanded in y.im around 0 29.2%
Taylor expanded in y.re around 0 48.8%
*-commutative48.8%
distribute-lft-neg-in48.8%
Simplified48.8%
Final simplification58.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-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) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)
\end{array}
Initial program 41.9%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in y.re around 0 39.5%
*-commutative39.5%
distribute-lft-neg-in39.5%
Simplified39.5%
Final simplification39.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (exp (* y.im (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * atan2(x_46im, x_46re))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * atan(x_46_im, x_46_re))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)
\end{array}
Initial program 41.9%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in y.re around 0 39.5%
*-commutative39.5%
distribute-lft-neg-in39.5%
Simplified39.5%
add-log-exp39.5%
*-un-lft-identity39.5%
log-prod39.5%
metadata-eval39.5%
add-log-exp39.5%
*-commutative39.5%
add-sqr-sqrt18.8%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod8.0%
add-sqr-sqrt13.4%
Applied egg-rr13.4%
+-lft-identity13.4%
Simplified13.4%
Final simplification13.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 41.9%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in y.re around 0 39.5%
*-commutative39.5%
distribute-lft-neg-in39.5%
Simplified39.5%
add-log-exp39.5%
*-un-lft-identity39.5%
log-prod39.5%
metadata-eval39.5%
add-log-exp39.5%
*-commutative39.5%
add-sqr-sqrt18.8%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod8.0%
add-sqr-sqrt13.4%
Applied egg-rr13.4%
+-lft-identity13.4%
Simplified13.4%
Taylor expanded in y.im around 0 12.5%
herbie shell --seed 2024101
(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)))))