
(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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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 10 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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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
(exp
(*
y.im
(- (* y.re (/ (log (hypot x.im x.re)) y.im)) (atan2 x.im x.re))))))
(if (<= y.re 4e+203)
t_0
(*
t_0
(+ 1.0 (* (* -0.5 (pow y.im 2.0)) (pow (log (hypot x.re x.im)) 2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((y_46_im * ((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= 4e+203) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + ((-0.5 * pow(y_46_im, 2.0)) * pow(log(hypot(x_46_re, x_46_im)), 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 = Math.exp((y_46_im * ((y_46_re * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_im)) - Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= 4e+203) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + ((-0.5 * Math.pow(y_46_im, 2.0)) * Math.pow(Math.log(Math.hypot(x_46_re, x_46_im)), 2.0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((y_46_im * ((y_46_re * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_im)) - math.atan2(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= 4e+203: tmp = t_0 else: tmp = t_0 * (1.0 + ((-0.5 * math.pow(y_46_im, 2.0)) * math.pow(math.log(math.hypot(x_46_re, x_46_im)), 2.0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(y_46_im * Float64(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= 4e+203) tmp = t_0; else tmp = Float64(t_0 * Float64(1.0 + Float64(Float64(-0.5 * (y_46_im ^ 2.0)) * (log(hypot(x_46_re, x_46_im)) ^ 2.0)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((y_46_im * ((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= 4e+203) tmp = t_0; else tmp = t_0 * (1.0 + ((-0.5 * (y_46_im ^ 2.0)) * (log(hypot(x_46_re, x_46_im)) ^ 2.0))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(y$46$im * N[(N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 4e+203], t$95$0, N[(t$95$0 * N[(1.0 + N[(N[(-0.5 * N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \left(y.re \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.re \leq 4 \cdot 10^{+203}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(1 + \left(-0.5 \cdot {y.im}^{2}\right) \cdot {\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}\right)\\
\end{array}
\end{array}
if y.re < 4e203Initial program 40.9%
fmm-def40.9%
hypot-define40.9%
distribute-rgt-neg-out40.9%
fma-define40.9%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around inf 58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
associate-/l*58.5%
unpow258.5%
unpow258.5%
hypot-undefine83.1%
Simplified83.1%
Taylor expanded in y.im around inf 40.9%
*-commutative40.9%
unpow240.9%
unpow240.9%
hypot-undefine83.7%
Simplified83.7%
Taylor expanded in y.im around 0 86.9%
if 4e203 < y.re Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define47.4%
*-commutative47.4%
Simplified47.4%
Taylor expanded in y.im around inf 47.4%
+-commutative47.4%
mul-1-neg47.4%
unsub-neg47.4%
associate-/l*47.4%
unpow247.4%
unpow247.4%
hypot-undefine47.4%
Simplified47.4%
Taylor expanded in y.im around inf 31.6%
*-commutative31.6%
unpow231.6%
unpow231.6%
hypot-undefine63.2%
Simplified63.2%
Taylor expanded in y.im around 0 68.4%
associate-*r*68.4%
+-commutative68.4%
unpow268.4%
unpow268.4%
hypot-undefine84.2%
Simplified84.2%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3.8)
(pow (+ x.im (/ (* 0.5 (pow x.re 2.0)) x.im)) y.re)
(if (<= y.re 1.2e+32)
(exp (* (atan2 x.im x.re) (- y.im)))
(if (<= y.re 6.5e+242)
(pow (hypot x.im x.re) y.re)
(*
(pow x.re y.re)
(fma -0.5 (pow (* y.re (atan2 x.im x.re)) 2.0) 1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.8) {
tmp = pow((x_46_im + ((0.5 * pow(x_46_re, 2.0)) / x_46_im)), y_46_re);
} else if (y_46_re <= 1.2e+32) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = pow(x_46_re, y_46_re) * fma(-0.5, pow((y_46_re * atan2(x_46_im, x_46_re)), 2.0), 1.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.8) tmp = Float64(x_46_im + Float64(Float64(0.5 * (x_46_re ^ 2.0)) / x_46_im)) ^ y_46_re; elseif (y_46_re <= 1.2e+32) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); elseif (y_46_re <= 6.5e+242) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = Float64((x_46_re ^ y_46_re) * fma(-0.5, (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 2.0), 1.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.8], N[Power[N[(x$46$im + N[(N[(0.5 * N[Power[x$46$re, 2.0], $MachinePrecision]), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 1.2e+32], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 6.5e+242], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[(-0.5 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.8:\\
\;\;\;\;{\left(x.im + \frac{0.5 \cdot {x.re}^{2}}{x.im}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+32}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+242}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot \mathsf{fma}\left(-0.5, {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}, 1\right)\\
\end{array}
\end{array}
if y.re < -3.7999999999999998Initial program 43.5%
fmm-def43.5%
hypot-define43.5%
distribute-rgt-neg-out43.5%
fma-define43.5%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine85.6%
Simplified85.6%
Taylor expanded in y.re around 0 87.2%
Taylor expanded in x.re around 0 88.8%
associate-*r/88.8%
Simplified88.8%
if -3.7999999999999998 < y.re < 1.19999999999999996e32Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.im around inf 45.2%
+-commutative45.2%
mul-1-neg45.2%
unsub-neg45.2%
associate-/l*45.2%
unpow245.2%
unpow245.2%
hypot-undefine84.1%
Simplified84.1%
Taylor expanded in y.im around inf 38.5%
*-commutative38.5%
unpow238.5%
unpow238.5%
hypot-undefine82.3%
Simplified82.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 80.4%
neg-mul-180.4%
Simplified80.4%
if 1.19999999999999996e32 < y.re < 6.49999999999999992e242Initial program 37.8%
fmm-def37.8%
hypot-define37.8%
distribute-rgt-neg-out37.8%
fma-define37.8%
hypot-define62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in y.im around 0 62.3%
unpow262.3%
unpow262.3%
hypot-undefine62.3%
Simplified62.3%
Taylor expanded in y.re around 0 81.2%
if 6.49999999999999992e242 < y.re Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
associate-*r*41.7%
Simplified41.7%
Taylor expanded in x.im around 0 33.3%
*-commutative33.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
swap-sqr83.3%
unpow283.3%
fma-undefine83.3%
Simplified83.3%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 6.5e+242)
(exp
(* y.im (- (* y.re (/ (log (hypot x.im x.re)) y.im)) (atan2 x.im x.re))))
(* (pow x.re y.re) (fma -0.5 (pow (* y.re (atan2 x.im x.re)) 2.0) 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 6.5e+242) {
tmp = exp((y_46_im * ((y_46_re * (log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan2(x_46_im, x_46_re))));
} else {
tmp = pow(x_46_re, y_46_re) * fma(-0.5, pow((y_46_re * atan2(x_46_im, x_46_re)), 2.0), 1.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 6.5e+242) tmp = exp(Float64(y_46_im * Float64(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) / y_46_im)) - atan(x_46_im, x_46_re)))); else tmp = Float64((x_46_re ^ y_46_re) * fma(-0.5, (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 2.0), 1.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 6.5e+242], N[Exp[N[(y$46$im * N[(N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[(-0.5 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 6.5 \cdot 10^{+242}:\\
\;\;\;\;e^{y.im \cdot \left(y.re \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.im} - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot \mathsf{fma}\left(-0.5, {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}, 1\right)\\
\end{array}
\end{array}
if y.re < 6.49999999999999992e242Initial program 40.1%
fmm-def40.1%
hypot-define40.1%
distribute-rgt-neg-out40.1%
fma-define40.1%
hypot-define82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in y.im around inf 57.6%
+-commutative57.6%
mul-1-neg57.6%
unsub-neg57.6%
associate-/l*57.6%
unpow257.6%
unpow257.6%
hypot-undefine81.5%
Simplified81.5%
Taylor expanded in y.im around inf 40.5%
*-commutative40.5%
unpow240.5%
unpow240.5%
hypot-undefine83.3%
Simplified83.3%
Taylor expanded in y.im around 0 86.1%
if 6.49999999999999992e242 < y.re Initial program 41.7%
fmm-def41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
associate-*r*41.7%
Simplified41.7%
Taylor expanded in x.im around 0 33.3%
*-commutative33.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
swap-sqr83.3%
unpow283.3%
fma-undefine83.3%
Simplified83.3%
Final simplification85.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -7.2e-8) (not (<= y.re 1.2e+32))) (pow (hypot x.im x.re) y.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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = 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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = 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 <= -7.2e-8) or not (y_46_re <= 1.2e+32): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = 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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = 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 <= -7.2e-8) || ~((y_46_re <= 1.2e+32))) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = 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, -7.2e-8], N[Not[LessEqual[y$46$re, 1.2e+32]], $MachinePrecision]], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{-8} \lor \neg \left(y.re \leq 1.2 \cdot 10^{+32}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -7.19999999999999962e-8 or 1.19999999999999996e32 < y.re Initial program 41.2%
fmm-def41.2%
hypot-define41.2%
distribute-rgt-neg-out41.2%
fma-define41.2%
hypot-define76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in y.im around 0 73.0%
unpow273.0%
unpow273.0%
hypot-undefine73.5%
Simplified73.5%
Taylor expanded in y.re around 0 79.6%
if -7.19999999999999962e-8 < y.re < 1.19999999999999996e32Initial program 39.3%
fmm-def39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y.im around inf 45.4%
+-commutative45.4%
mul-1-neg45.4%
unsub-neg45.4%
associate-/l*45.4%
unpow245.4%
unpow245.4%
hypot-undefine83.9%
Simplified83.9%
Taylor expanded in y.im around inf 38.6%
*-commutative38.6%
unpow238.6%
unpow238.6%
hypot-undefine82.4%
Simplified82.4%
Taylor expanded in y.im around 0 81.9%
Taylor expanded in y.re around 0 81.6%
neg-mul-181.6%
Simplified81.6%
Final simplification80.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -6.0)
(pow (+ x.im (/ (* 0.5 (pow x.re 2.0)) x.im)) y.re)
(if (<= y.re 1.25e+32)
(exp (* (atan2 x.im x.re) (- y.im)))
(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_re <= -6.0) {
tmp = pow((x_46_im + ((0.5 * pow(x_46_re, 2.0)) / x_46_im)), y_46_re);
} else if (y_46_re <= 1.25e+32) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -6.0) {
tmp = Math.pow((x_46_im + ((0.5 * Math.pow(x_46_re, 2.0)) / x_46_im)), y_46_re);
} else if (y_46_re <= 1.25e+32) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -6.0: tmp = math.pow((x_46_im + ((0.5 * math.pow(x_46_re, 2.0)) / x_46_im)), y_46_re) elif y_46_re <= 1.25e+32: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -6.0) tmp = Float64(x_46_im + Float64(Float64(0.5 * (x_46_re ^ 2.0)) / x_46_im)) ^ y_46_re; elseif (y_46_re <= 1.25e+32) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = hypot(x_46_im, x_46_re) ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -6.0) tmp = (x_46_im + ((0.5 * (x_46_re ^ 2.0)) / x_46_im)) ^ y_46_re; elseif (y_46_re <= 1.25e+32) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = hypot(x_46_im, x_46_re) ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -6.0], N[Power[N[(x$46$im + N[(N[(0.5 * N[Power[x$46$re, 2.0], $MachinePrecision]), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 1.25e+32], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6:\\
\;\;\;\;{\left(x.im + \frac{0.5 \cdot {x.re}^{2}}{x.im}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{+32}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -6Initial program 43.5%
fmm-def43.5%
hypot-define43.5%
distribute-rgt-neg-out43.5%
fma-define43.5%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in y.im around 0 85.6%
unpow285.6%
unpow285.6%
hypot-undefine85.6%
Simplified85.6%
Taylor expanded in y.re around 0 87.2%
Taylor expanded in x.re around 0 88.8%
associate-*r/88.8%
Simplified88.8%
if -6 < y.re < 1.2499999999999999e32Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.im around inf 45.2%
+-commutative45.2%
mul-1-neg45.2%
unsub-neg45.2%
associate-/l*45.2%
unpow245.2%
unpow245.2%
hypot-undefine84.1%
Simplified84.1%
Taylor expanded in y.im around inf 38.5%
*-commutative38.5%
unpow238.5%
unpow238.5%
hypot-undefine82.3%
Simplified82.3%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 80.4%
neg-mul-180.4%
Simplified80.4%
if 1.2499999999999999e32 < y.re Initial program 38.8%
fmm-def38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in y.im around 0 59.3%
unpow259.3%
unpow259.3%
hypot-undefine59.3%
Simplified59.3%
Taylor expanded in y.re around 0 71.5%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (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) {
return pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return hypot(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) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine62.8%
Simplified62.8%
Taylor expanded in y.re around 0 64.6%
Final simplification64.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4e-11) (not (<= y.re 210000000.0))) (pow x.im y.re) 1.0))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4e-11) || !(y_46_re <= 210000000.0)) {
tmp = pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-4d-11)) .or. (.not. (y_46re <= 210000000.0d0))) then
tmp = x_46im ** y_46re
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4e-11) || !(y_46_re <= 210000000.0)) {
tmp = Math.pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4e-11) or not (y_46_re <= 210000000.0): tmp = math.pow(x_46_im, y_46_re) else: tmp = 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4e-11) || !(y_46_re <= 210000000.0)) tmp = x_46_im ^ y_46_re; else tmp = 1.0; 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 <= -4e-11) || ~((y_46_re <= 210000000.0))) tmp = x_46_im ^ y_46_re; else tmp = 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4e-11], N[Not[LessEqual[y$46$re, 210000000.0]], $MachinePrecision]], N[Power[x$46$im, y$46$re], $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4 \cdot 10^{-11} \lor \neg \left(y.re \leq 210000000\right):\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y.re < -3.99999999999999976e-11 or 2.1e8 < y.re Initial program 42.5%
fmm-def42.5%
hypot-define42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around 0 71.9%
unpow271.9%
unpow271.9%
hypot-undefine72.3%
Simplified72.3%
Taylor expanded in y.re around 0 78.2%
Taylor expanded in x.re around 0 61.5%
if -3.99999999999999976e-11 < y.re < 2.1e8Initial program 38.1%
fmm-def38.1%
hypot-define38.1%
distribute-rgt-neg-out38.1%
fma-define38.1%
hypot-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y.im around 0 30.4%
unpow230.4%
unpow230.4%
hypot-undefine54.3%
Simplified54.3%
Taylor expanded in y.re around 0 52.7%
Taylor expanded in x.re around 0 30.9%
Taylor expanded in y.re around 0 52.0%
Final simplification56.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -3.1e-66) (pow (- x.im) y.re) (if (<= x.im 2e-227) (pow x.re y.re) (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.1e-66) {
tmp = pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2e-227) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-3.1d-66)) then
tmp = -x_46im ** y_46re
else if (x_46im <= 2d-227) then
tmp = x_46re ** y_46re
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.1e-66) {
tmp = Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2e-227) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -3.1e-66: tmp = math.pow(-x_46_im, y_46_re) elif x_46_im <= 2e-227: tmp = math.pow(x_46_re, y_46_re) else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -3.1e-66) tmp = Float64(-x_46_im) ^ y_46_re; elseif (x_46_im <= 2e-227) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_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 (x_46_im <= -3.1e-66) tmp = -x_46_im ^ y_46_re; elseif (x_46_im <= 2e-227) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -3.1e-66], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 2e-227], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.1 \cdot 10^{-66}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{-227}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -3.0999999999999997e-66Initial program 34.3%
fmm-def34.3%
hypot-define34.3%
distribute-rgt-neg-out34.3%
fma-define34.3%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in y.re around 0 57.8%
Taylor expanded in x.im around -inf 56.6%
mul-1-neg56.6%
Simplified56.6%
if -3.0999999999999997e-66 < x.im < 1.99999999999999989e-227Initial program 45.0%
fmm-def45.0%
hypot-define45.0%
distribute-rgt-neg-out45.0%
fma-define45.0%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.im around 0 60.4%
unpow260.4%
unpow260.4%
hypot-undefine66.7%
Simplified66.7%
Taylor expanded in y.re around 0 68.4%
Taylor expanded in x.im around 0 60.4%
if 1.99999999999999989e-227 < x.im Initial program 42.1%
fmm-def42.1%
hypot-define42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 48.9%
unpow248.9%
unpow248.9%
hypot-undefine64.3%
Simplified64.3%
Taylor expanded in y.re around 0 67.8%
Taylor expanded in x.re around 0 66.1%
Final simplification61.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -4.3e-11) (pow x.im y.re) (if (<= y.re 960000.0) 1.0 (pow 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_re <= -4.3e-11) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 960000.0) {
tmp = 1.0;
} else {
tmp = pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-4.3d-11)) then
tmp = x_46im ** y_46re
else if (y_46re <= 960000.0d0) then
tmp = 1.0d0
else
tmp = x_46re ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4.3e-11) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 960000.0) {
tmp = 1.0;
} else {
tmp = Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -4.3e-11: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 960000.0: tmp = 1.0 else: tmp = math.pow(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_re <= -4.3e-11) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 960000.0) tmp = 1.0; else tmp = x_46_re ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -4.3e-11) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 960000.0) tmp = 1.0; else tmp = x_46_re ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.3e-11], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 960000.0], 1.0, N[Power[x$46$re, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.3 \cdot 10^{-11}:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 960000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -4.30000000000000001e-11Initial program 44.8%
fmm-def44.8%
hypot-define44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.im around 0 82.4%
unpow282.4%
unpow282.4%
hypot-undefine83.2%
Simplified83.2%
Taylor expanded in y.re around 0 84.7%
Taylor expanded in x.re around 0 69.5%
if -4.30000000000000001e-11 < y.re < 9.6e5Initial program 37.7%
fmm-def37.7%
hypot-define37.7%
distribute-rgt-neg-out37.7%
fma-define37.7%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y.im around 0 30.7%
unpow230.7%
unpow230.7%
hypot-undefine54.7%
Simplified54.7%
Taylor expanded in y.re around 0 53.1%
Taylor expanded in x.re around 0 31.1%
Taylor expanded in y.re around 0 52.4%
if 9.6e5 < y.re Initial program 40.7%
fmm-def40.7%
hypot-define40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in y.im around 0 57.6%
unpow257.6%
unpow257.6%
hypot-undefine57.6%
Simplified57.6%
Taylor expanded in y.re around 0 68.7%
Taylor expanded in x.im around 0 59.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
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 = 1.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine62.8%
Simplified62.8%
Taylor expanded in y.re around 0 64.6%
Taylor expanded in x.re around 0 45.3%
Taylor expanded in y.re around 0 29.4%
herbie shell --seed 2024132
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))