
(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 18 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 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im -4.8e+115)
(* t_2 (sin (fma t_1 y.im (fabs t_0))))
(if (<= y.im -8.2e+26)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(fabs (sin (fma y.im (log (hypot x.im x.re)) t_0))))
(* t_2 (sin (fma t_1 y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(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 <= -4.8e+115) {
tmp = t_2 * sin(fma(t_1, y_46_im, fabs(t_0)));
} else if (y_46_im <= -8.2e+26) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else {
tmp = t_2 * sin(fma(t_1, y_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_re * atan(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 <= -4.8e+115) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, abs(t_0)))); elseif (y_46_im <= -8.2e+26) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); else tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, 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, -4.8e+115], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + N[Abs[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -8.2e+26], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
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 -4.8 \cdot 10^{+115}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, \left|t\_0\right|\right)\right)\\
\mathbf{elif}\;y.im \leq -8.2 \cdot 10^{+26}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.8000000000000001e115Initial program 51.6%
fma-neg51.6%
hypot-define51.6%
distribute-rgt-neg-out51.6%
fma-define51.6%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
*-commutative84.2%
add-sqr-sqrt58.2%
sqrt-unprod70.2%
pow270.2%
Applied egg-rr70.2%
*-commutative70.2%
unpow270.2%
rem-sqrt-square86.5%
Simplified86.5%
if -4.8000000000000001e115 < y.im < -8.19999999999999967e26Initial program 9.8%
add-sqr-sqrt1.5%
sqrt-unprod68.2%
pow268.2%
fma-define68.2%
hypot-define84.8%
Applied egg-rr84.8%
unpow284.8%
rem-sqrt-square84.8%
fma-undefine84.8%
hypot-undefine68.2%
unpow268.2%
unpow268.2%
+-commutative68.2%
*-commutative68.2%
*-commutative68.2%
fma-define68.2%
Simplified84.8%
if -8.19999999999999967e26 < y.im Initial program 49.2%
fma-neg49.2%
hypot-define49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define88.2%
*-commutative88.2%
Simplified88.2%
Final simplification87.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (+ (* y.re (atan2 x.im x.re)) (* y.im t_0)))))
(t_2 (log (hypot x.re x.im))))
(if (<= t_1 4e-13)
t_1
(*
(exp (fma t_2 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_0)));
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (t_1 <= 4e-13) {
tmp = t_1;
} else {
tmp = exp(fma(t_2, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_2));
}
return tmp;
}
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)))) t_1 = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_0)))) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (t_1 <= 4e-13) tmp = t_1; else tmp = Float64(exp(fma(t_2, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 4e-13], t$95$1, N[(N[Exp[N[(t$95$2 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$2), $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)\\
t_1 := e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t\_0\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_2, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot t\_2\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 4.0000000000000001e-13Initial program 91.0%
if 4.0000000000000001e-13 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 9.7%
fma-neg9.7%
hypot-define9.7%
distribute-rgt-neg-out9.7%
fma-define9.7%
hypot-define78.4%
*-commutative78.4%
Simplified78.4%
fma-undefine78.4%
hypot-define9.7%
*-commutative9.7%
add-cube-cbrt7.5%
pow38.2%
fma-define8.2%
hypot-define77.9%
Applied egg-rr77.9%
Taylor expanded in y.re around 0 11.2%
pow-base-111.2%
*-lft-identity11.2%
+-commutative11.2%
unpow211.2%
unpow211.2%
hypot-undefine72.8%
Simplified72.8%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re))))))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin (fma t_1 y.im t_3))))
(if (<= y.re -4.7)
(* t_2 (sin (pow (cbrt (* y.im t_1)) 3.0)))
(if (<= y.re 3.8)
(* t_4 (/ t_0 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 2.7e+85)
(* t_2 (sin t_3))
(if (<= y.re 2.6e+160)
(* t_4 (/ t_0 (+ (* y.im (atan2 x.im x.re)) 1.0)))
(* t_2 (sin (pow (cbrt t_3) 3.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_re, x_46_im), y_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 t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(fma(t_1, y_46_im, t_3));
double tmp;
if (y_46_re <= -4.7) {
tmp = t_2 * sin(pow(cbrt((y_46_im * t_1)), 3.0));
} else if (y_46_re <= 3.8) {
tmp = t_4 * (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7e+85) {
tmp = t_2 * sin(t_3);
} else if (y_46_re <= 2.6e+160) {
tmp = t_4 * (t_0 / ((y_46_im * atan2(x_46_im, x_46_re)) + 1.0));
} else {
tmp = t_2 * sin(pow(cbrt(t_3), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = 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))))) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(fma(t_1, y_46_im, t_3)) tmp = 0.0 if (y_46_re <= -4.7) tmp = Float64(t_2 * sin((cbrt(Float64(y_46_im * t_1)) ^ 3.0))); elseif (y_46_re <= 3.8) tmp = Float64(t_4 * Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.7e+85) tmp = Float64(t_2 * sin(t_3)); elseif (y_46_re <= 2.6e+160) tmp = Float64(t_4 * Float64(t_0 / Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) + 1.0))); else tmp = Float64(t_2 * sin((cbrt(t_3) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[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]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$1 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.7], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8], N[(t$95$4 * N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+85], N[(t$95$2 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e+160], N[(t$95$4 * N[(t$95$0 / N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$3, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \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)}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_3\right)\right)\\
\mathbf{if}\;y.re \leq -4.7:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_1}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 3.8:\\
\;\;\;\;t\_4 \cdot \frac{t\_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+85}:\\
\;\;\;\;t\_2 \cdot \sin t\_3\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+160}:\\
\;\;\;\;t\_4 \cdot \frac{t\_0}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_3}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -4.70000000000000018Initial program 51.6%
fma-neg51.6%
hypot-define51.6%
distribute-rgt-neg-out51.6%
fma-define51.6%
hypot-define92.2%
*-commutative92.2%
Simplified92.2%
fma-undefine92.2%
hypot-define51.6%
*-commutative51.6%
add-cube-cbrt46.9%
pow346.9%
fma-define46.9%
hypot-define87.5%
Applied egg-rr87.5%
Taylor expanded in y.re around 0 25.0%
unpow1/351.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-undefine93.8%
Simplified93.8%
if -4.70000000000000018 < y.re < 3.7999999999999998Initial program 51.0%
exp-diff51.0%
exp-to-pow51.0%
hypot-define51.0%
*-commutative51.0%
exp-prod50.7%
fma-define50.7%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
if 3.7999999999999998 < y.re < 2.69999999999999983e85Initial program 43.8%
fma-neg43.8%
hypot-define43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y.im around 0 87.5%
if 2.69999999999999983e85 < y.re < 2.6e160Initial program 38.5%
exp-diff38.5%
exp-to-pow38.5%
hypot-define38.5%
*-commutative38.5%
exp-prod38.5%
fma-define38.5%
hypot-define61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in y.im around 0 84.6%
if 2.6e160 < y.re Initial program 29.6%
fma-neg29.6%
hypot-define29.6%
distribute-rgt-neg-out29.6%
fma-define29.6%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
fma-undefine70.4%
hypot-define29.6%
*-commutative29.6%
add-cube-cbrt40.7%
pow337.0%
fma-define37.0%
hypot-define85.2%
Applied egg-rr85.2%
Taylor expanded in y.im around 0 40.7%
unpow1/385.2%
Simplified85.2%
Final simplification87.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 47.8%
fma-neg47.8%
hypot-define47.8%
distribute-rgt-neg-out47.8%
fma-define47.8%
hypot-define84.3%
*-commutative84.3%
Simplified84.3%
Final simplification84.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2
(*
(exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.im t_1)))))
(if (<= y.im -1.05e+117)
t_2
(if (<= y.im -0.062)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(fabs (sin t_0)))
(if (<= y.im 1.55e+23)
(* (sin (fma t_1 y.im t_0)) (pow (hypot x.re x.im) y.re))
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 = 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)))) * sin((y_46_im * t_1));
double tmp;
if (y_46_im <= -1.05e+117) {
tmp = t_2;
} else if (y_46_im <= -0.062) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * fabs(sin(t_0));
} else if (y_46_im <= 1.55e+23) {
tmp = sin(fma(t_1, y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = 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 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_im * t_1))) tmp = 0.0 if (y_46_im <= -1.05e+117) tmp = t_2; elseif (y_46_im <= -0.062) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * abs(sin(t_0))); elseif (y_46_im <= 1.55e+23) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(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] * N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e+117], t$95$2, If[LessEqual[y$46$im, -0.062], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.55e+23], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.im \cdot t\_1\right)\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+117}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -0.062:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left|\sin t\_0\right|\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{+23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -1.0500000000000001e117 or 1.54999999999999985e23 < y.im Initial program 41.3%
fma-neg41.3%
hypot-define41.3%
distribute-rgt-neg-out41.3%
fma-define41.3%
hypot-define78.9%
*-commutative78.9%
Simplified78.9%
fma-undefine78.9%
hypot-define41.3%
*-commutative41.3%
add-cube-cbrt37.5%
pow337.5%
fma-define37.5%
hypot-define76.8%
Applied egg-rr76.8%
Taylor expanded in y.re around 0 42.3%
pow-base-142.3%
*-lft-identity42.3%
+-commutative42.3%
unpow242.3%
unpow242.3%
hypot-undefine80.9%
Simplified80.9%
if -1.0500000000000001e117 < y.im < -0.062Initial program 17.7%
Taylor expanded in y.im around 0 55.8%
add-sqr-sqrt39.1%
sqrt-unprod55.7%
pow255.7%
*-commutative55.7%
Applied egg-rr55.7%
*-commutative55.7%
unpow255.7%
rem-sqrt-square78.0%
Simplified78.0%
if -0.062 < y.im < 1.54999999999999985e23Initial program 57.0%
exp-diff57.0%
exp-to-pow57.0%
hypot-define57.0%
*-commutative57.0%
exp-prod57.0%
fma-define57.0%
hypot-define93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in y.im around 0 92.5%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (* (exp (fma t_2 y.re (* y.im (- (atan2 x.im x.re))))) t_1)))
(if (<= y.im -1.35e+172)
t_3
(if (<= y.im -0.062)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(fabs t_1))
(if (<= y.im 0.48)
(* (sin (fma t_2 y.im t_0)) (pow (hypot x.re x.im) y.re))
t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * t_1;
double tmp;
if (y_46_im <= -1.35e+172) {
tmp = t_3;
} else if (y_46_im <= -0.062) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * fabs(t_1);
} else if (y_46_im <= 0.48) {
tmp = sin(fma(t_2, y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(fma(t_2, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * t_1) tmp = 0.0 if (y_46_im <= -1.35e+172) tmp = t_3; elseif (y_46_im <= -0.062) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * abs(t_1)); elseif (y_46_im <= 0.48) tmp = Float64(sin(fma(t_2, y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(t$95$2 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -1.35e+172], t$95$3, If[LessEqual[y$46$im, -0.062], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.48], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot t\_1\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+172}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -0.062:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.im \leq 0.48:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -1.35e172 or 0.47999999999999998 < y.im Initial program 35.0%
fma-neg35.0%
hypot-define35.0%
distribute-rgt-neg-out35.0%
fma-define35.0%
hypot-define77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in y.im around 0 74.5%
if -1.35e172 < y.im < -0.062Initial program 45.4%
Taylor expanded in y.im around 0 65.7%
add-sqr-sqrt41.5%
sqrt-unprod65.6%
pow265.6%
*-commutative65.6%
Applied egg-rr65.6%
*-commutative65.6%
unpow265.6%
rem-sqrt-square82.9%
Simplified82.9%
if -0.062 < y.im < 0.47999999999999998Initial program 58.6%
exp-diff58.6%
exp-to-pow58.6%
hypot-define58.6%
*-commutative58.6%
exp-prod58.6%
fma-define58.6%
hypot-define94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y.im around 0 92.9%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (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 (sin t_2))
(t_4
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
t_3))
(t_5 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -1.25e-47)
t_4
(if (<= y.re 6.4e-202)
(/ (sin (* y.im (log (hypot x.re x.im)))) t_0)
(if (<= y.re 1.12e-48)
(* (/ t_5 t_0) t_3)
(if (<= y.re 3.5e+50)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp (atan2 x.im x.re)) y.im))
(if (<= y.re 2e+138)
t_4
(if (<= y.re 1.5e+182)
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (+ t_2 (* y.im (log x.re)))))
(* t_5 t_3)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(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 = sin(t_2);
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
double t_5 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.25e-47) {
tmp = t_4;
} else if (y_46_re <= 6.4e-202) {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0;
} else if (y_46_re <= 1.12e-48) {
tmp = (t_5 / t_0) * t_3;
} else if (y_46_re <= 3.5e+50) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 2e+138) {
tmp = t_4;
} else if (y_46_re <= 1.5e+182) {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re))));
} else {
tmp = t_5 * t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.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 = Math.sin(t_2);
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
double t_5 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.25e-47) {
tmp = t_4;
} else if (y_46_re <= 6.4e-202) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / t_0;
} else if (y_46_re <= 1.12e-48) {
tmp = (t_5 / t_0) * t_3;
} else if (y_46_re <= 3.5e+50) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 2e+138) {
tmp = t_4;
} else if (y_46_re <= 1.5e+182) {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_2 + (y_46_im * Math.log(x_46_re))));
} else {
tmp = t_5 * t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(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 = math.sin(t_2) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3 t_5 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -1.25e-47: tmp = t_4 elif y_46_re <= 6.4e-202: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / t_0 elif y_46_re <= 1.12e-48: tmp = (t_5 / t_0) * t_3 elif y_46_re <= 3.5e+50: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(math.atan2(x_46_im, x_46_re)), y_46_im) elif y_46_re <= 2e+138: tmp = t_4 elif y_46_re <= 1.5e+182: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_1)) * math.sin((t_2 + (y_46_im * math.log(x_46_re)))) else: tmp = t_5 * t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(y_46_im) ^ 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 = sin(t_2) t_4 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * t_3) t_5 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.25e-47) tmp = t_4; elseif (y_46_re <= 6.4e-202) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0); elseif (y_46_re <= 1.12e-48) tmp = Float64(Float64(t_5 / t_0) * t_3); elseif (y_46_re <= 3.5e+50) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)); elseif (y_46_re <= 2e+138) tmp = t_4; elseif (y_46_re <= 1.5e+182) tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))); else tmp = Float64(t_5 * t_3); 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) ^ 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 = sin(t_2); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3; t_5 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_re <= -1.25e-47) tmp = t_4; elseif (y_46_re <= 6.4e-202) tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0; elseif (y_46_re <= 1.12e-48) tmp = (t_5 / t_0) * t_3; elseif (y_46_re <= 3.5e+50) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan2(x_46_im, x_46_re)) ^ y_46_im); elseif (y_46_re <= 2e+138) tmp = t_4; elseif (y_46_re <= 1.5e+182) tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re)))); else tmp = t_5 * t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Exp[y$46$im], $MachinePrecision], 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.25e-47], t$95$4, If[LessEqual[y$46$re, 6.4e-202], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.12e-48], N[(N[(t$95$5 / t$95$0), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 3.5e+50], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+138], t$95$4, If[LessEqual[y$46$re, 1.5e+182], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$5 * t$95$3), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
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 := \sin t\_2\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_3\\
t_5 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.25 \cdot 10^{-47}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{t\_0}\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-48}:\\
\;\;\;\;\frac{t\_5}{t\_0} \cdot t\_3\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+138}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+182}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_2 + y.im \cdot \log x.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot t\_3\\
\end{array}
\end{array}
if y.re < -1.25000000000000003e-47 or 3.50000000000000006e50 < y.re < 2.0000000000000001e138Initial program 51.2%
Taylor expanded in y.im around 0 82.4%
if -1.25000000000000003e-47 < y.re < 6.4000000000000002e-202Initial program 55.8%
exp-diff55.8%
exp-to-pow55.8%
hypot-define55.8%
*-commutative55.8%
exp-prod55.6%
fma-define55.6%
hypot-define88.7%
*-commutative88.7%
Simplified88.7%
expm1-log1p-u88.7%
expm1-undefine88.7%
pow-exp89.1%
*-commutative89.1%
exp-prod86.6%
Applied egg-rr86.6%
Taylor expanded in y.re around 0 48.7%
+-commutative48.7%
unpow248.7%
unpow248.7%
hypot-undefine79.7%
exp-prod79.2%
Simplified79.2%
if 6.4000000000000002e-202 < y.re < 1.11999999999999999e-48Initial program 40.5%
exp-diff40.5%
exp-to-pow40.5%
hypot-define40.5%
*-commutative40.5%
exp-prod40.5%
fma-define40.5%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.im around 0 79.1%
if 1.11999999999999999e-48 < y.re < 3.50000000000000006e50Initial program 34.3%
exp-diff27.6%
exp-to-pow27.6%
hypot-define27.6%
*-commutative27.6%
exp-prod26.7%
fma-define26.7%
hypot-define59.9%
*-commutative59.9%
Simplified59.9%
expm1-log1p-u59.9%
expm1-undefine59.9%
pow-exp60.8%
*-commutative60.8%
exp-prod60.8%
Applied egg-rr60.8%
Taylor expanded in y.re around 0 23.7%
+-commutative23.7%
unpow223.7%
unpow223.7%
hypot-undefine64.1%
hypot-undefine23.7%
unpow223.7%
unpow223.7%
+-commutative23.7%
unpow223.7%
unpow223.7%
hypot-define64.1%
*-commutative64.1%
exp-prod64.1%
Simplified64.1%
if 2.0000000000000001e138 < y.re < 1.5000000000000001e182Initial program 36.4%
fma-neg36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in x.im around 0 63.8%
+-commutative63.8%
neg-mul-163.8%
unsub-neg63.8%
Simplified63.8%
Taylor expanded in x.im around 0 63.8%
if 1.5000000000000001e182 < y.re Initial program 30.0%
exp-diff30.0%
exp-to-pow30.0%
hypot-define30.0%
*-commutative30.0%
exp-prod30.0%
fma-define30.0%
hypot-define65.0%
*-commutative65.0%
Simplified65.0%
expm1-log1p-u65.0%
expm1-undefine65.0%
pow-exp65.0%
*-commutative65.0%
exp-prod65.0%
Applied egg-rr65.0%
Taylor expanded in y.im around 0 70.1%
+-commutative70.1%
unpow270.1%
unpow270.1%
hypot-undefine70.1%
Simplified70.1%
Final simplification78.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (or (<= y.im -1900000000.0) (not (<= y.im 0.48)))
(* (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re))))) (sin t_0))
(* (sin (fma t_1 y.im t_0)) (pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1900000000.0) || !(y_46_im <= 0.48)) {
tmp = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = sin(fma(t_1, y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), 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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1900000000.0) || !(y_46_im <= 0.48)) tmp = Float64(exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(t_0)); else tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1900000000.0], N[Not[LessEqual[y$46$im, 0.48]], $MachinePrecision]], N[(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] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1900000000 \lor \neg \left(y.im \leq 0.48\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.9e9 or 0.47999999999999998 < y.im Initial program 37.1%
fma-neg37.1%
hypot-define37.1%
distribute-rgt-neg-out37.1%
fma-define37.1%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around 0 73.7%
if -1.9e9 < y.im < 0.47999999999999998Initial program 58.4%
exp-diff58.4%
exp-to-pow58.4%
hypot-define58.4%
*-commutative58.4%
exp-prod58.4%
fma-define58.4%
hypot-define94.2%
*-commutative94.2%
Simplified94.2%
Taylor expanded in y.im around 0 92.2%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re 6.8e-123)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* y.im (- (atan2 x.im x.re)))))
(sin t_0))
(*
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re))))
(sin (+ t_0 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 6.8e-123) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((t_0 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= 6.8e-123) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(t_0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 6.8e-123], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(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] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 6.8 \cdot 10^{-123}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 6.8000000000000001e-123Initial program 49.9%
fma-neg49.9%
hypot-define49.9%
distribute-rgt-neg-out49.9%
fma-define49.9%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 75.3%
if 6.8000000000000001e-123 < x.re Initial program 43.9%
fma-neg43.9%
hypot-define43.9%
distribute-rgt-neg-out43.9%
fma-define43.9%
hypot-define81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in x.im around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
Simplified80.0%
Taylor expanded in x.im around 0 78.8%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -1.3e-47) (not (<= y.re 3.5e+50)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re))))
(/
(sin (* y.im (log (hypot x.re x.im))))
(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.3e-47) || !(y_46_re <= 3.5e+50)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / 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.3e-47) || !(y_46_re <= 3.5e+50)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.3e-47) or not (y_46_re <= 3.5e+50): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1.3e-47) || !(y_46_re <= 3.5e+50)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); 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.3e-47) || ~((y_46_re <= 3.5e+50))) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / (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.3e-47], N[Not[LessEqual[y$46$re, 3.5e+50]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-47} \lor \neg \left(y.re \leq 3.5 \cdot 10^{+50}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -1.3e-47 or 3.50000000000000006e50 < y.re Initial program 46.5%
Taylor expanded in y.im around 0 77.9%
if -1.3e-47 < y.re < 3.50000000000000006e50Initial program 49.0%
exp-diff48.2%
exp-to-pow48.2%
hypot-define48.2%
*-commutative48.2%
exp-prod48.0%
fma-define48.0%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
expm1-log1p-u82.4%
expm1-undefine82.4%
pow-exp82.9%
*-commutative82.9%
exp-prod80.0%
Applied egg-rr80.0%
Taylor expanded in y.re around 0 38.5%
+-commutative38.5%
unpow238.5%
unpow238.5%
hypot-undefine70.3%
exp-prod69.9%
Simplified69.9%
Final simplification73.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -7.5e-41)
(* (pow (hypot x.re x.im) y.re) t_0)
(if (<= y.re 6.2e+50)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp (atan2 x.im x.re)) y.im))
(* t_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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.5e-41) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 6.2e+50) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.5e-41) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 6.2e+50) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_im);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -7.5e-41: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_0 elif y_46_re <= 6.2e+50: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(math.atan2(x_46_im, x_46_re)), y_46_im) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -7.5e-41) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_0); elseif (y_46_re <= 6.2e+50) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -7.5e-41) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_0; elseif (y_46_re <= 6.2e+50) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan2(x_46_im, x_46_re)) ^ y_46_im); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -7.5e-41], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+50], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-41}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -7.50000000000000049e-41Initial program 53.6%
exp-diff45.4%
exp-to-pow45.4%
hypot-define45.4%
*-commutative45.4%
exp-prod45.2%
fma-define45.2%
hypot-define72.6%
*-commutative72.6%
Simplified72.6%
expm1-log1p-u72.6%
expm1-undefine72.6%
pow-exp75.6%
*-commutative75.6%
exp-prod75.6%
Applied egg-rr75.6%
Taylor expanded in y.im around 0 82.8%
+-commutative82.8%
unpow282.8%
unpow282.8%
hypot-undefine82.8%
Simplified82.8%
if -7.50000000000000049e-41 < y.re < 6.20000000000000006e50Initial program 48.3%
exp-diff47.5%
exp-to-pow47.5%
hypot-define47.5%
*-commutative47.5%
exp-prod47.3%
fma-define47.3%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
expm1-log1p-u82.7%
expm1-undefine82.7%
pow-exp83.2%
*-commutative83.2%
exp-prod80.2%
Applied egg-rr80.2%
Taylor expanded in y.re around 0 37.9%
+-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine70.1%
hypot-undefine37.9%
unpow237.9%
unpow237.9%
+-commutative37.9%
unpow237.9%
unpow237.9%
hypot-define70.1%
*-commutative70.1%
exp-prod67.2%
Simplified67.2%
if 6.20000000000000006e50 < y.re Initial program 38.0%
exp-diff32.0%
exp-to-pow32.0%
hypot-define32.0%
*-commutative32.0%
exp-prod32.0%
fma-define32.0%
hypot-define62.0%
*-commutative62.0%
Simplified62.0%
expm1-log1p-u62.0%
expm1-undefine62.0%
pow-exp62.0%
*-commutative62.0%
exp-prod62.0%
Applied egg-rr62.0%
Taylor expanded in y.im around 0 62.2%
+-commutative62.2%
unpow262.2%
unpow262.2%
hypot-undefine62.2%
Simplified62.2%
Taylor expanded in x.im around 0 62.3%
Final simplification70.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -2.3e-40)
(* (pow (hypot x.re x.im) y.re) t_0)
(if (<= y.re 5.2e+50)
(/
(sin (* y.im (log (hypot x.re x.im))))
(pow (exp y.im) (atan2 x.im x.re)))
(* t_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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -2.3e-40) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 5.2e+50) {
tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -2.3e-40) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_0;
} else if (y_46_re <= 5.2e+50) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -2.3e-40: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_0 elif y_46_re <= 5.2e+50: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -2.3e-40) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_0); elseif (y_46_re <= 5.2e+50) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -2.3e-40) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_0; elseif (y_46_re <= 5.2e+50) tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.3e-40], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 5.2e+50], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -2.3 \cdot 10^{-40}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.3e-40Initial program 53.0%
exp-diff44.7%
exp-to-pow44.7%
hypot-define44.7%
*-commutative44.7%
exp-prod44.5%
fma-define44.5%
hypot-define72.2%
*-commutative72.2%
Simplified72.2%
expm1-log1p-u72.2%
expm1-undefine72.2%
pow-exp75.2%
*-commutative75.2%
exp-prod76.6%
Applied egg-rr76.6%
Taylor expanded in y.im around 0 83.9%
+-commutative83.9%
unpow283.9%
unpow283.9%
hypot-undefine83.9%
Simplified83.9%
if -2.3e-40 < y.re < 5.2000000000000004e50Initial program 48.7%
exp-diff47.9%
exp-to-pow47.9%
hypot-define47.9%
*-commutative47.9%
exp-prod47.7%
fma-define47.7%
hypot-define82.8%
*-commutative82.8%
Simplified82.8%
expm1-log1p-u82.8%
expm1-undefine82.8%
pow-exp83.3%
*-commutative83.3%
exp-prod79.7%
Applied egg-rr79.7%
Taylor expanded in y.re around 0 38.3%
+-commutative38.3%
unpow238.3%
unpow238.3%
hypot-undefine70.3%
exp-prod69.8%
Simplified69.8%
if 5.2000000000000004e50 < y.re Initial program 38.0%
exp-diff32.0%
exp-to-pow32.0%
hypot-define32.0%
*-commutative32.0%
exp-prod32.0%
fma-define32.0%
hypot-define62.0%
*-commutative62.0%
Simplified62.0%
expm1-log1p-u62.0%
expm1-undefine62.0%
pow-exp62.0%
*-commutative62.0%
exp-prod62.0%
Applied egg-rr62.0%
Taylor expanded in y.im around 0 62.2%
+-commutative62.2%
unpow262.2%
unpow262.2%
hypot-undefine62.2%
Simplified62.2%
Taylor expanded in x.im around 0 62.3%
Final simplification72.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (exp (- (* y.re (log (- x.re))) t_0)))))
(if (<= x.re -62000.0)
t_2
(if (<= x.re -1.6e-103)
(* (pow (hypot x.re x.im) y.re) t_1)
(if (<= x.re -1e-309) t_2 (* t_1 (exp (- (* y.re (log x.re)) t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
double tmp;
if (x_46_re <= -62000.0) {
tmp = t_2;
} else if (x_46_re <= -1.6e-103) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_1;
} else if (x_46_re <= -1e-309) {
tmp = t_2;
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
double tmp;
if (x_46_re <= -62000.0) {
tmp = t_2;
} else if (x_46_re <= -1.6e-103) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_1;
} else if (x_46_re <= -1e-309) {
tmp = t_2;
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) tmp = 0 if x_46_re <= -62000.0: tmp = t_2 elif x_46_re <= -1.6e-103: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_1 elif x_46_re <= -1e-309: tmp = t_2 else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))) tmp = 0.0 if (x_46_re <= -62000.0) tmp = t_2; elseif (x_46_re <= -1.6e-103) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_1); elseif (x_46_re <= -1e-309) tmp = t_2; else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -62000.0) tmp = t_2; elseif (x_46_re <= -1.6e-103) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_1; elseif (x_46_re <= -1e-309) tmp = t_2; else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -62000.0], t$95$2, If[LessEqual[x$46$re, -1.6e-103], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -1e-309], t$95$2, N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{if}\;x.re \leq -62000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-103}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{elif}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -62000 or -1.59999999999999988e-103 < x.re < -1.000000000000002e-309Initial program 43.4%
Taylor expanded in y.im around 0 57.5%
Taylor expanded in x.re around -inf 70.9%
mul-1-neg70.9%
Simplified70.9%
if -62000 < x.re < -1.59999999999999988e-103Initial program 63.6%
exp-diff54.5%
exp-to-pow54.5%
hypot-define54.5%
*-commutative54.5%
exp-prod54.5%
fma-define54.5%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
expm1-log1p-u81.7%
expm1-undefine81.7%
pow-exp81.7%
*-commutative81.7%
exp-prod81.7%
Applied egg-rr81.7%
Taylor expanded in y.im around 0 82.0%
+-commutative82.0%
unpow282.0%
unpow282.0%
hypot-undefine82.1%
Simplified82.1%
if -1.000000000000002e-309 < x.re Initial program 48.8%
Taylor expanded in y.im around 0 52.8%
Taylor expanded in x.re around inf 53.4%
Final simplification63.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (* t_0 t_2)))
(if (<= x.im -3.3e+54)
t_3
(if (<= x.im -1.55e-45)
(* t_0 (sin (fabs t_1)))
(if (<= x.im -1.5e-306)
t_3
(* t_2 (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 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = t_0 * t_2;
double tmp;
if (x_46_im <= -3.3e+54) {
tmp = t_3;
} else if (x_46_im <= -1.55e-45) {
tmp = t_0 * sin(fabs(t_1));
} else if (x_46_im <= -1.5e-306) {
tmp = t_3;
} else {
tmp = t_2 * 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.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = t_0 * t_2;
double tmp;
if (x_46_im <= -3.3e+54) {
tmp = t_3;
} else if (x_46_im <= -1.55e-45) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if (x_46_im <= -1.5e-306) {
tmp = t_3;
} else {
tmp = t_2 * 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.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = t_0 * t_2 tmp = 0 if x_46_im <= -3.3e+54: tmp = t_3 elif x_46_im <= -1.55e-45: tmp = t_0 * math.sin(math.fabs(t_1)) elif x_46_im <= -1.5e-306: tmp = t_3 else: tmp = t_2 * 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 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = Float64(t_0 * t_2) tmp = 0.0 if (x_46_im <= -3.3e+54) tmp = t_3; elseif (x_46_im <= -1.55e-45) tmp = Float64(t_0 * sin(abs(t_1))); elseif (x_46_im <= -1.5e-306) tmp = t_3; else tmp = Float64(t_2 * 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 = hypot(x_46_re, x_46_im) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = t_0 * t_2; tmp = 0.0; if (x_46_im <= -3.3e+54) tmp = t_3; elseif (x_46_im <= -1.55e-45) tmp = t_0 * sin(abs(t_1)); elseif (x_46_im <= -1.5e-306) tmp = t_3; else tmp = t_2 * 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * t$95$2), $MachinePrecision]}, If[LessEqual[x$46$im, -3.3e+54], t$95$3, If[LessEqual[x$46$im, -1.55e-45], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.5e-306], t$95$3, N[(t$95$2 * 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 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := t\_0 \cdot t\_2\\
\mathbf{if}\;x.im \leq -3.3 \cdot 10^{+54}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.im \leq -1.55 \cdot 10^{-45}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-306}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \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 < -3.3e54 or -1.55e-45 < x.im < -1.50000000000000012e-306Initial program 52.7%
exp-diff47.6%
exp-to-pow47.6%
hypot-define47.6%
*-commutative47.6%
exp-prod47.5%
fma-define47.5%
hypot-define77.9%
*-commutative77.9%
Simplified77.9%
expm1-log1p-u77.9%
expm1-undefine77.9%
pow-exp79.0%
*-commutative79.0%
exp-prod77.1%
Applied egg-rr77.1%
Taylor expanded in y.im around 0 59.7%
+-commutative59.7%
unpow259.7%
unpow259.7%
hypot-undefine59.0%
Simplified59.0%
if -3.3e54 < x.im < -1.55e-45Initial program 52.0%
exp-diff40.0%
exp-to-pow40.0%
hypot-define40.0%
*-commutative40.0%
exp-prod40.0%
fma-define40.0%
hypot-define51.9%
*-commutative51.9%
Simplified51.9%
expm1-log1p-u51.9%
expm1-undefine51.9%
pow-exp55.9%
*-commutative55.9%
exp-prod56.0%
Applied egg-rr56.0%
Taylor expanded in y.im around 0 37.6%
+-commutative37.6%
unpow237.6%
unpow237.6%
hypot-undefine37.6%
Simplified37.6%
*-commutative67.9%
add-sqr-sqrt51.9%
sqrt-unprod51.9%
pow251.9%
Applied egg-rr28.7%
*-commutative51.9%
unpow251.9%
rem-sqrt-square87.9%
Simplified57.5%
if -1.50000000000000012e-306 < x.im Initial program 43.3%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in x.re around 0 56.0%
Final simplification57.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -3700.0)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im -1.5e-306)
(* (pow (hypot x.re x.im) y.re) t_1)
(* t_1 (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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -3700.0) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= -1.5e-306) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_1;
} else {
tmp = t_1 * 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -3700.0) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= -1.5e-306) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_1;
} else {
tmp = t_1 * 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -3700.0: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= -1.5e-306: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_1 else: tmp = t_1 * 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -3700.0) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= -1.5e-306) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_1); else tmp = Float64(t_1 * 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -3700.0) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= -1.5e-306) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_1; else tmp = t_1 * 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -3700.0], N[(t$95$1 * 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, -1.5e-306], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -3700:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-306}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -3700Initial program 32.2%
Taylor expanded in y.im around 0 68.2%
Taylor expanded in x.im around -inf 79.9%
mul-1-neg79.9%
Simplified79.9%
if -3700 < x.im < -1.50000000000000012e-306Initial program 71.0%
exp-diff63.3%
exp-to-pow63.3%
hypot-define63.3%
*-commutative63.3%
exp-prod63.1%
fma-define63.1%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
expm1-log1p-u81.8%
expm1-undefine81.8%
pow-exp83.5%
*-commutative83.5%
exp-prod80.6%
Applied egg-rr80.6%
Taylor expanded in y.im around 0 56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-undefine56.7%
Simplified56.7%
if -1.50000000000000012e-306 < x.im Initial program 43.3%
Taylor expanded in y.im around 0 49.2%
Taylor expanded in x.re around 0 56.0%
Final simplification61.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow (hypot x.re x.im) y.re) (sin (* 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 pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(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 = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 47.8%
exp-diff43.9%
exp-to-pow43.9%
hypot-define43.9%
*-commutative43.9%
exp-prod43.7%
fma-define43.7%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
expm1-log1p-u75.8%
expm1-undefine75.8%
pow-exp76.9%
*-commutative76.9%
exp-prod75.4%
Applied egg-rr75.4%
Taylor expanded in y.im around 0 46.5%
+-commutative46.5%
unpow246.5%
unpow246.5%
hypot-undefine46.5%
Simplified46.5%
Final simplification46.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= x.im -1.6e+36) (not (<= x.im 1.22e-70)))
(* t_0 (pow x.im y.re))
(* t_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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * 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) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if ((x_46im <= (-1.6d+36)) .or. (.not. (x_46im <= 1.22d-70))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * (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 t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (x_46_im <= -1.6e+36) or not (x_46_im <= 1.22e-70): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((x_46_im <= -1.6e+36) || ~((x_46_im <= 1.22e-70))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$im, -1.6e+36], N[Not[LessEqual[x$46$im, 1.22e-70]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.6 \cdot 10^{+36} \lor \neg \left(x.im \leq 1.22 \cdot 10^{-70}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.5999999999999999e36 or 1.22e-70 < x.im Initial program 36.8%
exp-diff34.5%
exp-to-pow34.5%
hypot-define34.5%
*-commutative34.5%
exp-prod34.3%
fma-define34.3%
hypot-define73.4%
*-commutative73.4%
Simplified73.4%
expm1-log1p-u73.4%
expm1-undefine73.4%
pow-exp74.6%
*-commutative74.6%
exp-prod73.8%
Applied egg-rr73.8%
Taylor expanded in y.im around 0 49.1%
+-commutative49.1%
unpow249.1%
unpow249.1%
hypot-undefine49.6%
Simplified49.6%
Taylor expanded in x.re around 0 46.7%
if -1.5999999999999999e36 < x.im < 1.22e-70Initial program 58.8%
exp-diff53.3%
exp-to-pow53.3%
hypot-define53.3%
*-commutative53.3%
exp-prod53.1%
fma-define53.1%
hypot-define78.1%
*-commutative78.1%
Simplified78.1%
expm1-log1p-u78.1%
expm1-undefine78.1%
pow-exp79.2%
*-commutative79.2%
exp-prod76.9%
Applied egg-rr76.9%
Taylor expanded in y.im around 0 43.9%
+-commutative43.9%
unpow243.9%
unpow243.9%
hypot-undefine43.4%
Simplified43.4%
Taylor expanded in x.im around 0 35.9%
Final simplification41.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, 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
code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Initial program 47.8%
exp-diff43.9%
exp-to-pow43.9%
hypot-define43.9%
*-commutative43.9%
exp-prod43.7%
fma-define43.7%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
expm1-log1p-u75.8%
expm1-undefine75.8%
pow-exp76.9%
*-commutative76.9%
exp-prod75.4%
Applied egg-rr75.4%
Taylor expanded in y.im around 0 46.5%
+-commutative46.5%
unpow246.5%
unpow246.5%
hypot-undefine46.5%
Simplified46.5%
Taylor expanded in x.re around 0 33.8%
Final simplification33.8%
herbie shell --seed 2024043
(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)))))