
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_3 (log (fabs x.re))))
(if (<= y.re -0.13)
(* t_2 t_1)
(if (<= y.re 3.2e+82)
(*
(exp (- (* y.re t_3) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_3 t_0)))
(* t_2 (+ t_1 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = log(fabs(x_46_re));
double tmp;
if (y_46_re <= -0.13) {
tmp = t_2 * t_1;
} else if (y_46_re <= 3.2e+82) {
tmp = exp(((y_46_re * t_3) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_3, t_0));
} else {
tmp = t_2 * (t_1 + (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = log(abs(x_46_re)) tmp = 0.0 if (y_46_re <= -0.13) tmp = Float64(t_2 * t_1); elseif (y_46_re <= 3.2e+82) tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_3, t_0))); else tmp = Float64(t_2 * Float64(t_1 + Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.13], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.2e+82], 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 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(t$95$1 + N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;y.re \leq -0.13:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{+82}:\\
\;\;\;\;e^{y.re \cdot t\_3 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_3, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 + y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\end{array}
\end{array}
if y.re < -0.13Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
if -0.13 < y.re < 3.19999999999999975e82Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
if 3.19999999999999975e82 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (* -1.0 x.im)))
(t_3 (log (fabs x.re))))
(if (<= x.im -1.05e+38)
(*
(exp (- (* t_2 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_2 y.im (* (atan2 x.im x.re) y.re))))
(if (<= x.im 0.0065)
(* (exp (- (* y.re t_3) t_0)) (sin (fma y.im t_3 t_1)))
(*
(exp (- (* y.re (log x.im)) t_0))
(sin (fma y.im (log x.im) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 * x_46_im));
double t_3 = log(fabs(x_46_re));
double tmp;
if (x_46_im <= -1.05e+38) {
tmp = exp(((t_2 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_2, y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 0.0065) {
tmp = exp(((y_46_re * t_3) - t_0)) * sin(fma(y_46_im, t_3, t_1));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * sin(fma(y_46_im, log(x_46_im), t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 * x_46_im)) t_3 = log(abs(x_46_re)) tmp = 0.0 if (x_46_im <= -1.05e+38) tmp = Float64(exp(Float64(Float64(t_2 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_2, y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 0.0065) tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - t_0)) * sin(fma(y_46_im, t_3, t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * sin(fma(y_46_im, log(x_46_im), t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.05e+38], N[(N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 * y$46$im + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 0.0065], N[(N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$3 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(-1 \cdot x.im\right)\\
t_3 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;x.im \leq -1.05 \cdot 10^{+38}:\\
\;\;\;\;e^{t\_2 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\\
\mathbf{elif}\;x.im \leq 0.0065:\\
\;\;\;\;e^{y.re \cdot t\_3 - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_3, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -1.05e38Initial program 40.9%
Taylor expanded in x.im around -inf
lower-*.f6418.3
Applied rewrites18.3%
Taylor expanded in x.im around -inf
lower-*.f6431.5
Applied rewrites31.5%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6431.4
Applied rewrites31.4%
if -1.05e38 < x.im < 0.0064999999999999997Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
if 0.0064999999999999997 < x.im Initial program 40.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6431.5
Applied rewrites31.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (fabs x.re))))
(if (<= y.re -0.13)
(* t_1 (sin t_0))
(if (<= y.re 1.8e+65)
(*
(exp (- (* y.re t_2) (* y.im (atan2 x.im x.re))))
(sin (fma y.im t_2 t_0)))
(* t_1 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(fabs(x_46_re));
double tmp;
if (y_46_re <= -0.13) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 1.8e+65) {
tmp = exp(((y_46_re * t_2) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0));
} else {
tmp = t_1 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(abs(x_46_re)) tmp = 0.0 if (y_46_re <= -0.13) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 1.8e+65) tmp = Float64(exp(Float64(Float64(y_46_re * t_2) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, t_2, t_0))); else tmp = Float64(t_1 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.13], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.8e+65], N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$2 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\left|x.re\right|\right)\\
\mathbf{if}\;y.re \leq -0.13:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+65}:\\
\;\;\;\;e^{y.re \cdot t\_2 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, t\_2, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\end{array}
\end{array}
if y.re < -0.13Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
if -0.13 < y.re < 1.79999999999999989e65Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
if 1.79999999999999989e65 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_3 (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= y.re -2.2e-78)
(* t_2 t_1)
(if (<= y.re 1.45e-277)
(* t_2 (fma y.im t_3 t_0))
(if (<= y.re 3.05)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_1)
(* t_2 (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double tmp;
if (y_46_re <= -2.2e-78) {
tmp = t_2 * t_1;
} else if (y_46_re <= 1.45e-277) {
tmp = t_2 * fma(y_46_im, t_3, t_0);
} else if (y_46_re <= 3.05) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_1;
} else {
tmp = t_2 * (y_46_im * t_3);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) tmp = 0.0 if (y_46_re <= -2.2e-78) tmp = Float64(t_2 * t_1); elseif (y_46_re <= 1.45e-277) tmp = Float64(t_2 * fma(y_46_im, t_3, t_0)); elseif (y_46_re <= 3.05) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_1); else tmp = Float64(t_2 * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e-78], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.45e-277], N[(t$95$2 * N[(y$46$im * t$95$3 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.05], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$2 * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-277}:\\
\;\;\;\;t\_2 \cdot \mathsf{fma}\left(y.im, t\_3, t\_0\right)\\
\mathbf{elif}\;y.re \leq 3.05:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot t\_3\right)\\
\end{array}
\end{array}
if y.re < -2.1999999999999999e-78Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
if -2.1999999999999999e-78 < y.re < 1.44999999999999989e-277Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-fma.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-*.f6447.8
Applied rewrites47.8%
if 1.44999999999999989e-277 < y.re < 3.0499999999999998Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6440.0
Applied rewrites40.0%
if 3.0499999999999998 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (sqrt (fma x.im x.im (* x.re x.re))))
(t_4 (log t_3)))
(if (<= y.re -7.2e-76)
(* t_2 (pow t_3 y.re))
(if (<= y.re 1.45e-277)
(* t_0 (fma y.im t_4 t_1))
(if (<= y.re 3.05)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_2)
(* t_0 (* y.im t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_4 = log(t_3);
double tmp;
if (y_46_re <= -7.2e-76) {
tmp = t_2 * pow(t_3, y_46_re);
} else if (y_46_re <= 1.45e-277) {
tmp = t_0 * fma(y_46_im, t_4, t_1);
} else if (y_46_re <= 3.05) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_2;
} else {
tmp = t_0 * (y_46_im * t_4);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_4 = log(t_3) tmp = 0.0 if (y_46_re <= -7.2e-76) tmp = Float64(t_2 * (t_3 ^ y_46_re)); elseif (y_46_re <= 1.45e-277) tmp = Float64(t_0 * fma(y_46_im, t_4, t_1)); elseif (y_46_re <= 3.05) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_2); else tmp = Float64(t_0 * Float64(y_46_im * t_4)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[t$95$3], $MachinePrecision]}, If[LessEqual[y$46$re, -7.2e-76], N[(t$95$2 * N[Power[t$95$3, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.45e-277], N[(t$95$0 * N[(y$46$im * t$95$4 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.05], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$2), $MachinePrecision], N[(t$95$0 * N[(y$46$im * t$95$4), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_4 := \log t\_3\\
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{-76}:\\
\;\;\;\;t\_2 \cdot {t\_3}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-277}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(y.im, t\_4, t\_1\right)\\
\mathbf{elif}\;y.re \leq 3.05:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot t\_4\right)\\
\end{array}
\end{array}
if y.re < -7.2000000000000001e-76Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
if -7.2000000000000001e-76 < y.re < 1.44999999999999989e-277Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-fma.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-atan2.f64N/A
lift-*.f6447.8
Applied rewrites47.8%
if 1.44999999999999989e-277 < y.re < 3.0499999999999998Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6440.0
Applied rewrites40.0%
if 3.0499999999999998 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
(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 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3 (* y.im (log t_2))))
(if (<= y.re -6.5e-69)
(* t_1 (pow t_2 y.re))
(if (<= y.re 1.08e-277)
(* t_0 (sin t_3))
(if (<= y.re 3.05)
(* t_0 t_1)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) 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 = 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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = y_46_im * log(t_2);
double tmp;
if (y_46_re <= -6.5e-69) {
tmp = t_1 * pow(t_2, y_46_re);
} else if (y_46_re <= 1.08e-277) {
tmp = t_0 * sin(t_3);
} else if (y_46_re <= 3.05) {
tmp = t_0 * t_1;
} else {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
}
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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(y_46_im * log(t_2)) tmp = 0.0 if (y_46_re <= -6.5e-69) tmp = Float64(t_1 * (t_2 ^ y_46_re)); elseif (y_46_re <= 1.08e-277) tmp = Float64(t_0 * sin(t_3)); elseif (y_46_re <= 3.05) tmp = Float64(t_0 * t_1); else tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3); 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[t$95$2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.5e-69], N[(t$95$1 * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.08e-277], N[(t$95$0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.05], N[(t$95$0 * t$95$1), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]
\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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := y.im \cdot \log t\_2\\
\mathbf{if}\;y.re \leq -6.5 \cdot 10^{-69}:\\
\;\;\;\;t\_1 \cdot {t\_2}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.08 \cdot 10^{-277}:\\
\;\;\;\;t\_0 \cdot \sin t\_3\\
\mathbf{elif}\;y.re \leq 3.05:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3\\
\end{array}
\end{array}
if y.re < -6.49999999999999951e-69Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
if -6.49999999999999951e-69 < y.re < 1.0800000000000001e-277Initial program 40.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6422.4
Applied rewrites22.4%
if 1.0800000000000001e-277 < y.re < 3.0499999999999998Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6440.0
Applied rewrites40.0%
if 3.0499999999999998 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re -8.6e+155)
(* (pow (fabs x.re) y.re) (sin (fma y.im (log (fabs x.re)) t_0)))
(if (<= x.re 1.2e-105)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(*
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re))))
(sin (fma y.im (log x.re) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -8.6e+155) {
tmp = pow(fabs(x_46_re), y_46_re) * sin(fma(y_46_im, log(fabs(x_46_re)), t_0));
} else if (x_46_re <= 1.2e-105) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -8.6e+155) tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(fma(y_46_im, log(abs(x_46_re)), t_0))); elseif (x_46_re <= 1.2e-105) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -8.6e+155], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.2e-105], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -8.6 \cdot 10^{+155}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log \left(\left|x.re\right|\right), t\_0\right)\right)\\
\mathbf{elif}\;x.re \leq 1.2 \cdot 10^{-105}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)\\
\end{array}
\end{array}
if x.re < -8.6000000000000005e155Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
if -8.6000000000000005e155 < x.re < 1.20000000000000007e-105Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
if 1.20000000000000007e-105 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (pow (fabs x.re) y.re) (sin (fma y.im (log (fabs x.re)) t_0))))
(t_2 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log t_2)))))
(if (<= y.re -0.018)
(* (sin t_0) (pow t_2 y.re))
(if (<= y.re -1.7e-200)
t_1
(if (<= y.re 1.9e-214) t_3 (if (<= y.re 4e+39) t_1 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(fabs(x_46_re), y_46_re) * sin(fma(y_46_im, log(fabs(x_46_re)), t_0));
double t_2 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * log(t_2));
double tmp;
if (y_46_re <= -0.018) {
tmp = sin(t_0) * pow(t_2, y_46_re);
} else if (y_46_re <= -1.7e-200) {
tmp = t_1;
} else if (y_46_re <= 1.9e-214) {
tmp = t_3;
} else if (y_46_re <= 4e+39) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64((abs(x_46_re) ^ y_46_re) * sin(fma(y_46_im, log(abs(x_46_re)), t_0))) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * log(t_2))) tmp = 0.0 if (y_46_re <= -0.018) tmp = Float64(sin(t_0) * (t_2 ^ y_46_re)); elseif (y_46_re <= -1.7e-200) tmp = t_1; elseif (y_46_re <= 1.9e-214) tmp = t_3; elseif (y_46_re <= 4e+39) tmp = t_1; else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.018], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.7e-200], t$95$1, If[LessEqual[y$46$re, 1.9e-214], t$95$3, If[LessEqual[y$46$re, 4e+39], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log \left(\left|x.re\right|\right), t\_0\right)\right)\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log t\_2\right)\\
\mathbf{if}\;y.re \leq -0.018:\\
\;\;\;\;\sin t\_0 \cdot {t\_2}^{y.re}\\
\mathbf{elif}\;y.re \leq -1.7 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-214}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -0.0179999999999999986Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
if -0.0179999999999999986 < y.re < -1.7000000000000001e-200 or 1.9000000000000001e-214 < y.re < 3.99999999999999976e39Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
if -1.7000000000000001e-200 < y.re < 1.9000000000000001e-214 or 3.99999999999999976e39 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sqrt (fma x.im x.im (* x.re x.re))))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log t_1)))))
(if (<= y.re -7e-77)
(* (sin t_0) (pow t_1 y.re))
(if (<= y.re 1.9e-214)
t_2
(if (<= y.re 1.16)
(* 1.0 (sin (fma y.im (log (fabs x.re)) t_0)))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * log(t_1));
double tmp;
if (y_46_re <= -7e-77) {
tmp = sin(t_0) * pow(t_1, y_46_re);
} else if (y_46_re <= 1.9e-214) {
tmp = t_2;
} else if (y_46_re <= 1.16) {
tmp = 1.0 * sin(fma(y_46_im, log(fabs(x_46_re)), t_0));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * log(t_1))) tmp = 0.0 if (y_46_re <= -7e-77) tmp = Float64(sin(t_0) * (t_1 ^ y_46_re)); elseif (y_46_re <= 1.9e-214) tmp = t_2; elseif (y_46_re <= 1.16) tmp = Float64(1.0 * sin(fma(y_46_im, log(abs(x_46_re)), t_0))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-77], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.9e-214], t$95$2, If[LessEqual[y$46$re, 1.16], N[(1.0 * N[Sin[N[(y$46$im * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log t\_1\right)\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-77}:\\
\;\;\;\;\sin t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-214}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 1.16:\\
\;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.im, \log \left(\left|x.re\right|\right), t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -7.00000000000000026e-77Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
if -7.00000000000000026e-77 < y.re < 1.9000000000000001e-214 or 1.15999999999999992 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
if 1.9000000000000001e-214 < y.re < 1.15999999999999992Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
Applied rewrites20.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (fabs x.re) y.re)))
(if (<= x.re -1e+87)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= x.re 7.6e+55)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(* t_0 (sin (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(fabs(x_46_re), y_46_re);
double tmp;
if (x_46_re <= -1e+87) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (x_46_re <= 7.6e+55) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else {
tmp = t_0 * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = abs(x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -1e+87) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (x_46_re <= 7.6e+55) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); else tmp = Float64(t_0 * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -1e+87], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 7.6e+55], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left|x.re\right|\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{+87}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;x.re \leq 7.6 \cdot 10^{+55}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.9999999999999996e86Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-pow.f64N/A
lift-fabs.f6437.5
Applied rewrites37.5%
if -9.9999999999999996e86 < x.re < 7.5999999999999999e55Initial program 40.9%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f6447.7
Applied rewrites47.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-log.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6442.6
Applied rewrites42.6%
if 7.5999999999999999e55 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
log-fabsN/A
lower-log.f6420.7
Applied rewrites20.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))) (t_1 (pow (fabs x.re) y.re)))
(if (<= x.re -2.1e-9)
(* t_0 t_1)
(if (<= x.re 2.7e-127)
(* t_0 (pow x.im y.re))
(* t_1 (sin (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(fabs(x_46_re), y_46_re);
double tmp;
if (x_46_re <= -2.1e-9) {
tmp = t_0 * t_1;
} else if (x_46_re <= 2.7e-127) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_1 * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
t_1 = abs(x_46re) ** y_46re
if (x_46re <= (-2.1d-9)) then
tmp = t_0 * t_1
else if (x_46re <= 2.7d-127) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_1 * sin((y_46im * log(x_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.abs(x_46_re), y_46_re);
double tmp;
if (x_46_re <= -2.1e-9) {
tmp = t_0 * t_1;
} else if (x_46_re <= 2.7e-127) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_1 * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.fabs(x_46_re), y_46_re) tmp = 0 if x_46_re <= -2.1e-9: tmp = t_0 * t_1 elif x_46_re <= 2.7e-127: tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_1 * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = abs(x_46_re) ^ y_46_re tmp = 0.0 if (x_46_re <= -2.1e-9) tmp = Float64(t_0 * t_1); elseif (x_46_re <= 2.7e-127) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = abs(x_46_re) ^ y_46_re; tmp = 0.0; if (x_46_re <= -2.1e-9) tmp = t_0 * t_1; elseif (x_46_re <= 2.7e-127) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_1 * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, -2.1e-9], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2.7e-127], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[x$46$re], $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)\\
t_1 := {\left(\left|x.re\right|\right)}^{y.re}\\
\mathbf{if}\;x.re \leq -2.1 \cdot 10^{-9}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{-127}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.10000000000000019e-9Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lift-atan2.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-pow.f64N/A
lift-fabs.f6437.5
Applied rewrites37.5%
if -2.10000000000000019e-9 < x.re < 2.7e-127Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in x.re around 0
lower-pow.f6430.8
Applied rewrites30.8%
if 2.7e-127 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
log-fabsN/A
lower-log.f6420.7
Applied rewrites20.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 2.7e-127) (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (* (pow (fabs x.re) y.re) (sin (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 2.7e-127) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
} else {
tmp = pow(fabs(x_46_re), y_46_re) * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= 2.7d-127) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
else
tmp = (abs(x_46re) ** y_46re) * sin((y_46im * log(x_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 2.7e-127) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.pow(Math.abs(x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 2.7e-127: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) else: tmp = math.pow(math.fabs(x_46_re), y_46_re) * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 2.7e-127) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)); else tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 2.7e-127) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); else tmp = (abs(x_46_re) ^ y_46_re) * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 2.7e-127], 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], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 2.7 \cdot 10^{-127}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 2.7e-127Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in x.re around 0
lower-pow.f6430.8
Applied rewrites30.8%
if 2.7e-127 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
log-fabsN/A
lower-log.f6420.7
Applied rewrites20.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.re 7.8e-215)
(*
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
(* -0.16666666666666666 (pow (* y.re (atan2 x.im x.re)) 3.0)))
(* (pow (fabs x.re) y.re) (sin (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 7.8e-215) {
tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * (-0.16666666666666666 * pow((y_46_re * atan2(x_46_im, x_46_re)), 3.0));
} else {
tmp = pow(fabs(x_46_re), y_46_re) * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 7.8e-215) tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * Float64(-0.16666666666666666 * (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 3.0))); else tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 7.8e-215], 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[(-0.16666666666666666 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 7.8 \cdot 10^{-215}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(-0.16666666666666666 \cdot {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 7.7999999999999999e-215Initial program 40.9%
Taylor expanded in y.im around 0
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f6453.1
Applied rewrites53.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-atan2.f6436.8
Applied rewrites36.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
pow-prod-downN/A
lower-pow.f64N/A
lift-atan2.f64N/A
lift-*.f6430.9
Applied rewrites30.9%
Taylor expanded in y.im around 0
lower-pow.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6426.8
Applied rewrites26.8%
if 7.7999999999999999e-215 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
log-fabsN/A
lower-log.f6420.7
Applied rewrites20.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.re -5e-310)
(*
y.re
(fma
y.re
(* -1.0 (* (log (/ -1.0 x.re)) (atan2 x.im x.re)))
(atan2 x.im x.re)))
(* (pow (fabs x.re) y.re) (sin (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -5e-310) {
tmp = y_46_re * fma(y_46_re, (-1.0 * (log((-1.0 / x_46_re)) * atan2(x_46_im, x_46_re))), atan2(x_46_im, x_46_re));
} else {
tmp = pow(fabs(x_46_re), y_46_re) * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(y_46_re * fma(y_46_re, Float64(-1.0 * Float64(log(Float64(-1.0 / x_46_re)) * atan(x_46_im, x_46_re))), atan(x_46_im, x_46_re))); else tmp = Float64((abs(x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -5e-310], N[(y$46$re * N[(y$46$re * N[(-1.0 * N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Abs[x$46$re], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(y.re, -1 \cdot \left(\log \left(\frac{-1}{x.re}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left|x.re\right|\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f64N/A
lift-atan2.f6410.0
Applied rewrites10.0%
if -4.999999999999985e-310 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6432.2
Applied rewrites32.2%
lift-log.f64N/A
log-fabsN/A
lower-log.f64N/A
lower-fabs.f6466.7
Applied rewrites66.7%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lift-fabs.f6447.4
Applied rewrites47.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
log-fabsN/A
lower-log.f6420.7
Applied rewrites20.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
y.re
(*
y.re
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))))))
(if (<= y.im -3.1e-81)
t_0
(if (<= y.im 2.9e-51) (* (sin (* y.re (atan2 x.im x.re))) 1.0) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (y_46_re * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3.1e-81) {
tmp = t_0;
} else if (y_46_im <= 2.9e-51) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * 1.0;
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(y_46_re * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -3.1e-81) tmp = t_0; elseif (y_46_im <= 2.9e-51) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * 1.0); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(y$46$re * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.1e-81], t$95$0, If[LessEqual[y$46$im, 2.9e-51], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(y.re \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{-81}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 2.9 \cdot 10^{-51}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -3.09999999999999988e-81 or 2.89999999999999973e-51 < y.im Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.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-*.f6415.7
Applied rewrites15.7%
if -3.09999999999999988e-81 < y.im < 2.89999999999999973e-51Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y.re around 0
Applied rewrites13.9%
(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 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.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-*.f6415.7
Applied rewrites15.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re y.re) (* (log (sqrt (fma x.im x.im (* x.re x.re)))) (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * y_46_re) * (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * atan2(x_46_im, x_46_re));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * y_46_re) * Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * atan(x_46_im, x_46_re))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot y.re\right) \cdot \left(\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
pow2N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-atan2.f6418.2
Applied rewrites18.2%
Taylor expanded in y.re around inf
pow2N/A
pow2N/A
lower-*.f64N/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-*.f6414.5
Applied rewrites14.5%
herbie shell --seed 2025134
(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)))))