
(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 21 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 (- (log x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (* -1.0 x.re)))
(t_4 (log (fabs x.im)))
(t_5 (exp (- (* y.re t_4) t_0))))
(if (<= x.re -6e+52)
(*
(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.re -3.9e-255)
(* t_5 (sin (* y.im t_4)))
(if (<= x.re 2.1e-13)
(* t_5 (+ (sin t_2) (* y.im (* (cos t_2) t_4))))
(*
(exp (- (* -1.0 (* y.re t_1)) t_0))
(sin (fma -1.0 (* y.im t_1) t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = -log(x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log((-1.0 * x_46_re));
double t_4 = log(fabs(x_46_im));
double t_5 = exp(((y_46_re * t_4) - t_0));
double tmp;
if (x_46_re <= -6e+52) {
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_re <= -3.9e-255) {
tmp = t_5 * sin((y_46_im * t_4));
} else if (x_46_re <= 2.1e-13) {
tmp = t_5 * (sin(t_2) + (y_46_im * (cos(t_2) * t_4)));
} else {
tmp = exp(((-1.0 * (y_46_re * t_1)) - t_0)) * sin(fma(-1.0, (y_46_im * t_1), t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(-log(x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(Float64(-1.0 * x_46_re)) t_4 = log(abs(x_46_im)) t_5 = exp(Float64(Float64(y_46_re * t_4) - t_0)) tmp = 0.0 if (x_46_re <= -6e+52) 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_re <= -3.9e-255) tmp = Float64(t_5 * sin(Float64(y_46_im * t_4))); elseif (x_46_re <= 2.1e-13) tmp = Float64(t_5 * Float64(sin(t_2) + Float64(y_46_im * Float64(cos(t_2) * t_4)))); else tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_1)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_1), t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[Log[x$46$re], $MachinePrecision])}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * t$95$4), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -6e+52], 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$re, -3.9e-255], N[(t$95$5 * N[Sin[N[(y$46$im * t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.1e-13], N[(t$95$5 * N[(N[Sin[t$95$2], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$2], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := -\log x.re\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(-1 \cdot x.re\right)\\
t_4 := \log \left(\left|x.im\right|\right)\\
t_5 := e^{y.re \cdot t\_4 - t\_0}\\
\mathbf{if}\;x.re \leq -6 \cdot 10^{+52}:\\
\;\;\;\;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.re \leq -3.9 \cdot 10^{-255}:\\
\;\;\;\;t\_5 \cdot \sin \left(y.im \cdot t\_4\right)\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{-13}:\\
\;\;\;\;t\_5 \cdot \left(\sin t\_2 + y.im \cdot \left(\cos t\_2 \cdot t\_4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_1\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_1, t\_2\right)\right)\\
\end{array}
\end{array}
if x.re < -6e52Initial program 39.4%
Taylor expanded in x.re around -inf
lower-*.f6418.4
Applied rewrites18.4%
Taylor expanded in x.re around -inf
lower-*.f6434.8
Applied rewrites34.8%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6434.8
Applied rewrites34.8%
if -6e52 < x.re < -3.9000000000000001e-255Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6453.5
Applied rewrites53.5%
if -3.9000000000000001e-255 < x.re < 2.09999999999999989e-13Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.im around 0
lower-+.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-fabs.f6462.3
Applied rewrites62.3%
if 2.09999999999999989e-13 < x.re Initial program 39.4%
Taylor expanded in x.re around inf
lower-*.f64N/A
Applied rewrites32.2%
(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.re)))
(t_3 (log (* -1.0 x.re)))
(t_4 (log (fabs x.im))))
(if (<= x.re -6e+52)
(*
(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.re 2.8e-34)
(* (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_re);
double t_3 = log((-1.0 * x_46_re));
double t_4 = log(fabs(x_46_im));
double tmp;
if (x_46_re <= -6e+52) {
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_re <= 2.8e-34) {
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_re)) t_3 = log(Float64(-1.0 * x_46_re)) t_4 = log(abs(x_46_im)) tmp = 0.0 if (x_46_re <= -6e+52) 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_re <= 2.8e-34) 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$re], $MachinePrecision])}, Block[{t$95$3 = N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -6e+52], 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$re, 2.8e-34], 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.re\\
t_3 := \log \left(-1 \cdot x.re\right)\\
t_4 := \log \left(\left|x.im\right|\right)\\
\mathbf{if}\;x.re \leq -6 \cdot 10^{+52}:\\
\;\;\;\;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.re \leq 2.8 \cdot 10^{-34}:\\
\;\;\;\;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.re < -6e52Initial program 39.4%
Taylor expanded in x.re around -inf
lower-*.f6418.4
Applied rewrites18.4%
Taylor expanded in x.re around -inf
lower-*.f6434.8
Applied rewrites34.8%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6434.8
Applied rewrites34.8%
if -6e52 < x.re < 2.79999999999999997e-34Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
if 2.79999999999999997e-34 < x.re Initial program 39.4%
Taylor expanded in x.re around inf
lower-*.f64N/A
Applied rewrites32.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))))
(t_2 (* t_1 (sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re)))))
(t_3 (log (fabs x.im)))
(t_4 (sqrt (fma x.im x.im (* x.re x.re))))
(t_5 (* y.im (log t_4))))
(if (<= t_2 0.0)
(* t_1 (sin t_5))
(if (<= t_2 5e-10)
(* (pow t_4 y.re) (sin (* y.re (+ (/ t_5 y.re) (atan2 x.im x.re)))))
(*
(exp (- (* y.re t_3) (* y.im (atan2 x.im x.re))))
(sin (* y.im t_3)))))))
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 t_2 = t_1 * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double t_3 = log(fabs(x_46_im));
double t_4 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_5 = y_46_im * log(t_4);
double tmp;
if (t_2 <= 0.0) {
tmp = t_1 * sin(t_5);
} else if (t_2 <= 5e-10) {
tmp = pow(t_4, y_46_re) * sin((y_46_re * ((t_5 / y_46_re) + atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * t_3) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_3));
}
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))) t_2 = Float64(t_1 * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) t_3 = log(abs(x_46_im)) t_4 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_5 = Float64(y_46_im * log(t_4)) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(t_1 * sin(t_5)); elseif (t_2 <= 5e-10) tmp = Float64((t_4 ^ y_46_re) * sin(Float64(y_46_re * Float64(Float64(t_5 / y_46_re) + atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_3))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[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]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(y$46$im * N[Log[t$95$4], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(t$95$1 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-10], N[(N[Power[t$95$4, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[(t$95$5 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * t$95$3), $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$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := t\_1 \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_3 := \log \left(\left|x.im\right|\right)\\
t_4 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_5 := y.im \cdot \log t\_4\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_1 \cdot \sin t\_5\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-10}:\\
\;\;\;\;{t\_4}^{y.re} \cdot \sin \left(y.re \cdot \left(\frac{t\_5}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t\_3 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_3\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)))) < -0.0Initial program 39.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6434.3
Applied rewrites34.3%
if -0.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)))) < 5.00000000000000031e-10Initial program 39.4%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6429.7
Applied rewrites29.7%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f64N/A
lift-atan2.f6429.4
Applied rewrites29.4%
if 5.00000000000000031e-10 < (*.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.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6453.5
Applied rewrites53.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(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)))))
(if (<= (* t_2 (sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re)))) 1e-105)
(* t_2 (sin (* y.im (log (sqrt (fma x.im x.im (* x.re x.re)))))))
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_0 (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(fabs(x_46_im));
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 tmp;
if ((t_2 * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)))) <= 1e-105) {
tmp = t_2 * sin((y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))))));
} else {
tmp = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_0, (y_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_im)) 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))) tmp = 0.0 if (Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) <= 1e-105) tmp = Float64(t_2 * sin(Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))))); else 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, Float64(y_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$im], $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]}, If[LessEqual[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], 1e-105], N[(t$95$2 * N[Sin[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]), $MachinePrecision], 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 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
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}\\
\mathbf{if}\;t\_2 \cdot \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \leq 10^{-105}:\\
\;\;\;\;t\_2 \cdot \sin \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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)))) < 9.99999999999999965e-106Initial program 39.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6434.3
Applied rewrites34.3%
if 9.99999999999999965e-106 < (*.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.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(t_1
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (* y.im t_0))))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (sin (+ (* t_2 y.im) (* (atan2 x.im x.re) y.re))))
(t_4 (* (exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im))) t_3))
(t_5 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= t_4 -2e-116)
(* (pow t_5 y.re) (sin (* y.im (log t_5))))
(if (<= t_4 0.0)
t_1
(if (<= t_4 5e-10) (* (pow (fabs x.im) y.re) t_3) 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_im));
double t_1 = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_0));
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = sin(((t_2 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double t_4 = exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
double t_5 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (t_4 <= -2e-116) {
tmp = pow(t_5, y_46_re) * sin((y_46_im * log(t_5)));
} else if (t_4 <= 0.0) {
tmp = t_1;
} else if (t_4 <= 5e-10) {
tmp = pow(fabs(x_46_im), y_46_re) * t_3;
} 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_im)) t_1 = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_0))) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = sin(Float64(Float64(t_2 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))) t_4 = Float64(exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3) t_5 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (t_4 <= -2e-116) tmp = Float64((t_5 ^ y_46_re) * sin(Float64(y_46_im * log(t_5)))); elseif (t_4 <= 0.0) tmp = t_1; elseif (t_4 <= 5e-10) tmp = Float64((abs(x_46_im) ^ y_46_re) * t_3); 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$3 = N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = 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] * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, -2e-116], N[(N[Power[t$95$5, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[t$95$5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$1, If[LessEqual[t$95$4, 5e-10], N[(N[Power[N[Abs[x$46$im], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$3), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
t_1 := e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := \sin \left(t\_2 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_4 := e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3\\
t_5 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{-116}:\\
\;\;\;\;{t\_5}^{y.re} \cdot \sin \left(y.im \cdot \log t\_5\right)\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{-10}:\\
\;\;\;\;{\left(\left|x.im\right|\right)}^{y.re} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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)))) < -2e-116Initial program 39.4%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6429.7
Applied rewrites29.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6424.6
Applied rewrites24.6%
if -2e-116 < (*.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)))) < -0.0 or 5.00000000000000031e-10 < (*.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.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6453.5
Applied rewrites53.5%
if -0.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)))) < 5.00000000000000031e-10Initial program 39.4%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6429.7
Applied rewrites29.7%
Taylor expanded in x.re around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6425.2
Applied rewrites25.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -6.4e+52)
(* (sin t_1) (pow (sqrt (* x.re x.re)) y.re))
(if (<= x.re 2.4e-24)
(* (exp (- (* y.re t_0) (* y.im (atan2 x.im x.re)))) (sin (* y.im t_0)))
(*
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
(sin (fma -1.0 (* y.im (- (log x.re))) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(fabs(x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6.4e+52) {
tmp = sin(t_1) * pow(sqrt((x_46_re * x_46_re)), y_46_re);
} else if (x_46_re <= 2.4e-24) {
tmp = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_0));
} else {
tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(fma(-1.0, (y_46_im * -log(x_46_re)), t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(abs(x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -6.4e+52) tmp = Float64(sin(t_1) * (sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re)); elseif (x_46_re <= 2.4e-24) tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_0))); else tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(fma(-1.0, Float64(y_46_im * Float64(-log(x_46_re))), 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.4e+52], N[(N[Sin[t$95$1], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.4e-24], 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), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[Sin[N[(-1.0 * N[(y$46$im * (-N[Log[x$46$re], $MachinePrecision])), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6.4 \cdot 10^{+52}:\\
\;\;\;\;\sin t\_1 \cdot {\left(\sqrt{x.re \cdot x.re}\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot \left(-\log x.re\right), t\_1\right)\right)\\
\end{array}
\end{array}
if x.re < -6.4e52Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.1
Applied rewrites37.1%
if -6.4e52 < x.re < 2.3999999999999998e-24Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6453.5
Applied rewrites53.5%
if 2.3999999999999998e-24 < x.re Initial program 39.4%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6429.7
Applied rewrites29.7%
Taylor expanded in x.re around inf
lower-fma.f64N/A
lower-*.f64N/A
log-recN/A
lower-neg.f64N/A
lower-log.f64N/A
lift-atan2.f64N/A
lift-*.f6424.8
Applied rewrites24.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(t_1
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (* y.im t_0)))))
(if (<= y.im -1.2e-55)
t_1
(if (<= y.im 9.4e-169)
(*
(pow (fabs x.im) 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_im));
double t_1 = exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -1.2e-55) {
tmp = t_1;
} else if (y_46_im <= 9.4e-169) {
tmp = pow(fabs(x_46_im), 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_im)) t_1 = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * t_0))) tmp = 0.0 if (y_46_im <= -1.2e-55) tmp = t_1; elseif (y_46_im <= 9.4e-169) tmp = Float64((abs(x_46_im) ^ 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e-55], t$95$1, If[LessEqual[y$46$im, 9.4e-169], N[(N[Power[N[Abs[x$46$im], $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.im\right|\right)\\
t_1 := e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 9.4 \cdot 10^{-169}:\\
\;\;\;\;{\left(\left|x.im\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 < -1.19999999999999996e-55 or 9.39999999999999981e-169 < y.im Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6453.5
Applied rewrites53.5%
if -1.19999999999999996e-55 < y.im < 9.39999999999999981e-169Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
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.f6443.2
Applied rewrites43.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (- (* y.im (atan2 x.im x.re)))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.re -1.85)
t_2
(if (<= y.re -8e-110)
(* t_0 t_1)
(if (<= y.re 0.0075) (* t_0 (sin (* y.im (log (fabs x.im))))) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(-(y_46_im * atan2(x_46_im, x_46_re)));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -1.85) {
tmp = t_2;
} else if (y_46_re <= -8e-110) {
tmp = t_0 * t_1;
} else if (y_46_re <= 0.0075) {
tmp = t_0 * sin((y_46_im * log(fabs(x_46_im))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.85) tmp = t_2; elseif (y_46_re <= -8e-110) tmp = Float64(t_0 * t_1); elseif (y_46_re <= 0.0075) tmp = Float64(t_0 * sin(Float64(y_46_im * log(abs(x_46_im))))); 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[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[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, -1.85], t$95$2, If[LessEqual[y$46$re, -8e-110], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.0075], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.85:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -8 \cdot 10^{-110}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 0.0075:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\left|x.im\right|\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.8500000000000001 or 0.0074999999999999997 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
if -1.8500000000000001 < y.re < -8.0000000000000004e-110Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
if -8.0000000000000004e-110 < y.re < 0.0074999999999999997Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
(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))))
(if (<= y.re -1.4e-8)
t_0
(if (<= y.re 0.0075)
(*
(exp (- (* y.im (atan2 x.im x.re))))
(sin (* y.im (log (fabs x.im)))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (y_46_re <= -1.4e-8) {
tmp = t_0;
} else if (y_46_re <= 0.0075) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(fabs(x_46_im))));
} else {
tmp = t_0;
}
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)) tmp = 0.0 if (y_46_re <= -1.4e-8) tmp = t_0; elseif (y_46_re <= 0.0075) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(abs(x_46_im))))); 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[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]}, If[LessEqual[y$46$re, -1.4e-8], t$95$0, If[LessEqual[y$46$re, 0.0075], 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[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\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}\\
\mathbf{if}\;y.re \leq -1.4 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 0.0075:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log \left(\left|x.im\right|\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.4e-8 or 0.0074999999999999997 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
if -1.4e-8 < y.re < 0.0074999999999999997Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (pow x.im y.re))))
(if (<= y.re -3e+202)
t_2
(if (<= y.re -0.0132)
(* t_1 (pow (sqrt (* x.re x.re)) y.re))
(if (<= y.re 0.0075)
(* (exp (- (* y.im (atan2 x.im x.re)))) (sin (* y.im t_0)))
(if (<= y.re 7e+230)
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_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -3e+202) {
tmp = t_2;
} else if (y_46_re <= -0.0132) {
tmp = t_1 * pow(sqrt((x_46_re * x_46_re)), y_46_re);
} else if (y_46_re <= 0.0075) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * t_0));
} else if (y_46_re <= 7e+230) {
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_im)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3e+202) tmp = t_2; elseif (y_46_re <= -0.0132) tmp = Float64(t_1 * (sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re)); elseif (y_46_re <= 0.0075) 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 <= 7e+230) 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3e+202], t$95$2, If[LessEqual[y$46$re, -0.0132], N[(t$95$1 * N[Power[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0075], 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, 7e+230], 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.im\right|\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -3 \cdot 10^{+202}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -0.0132:\\
\;\;\;\;t\_1 \cdot {\left(\sqrt{x.re \cdot x.re}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 0.0075:\\
\;\;\;\;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 7 \cdot 10^{+230}:\\
\;\;\;\;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 < -3.0000000000000001e202 or 0.0074999999999999997 < y.re < 7.0000000000000001e230Initial program 39.4%
Taylor expanded in x.im around inf
lower-*.f64N/A
Applied rewrites30.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-pow.f6430.1
Applied rewrites30.1%
if -3.0000000000000001e202 < y.re < -0.0132Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.1
Applied rewrites37.1%
if -0.0132 < y.re < 0.0074999999999999997Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
if 7.0000000000000001e230 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6419.2
Applied rewrites19.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (pow x.im y.re)))
(t_3 (* t_0 (atan2 x.im x.re))))
(if (<= y.re -3e+202)
t_2
(if (<= y.re -5000000.0)
(* t_1 (pow (- x.re) y.re))
(if (<= y.re -7.5e-85)
(*
y.re
(fma
y.re
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))
(atan2 x.im x.re)))
(if (<= y.re 1.12e-169)
(* y.im (+ t_0 (* -1.0 (* y.im t_3))))
(if (<= y.re 3.8e+33)
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (atan2 x.im x.re))
(atan2 x.im x.re)))
(if (<= y.re 7e+230)
t_2
(* y.re (fma y.re t_3 (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_im));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * pow(x_46_im, y_46_re);
double t_3 = t_0 * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3e+202) {
tmp = t_2;
} else if (y_46_re <= -5000000.0) {
tmp = t_1 * pow(-x_46_re, y_46_re);
} else if (y_46_re <= -7.5e-85) {
tmp = y_46_re * fma(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)), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.12e-169) {
tmp = y_46_im * (t_0 + (-1.0 * (y_46_im * t_3)));
} else if (y_46_re <= 3.8e+33) {
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));
} else if (y_46_re <= 7e+230) {
tmp = t_2;
} else {
tmp = y_46_re * fma(y_46_re, t_3, 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_im)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * (x_46_im ^ y_46_re)) t_3 = Float64(t_0 * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -3e+202) tmp = t_2; elseif (y_46_re <= -5000000.0) tmp = Float64(t_1 * (Float64(-x_46_re) ^ y_46_re)); elseif (y_46_re <= -7.5e-85) tmp = Float64(y_46_re * fma(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)), atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.12e-169) tmp = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * t_3)))); elseif (y_46_re <= 3.8e+33) 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))); elseif (y_46_re <= 7e+230) tmp = t_2; else tmp = Float64(y_46_re * fma(y_46_re, t_3, 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3e+202], t$95$2, If[LessEqual[y$46$re, -5000000.0], N[(t$95$1 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -7.5e-85], 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] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.12e-169], N[(y$46$im * N[(t$95$0 + N[(-1.0 * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8e+33], 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], If[LessEqual[y$46$re, 7e+230], t$95$2, N[(y$46$re * N[(y$46$re * t$95$3 + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t\_1 \cdot {x.im}^{y.re}\\
t_3 := t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3 \cdot 10^{+202}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -5000000:\\
\;\;\;\;t\_1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -7.5 \cdot 10^{-85}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \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}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;y.im \cdot \left(t\_0 + -1 \cdot \left(y.im \cdot t\_3\right)\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+33}:\\
\;\;\;\;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)\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{+230}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_3, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -3.0000000000000001e202 or 3.80000000000000002e33 < y.re < 7.0000000000000001e230Initial program 39.4%
Taylor expanded in x.im around inf
lower-*.f64N/A
Applied rewrites30.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-pow.f6430.1
Applied rewrites30.1%
if -3.0000000000000001e202 < y.re < -5e6Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6420.2
Applied rewrites20.2%
Taylor expanded in x.re around 0
lower-pow.f64N/A
lower-neg.f6432.7
Applied rewrites32.7%
if -5e6 < y.re < -7.5000000000000003e-85Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
if -7.5000000000000003e-85 < y.re < 1.11999999999999998e-169Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
if 1.11999999999999998e-169 < y.re < 3.80000000000000002e33Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
lower-*.f6418.9
Applied rewrites18.9%
if 7.0000000000000001e230 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6419.2
Applied rewrites19.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 (* t_0 (pow (sqrt (* x.re x.re)) y.re))))
(if (<= x.re -1.9e+15)
t_1
(if (<= x.re 5.3e+16) (* t_0 (pow (fabs x.im) y.re)) 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 = t_0 * pow(sqrt((x_46_re * x_46_re)), y_46_re);
double tmp;
if (x_46_re <= -1.9e+15) {
tmp = t_1;
} else if (x_46_re <= 5.3e+16) {
tmp = t_0 * pow(fabs(x_46_im), y_46_re);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
t_1 = t_0 * (sqrt((x_46re * x_46re)) ** y_46re)
if (x_46re <= (-1.9d+15)) then
tmp = t_1
else if (x_46re <= 5.3d+16) then
tmp = t_0 * (abs(x_46im) ** y_46re)
else
tmp = t_1
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 t_1 = t_0 * Math.pow(Math.sqrt((x_46_re * x_46_re)), y_46_re);
double tmp;
if (x_46_re <= -1.9e+15) {
tmp = t_1;
} else if (x_46_re <= 5.3e+16) {
tmp = t_0 * Math.pow(Math.abs(x_46_im), y_46_re);
} else {
tmp = t_1;
}
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))) t_1 = t_0 * math.pow(math.sqrt((x_46_re * x_46_re)), y_46_re) tmp = 0 if x_46_re <= -1.9e+15: tmp = t_1 elif x_46_re <= 5.3e+16: tmp = t_0 * math.pow(math.fabs(x_46_im), y_46_re) else: tmp = 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 = Float64(t_0 * (sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re)) tmp = 0.0 if (x_46_re <= -1.9e+15) tmp = t_1; elseif (x_46_re <= 5.3e+16) tmp = Float64(t_0 * (abs(x_46_im) ^ y_46_re)); else tmp = t_1; 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))); t_1 = t_0 * (sqrt((x_46_re * x_46_re)) ^ y_46_re); tmp = 0.0; if (x_46_re <= -1.9e+15) tmp = t_1; elseif (x_46_re <= 5.3e+16) tmp = t_0 * (abs(x_46_im) ^ y_46_re); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.9e+15], t$95$1, If[LessEqual[x$46$re, 5.3e+16], N[(t$95$0 * N[Power[N[Abs[x$46$im], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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(\sqrt{x.re \cdot x.re}\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -1.9 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x.re \leq 5.3 \cdot 10^{+16}:\\
\;\;\;\;t\_0 \cdot {\left(\left|x.im\right|\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x.re < -1.9e15 or 5.3e16 < x.re Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lift-*.f6437.1
Applied rewrites37.1%
if -1.9e15 < x.re < 5.3e16Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6436.7
Applied rewrites36.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
(t_1 (log (fabs x.im)))
(t_2 (* t_1 (atan2 x.im x.re))))
(if (<= y.re -1700000000.0)
t_0
(if (<= y.re -7.5e-85)
(*
y.re
(fma
y.re
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))
(atan2 x.im x.re)))
(if (<= y.re 1.12e-169)
(* y.im (+ t_1 (* -1.0 (* y.im t_2))))
(if (<= y.re 3.8e+33)
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (atan2 x.im x.re))
(atan2 x.im x.re)))
(if (<= y.re 7e+230)
t_0
(* y.re (fma y.re t_2 (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(x_46_im, y_46_re);
double t_1 = log(fabs(x_46_im));
double t_2 = t_1 * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -1700000000.0) {
tmp = t_0;
} else if (y_46_re <= -7.5e-85) {
tmp = y_46_re * fma(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)), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.12e-169) {
tmp = y_46_im * (t_1 + (-1.0 * (y_46_im * t_2)));
} else if (y_46_re <= 3.8e+33) {
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));
} else if (y_46_re <= 7e+230) {
tmp = t_0;
} else {
tmp = y_46_re * fma(y_46_re, t_2, 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))) * (x_46_im ^ y_46_re)) t_1 = log(abs(x_46_im)) t_2 = Float64(t_1 * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -1700000000.0) tmp = t_0; elseif (y_46_re <= -7.5e-85) tmp = Float64(y_46_re * fma(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)), atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.12e-169) tmp = Float64(y_46_im * Float64(t_1 + Float64(-1.0 * Float64(y_46_im * t_2)))); elseif (y_46_re <= 3.8e+33) 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))); elseif (y_46_re <= 7e+230) tmp = t_0; else tmp = Float64(y_46_re * fma(y_46_re, t_2, 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[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1700000000.0], t$95$0, If[LessEqual[y$46$re, -7.5e-85], 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] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.12e-169], N[(y$46$im * N[(t$95$1 + N[(-1.0 * N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8e+33], 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], If[LessEqual[y$46$re, 7e+230], t$95$0, N[(y$46$re * N[(y$46$re * t$95$2 + 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 {x.im}^{y.re}\\
t_1 := \log \left(\left|x.im\right|\right)\\
t_2 := t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1700000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -7.5 \cdot 10^{-85}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, \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}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;y.im \cdot \left(t\_1 + -1 \cdot \left(y.im \cdot t\_2\right)\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+33}:\\
\;\;\;\;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)\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{+230}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_2, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.7e9 or 3.80000000000000002e33 < y.re < 7.0000000000000001e230Initial program 39.4%
Taylor expanded in x.im around inf
lower-*.f64N/A
Applied rewrites30.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-pow.f6430.1
Applied rewrites30.1%
if -1.7e9 < y.re < -7.5000000000000003e-85Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
if -7.5000000000000003e-85 < y.re < 1.11999999999999998e-169Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
if 1.11999999999999998e-169 < y.re < 3.80000000000000002e33Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
lower-*.f6418.9
Applied rewrites18.9%
if 7.0000000000000001e230 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6419.2
Applied rewrites19.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -2.4e-48)
(* t_0 (pow (fabs x.im) y.re))
(if (<= x.im 9e-29)
(* t_0 (pow (- x.re) y.re))
(* (exp (- (* y.im (atan2 x.im x.re)))) (sin (* y.im (log x.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.4e-48) {
tmp = t_0 * pow(fabs(x_46_im), y_46_re);
} else if (x_46_im <= 9e-29) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im)));
}
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_46im <= (-2.4d-48)) then
tmp = t_0 * (abs(x_46im) ** y_46re)
else if (x_46im <= 9d-29) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * sin((y_46im * log(x_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.4e-48) {
tmp = t_0 * Math.pow(Math.abs(x_46_im), y_46_re);
} else if (x_46_im <= 9e-29) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -2.4e-48: tmp = t_0 * math.pow(math.fabs(x_46_im), y_46_re) elif x_46_im <= 9e-29: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -2.4e-48) tmp = Float64(t_0 * (abs(x_46_im) ^ y_46_re)); elseif (x_46_im <= 9e-29) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -2.4e-48) tmp = t_0 * (abs(x_46_im) ^ y_46_re); elseif (x_46_im <= 9e-29) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im))); 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$im, -2.4e-48], N[(t$95$0 * N[Power[N[Abs[x$46$im], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 9e-29], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], 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[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;t\_0 \cdot {\left(\left|x.im\right|\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 9 \cdot 10^{-29}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -2.4e-48Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6436.7
Applied rewrites36.7%
if -2.4e-48 < x.im < 8.9999999999999996e-29Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6420.2
Applied rewrites20.2%
Taylor expanded in x.re around 0
lower-pow.f64N/A
lower-neg.f6432.7
Applied rewrites32.7%
if 8.9999999999999996e-29 < x.im Initial program 39.4%
Taylor expanded in x.im around inf
lower-*.f64N/A
Applied rewrites30.5%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-log.f6417.9
Applied rewrites17.9%
(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.9e+15)
(* t_0 (pow (- x.re) y.re))
(if (<= x.re 2.3e+228)
(* t_0 (pow (fabs x.im) y.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 t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1.9e+15) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else if (x_46_re <= 2.3e+228) {
tmp = t_0 * pow(fabs(x_46_im), y_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) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -1.9e+15) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); elseif (x_46_re <= 2.3e+228) tmp = Float64(t_0 * (abs(x_46_im) ^ y_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_] := 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.9e+15], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e+228], N[(t$95$0 * N[Power[N[Abs[x$46$im], $MachinePrecision], y$46$re], $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}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1.9 \cdot 10^{+15}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{+228}:\\
\;\;\;\;t\_0 \cdot {\left(\left|x.im\right|\right)}^{y.re}\\
\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 x.re < -1.9e15Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around -inf
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6420.2
Applied rewrites20.2%
Taylor expanded in x.re around 0
lower-pow.f64N/A
lower-neg.f6432.7
Applied rewrites32.7%
if -1.9e15 < x.re < 2.30000000000000013e228Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in x.re around 0
lower-pow.f64N/A
pow2N/A
rem-sqrt-squareN/A
lower-fabs.f6436.7
Applied rewrites36.7%
if 2.30000000000000013e228 < x.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
lower-*.f6418.9
Applied rewrites18.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im))))
(if (<= y.re -9.2e-110)
(*
(*
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.12e-169)
(* y.im (+ t_0 (* -1.0 (* y.im (* t_0 (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 t_0 = log(fabs(x_46_im));
double tmp;
if (y_46_re <= -9.2e-110) {
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.12e-169) {
tmp = y_46_im * (t_0 + (-1.0 * (y_46_im * (t_0 * 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) t_0 = log(abs(x_46_im)) tmp = 0.0 if (y_46_re <= -9.2e-110) 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.12e-169) tmp = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * Float64(t_0 * 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_] := Block[{t$95$0 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9.2e-110], 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.12e-169], 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], 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}
t_0 := \log \left(\left|x.im\right|\right)\\
\mathbf{if}\;y.re \leq -9.2 \cdot 10^{-110}:\\
\;\;\;\;\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.12 \cdot 10^{-169}:\\
\;\;\;\;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{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 < -9.2000000000000006e-110Initial program 39.4%
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.8
Applied rewrites43.8%
Taylor expanded in y.re around 0
Applied rewrites13.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6419.3
Applied rewrites19.3%
if -9.2000000000000006e-110 < y.re < 1.11999999999999998e-169Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
if 1.11999999999999998e-169 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
lower-*.f6418.9
Applied rewrites18.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im)))
(t_1
(*
y.re
(fma
y.re
(* (log (sqrt (* x.im x.im))) (atan2 x.im x.re))
(atan2 x.im x.re)))))
(if (<= y.re -7.5e-85)
t_1
(if (<= y.re 1.12e-169)
(* y.im (+ t_0 (* -1.0 (* y.im (* t_0 (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_im));
double t_1 = 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));
double tmp;
if (y_46_re <= -7.5e-85) {
tmp = t_1;
} else if (y_46_re <= 1.12e-169) {
tmp = y_46_im * (t_0 + (-1.0 * (y_46_im * (t_0 * 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_im)) t_1 = 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))) tmp = 0.0 if (y_46_re <= -7.5e-85) tmp = t_1; elseif (y_46_re <= 1.12e-169) tmp = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * Float64(t_0 * 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$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[y$46$re, -7.5e-85], t$95$1, If[LessEqual[y$46$re, 1.12e-169], 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], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
t_1 := 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)\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;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{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -7.5000000000000003e-85 or 1.11999999999999998e-169 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
lower-*.f6418.9
Applied rewrites18.9%
if -7.5000000000000003e-85 < y.re < 1.11999999999999998e-169Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
(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)))))
(t_1 (log (fabs x.im)))
(t_2 (* t_1 (atan2 x.im x.re))))
(if (<= y.im -2.06e+21)
t_0
(if (<= y.im -5.8e-92)
(* y.im (+ t_1 (* -1.0 (* y.im t_2))))
(if (<= y.im 33000000000.0)
(* y.re (fma y.re t_2 (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 t_1 = log(fabs(x_46_im));
double t_2 = t_1 * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.06e+21) {
tmp = t_0;
} else if (y_46_im <= -5.8e-92) {
tmp = y_46_im * (t_1 + (-1.0 * (y_46_im * t_2)));
} else if (y_46_im <= 33000000000.0) {
tmp = y_46_re * fma(y_46_re, t_2, 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)))) t_1 = log(abs(x_46_im)) t_2 = Float64(t_1 * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.06e+21) tmp = t_0; elseif (y_46_im <= -5.8e-92) tmp = Float64(y_46_im * Float64(t_1 + Float64(-1.0 * Float64(y_46_im * t_2)))); elseif (y_46_im <= 33000000000.0) tmp = Float64(y_46_re * fma(y_46_re, t_2, 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]}, Block[{t$95$1 = N[Log[N[Abs[x$46$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.06e+21], t$95$0, If[LessEqual[y$46$im, -5.8e-92], N[(y$46$im * N[(t$95$1 + N[(-1.0 * N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 33000000000.0], N[(y$46$re * N[(y$46$re * t$95$2 + 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)\\
t_1 := \log \left(\left|x.im\right|\right)\\
t_2 := t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.06 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -5.8 \cdot 10^{-92}:\\
\;\;\;\;y.im \cdot \left(t\_1 + -1 \cdot \left(y.im \cdot t\_2\right)\right)\\
\mathbf{elif}\;y.im \leq 33000000000:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, t\_2, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -2.06e21 or 3.3e10 < y.im Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
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-*.f6416.1
Applied rewrites16.1%
if -2.06e21 < y.im < -5.79999999999999969e-92Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
if -5.79999999999999969e-92 < y.im < 3.3e10Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around 0
pow2N/A
rem-sqrt-square-revN/A
lift-fabs.f6419.2
Applied rewrites19.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (fabs x.im))))
(if (<= y.re 1.3e-266)
(* y.im (+ t_0 (* -1.0 (* y.im (* t_0 (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 t_0 = log(fabs(x_46_im));
double tmp;
if (y_46_re <= 1.3e-266) {
tmp = y_46_im * (t_0 + (-1.0 * (y_46_im * (t_0 * 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) t_0 = log(abs(x_46_im)) tmp = 0.0 if (y_46_re <= 1.3e-266) tmp = Float64(y_46_im * Float64(t_0 + Float64(-1.0 * Float64(y_46_im * Float64(t_0 * atan(x_46_im, x_46_re)))))); else tmp = 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 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$im], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 1.3e-266], 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], 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}
\\
\begin{array}{l}
t_0 := \log \left(\left|x.im\right|\right)\\
\mathbf{if}\;y.re \leq 1.3 \cdot 10^{-266}:\\
\;\;\;\;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{else}:\\
\;\;\;\;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}
\end{array}
if y.re < 1.3e-266Initial program 39.4%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
Applied rewrites62.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-sin.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-+.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lower-*.f64N/A
rem-sqrt-square-revN/A
pow2N/A
lower-*.f64N/A
pow2N/A
rem-sqrt-square-revN/A
lower-*.f64N/A
lift-log.f64N/A
lift-fabs.f64N/A
lift-atan2.f6414.6
Applied rewrites14.6%
if 1.3e-266 < y.re Initial program 39.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
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-*.f6416.1
Applied rewrites16.1%
(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.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
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-*.f6416.1
Applied rewrites16.1%
(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.4%
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.8
Applied rewrites43.8%
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-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
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-*.f6415.0
Applied rewrites15.0%
herbie shell --seed 2025135
(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)))))