
(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 15 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.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.75e+49)
(*
(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 0.056)
(* (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.75e+49) {
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 <= 0.056) {
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.75e+49) 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 <= 0.056) 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.75e+49], 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, 0.056], 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.75 \cdot 10^{+49}:\\
\;\;\;\;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 0.056:\\
\;\;\;\;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.74999999999999987e49Initial program 40.9%
Taylor expanded in x.im around -inf
lower-*.f6418.6
Applied rewrites18.6%
Taylor expanded in x.im around -inf
lower-*.f6431.3
Applied rewrites31.3%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6431.4
Applied rewrites31.4%
if -1.74999999999999987e49 < x.im < 0.0560000000000000012Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-fma.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-*.f6448.1
Applied rewrites48.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites67.0%
if 0.0560000000000000012 < x.im Initial program 40.9%
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.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (* -1.0 x.im)))
(t_3 (log (fabs x.re))))
(if (<= x.im -1.75e+49)
(*
(exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_2 y.im (* (atan2 x.im x.re) y.re))))
(if (<= x.im 5.2e+161)
(* (exp (- (* y.re t_3) t_0)) (sin (fma y.im t_3 t_1)))
(* (exp (- t_0)) (sin (fma -1.0 (* y.im (- (log x.im))) 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((-1.0 * x_46_im));
double t_3 = log(fabs(x_46_re));
double tmp;
if (x_46_im <= -1.75e+49) {
tmp = exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_2, y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 5.2e+161) {
tmp = exp(((y_46_re * t_3) - t_0)) * sin(fma(y_46_im, t_3, t_1));
} else {
tmp = exp(-t_0) * sin(fma(-1.0, (y_46_im * -log(x_46_im)), 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 = log(Float64(-1.0 * x_46_im)) t_3 = log(abs(x_46_re)) tmp = 0.0 if (x_46_im <= -1.75e+49) tmp = Float64(exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_2, y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 5.2e+161) tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - t_0)) * sin(fma(y_46_im, t_3, t_1))); else tmp = Float64(exp(Float64(-t_0)) * sin(fma(-1.0, Float64(y_46_im * Float64(-log(x_46_im))), 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[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.75e+49], N[(N[Exp[N[(N[(t$95$2 * 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$2 * 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, 5.2e+161], N[(N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$3 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[(-t$95$0)], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * (-N[Log[x$46$im], $MachinePrecision])), $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 \left(-1 \cdot x.im\right)\\
t_3 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;x.im \leq -1.75 \cdot 10^{+49}:\\
\;\;\;\;e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{+161}:\\
\;\;\;\;e^{y.re \cdot t\_3 - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_3, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{-t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot \left(-\log x.im\right), t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -1.74999999999999987e49Initial program 40.9%
Taylor expanded in x.im around -inf
lower-*.f6418.6
Applied rewrites18.6%
Taylor expanded in x.im around -inf
lower-*.f6431.3
Applied rewrites31.3%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6431.4
Applied rewrites31.4%
if -1.74999999999999987e49 < x.im < 5.1999999999999996e161Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-fma.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-*.f6448.1
Applied rewrites48.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites67.0%
if 5.1999999999999996e161 < x.im Initial program 40.9%
Taylor expanded in x.im around inf
lower-fma.f64N/A
lower-*.f64N/A
log-recN/A
lower-neg.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6428.7
Applied rewrites28.7%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6423.0
Applied rewrites23.0%
(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 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -1.76e+25)
(* (sin t_1) (pow t_2 y.re))
(if (<= y.re 3800000.0)
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_0 t_1)))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -1.76e+25) {
tmp = sin(t_1) * pow(t_2, y_46_re);
} else if (y_46_re <= 3800000.0) {
tmp = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_0, t_1));
} else {
tmp = 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))) * (y_46_im * log(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -1.76e+25) tmp = Float64(sin(t_1) * (t_2 ^ y_46_re)); elseif (y_46_re <= 3800000.0) tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_0, t_1))); else tmp = 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))) * Float64(y_46_im * log(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.76e+25], N[(N[Sin[t$95$1], $MachinePrecision] * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3800000.0], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[(y$46$im * N[Log[t$95$2], $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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -1.76 \cdot 10^{+25}:\\
\;\;\;\;\sin t\_1 \cdot {t\_2}^{y.re}\\
\mathbf{elif}\;y.re \leq 3800000:\\
\;\;\;\;e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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 \left(y.im \cdot \log t\_2\right)\\
\end{array}
\end{array}
if y.re < -1.76000000000000001e25Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
if -1.76000000000000001e25 < y.re < 3.8e6Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-fma.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-*.f6448.1
Applied rewrites48.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
Applied rewrites67.0%
if 3.8e6 < y.re Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6443.2
Applied rewrites43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (sqrt (fma x.im x.im (* x.re x.re))))
(t_4 (* (exp (- (* y.im (atan2 x.im x.re)))) t_2))
(t_5 (log t_3)))
(if (<= y.re -0.38)
(* t_2 (pow t_3 y.re))
(if (<= y.re -5.5e-195)
t_4
(if (<= y.re 1.7e-184)
(* (exp (- (* (log (fabs x.re)) y.re) t_0)) (fma y.im t_5 t_1))
(if (<= y.re 11.0)
t_4
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(* y.im t_5))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_4 = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_2;
double t_5 = log(t_3);
double tmp;
if (y_46_re <= -0.38) {
tmp = t_2 * pow(t_3, y_46_re);
} else if (y_46_re <= -5.5e-195) {
tmp = t_4;
} else if (y_46_re <= 1.7e-184) {
tmp = exp(((log(fabs(x_46_re)) * y_46_re) - t_0)) * fma(y_46_im, t_5, t_1);
} else if (y_46_re <= 11.0) {
tmp = t_4;
} else {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (y_46_im * t_5);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_4 = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_2) t_5 = log(t_3) tmp = 0.0 if (y_46_re <= -0.38) tmp = Float64(t_2 * (t_3 ^ y_46_re)); elseif (y_46_re <= -5.5e-195) tmp = t_4; elseif (y_46_re <= 1.7e-184) tmp = Float64(exp(Float64(Float64(log(abs(x_46_re)) * y_46_re) - t_0)) * fma(y_46_im, t_5, t_1)); elseif (y_46_re <= 11.0) tmp = t_4; else tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * Float64(y_46_im * t_5)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[Log[t$95$3], $MachinePrecision]}, If[LessEqual[y$46$re, -0.38], N[(t$95$2 * N[Power[t$95$3, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -5.5e-195], t$95$4, If[LessEqual[y$46$re, 1.7e-184], N[(N[Exp[N[(N[(N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$5 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 11.0], t$95$4, 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] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_4 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
t_5 := \log t\_3\\
\mathbf{if}\;y.re \leq -0.38:\\
\;\;\;\;t\_2 \cdot {t\_3}^{y.re}\\
\mathbf{elif}\;y.re \leq -5.5 \cdot 10^{-195}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-184}:\\
\;\;\;\;e^{\log \left(\left|x.re\right|\right) \cdot y.re - t\_0} \cdot \mathsf{fma}\left(y.im, t\_5, t\_1\right)\\
\mathbf{elif}\;y.re \leq 11:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \left(y.im \cdot t\_5\right)\\
\end{array}
\end{array}
if y.re < -0.38Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
if -0.38 < y.re < -5.5000000000000003e-195 or 1.70000000000000002e-184 < y.re < 11Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.3
Applied rewrites53.3%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6439.5
Applied rewrites39.5%
if -5.5000000000000003e-195 < y.re < 1.70000000000000002e-184Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-fma.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-*.f6448.1
Applied rewrites48.1%
Taylor expanded in x.im around 0
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6444.7
Applied rewrites44.7%
if 11 < y.re Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6443.2
Applied rewrites43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -0.38)
(* t_0 (pow t_1 y.re))
(if (<= y.re 11.0)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -0.38) {
tmp = t_0 * pow(t_1, y_46_re);
} else if (y_46_re <= 11.0) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = 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))) * (y_46_im * log(t_1));
}
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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -0.38) tmp = Float64(t_0 * (t_1 ^ y_46_re)); elseif (y_46_re <= 11.0) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0); else tmp = 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))) * Float64(y_46_im * log(t_1))); 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.38], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 11.0], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision], 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[(y$46$im * N[Log[t$95$1], $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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -0.38:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq 11:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;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 \left(y.im \cdot \log t\_1\right)\\
\end{array}
\end{array}
if y.re < -0.38Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
if -0.38 < y.re < 11Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.3
Applied rewrites53.3%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6439.5
Applied rewrites39.5%
if 11 < y.re Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6443.2
Applied rewrites43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -1.8e-167)
(* (sin (* y.re (atan2 x.im x.re))) (pow t_0 y.re))
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -1.8e-167) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_0, y_46_re);
} else {
tmp = 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))) * (y_46_im * log(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -1.8e-167) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_0 ^ y_46_re)); else tmp = 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))) * Float64(y_46_im * log(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.8e-167], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$0, y$46$re], $MachinePrecision]), $MachinePrecision], 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[(y$46$im * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{-167}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_0}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;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 \left(y.im \cdot \log t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.8e-167Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
if -1.8e-167 < y.re Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6443.2
Applied rewrites43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= (* t_1 (sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re)))) INFINITY)
(* t_1 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(* (sin (* y.re (atan2 x.im x.re))) (pow (fabs 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))));
double t_1 = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((t_1 * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)))) <= ((double) INFINITY)) {
tmp = t_1 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(fabs(x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(t_1 * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) <= Inf) tmp = Float64(t_1 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (abs(x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[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]}, If[LessEqual[N[(t$95$1 * 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], Infinity], N[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;t\_1 \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \leq \infty:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\left|x.re\right|\right)}^{y.re}\\
\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)))) < +inf.0Initial program 40.9%
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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6443.2
Applied rewrites43.2%
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 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.3
Applied rewrites36.3%
lift-*.f64N/A
lift-sqrt.f64N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im 6e+17)
(* (sin t_0) (pow (fabs x.re) y.re))
(*
(* 0.008333333333333333 (pow t_0 5.0))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 6e+17) {
tmp = sin(t_0) * pow(fabs(x_46_re), y_46_re);
} else {
tmp = (0.008333333333333333 * pow(t_0, 5.0)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= 6e+17) tmp = Float64(sin(t_0) * (abs(x_46_re) ^ y_46_re)); else tmp = Float64(Float64(0.008333333333333333 * (t_0 ^ 5.0)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, 6e+17], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(0.008333333333333333 * N[Power[t$95$0, 5.0], $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]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 6 \cdot 10^{+17}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\left|x.re\right|\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left(0.008333333333333333 \cdot {t\_0}^{5}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < 6e17Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.3
Applied rewrites36.3%
lift-*.f64N/A
lift-sqrt.f64N/A
rem-sqrt-squareN/A
lower-fabs.f6437.7
Applied rewrites37.7%
if 6e17 < y.im Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6424.8
Applied rewrites24.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
pow-prod-downN/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-*.f6425.0
Applied rewrites25.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_1 (pow x.re y.re))))
(if (<= y.re -3.05e+49)
t_2
(if (<= y.re -0.0275)
(*
(* 0.008333333333333333 (pow t_0 5.0))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= y.re 3900000.0)
(* t_1 (+ 1.0 (* y.re (log (fabs x.re)))))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_1 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -3.05e+49) {
tmp = t_2;
} else if (y_46_re <= -0.0275) {
tmp = (0.008333333333333333 * pow(t_0, 5.0)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (y_46_re <= 3900000.0) {
tmp = t_1 * (1.0 + (y_46_re * log(fabs(x_46_re))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(t_1 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.05e+49) tmp = t_2; elseif (y_46_re <= -0.0275) tmp = Float64(Float64(0.008333333333333333 * (t_0 ^ 5.0)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (y_46_re <= 3900000.0) tmp = Float64(t_1 * Float64(1.0 + Float64(y_46_re * log(abs(x_46_re))))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.05e+49], t$95$2, If[LessEqual[y$46$re, -0.0275], N[(N[(0.008333333333333333 * N[Power[t$95$0, 5.0], $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], If[LessEqual[y$46$re, 3900000.0], N[(t$95$1 * N[(1.0 + N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_1 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -3.05 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -0.0275:\\
\;\;\;\;\left(0.008333333333333333 \cdot {t\_0}^{5}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3900000:\\
\;\;\;\;t\_1 \cdot \left(1 + y.re \cdot \log \left(\left|x.re\right|\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -3.04999999999999982e49 or 3.9e6 < y.re Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.3
Applied rewrites36.3%
Taylor expanded in x.re around 0
lower-pow.f6430.4
Applied rewrites30.4%
if -3.04999999999999982e49 < y.re < -0.0275000000000000001Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6424.8
Applied rewrites24.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
pow-prod-downN/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-*.f6425.0
Applied rewrites25.0%
if -0.0275000000000000001 < y.re < 3.9e6Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6436.3
Applied rewrites36.3%
Taylor expanded in y.re around 0
lower-+.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6413.9
Applied rewrites13.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(* 0.008333333333333333 (pow (* y.re (atan2 x.im x.re)) 5.0))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.im -1.32e+15)
t_0
(if (<= y.im 8e-79)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
1.0)
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (0.008333333333333333 * pow((y_46_re * atan2(x_46_im, x_46_re)), 5.0)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_im <= -1.32e+15) {
tmp = t_0;
} else if (y_46_im <= 8e-79) {
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 {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(0.008333333333333333 * (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 5.0)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_im <= -1.32e+15) tmp = t_0; elseif (y_46_im <= 8e-79) 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); 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[(N[(0.008333333333333333 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 5.0], $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]}, If[LessEqual[y$46$im, -1.32e+15], t$95$0, If[LessEqual[y$46$im, 8e-79], 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], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.008333333333333333 \cdot {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{5}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -1.32 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-79}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.32e15 or 8e-79 < y.im Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6424.8
Applied rewrites24.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
pow-prod-downN/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-*.f6425.0
Applied rewrites25.0%
if -1.32e15 < y.im < 8e-79Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
Applied rewrites13.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6419.7
Applied rewrites19.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 1.85e+117)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
1.0)
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (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 tmp;
if (y_46_re <= 1.85e+117) {
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 {
tmp = y_46_re * fma(y_46_re, (log(sqrt((x_46_im * x_46_im))) * 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) tmp = 0.0 if (y_46_re <= 1.85e+117) 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); else tmp = Float64(y_46_re * fma(y_46_re, Float64(log(sqrt(Float64(x_46_im * x_46_im))) * 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_] := If[LessEqual[y$46$re, 1.85e+117], 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], N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $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}
\mathbf{if}\;y.re \leq 1.85 \cdot 10^{+117}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\sqrt{x.im \cdot x.im}\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.8499999999999999e117Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
Applied rewrites13.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6419.7
Applied rewrites19.7%
if 1.8499999999999999e117 < y.re Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f64N/A
lift-atan2.f6417.8
Applied rewrites17.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 1.58e+35)
(* (sin (* y.re (atan2 x.im x.re))) 1.0)
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (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 tmp;
if (y_46_re <= 1.58e+35) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * 1.0;
} else {
tmp = y_46_re * fma(y_46_re, (log(sqrt((x_46_im * x_46_im))) * 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) tmp = 0.0 if (y_46_re <= 1.58e+35) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * 1.0); else tmp = Float64(y_46_re * fma(y_46_re, Float64(log(sqrt(Float64(x_46_im * x_46_im))) * 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_] := If[LessEqual[y$46$re, 1.58e+35], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $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}
\mathbf{if}\;y.re \leq 1.58 \cdot 10^{+35}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\sqrt{x.im \cdot x.im}\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.57999999999999999e35Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
Applied rewrites13.7%
if 1.57999999999999999e35 < y.re Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f64N/A
lift-atan2.f6417.8
Applied rewrites17.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 11200000.0)
(*
y.re
(fma y.re (* (log (fabs x.re)) (atan2 x.im x.re)) (atan2 x.im x.re)))
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (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 tmp;
if (y_46_re <= 11200000.0) {
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 = y_46_re * fma(y_46_re, (log(sqrt((x_46_im * x_46_im))) * 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) tmp = 0.0 if (y_46_re <= 11200000.0) 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 = Float64(y_46_re * fma(y_46_re, Float64(log(sqrt(Float64(x_46_im * x_46_im))) * 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_] := If[LessEqual[y$46$re, 11200000.0], 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], N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $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}
\mathbf{if}\;y.re \leq 11200000:\\
\;\;\;\;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}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \log \left(\sqrt{x.im \cdot x.im}\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.12e7Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f64N/A
lift-atan2.f6418.4
Applied rewrites18.4%
if 1.12e7 < y.re Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f64N/A
lift-atan2.f6417.8
Applied rewrites17.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 3.5e+42)
(*
y.re
(fma y.re (* (log (fabs x.re)) (atan2 x.im x.re)) (atan2 x.im x.re)))
(*
(* 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) {
double tmp;
if (y_46_re <= 3.5e+42) {
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 = (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));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 3.5e+42) 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 = 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 return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 3.5e+42], 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], 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}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 3.5 \cdot 10^{+42}:\\
\;\;\;\;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}:\\
\;\;\;\;\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}
\end{array}
if y.re < 3.50000000000000023e42Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f64N/A
lift-atan2.f6418.4
Applied rewrites18.4%
if 3.50000000000000023e42 < y.re Initial program 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
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.5
Applied rewrites14.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 40.9%
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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6417.9
Applied rewrites17.9%
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.5
Applied rewrites14.5%
herbie shell --seed 2025140
(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)))))