
(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)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
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}
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)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
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 (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))))
(t_3 (* t_2 (sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re)))))
(t_4 (log (fabs x.re))))
(if (<= t_3 1.0)
t_3
(if (<= t_3 INFINITY)
(*
t_2
(*
y.im
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (sin (* 0.5 PI)))))
(*
(exp (- (* y.re t_4) (* y.im (atan2 x.im x.re))))
(+ (sin t_0) (* y.im (* (cos t_0) t_4))))))))
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(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = t_2 * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double t_4 = log(fabs(x_46_re));
double tmp;
if (t_3 <= 1.0) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2 * (y_46_im * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * sin((0.5 * ((double) M_PI)))));
} else {
tmp = exp(((y_46_re * t_4) - (y_46_im * atan2(x_46_im, x_46_re)))) * (sin(t_0) + (y_46_im * (cos(t_0) * t_4)));
}
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(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) t_4 = log(abs(x_46_re)) tmp = 0.0 if (t_3 <= 1.0) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(t_2 * Float64(y_46_im * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * sin(Float64(0.5 * pi))))); else tmp = Float64(exp(Float64(Float64(y_46_re * t_4) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(sin(t_0) + Float64(y_46_im * Float64(cos(t_0) * t_4)))); 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[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1.0], t$95$3, If[LessEqual[t$95$3, Infinity], N[(t$95$2 * N[(y$46$im * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * t$95$4), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$4), $MachinePrecision]), $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(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := t\_2 \cdot \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_4 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;t\_3 \leq 1:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \sin \left(0.5 \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t\_4 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin t\_0 + y.im \cdot \left(\cos t\_0 \cdot t\_4\right)\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)))) < 1Initial program 39.8%
if 1 < (*.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)))) < +inf.0Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-PI.f6442.4
Applied rewrites42.4%
if +inf.0 < (*.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 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
Taylor expanded in y.im around 0
lower-+.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
lower-cos.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6465.7
Applied rewrites65.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (- (log x.im)))
(t_3 (log (* -1.0 x.im)))
(t_4 (log (fabs x.re))))
(if (<= x.im -1.95e+20)
(*
(exp (- (* t_3 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_3 y.im (* (atan2 x.im x.re) y.re))))
(if (<= x.im 7.9e-28)
(* (exp (- (* y.re t_4) t_0)) (sin (fma y.im t_4 t_1)))
(*
(exp (- (* -1.0 (* y.re t_2)) t_0))
(sin (fma -1.0 (* y.im t_2) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = -log(x_46_im);
double t_3 = log((-1.0 * x_46_im));
double t_4 = log(fabs(x_46_re));
double tmp;
if (x_46_im <= -1.95e+20) {
tmp = exp(((t_3 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_3, y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 7.9e-28) {
tmp = exp(((y_46_re * t_4) - t_0)) * sin(fma(y_46_im, t_4, t_1));
} else {
tmp = exp(((-1.0 * (y_46_re * t_2)) - t_0)) * sin(fma(-1.0, (y_46_im * t_2), t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(-log(x_46_im)) t_3 = log(Float64(-1.0 * x_46_im)) t_4 = log(abs(x_46_re)) tmp = 0.0 if (x_46_im <= -1.95e+20) tmp = Float64(exp(Float64(Float64(t_3 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_3, y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 7.9e-28) tmp = Float64(exp(Float64(Float64(y_46_re * t_4) - t_0)) * sin(fma(y_46_im, t_4, t_1))); else tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_2)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_2), t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Log[x$46$im], $MachinePrecision])}, Block[{t$95$3 = N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.95e+20], N[(N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$3 * y$46$im + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 7.9e-28], N[(N[Exp[N[(N[(y$46$re * t$95$4), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$4 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := -\log x.im\\
t_3 := \log \left(-1 \cdot x.im\right)\\
t_4 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;x.im \leq -1.95 \cdot 10^{+20}:\\
\;\;\;\;e^{t\_3 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t\_3, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\\
\mathbf{elif}\;x.im \leq 7.9 \cdot 10^{-28}:\\
\;\;\;\;e^{y.re \cdot t\_4 - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_4, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_2\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_2, t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -1.95e20Initial program 39.8%
Taylor expanded in x.im around -inf
lower-*.f6416.9
Applied rewrites16.9%
Taylor expanded in x.im around -inf
lower-*.f6431.2
Applied rewrites31.2%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6431.2
Applied rewrites31.2%
if -1.95e20 < x.im < 7.8999999999999999e-28Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
if 7.8999999999999999e-28 < x.im Initial program 39.8%
Taylor expanded in x.im around inf
lower-*.f64N/A
Applied rewrites31.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (fabs x.re))))
(if (<= y.re -4.2e-14)
(* t_1 (sin t_0))
(if (<= y.re 8.5e+90)
(*
(exp (- (* y.re t_2) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_2 t_0)))
(*
t_1
(*
y.im
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (sin (* 0.5 PI)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(fabs(x_46_re));
double tmp;
if (y_46_re <= -4.2e-14) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 8.5e+90) {
tmp = exp(((y_46_re * t_2) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0));
} else {
tmp = t_1 * (y_46_im * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * sin((0.5 * ((double) M_PI)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(abs(x_46_re)) tmp = 0.0 if (y_46_re <= -4.2e-14) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 8.5e+90) tmp = Float64(exp(Float64(Float64(y_46_re * t_2) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0))); else tmp = Float64(t_1 * Float64(y_46_im * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * sin(Float64(0.5 * pi))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e-14], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.5e+90], N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - 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 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y$46$im * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+90}:\\
\;\;\;\;e^{y.re \cdot t\_2 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_2, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \sin \left(0.5 \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -4.1999999999999998e-14Initial program 39.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.9
Applied rewrites53.9%
if -4.1999999999999998e-14 < y.re < 8.5000000000000002e90Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
if 8.5000000000000002e90 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-PI.f6442.4
Applied rewrites42.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin t_0)))
(t_2 (log (fabs x.re))))
(if (<= y.re -4.2e-14)
t_1
(if (<= y.re 8.4e-22)
(*
(exp (- (* y.re t_2) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_2 t_0)))
(if (<= y.re 6.7e+255)
t_1
(* y.re (fma y.re (* t_2 (atan2 x.im x.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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
double t_2 = log(fabs(x_46_re));
double tmp;
if (y_46_re <= -4.2e-14) {
tmp = t_1;
} else if (y_46_re <= 8.4e-22) {
tmp = exp(((y_46_re * t_2) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0));
} else if (y_46_re <= 6.7e+255) {
tmp = t_1;
} else {
tmp = y_46_re * fma(y_46_re, (t_2 * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)) t_2 = log(abs(x_46_re)) tmp = 0.0 if (y_46_re <= -4.2e-14) tmp = t_1; elseif (y_46_re <= 8.4e-22) tmp = Float64(exp(Float64(Float64(y_46_re * t_2) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0))); elseif (y_46_re <= 6.7e+255) tmp = t_1; else tmp = Float64(y_46_re * fma(y_46_re, Float64(t_2 * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e-14], t$95$1, If[LessEqual[y$46$re, 8.4e-22], N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - 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 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.7e+255], t$95$1, N[(y$46$re * N[(y$46$re * N[(t$95$2 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
t_2 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 8.4 \cdot 10^{-22}:\\
\;\;\;\;e^{y.re \cdot t\_2 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_2, t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 6.7 \cdot 10^{+255}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_2 \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -4.1999999999999998e-14 or 8.40000000000000031e-22 < y.re < 6.7000000000000001e255Initial program 39.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.9
Applied rewrites53.9%
if -4.1999999999999998e-14 < y.re < 8.40000000000000031e-22Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
if 6.7000000000000001e255 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin t_1))))
(if (<= y.re -4.2e-14)
t_2
(if (<= y.re 8.4e-22)
(*
(exp (- (* y.im (atan2 x.im x.re))))
(sin (* y.im (+ t_0 (/ t_1 y.im)))))
(if (<= y.re 6.7e+255)
t_2
(* y.re (fma y.re (* t_0 (atan2 x.im x.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(fabs(x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_1);
double tmp;
if (y_46_re <= -4.2e-14) {
tmp = t_2;
} else if (y_46_re <= 8.4e-22) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (t_1 / y_46_im))));
} else if (y_46_re <= 6.7e+255) {
tmp = t_2;
} else {
tmp = y_46_re * fma(y_46_re, (t_0 * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(abs(x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_1)) tmp = 0.0 if (y_46_re <= -4.2e-14) tmp = t_2; elseif (y_46_re <= 8.4e-22) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * Float64(t_0 + Float64(t_1 / y_46_im))))); elseif (y_46_re <= 6.7e+255) tmp = t_2; else tmp = Float64(y_46_re * fma(y_46_re, Float64(t_0 * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e-14], t$95$2, If[LessEqual[y$46$re, 8.4e-22], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(t$95$1 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.7e+255], t$95$2, N[(y$46$re * N[(y$46$re * N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.re\right|\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_1\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 8.4 \cdot 10^{-22}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \left(t\_0 + \frac{t\_1}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 6.7 \cdot 10^{+255}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -4.1999999999999998e-14 or 8.40000000000000031e-22 < y.re < 6.7000000000000001e255Initial program 39.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.9
Applied rewrites53.9%
if -4.1999999999999998e-14 < y.re < 8.40000000000000031e-22Initial program 39.8%
Taylor expanded in y.im around inf
lower-*.f64N/A
lower-+.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-atan2.f6435.8
Applied rewrites35.8%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6426.5
Applied rewrites26.5%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6446.6
Applied rewrites46.6%
if 6.7000000000000001e255 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (fabs x.re)))
(t_2 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(t_3 (* (sin t_0) t_2)))
(if (<= y.re -0.115)
t_3
(if (<= y.re 8.4e-22)
(*
(exp (- (* y.im (atan2 x.im x.re))))
(sin (* y.im (+ t_1 (/ t_0 y.im)))))
(if (<= y.re 1.15e+107)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
t_2)
(if (<= y.re 6.7e+255)
t_3
(*
y.re
(fma y.re (* t_1 (atan2 x.im x.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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(fabs(x_46_re));
double t_2 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double t_3 = sin(t_0) * t_2;
double tmp;
if (y_46_re <= -0.115) {
tmp = t_3;
} else if (y_46_re <= 8.4e-22) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_1 + (t_0 / y_46_im))));
} else if (y_46_re <= 1.15e+107) {
tmp = (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re))) * t_2;
} else if (y_46_re <= 6.7e+255) {
tmp = t_3;
} else {
tmp = y_46_re * fma(y_46_re, (t_1 * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(abs(x_46_re)) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re t_3 = Float64(sin(t_0) * t_2) tmp = 0.0 if (y_46_re <= -0.115) tmp = t_3; elseif (y_46_re <= 8.4e-22) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * Float64(t_1 + Float64(t_0 / y_46_im))))); elseif (y_46_re <= 1.15e+107) tmp = Float64(Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re))) * t_2); elseif (y_46_re <= 6.7e+255) tmp = t_3; else tmp = Float64(y_46_re * fma(y_46_re, Float64(t_1 * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -0.115], t$95$3, If[LessEqual[y$46$re, 8.4e-22], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$1 + N[(t$95$0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+107], N[(N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 6.7e+255], t$95$3, N[(y$46$re * N[(y$46$re * N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $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(\left|x.re\right|\right)\\
t_2 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
t_3 := \sin t\_0 \cdot t\_2\\
\mathbf{if}\;y.re \leq -0.115:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 8.4 \cdot 10^{-22}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \left(t\_1 + \frac{t\_0}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+107}:\\
\;\;\;\;\left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot t\_2\\
\mathbf{elif}\;y.re \leq 6.7 \cdot 10^{+255}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -0.115000000000000005 or 1.15e107 < y.re < 6.7000000000000001e255Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
if -0.115000000000000005 < y.re < 8.40000000000000031e-22Initial program 39.8%
Taylor expanded in y.im around inf
lower-*.f64N/A
lower-+.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-atan2.f6435.8
Applied rewrites35.8%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6426.5
Applied rewrites26.5%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6446.6
Applied rewrites46.6%
if 8.40000000000000031e-22 < y.re < 1.15e107Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6429.5
Applied rewrites29.5%
if 6.7000000000000001e255 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.re)))
(t_1 (exp (- (* y.im (atan2 x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -0.115)
(* t_1 (sin (* y.im t_0)))
(if (<= y.im 5000.0)
(* (pow (fabs x.re) y.re) (sin (fma y.im t_0 t_2)))
(* t_1 (sin t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(fabs(x_46_re));
double t_1 = exp(-(y_46_im * atan2(x_46_im, x_46_re)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -0.115) {
tmp = t_1 * sin((y_46_im * t_0));
} else if (y_46_im <= 5000.0) {
tmp = pow(fabs(x_46_re), y_46_re) * sin(fma(y_46_im, t_0, t_2));
} else {
tmp = t_1 * sin(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(abs(x_46_re)) t_1 = exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.115) tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); elseif (y_46_im <= 5000.0) tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(fma(y_46_im, t_0, t_2))); else tmp = Float64(t_1 * sin(t_2)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -0.115], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5000.0], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.re\right|\right)\\
t_1 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -0.115:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.im \leq 5000:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin t\_2\\
\end{array}
\end{array}
if y.im < -0.115000000000000005Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
if -0.115000000000000005 < y.im < 5e3Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
Taylor expanded in y.im around 0
rem-sqrt-square-revN/A
pow2N/A
lower-pow.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6447.4
Applied rewrites47.4%
if 5e3 < y.im Initial program 39.8%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.9
Applied rewrites53.9%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6440.3
Applied rewrites40.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.re)))
(t_1 (* (exp (- (* y.im (atan2 x.im x.re)))) (sin (* y.im t_0)))))
(if (<= y.im -0.115)
t_1
(if (<= y.im 3.8e-10)
(*
(pow (fabs x.re) y.re)
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(fabs(x_46_re));
double t_1 = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -0.115) {
tmp = t_1;
} else if (y_46_im <= 3.8e-10) {
tmp = pow(fabs(x_46_re), y_46_re) * sin(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(abs(x_46_re)) t_1 = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_0))) tmp = 0.0 if (y_46_im <= -0.115) tmp = t_1; elseif (y_46_im <= 3.8e-10) tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -0.115], t$95$1, If[LessEqual[y$46$im, 3.8e-10], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.re\right|\right)\\
t_1 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -0.115:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-10}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -0.115000000000000005 or 3.7999999999999998e-10 < y.im Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
if -0.115000000000000005 < y.im < 3.7999999999999998e-10Initial program 39.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.5
Applied rewrites46.5%
lift-cos.f64N/A
lift-*.f64N/A
lift-atan2.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-atan2.f64N/A
lower-/.f64N/A
lower-PI.f6447.1
Applied rewrites47.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites66.3%
Taylor expanded in y.im around 0
rem-sqrt-square-revN/A
pow2N/A
lower-pow.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6447.4
Applied rewrites47.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* y.re (atan2 x.im x.re)))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)))
(t_1 (log (fabs x.re))))
(if (<= y.re -0.115)
t_0
(if (<= y.re 3.4e-117)
(* (exp (- (* y.im (atan2 x.im x.re)))) (sin (* y.im t_1)))
(if (<= y.re 6.7e+255)
t_0
(* y.re (fma y.re (* t_1 (atan2 x.im x.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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double t_1 = log(fabs(x_46_re));
double tmp;
if (y_46_re <= -0.115) {
tmp = t_0;
} else if (y_46_re <= 3.4e-117) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * t_1));
} else if (y_46_re <= 6.7e+255) {
tmp = t_0;
} else {
tmp = y_46_re * fma(y_46_re, (t_1 * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) t_1 = log(abs(x_46_re)) tmp = 0.0 if (y_46_re <= -0.115) tmp = t_0; elseif (y_46_re <= 3.4e-117) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_1))); elseif (y_46_re <= 6.7e+255) tmp = t_0; else tmp = Float64(y_46_re * fma(y_46_re, Float64(t_1 * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.115], t$95$0, If[LessEqual[y$46$re, 3.4e-117], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.7e+255], t$95$0, N[(y$46$re * N[(y$46$re * N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
t_1 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;y.re \leq -0.115:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-117}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_1\right)\\
\mathbf{elif}\;y.re \leq 6.7 \cdot 10^{+255}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -0.115000000000000005 or 3.40000000000000035e-117 < y.re < 6.7000000000000001e255Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
if -0.115000000000000005 < y.re < 3.40000000000000035e-117Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
if 6.7000000000000001e255 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.re))) (t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1.2e+221)
(* t_1 (pow (- x.im) y.re))
(if (<= y.re -520.0)
(* t_1 (pow (fabs x.re) y.re))
(if (<= y.re 3.4e-117)
(* (exp (- (* y.im (atan2 x.im x.re)))) (sin (* y.im t_0)))
(if (<= y.re 6.2e+253)
(* t_1 (pow (sqrt (* x.im x.im)) y.re))
(*
y.re
(fma y.re (* t_0 (atan2 x.im x.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(fabs(x_46_re));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.2e+221) {
tmp = t_1 * pow(-x_46_im, y_46_re);
} else if (y_46_re <= -520.0) {
tmp = t_1 * pow(fabs(x_46_re), y_46_re);
} else if (y_46_re <= 3.4e-117) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * t_0));
} else if (y_46_re <= 6.2e+253) {
tmp = t_1 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
} else {
tmp = y_46_re * fma(y_46_re, (t_0 * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(abs(x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -1.2e+221) tmp = Float64(t_1 * (Float64(-x_46_im) ^ y_46_re)); elseif (y_46_re <= -520.0) tmp = Float64(t_1 * (abs(x_46_re) ^ y_46_re)); elseif (y_46_re <= 3.4e-117) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_0))); elseif (y_46_re <= 6.2e+253) tmp = Float64(t_1 * (sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re)); else tmp = Float64(y_46_re * fma(y_46_re, Float64(t_0 * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Abs[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[y$46$re, -1.2e+221], N[(t$95$1 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -520.0], N[(t$95$1 * N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.4e-117], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+253], N[(t$95$1 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(y$46$re * N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.re\right|\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+221}:\\
\;\;\;\;t\_1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -520:\\
\;\;\;\;t\_1 \cdot {\left(\left|x.re\right|\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-117}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+253}:\\
\;\;\;\;t\_1 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.2000000000000001e221Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6418.7
Applied rewrites18.7%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-neg.f6431.3
Applied rewrites31.3%
if -1.2000000000000001e221 < y.re < -520Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites14.0%
Taylor expanded in x.im around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6438.7
Applied rewrites38.7%
if -520 < y.re < 3.40000000000000035e-117Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
if 3.40000000000000035e-117 < y.re < 6.20000000000000013e253Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.re around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.4
Applied rewrites36.4%
if 6.20000000000000013e253 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* t_0 (pow (fabs x.re) y.re)))
(t_2 (* t_0 (pow (- x.im) y.re)))
(t_3 (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= y.re -1.2e+221)
t_2
(if (<= y.re -1.5e-262)
t_1
(if (<= y.re 2.4e-117)
(* y.im (+ t_3 (* -1.0 (* y.im (* t_3 (atan2 x.im x.re))))))
(if (<= y.re 4.9e+85)
t_1
(if (<= y.re 6.7e+255)
t_2
(*
y.re
(fma
y.re
(* (log (fabs x.re)) (atan2 x.im x.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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(fabs(x_46_re), y_46_re);
double t_2 = t_0 * pow(-x_46_im, y_46_re);
double t_3 = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double tmp;
if (y_46_re <= -1.2e+221) {
tmp = t_2;
} else if (y_46_re <= -1.5e-262) {
tmp = t_1;
} else if (y_46_re <= 2.4e-117) {
tmp = y_46_im * (t_3 + (-1.0 * (y_46_im * (t_3 * atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= 4.9e+85) {
tmp = t_1;
} else if (y_46_re <= 6.7e+255) {
tmp = t_2;
} else {
tmp = y_46_re * fma(y_46_re, (log(fabs(x_46_re)) * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (abs(x_46_re) ^ y_46_re)) t_2 = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)) t_3 = log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) tmp = 0.0 if (y_46_re <= -1.2e+221) tmp = t_2; elseif (y_46_re <= -1.5e-262) tmp = t_1; elseif (y_46_re <= 2.4e-117) tmp = Float64(y_46_im * Float64(t_3 + Float64(-1.0 * Float64(y_46_im * Float64(t_3 * atan(x_46_im, x_46_re)))))); elseif (y_46_re <= 4.9e+85) tmp = t_1; elseif (y_46_re <= 6.7e+255) tmp = t_2; else tmp = Float64(y_46_re * fma(y_46_re, Float64(log(abs(x_46_re)) * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+221], t$95$2, If[LessEqual[y$46$re, -1.5e-262], t$95$1, If[LessEqual[y$46$re, 2.4e-117], N[(y$46$im * N[(t$95$3 + N[(-1.0 * N[(y$46$im * N[(t$95$3 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.9e+85], t$95$1, If[LessEqual[y$46$re, 6.7e+255], t$95$2, N[(y$46$re * N[(y$46$re * N[(N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {\left(\left|x.re\right|\right)}^{y.re}\\
t_2 := t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
t_3 := \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.5 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-117}:\\
\;\;\;\;y.im \cdot \left(t\_3 + -1 \cdot \left(y.im \cdot \left(t\_3 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 4.9 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 6.7 \cdot 10^{+255}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\left|x.re\right|\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.2000000000000001e221 or 4.8999999999999997e85 < y.re < 6.7000000000000001e255Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6418.7
Applied rewrites18.7%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-neg.f6431.3
Applied rewrites31.3%
if -1.2000000000000001e221 < y.re < -1.50000000000000009e-262 or 2.40000000000000014e-117 < y.re < 4.8999999999999997e85Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites14.0%
Taylor expanded in x.im around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6438.7
Applied rewrites38.7%
if -1.50000000000000009e-262 < y.re < 2.40000000000000014e-117Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
Applied rewrites17.5%
if 6.7000000000000001e255 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (log (sqrt (fma x.im x.im (* x.re x.re)))))
(t_2 (* t_0 (pow (- x.im) y.re)))
(t_3 (* y.im (+ t_1 (* -1.0 (* y.im (* t_1 (atan2 x.im x.re))))))))
(if (<= y.re -1.2e+221)
t_2
(if (<= y.re -520.0)
(* t_0 (pow x.re y.re))
(if (<= y.re -9.5e-98)
t_3
(if (<= y.re -1.5e-262)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
1.0)
(if (<= y.re 1.35e+42)
t_3
(if (<= y.re 6.2e+253)
t_2
(*
y.re
(fma
y.re
(* (log (fabs x.re)) (atan2 x.im x.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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double t_2 = t_0 * pow(-x_46_im, y_46_re);
double t_3 = y_46_im * (t_1 + (-1.0 * (y_46_im * (t_1 * atan2(x_46_im, x_46_re)))));
double tmp;
if (y_46_re <= -1.2e+221) {
tmp = t_2;
} else if (y_46_re <= -520.0) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else if (y_46_re <= -9.5e-98) {
tmp = t_3;
} else if (y_46_re <= -1.5e-262) {
tmp = (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re))) * 1.0;
} else if (y_46_re <= 1.35e+42) {
tmp = t_3;
} else if (y_46_re <= 6.2e+253) {
tmp = t_2;
} else {
tmp = y_46_re * fma(y_46_re, (log(fabs(x_46_re)) * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) t_2 = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)) t_3 = Float64(y_46_im * Float64(t_1 + Float64(-1.0 * Float64(y_46_im * Float64(t_1 * atan(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_re <= -1.2e+221) tmp = t_2; elseif (y_46_re <= -520.0) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); elseif (y_46_re <= -9.5e-98) tmp = t_3; elseif (y_46_re <= -1.5e-262) tmp = Float64(Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re))) * 1.0); elseif (y_46_re <= 1.35e+42) tmp = t_3; elseif (y_46_re <= 6.2e+253) tmp = t_2; else tmp = Float64(y_46_re * fma(y_46_re, Float64(log(abs(x_46_re)) * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[(t$95$1 + N[(-1.0 * N[(y$46$im * N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+221], t$95$2, If[LessEqual[y$46$re, -520.0], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -9.5e-98], t$95$3, If[LessEqual[y$46$re, -1.5e-262], N[(N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 1.35e+42], t$95$3, If[LessEqual[y$46$re, 6.2e+253], t$95$2, N[(y$46$re * N[(y$46$re * N[(N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
t_2 := t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
t_3 := y.im \cdot \left(t\_1 + -1 \cdot \left(y.im \cdot \left(t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -520:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq -9.5 \cdot 10^{-98}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -1.5 \cdot 10^{-262}:\\
\;\;\;\;\left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+253}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\left|x.re\right|\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.2000000000000001e221 or 1.35e42 < y.re < 6.20000000000000013e253Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6418.7
Applied rewrites18.7%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-neg.f6431.3
Applied rewrites31.3%
if -1.2000000000000001e221 < y.re < -520Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x.re around 0
lower-pow.f6431.0
Applied rewrites31.0%
if -520 < y.re < -9.5000000000000001e-98 or -1.50000000000000009e-262 < y.re < 1.35e42Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
Applied rewrites17.5%
if -9.5000000000000001e-98 < y.re < -1.50000000000000009e-262Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites14.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6420.0
Applied rewrites20.0%
if 6.20000000000000013e253 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -1.6e+129)
(* t_0 (pow (fabs x.re) y.re))
(if (<= x.re 2.05e-81)
(* t_0 (pow (sqrt (* x.im 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_re <= -1.6e+129) {
tmp = t_0 * pow(fabs(x_46_re), y_46_re);
} else if (x_46_re <= 2.05e-81) {
tmp = t_0 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
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_46re <= (-1.6d+129)) then
tmp = t_0 * (abs(x_46re) ** y_46re)
else if (x_46re <= 2.05d-81) then
tmp = t_0 * (sqrt((x_46im * 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_re <= -1.6e+129) {
tmp = t_0 * Math.pow(Math.abs(x_46_re), y_46_re);
} else if (x_46_re <= 2.05e-81) {
tmp = t_0 * Math.pow(Math.sqrt((x_46_im * 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_re <= -1.6e+129: tmp = t_0 * math.pow(math.fabs(x_46_re), y_46_re) elif x_46_re <= 2.05e-81: tmp = t_0 * math.pow(math.sqrt((x_46_im * 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_re <= -1.6e+129) tmp = Float64(t_0 * (abs(x_46_re) ^ y_46_re)); elseif (x_46_re <= 2.05e-81) tmp = Float64(t_0 * (sqrt(Float64(x_46_im * 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_re <= -1.6e+129) tmp = t_0 * (abs(x_46_re) ^ y_46_re); elseif (x_46_re <= 2.05e-81) tmp = t_0 * (sqrt((x_46_im * 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[LessEqual[x$46$re, -1.6e+129], N[(t$95$0 * N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.05e-81], N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], 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.re \leq -1.6 \cdot 10^{+129}:\\
\;\;\;\;t\_0 \cdot {\left(\left|x.re\right|\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-81}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -1.6000000000000001e129Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites14.0%
Taylor expanded in x.im around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6438.7
Applied rewrites38.7%
if -1.6000000000000001e129 < x.re < 2.04999999999999992e-81Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.re around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.4
Applied rewrites36.4%
if 2.04999999999999992e-81 < x.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x.re around 0
lower-pow.f6431.0
Applied rewrites31.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (fma x.im x.im (* x.re x.re)))))
(t_1 (* y.im (+ t_0 (* -1.0 (* y.im (* t_0 (atan2 x.im x.re)))))))
(t_2 (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re))))
(if (<= y.re -520.0)
t_2
(if (<= y.re -9.5e-98)
t_1
(if (<= y.re -1.5e-262)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
1.0)
(if (<= y.re 1.35e+42) t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double t_1 = y_46_im * (t_0 + (-1.0 * (y_46_im * (t_0 * atan2(x_46_im, x_46_re)))));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -520.0) {
tmp = t_2;
} else if (y_46_re <= -9.5e-98) {
tmp = t_1;
} else if (y_46_re <= -1.5e-262) {
tmp = (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re))) * 1.0;
} else if (y_46_re <= 1.35e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) t_1 = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * Float64(t_0 * atan(x_46_im, x_46_re)))))) t_2 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -520.0) tmp = t_2; elseif (y_46_re <= -9.5e-98) tmp = t_1; elseif (y_46_re <= -1.5e-262) tmp = Float64(Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re))) * 1.0); elseif (y_46_re <= 1.35e+42) tmp = t_1; 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[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[(t$95$0 + N[(-1.0 * N[(y$46$im * N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -520.0], t$95$2, If[LessEqual[y$46$re, -9.5e-98], t$95$1, If[LessEqual[y$46$re, -1.5e-262], N[(N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 1.35e+42], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
t_1 := y.im \cdot \left(t\_0 + -1 \cdot \left(y.im \cdot \left(t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -520:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -9.5 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.5 \cdot 10^{-262}:\\
\;\;\;\;\left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -520 or 1.35e42 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x.re around 0
lower-pow.f6431.0
Applied rewrites31.0%
if -520 < y.re < -9.5000000000000001e-98 or -1.50000000000000009e-262 < y.re < 1.35e42Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
Applied rewrites17.5%
if -9.5000000000000001e-98 < y.re < -1.50000000000000009e-262Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites14.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6420.0
Applied rewrites20.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (fma x.im x.im (* x.re x.re)))))
(t_1 (* y.im (+ t_0 (* -1.0 (* y.im (* t_0 (atan2 x.im x.re))))))))
(if (<= y.im -5.8e-95)
t_1
(if (<= y.im 5.1e-53)
(*
y.re
(fma y.re (* (log (fabs x.re)) (atan2 x.im x.re)) (atan2 x.im x.re)))
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double t_1 = y_46_im * (t_0 + (-1.0 * (y_46_im * (t_0 * atan2(x_46_im, x_46_re)))));
double tmp;
if (y_46_im <= -5.8e-95) {
tmp = t_1;
} else if (y_46_im <= 5.1e-53) {
tmp = y_46_re * fma(y_46_re, (log(fabs(x_46_re)) * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) t_1 = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * Float64(t_0 * atan(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_im <= -5.8e-95) tmp = t_1; elseif (y_46_im <= 5.1e-53) tmp = Float64(y_46_re * fma(y_46_re, Float64(log(abs(x_46_re)) * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); else tmp = t_1; 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[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[(t$95$0 + N[(-1.0 * N[(y$46$im * N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.8e-95], t$95$1, If[LessEqual[y$46$im, 5.1e-53], N[(y$46$re * N[(y$46$re * N[(N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
t_1 := y.im \cdot \left(t\_0 + -1 \cdot \left(y.im \cdot \left(t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\mathbf{if}\;y.im \leq -5.8 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 5.1 \cdot 10^{-53}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\left|x.re\right|\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -5.80000000000000004e-95 or 5.10000000000000045e-53 < y.im Initial program 39.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6421.8
Applied rewrites21.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
Applied rewrites17.5%
if -5.80000000000000004e-95 < y.im < 5.10000000000000045e-53Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
y.re
(*
y.re
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))))))
(if (<= y.im -360.0)
t_0
(if (<= y.im 7e-47)
(*
y.re
(fma y.re (* (log (fabs x.re)) (atan2 x.im x.re)) (atan2 x.im x.re)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (y_46_re * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -360.0) {
tmp = t_0;
} else if (y_46_im <= 7e-47) {
tmp = y_46_re * fma(y_46_re, (log(fabs(x_46_re)) * atan2(x_46_im, x_46_re)), atan2(x_46_im, x_46_re));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(y_46_re * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -360.0) tmp = t_0; elseif (y_46_im <= 7e-47) tmp = Float64(y_46_re * fma(y_46_re, Float64(log(abs(x_46_re)) * atan(x_46_im, x_46_re)), atan(x_46_im, x_46_re))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -360.0], t$95$0, If[LessEqual[y$46$im, 7e-47], N[(y$46$re * N[(y$46$re * N[(N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(y.re \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{if}\;y.im \leq -360:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{-47}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\left|x.re\right|\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -360 or 6.9999999999999996e-47 < y.im Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in y.re around inf
pow2N/A
pow2N/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6415.5
Applied rewrites15.5%
if -360 < y.im < 6.9999999999999996e-47Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6418.7
Applied rewrites18.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* y.re (* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (y_46_re * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * atan2(x_46_im, x_46_re)));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(y_46_re * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(y.re \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in y.re around inf
pow2N/A
pow2N/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6415.5
Applied rewrites15.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re y.re) (* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * y_46_re) * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * atan2(x_46_im, x_46_re));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * y_46_re) * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * atan(x_46_im, x_46_re))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot y.re\right) \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 39.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.7
Applied rewrites17.7%
Taylor expanded in y.re around inf
pow2N/A
pow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6414.1
Applied rewrites14.1%
herbie shell --seed 2025142
(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)))))