
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.im (log (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))))
(t_3 (log (/ -1.0 x.re)))
(t_4 (* y.re (atan2 x.im x.re)))
(t_5 (sin t_4))
(t_6
(*
(exp (- (* -1.0 (* y.re t_3)) t_0))
(sin (fma -1.0 (* y.im t_3) t_4)))))
(if (<= x.re -8.8e+46)
t_6
(if (<= x.re -1.7e-221)
(* t_2 (* y.im (log (* -1.0 x.re))))
(if (<= x.re -5e-309)
t_6
(if (<= x.re 7.8e-184)
(* t_5 (pow (sqrt (* x.im x.im)) y.re))
(if (<= x.re 2.95e-12)
(* t_2 (+ (sin t_1) (* y.re (* (cos t_1) (atan2 x.im x.re)))))
(*
(exp (- (* y.re (log x.re)) t_0))
(+ t_5 (* y.im (* (cos t_4) (log x.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * log(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)));
double t_3 = log((-1.0 / x_46_re));
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double t_5 = sin(t_4);
double t_6 = exp(((-1.0 * (y_46_re * t_3)) - t_0)) * sin(fma(-1.0, (y_46_im * t_3), t_4));
double tmp;
if (x_46_re <= -8.8e+46) {
tmp = t_6;
} else if (x_46_re <= -1.7e-221) {
tmp = t_2 * (y_46_im * log((-1.0 * x_46_re)));
} else if (x_46_re <= -5e-309) {
tmp = t_6;
} else if (x_46_re <= 7.8e-184) {
tmp = t_5 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
} else if (x_46_re <= 2.95e-12) {
tmp = t_2 * (sin(t_1) + (y_46_re * (cos(t_1) * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * (t_5 + (y_46_im * (cos(t_4) * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))) 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(Float64(-1.0 / x_46_re)) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_5 = sin(t_4) t_6 = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_3)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_3), t_4))) tmp = 0.0 if (x_46_re <= -8.8e+46) tmp = t_6; elseif (x_46_re <= -1.7e-221) tmp = Float64(t_2 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); elseif (x_46_re <= -5e-309) tmp = t_6; elseif (x_46_re <= 7.8e-184) tmp = Float64(t_5 * (sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re)); elseif (x_46_re <= 2.95e-12) tmp = Float64(t_2 * Float64(sin(t_1) + Float64(y_46_re * Float64(cos(t_1) * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * Float64(t_5 + Float64(y_46_im * Float64(cos(t_4) * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{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]}, 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[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -8.8e+46], t$95$6, If[LessEqual[x$46$re, -1.7e-221], N[(t$95$2 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -5e-309], t$95$6, If[LessEqual[x$46$re, 7.8e-184], N[(t$95$5 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.95e-12], N[(t$95$2 * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$re * N[(N[Cos[t$95$1], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(t$95$5 + N[(y$46$im * N[(N[Cos[t$95$4], $MachinePrecision] * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\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}\\
t_3 := \log \left(\frac{-1}{x.re}\right)\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_5 := \sin t\_4\\
t_6 := e^{-1 \cdot \left(y.re \cdot t\_3\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_3, t\_4\right)\right)\\
\mathbf{if}\;x.re \leq -8.8 \cdot 10^{+46}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq -1.7 \cdot 10^{-221}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.re \leq 7.8 \cdot 10^{-184}:\\
\;\;\;\;t\_5 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 2.95 \cdot 10^{-12}:\\
\;\;\;\;t\_2 \cdot \left(\sin t\_1 + y.re \cdot \left(\cos t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \left(t\_5 + y.im \cdot \left(\cos t\_4 \cdot \log x.re\right)\right)\\
\end{array}
\end{array}
if x.re < -8.8000000000000001e46 or -1.7000000000000001e-221 < x.re < -4.9999999999999995e-309Initial program 28.0%
Taylor expanded in x.re around -inf
lower-*.f64N/A
Applied rewrites72.8%
if -8.8000000000000001e46 < x.re < -1.7000000000000001e-221Initial program 57.6%
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-*.f6460.2
Applied rewrites60.2%
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.f6452.9
Applied rewrites52.9%
Taylor expanded in x.re around -inf
lower-*.f6455.0
Applied rewrites55.0%
if -4.9999999999999995e-309 < x.re < 7.79999999999999988e-184Initial program 40.5%
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-*.f6445.4
Applied rewrites45.4%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6445.4
Applied rewrites45.4%
if 7.79999999999999988e-184 < x.re < 2.95e-12Initial program 56.7%
Taylor expanded in y.re around 0
lower-+.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-*.f64N/A
Applied rewrites56.0%
if 2.95e-12 < x.re Initial program 30.1%
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.f6473.1
Applied rewrites73.1%
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.f6472.0
Applied rewrites72.0%
(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
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_3 (log (/ -1.0 x.im))))
(if (<= x.im -100000000.0)
(* (exp (- (* -1.0 (* y.re t_3)) t_0)) (sin (fma -1.0 (* y.im t_3) t_1)))
(if (<= x.im -1.5e-308)
(*
t_2
(sin (+ (* (log (* -1.0 x.im)) y.im) (* (atan2 x.im x.re) y.re))))
(if (<= x.im 2.65e-11)
(*
t_2
(+
(sin t_1)
(* y.im (* (cos t_1) (log (sqrt (fma x.im x.im (* x.re x.re))))))))
(*
(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 = 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((-1.0 / x_46_im));
double tmp;
if (x_46_im <= -100000000.0) {
tmp = exp(((-1.0 * (y_46_re * t_3)) - t_0)) * sin(fma(-1.0, (y_46_im * t_3), t_1));
} else if (x_46_im <= -1.5e-308) {
tmp = t_2 * sin(((log((-1.0 * x_46_im)) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 2.65e-11) {
tmp = t_2 * (sin(t_1) + (y_46_im * (cos(t_1) * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))))));
} 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 = 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(Float64(-1.0 / x_46_im)) tmp = 0.0 if (x_46_im <= -100000000.0) tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_3)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_3), t_1))); elseif (x_46_im <= -1.5e-308) tmp = Float64(t_2 * sin(Float64(Float64(log(Float64(-1.0 * x_46_im)) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 2.65e-11) tmp = Float64(t_2 * Float64(sin(t_1) + Float64(y_46_im * Float64(cos(t_1) * 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 * 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[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[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -100000000.0], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$3), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.5e-308], N[(t$95$2 * N[Sin[N[(N[(N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.65e-11], N[(t$95$2 * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$1], $MachinePrecision] * 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]), $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 := 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(\frac{-1}{x.im}\right)\\
\mathbf{if}\;x.im \leq -100000000:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_3\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_3, t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-308}:\\
\;\;\;\;t\_2 \cdot \sin \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;x.im \leq 2.65 \cdot 10^{-11}:\\
\;\;\;\;t\_2 \cdot \left(\sin t\_1 + y.im \cdot \left(\cos t\_1 \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\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 < -1e8Initial program 28.7%
Taylor expanded in x.im around -inf
lower-*.f64N/A
Applied rewrites77.1%
if -1e8 < x.im < -1.4999999999999999e-308Initial program 49.7%
Taylor expanded in x.im around -inf
lower-*.f6457.1
Applied rewrites57.1%
if -1.4999999999999999e-308 < x.im < 2.6499999999999999e-11Initial program 49.1%
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-*.f6453.8
Applied rewrites53.8%
if 2.6499999999999999e-11 < x.im Initial program 33.5%
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.f6476.8
Applied rewrites76.8%
(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 (sin (fma y.im (log x.im) t_1)))
(t_3
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_4 (log (/ -1.0 x.im))))
(if (<= x.im -100000000.0)
(* (exp (- (* -1.0 (* y.re t_4)) t_0)) (sin (fma -1.0 (* y.im t_4) t_1)))
(if (<= x.im -1e-310)
(*
t_3
(sin (+ (* (log (* -1.0 x.im)) y.im) (* (atan2 x.im x.re) y.re))))
(if (<= x.im 2e+22)
(* t_3 t_2)
(* (exp (- (* y.re (log x.im)) 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(fma(y_46_im, log(x_46_im), t_1));
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)));
double t_4 = log((-1.0 / x_46_im));
double tmp;
if (x_46_im <= -100000000.0) {
tmp = exp(((-1.0 * (y_46_re * t_4)) - t_0)) * sin(fma(-1.0, (y_46_im * t_4), t_1));
} else if (x_46_im <= -1e-310) {
tmp = t_3 * sin(((log((-1.0 * x_46_im)) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 2e+22) {
tmp = t_3 * t_2;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * 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(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(fma(y_46_im, log(x_46_im), t_1)) t_3 = 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_4 = log(Float64(-1.0 / x_46_im)) tmp = 0.0 if (x_46_im <= -100000000.0) tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_4)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_4), t_1))); elseif (x_46_im <= -1e-310) tmp = Float64(t_3 * sin(Float64(Float64(log(Float64(-1.0 * x_46_im)) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 2e+22) tmp = Float64(t_3 * t_2); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -100000000.0], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$4), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1e-310], N[(t$95$3 * N[Sin[N[(N[(N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2e+22], N[(t$95$3 * t$95$2), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $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 := \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\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}\\
t_4 := \log \left(\frac{-1}{x.im}\right)\\
\mathbf{if}\;x.im \leq -100000000:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_4\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_4, t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_3 \cdot \sin \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{+22}:\\
\;\;\;\;t\_3 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot t\_2\\
\end{array}
\end{array}
if x.im < -1e8Initial program 28.7%
Taylor expanded in x.im around -inf
lower-*.f64N/A
Applied rewrites77.1%
if -1e8 < x.im < -9.999999999999969e-311Initial program 49.6%
Taylor expanded in x.im around -inf
lower-*.f6457.1
Applied rewrites57.1%
if -9.999999999999969e-311 < x.im < 2e22Initial program 50.1%
Taylor expanded in x.re around 0
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6456.9
Applied rewrites56.9%
if 2e22 < x.im Initial program 30.3%
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.f6478.3
Applied rewrites78.3%
(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
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_3 (sin (fma y.im (log x.im) t_1)))
(t_4 (log (/ -1.0 x.im))))
(if (<= x.im -1.25e-210)
(* (exp (- (* -1.0 (* y.re t_4)) t_0)) (sin (fma -1.0 (* y.im t_4) t_1)))
(if (<= x.im 9.5e-100)
(* t_2 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= x.im 2e+22)
(* t_2 t_3)
(* (exp (- (* y.re (log x.im)) t_0)) 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = sin(fma(y_46_im, log(x_46_im), t_1));
double t_4 = log((-1.0 / x_46_im));
double tmp;
if (x_46_im <= -1.25e-210) {
tmp = exp(((-1.0 * (y_46_re * t_4)) - t_0)) * sin(fma(-1.0, (y_46_im * t_4), t_1));
} else if (x_46_im <= 9.5e-100) {
tmp = t_2 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (x_46_im <= 2e+22) {
tmp = t_2 * t_3;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * t_3;
}
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 = 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 = sin(fma(y_46_im, log(x_46_im), t_1)) t_4 = log(Float64(-1.0 / x_46_im)) tmp = 0.0 if (x_46_im <= -1.25e-210) tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_4)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_4), t_1))); elseif (x_46_im <= 9.5e-100) tmp = Float64(t_2 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); elseif (x_46_im <= 2e+22) tmp = Float64(t_2 * t_3); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * 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$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[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[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.25e-210], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$4), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 9.5e-100], N[(t$95$2 * 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], If[LessEqual[x$46$im, 2e+22], N[(t$95$2 * t$95$3), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $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 := 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 := \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
t_4 := \log \left(\frac{-1}{x.im}\right)\\
\mathbf{if}\;x.im \leq -1.25 \cdot 10^{-210}:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_4\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_4, t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq 9.5 \cdot 10^{-100}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{+22}:\\
\;\;\;\;t\_2 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot t\_3\\
\end{array}
\end{array}
if x.im < -1.2500000000000001e-210Initial program 39.1%
Taylor expanded in x.im around -inf
lower-*.f64N/A
Applied rewrites66.3%
if -1.2500000000000001e-210 < x.im < 9.4999999999999992e-100Initial program 44.1%
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-*.f6449.8
Applied rewrites49.8%
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.f6446.9
Applied rewrites46.9%
if 9.4999999999999992e-100 < x.im < 2e22Initial program 56.7%
Taylor expanded in x.re around 0
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6463.1
Applied rewrites63.1%
if 2e22 < x.im Initial program 30.3%
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.f6478.3
Applied rewrites78.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (fma y.im (log x.im) (* y.re (atan2 x.im x.re)))))
(t_2
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))))
(if (<= x.im -5.8e-207)
(*
(exp (- (* (log (sqrt (* x.im x.im))) y.re) t_0))
(sin (+ (* (log (* -1.0 x.im)) y.im) (* (atan2 x.im x.re) y.re))))
(if (<= x.im 9.5e-100)
(* t_2 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= x.im 2e+22)
(* t_2 t_1)
(* (exp (- (* y.re (log x.im)) (* y.im (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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin(fma(y_46_im, log(x_46_im), (y_46_re * atan2(x_46_im, x_46_re))));
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double tmp;
if (x_46_im <= -5.8e-207) {
tmp = exp(((log(sqrt((x_46_im * x_46_im))) * y_46_re) - t_0)) * sin(((log((-1.0 * x_46_im)) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 9.5e-100) {
tmp = t_2 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (x_46_im <= 2e+22) {
tmp = t_2 * t_1;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(fma(y_46_im, log(x_46_im), Float64(y_46_re * atan(x_46_im, x_46_re)))) 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) - t_0)) tmp = 0.0 if (x_46_im <= -5.8e-207) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(x_46_im * x_46_im))) * y_46_re) - t_0)) * sin(Float64(Float64(log(Float64(-1.0 * x_46_im)) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 9.5e-100) tmp = Float64(t_2 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); elseif (x_46_im <= 2e+22) tmp = Float64(t_2 * t_1); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5.8e-207], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 9.5e-100], N[(t$95$2 * 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], If[LessEqual[x$46$im, 2e+22], N[(t$95$2 * t$95$1), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
\mathbf{if}\;x.im \leq -5.8 \cdot 10^{-207}:\\
\;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;x.im \leq 9.5 \cdot 10^{-100}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{+22}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\end{array}
\end{array}
if x.im < -5.80000000000000022e-207Initial program 39.2%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6434.5
Applied rewrites34.5%
Taylor expanded in x.im around -inf
lower-*.f6453.6
Applied rewrites53.6%
if -5.80000000000000022e-207 < x.im < 9.4999999999999992e-100Initial program 43.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-*.f6449.6
Applied rewrites49.6%
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.f6446.8
Applied rewrites46.8%
if 9.4999999999999992e-100 < x.im < 2e22Initial program 56.7%
Taylor expanded in x.re around 0
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6463.1
Applied rewrites63.1%
if 2e22 < x.im Initial program 30.3%
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.f6478.3
Applied rewrites78.3%
(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 (* t_0 (sin t_1))))
(if (<= x.im -1e+194)
(* t_0 (* y.im (log (* -1.0 x.im))))
(if (<= x.im -4.8e-208)
t_2
(if (<= x.im 3.7e-94)
(* t_0 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= x.im 0.1)
t_2
(*
(exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))
(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 = 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 = t_0 * sin(t_1);
double tmp;
if (x_46_im <= -1e+194) {
tmp = t_0 * (y_46_im * log((-1.0 * x_46_im)));
} else if (x_46_im <= -4.8e-208) {
tmp = t_2;
} else if (x_46_im <= 3.7e-94) {
tmp = t_0 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (x_46_im <= 0.1) {
tmp = t_2;
} else {
tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * 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 = 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 = Float64(t_0 * sin(t_1)) tmp = 0.0 if (x_46_im <= -1e+194) tmp = Float64(t_0 * Float64(y_46_im * log(Float64(-1.0 * x_46_im)))); elseif (x_46_im <= -4.8e-208) tmp = t_2; elseif (x_46_im <= 3.7e-94) tmp = Float64(t_0 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); elseif (x_46_im <= 0.1) tmp = t_2; else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * 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[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[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1e+194], N[(t$95$0 * N[(y$46$im * N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -4.8e-208], t$95$2, If[LessEqual[x$46$im, 3.7e-94], N[(t$95$0 * 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], If[LessEqual[x$46$im, 0.1], t$95$2, N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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 := 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 := t\_0 \cdot \sin t\_1\\
\mathbf{if}\;x.im \leq -1 \cdot 10^{+194}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(-1 \cdot x.im\right)\right)\\
\mathbf{elif}\;x.im \leq -4.8 \cdot 10^{-208}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.im \leq 3.7 \cdot 10^{-94}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{elif}\;x.im \leq 0.1:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -9.99999999999999945e193Initial program 0.0%
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-*.f6412.8
Applied rewrites12.8%
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.f6415.7
Applied rewrites15.7%
Taylor expanded in x.im around -inf
lower-*.f6445.5
Applied rewrites45.5%
if -9.99999999999999945e193 < x.im < -4.7999999999999998e-208 or 3.6999999999999998e-94 < x.im < 0.10000000000000001Initial program 51.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6456.9
Applied rewrites56.9%
if -4.7999999999999998e-208 < x.im < 3.6999999999999998e-94Initial program 44.2%
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-*.f6449.9
Applied rewrites49.9%
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.f6446.9
Applied rewrites46.9%
if 0.10000000000000001 < x.im Initial program 32.8%
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.f6477.5
Applied rewrites77.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.im -5.8e-207)
(*
(exp (- (* (log (sqrt (* x.im x.im))) y.re) t_0))
(sin (+ (* (log (* -1.0 x.im)) y.im) (* (atan2 x.im x.re) y.re))))
(if (<= x.im 3.7e-94)
(* t_1 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= x.im 0.1)
(* t_1 (sin t_2))
(*
(exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))
(sin (fma y.im (log 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -5.8e-207) {
tmp = exp(((log(sqrt((x_46_im * x_46_im))) * y_46_re) - t_0)) * sin(((log((-1.0 * x_46_im)) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
} else if (x_46_im <= 3.7e-94) {
tmp = t_1 * (y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (x_46_im <= 0.1) {
tmp = t_1 * sin(t_2);
} else {
tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -5.8e-207) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(x_46_im * x_46_im))) * y_46_re) - t_0)) * sin(Float64(Float64(log(Float64(-1.0 * x_46_im)) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))); elseif (x_46_im <= 3.7e-94) tmp = Float64(t_1 * Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); elseif (x_46_im <= 0.1) tmp = Float64(t_1 * sin(t_2)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -5.8e-207], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.7e-94], 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], If[LessEqual[x$46$im, 0.1], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -5.8 \cdot 10^{-207}:\\
\;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \sin \left(\log \left(-1 \cdot x.im\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;x.im \leq 3.7 \cdot 10^{-94}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{elif}\;x.im \leq 0.1:\\
\;\;\;\;t\_1 \cdot \sin t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_2\right)\right)\\
\end{array}
\end{array}
if x.im < -5.80000000000000022e-207Initial program 39.2%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6434.5
Applied rewrites34.5%
Taylor expanded in x.im around -inf
lower-*.f6453.6
Applied rewrites53.6%
if -5.80000000000000022e-207 < x.im < 3.6999999999999998e-94Initial program 44.1%
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-*.f6449.8
Applied rewrites49.8%
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.f6446.9
Applied rewrites46.9%
if 3.6999999999999998e-94 < x.im < 0.10000000000000001Initial program 55.9%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6455.5
Applied rewrites55.5%
if 0.10000000000000001 < x.im Initial program 32.8%
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.f6477.5
Applied rewrites77.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_3 (exp (- (* y.im (atan2 x.im x.re)))))
(t_4 (* t_3 t_1)))
(if (<= y.re -2.1e-8)
(* t_2 t_1)
(if (<= y.re -6.8e-152)
t_4
(if (<= y.re 4.6e-164)
(* t_3 t_0)
(if (<= y.re 1.9e-50) t_4 (* t_2 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = exp(-(y_46_im * atan2(x_46_im, x_46_re)));
double t_4 = t_3 * t_1;
double tmp;
if (y_46_re <= -2.1e-8) {
tmp = t_2 * t_1;
} else if (y_46_re <= -6.8e-152) {
tmp = t_4;
} else if (y_46_re <= 4.6e-164) {
tmp = t_3 * t_0;
} else if (y_46_re <= 1.9e-50) {
tmp = t_4;
} else {
tmp = t_2 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) 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 = exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) t_4 = Float64(t_3 * t_1) tmp = 0.0 if (y_46_re <= -2.1e-8) tmp = Float64(t_2 * t_1); elseif (y_46_re <= -6.8e-152) tmp = t_4; elseif (y_46_re <= 4.6e-164) tmp = Float64(t_3 * t_0); elseif (y_46_re <= 1.9e-50) tmp = t_4; else tmp = Float64(t_2 * 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$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $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[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[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -2.1e-8], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, -6.8e-152], t$95$4, If[LessEqual[y$46$re, 4.6e-164], N[(t$95$3 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.9e-50], t$95$4, N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{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}\\
t_3 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := t\_3 \cdot t\_1\\
\mathbf{if}\;y.re \leq -2.1 \cdot 10^{-8}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-152}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-164}:\\
\;\;\;\;t\_3 \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-50}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.09999999999999994e-8Initial program 39.0%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6480.5
Applied rewrites80.5%
if -2.09999999999999994e-8 < y.re < -6.79999999999999968e-152 or 4.59999999999999971e-164 < y.re < 1.9e-50Initial program 42.9%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6439.3
Applied rewrites39.3%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6461.0
Applied rewrites61.0%
if -6.79999999999999968e-152 < y.re < 4.59999999999999971e-164Initial program 44.0%
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-*.f6444.9
Applied rewrites44.9%
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.f6439.5
Applied rewrites39.5%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6442.8
Applied rewrites42.8%
if 1.9e-50 < y.re Initial program 35.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6454.6
Applied rewrites54.6%
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.f6456.7
Applied rewrites56.7%
(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_0 t_1))
(t_3 (sqrt (fma x.im x.im (* x.re x.re))))
(t_4 (* y.im (log t_3))))
(if (<= y.re -0.0146)
(* t_1 (pow t_3 y.re))
(if (<= y.re -6.8e-152)
t_2
(if (<= y.re 4.6e-164)
(* t_0 t_4)
(if (<= y.re 1.9e-50)
t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) 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(-(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_0 * t_1;
double t_3 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_4 = y_46_im * log(t_3);
double tmp;
if (y_46_re <= -0.0146) {
tmp = t_1 * pow(t_3, y_46_re);
} else if (y_46_re <= -6.8e-152) {
tmp = t_2;
} else if (y_46_re <= 4.6e-164) {
tmp = t_0 * t_4;
} else if (y_46_re <= 1.9e-50) {
tmp = t_2;
} 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_4;
}
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_0 * t_1) t_3 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_4 = Float64(y_46_im * log(t_3)) tmp = 0.0 if (y_46_re <= -0.0146) tmp = Float64(t_1 * (t_3 ^ y_46_re)); elseif (y_46_re <= -6.8e-152) tmp = t_2; elseif (y_46_re <= 4.6e-164) tmp = Float64(t_0 * t_4); elseif (y_46_re <= 1.9e-50) tmp = t_2; 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_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[(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$0 * 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[(y$46$im * N[Log[t$95$3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0146], N[(t$95$1 * N[Power[t$95$3, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -6.8e-152], t$95$2, If[LessEqual[y$46$re, 4.6e-164], N[(t$95$0 * t$95$4), $MachinePrecision], If[LessEqual[y$46$re, 1.9e-50], 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] * t$95$4), $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 := t\_0 \cdot t\_1\\
t_3 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_4 := y.im \cdot \log t\_3\\
\mathbf{if}\;y.re \leq -0.0146:\\
\;\;\;\;t\_1 \cdot {t\_3}^{y.re}\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-152}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-164}:\\
\;\;\;\;t\_0 \cdot t\_4\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-50}:\\
\;\;\;\;t\_2\\
\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\_4\\
\end{array}
\end{array}
if y.re < -0.0146000000000000001Initial program 38.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-*.f6477.7
Applied rewrites77.7%
if -0.0146000000000000001 < y.re < -6.79999999999999968e-152 or 4.59999999999999971e-164 < y.re < 1.9e-50Initial program 42.8%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6439.5
Applied rewrites39.5%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6460.7
Applied rewrites60.7%
if -6.79999999999999968e-152 < y.re < 4.59999999999999971e-164Initial program 44.0%
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-*.f6444.9
Applied rewrites44.9%
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.f6439.5
Applied rewrites39.5%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6442.8
Applied rewrites42.8%
if 1.9e-50 < y.re Initial program 35.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6454.6
Applied rewrites54.6%
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.f6456.7
Applied rewrites56.7%
(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 (sqrt (fma x.im x.im (* x.re x.re))))
(t_4 (* y.im (log t_3))))
(if (<= t_2 (- INFINITY))
(* t_1 (* y.im (log (* -1.0 x.re))))
(if (<= t_2 -5e-194)
(* 1.0 (sin (* y.re (+ (/ t_4 y.re) (atan2 x.im x.re)))))
(if (<= t_2 INFINITY)
(* t_1 t_4)
(* (sin (* y.re (atan2 x.im x.re))) (pow t_3 y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = t_1 * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
double t_3 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_4 = y_46_im * log(t_3);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1 * (y_46_im * log((-1.0 * x_46_re)));
} else if (t_2 <= -5e-194) {
tmp = 1.0 * sin((y_46_re * ((t_4 / y_46_re) + atan2(x_46_im, x_46_re))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1 * t_4;
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_3, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) 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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_4 = Float64(y_46_im * log(t_3)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(t_1 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); elseif (t_2 <= -5e-194) tmp = Float64(1.0 * sin(Float64(y_46_re * Float64(Float64(t_4 / y_46_re) + atan(x_46_im, x_46_re))))); elseif (t_2 <= Inf) tmp = Float64(t_1 * t_4); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_3 ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * N[Log[t$95$3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$1 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-194], N[(1.0 * N[Sin[N[(y$46$re * N[(N[(t$95$4 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(t$95$1 * t$95$4), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$3, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_4 := y.im \cdot \log t\_3\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-194}:\\
\;\;\;\;1 \cdot \sin \left(y.re \cdot \left(\frac{t\_4}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1 \cdot t\_4\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_3}^{y.re}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -inf.0Initial program 53.1%
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-*.f6451.6
Applied rewrites51.6%
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.f6453.5
Applied rewrites53.5%
Taylor expanded in x.re around -inf
lower-*.f6424.9
Applied rewrites24.9%
if -inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -5.0000000000000002e-194Initial program 85.8%
Taylor expanded in y.im around 0
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6483.9
Applied rewrites83.9%
Taylor expanded in y.re around 0
Applied rewrites82.4%
Taylor expanded in y.re around inf
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites81.5%
if -5.0000000000000002e-194 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 85.5%
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-*.f6484.9
Applied rewrites84.9%
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.f6477.5
Applied rewrites77.5%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
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-*.f6442.8
Applied rewrites42.8%
(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 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -5.5e+50)
(* t_1 (pow (* -1.0 x.re) y.re))
(if (<= x.re -3.1e-279)
(* t_0 (* y.im (log (* -1.0 x.re))))
(if (<= x.re 7.8e-184)
(* t_1 (pow (sqrt (* x.im x.im)) y.re))
(* t_0 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5.5e+50) {
tmp = t_1 * pow((-1.0 * x_46_re), y_46_re);
} else if (x_46_re <= -3.1e-279) {
tmp = t_0 * (y_46_im * log((-1.0 * x_46_re)));
} else if (x_46_re <= 7.8e-184) {
tmp = t_1 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
} else {
tmp = t_0 * (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 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im)))
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-5.5d+50)) then
tmp = t_1 * (((-1.0d0) * x_46re) ** y_46re)
else if (x_46re <= (-3.1d-279)) then
tmp = t_0 * (y_46im * log(((-1.0d0) * x_46re)))
else if (x_46re <= 7.8d-184) then
tmp = t_1 * (sqrt((x_46im * x_46im)) ** y_46re)
else
tmp = t_0 * (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.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5.5e+50) {
tmp = t_1 * Math.pow((-1.0 * x_46_re), y_46_re);
} else if (x_46_re <= -3.1e-279) {
tmp = t_0 * (y_46_im * Math.log((-1.0 * x_46_re)));
} else if (x_46_re <= 7.8e-184) {
tmp = t_1 * Math.pow(Math.sqrt((x_46_im * x_46_im)), y_46_re);
} else {
tmp = t_0 * (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.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -5.5e+50: tmp = t_1 * math.pow((-1.0 * x_46_re), y_46_re) elif x_46_re <= -3.1e-279: tmp = t_0 * (y_46_im * math.log((-1.0 * x_46_re))) elif x_46_re <= 7.8e-184: tmp = t_1 * math.pow(math.sqrt((x_46_im * x_46_im)), y_46_re) else: tmp = t_0 * (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 = 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -5.5e+50) tmp = Float64(t_1 * (Float64(-1.0 * x_46_re) ^ y_46_re)); elseif (x_46_re <= -3.1e-279) tmp = Float64(t_0 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); elseif (x_46_re <= 7.8e-184) tmp = Float64(t_1 * (sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re)); else tmp = Float64(t_0 * 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 = 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_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -5.5e+50) tmp = t_1 * ((-1.0 * x_46_re) ^ y_46_re); elseif (x_46_re <= -3.1e-279) tmp = t_0 * (y_46_im * log((-1.0 * x_46_re))); elseif (x_46_re <= 7.8e-184) tmp = t_1 * (sqrt((x_46_im * x_46_im)) ^ y_46_re); else tmp = t_0 * (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[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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5.5e+50], N[(t$95$1 * N[Power[N[(-1.0 * x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3.1e-279], N[(t$95$0 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 7.8e-184], N[(t$95$1 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -5.5 \cdot 10^{+50}:\\
\;\;\;\;t\_1 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq -3.1 \cdot 10^{-279}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 7.8 \cdot 10^{-184}:\\
\;\;\;\;t\_1 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -5.4999999999999998e50Initial program 23.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.re around -inf
lower-*.f6444.9
Applied rewrites44.9%
if -5.4999999999999998e50 < x.re < -3.0999999999999999e-279Initial program 54.3%
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-*.f6458.3
Applied rewrites58.3%
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.f6451.9
Applied rewrites51.9%
Taylor expanded in x.re around -inf
lower-*.f6454.6
Applied rewrites54.6%
if -3.0999999999999999e-279 < x.re < 7.79999999999999988e-184Initial program 40.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.2
Applied rewrites44.2%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6444.2
Applied rewrites44.2%
if 7.79999999999999988e-184 < x.re Initial program 39.1%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.2
Applied rewrites46.2%
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.f6443.6
Applied rewrites43.6%
Taylor expanded in x.re around inf
Applied rewrites56.2%
(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 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -5.5e+50)
(* t_1 (pow (* -1.0 x.re) y.re))
(if (<= x.re -1.15e-227)
(* t_0 (* y.im (log (* -1.0 x.re))))
(if (<= x.re 3.6e-167)
(* t_1 (pow (* -1.0 x.im) y.re))
(* t_0 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5.5e+50) {
tmp = t_1 * pow((-1.0 * x_46_re), y_46_re);
} else if (x_46_re <= -1.15e-227) {
tmp = t_0 * (y_46_im * log((-1.0 * x_46_re)));
} else if (x_46_re <= 3.6e-167) {
tmp = t_1 * pow((-1.0 * x_46_im), y_46_re);
} else {
tmp = t_0 * (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 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im)))
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-5.5d+50)) then
tmp = t_1 * (((-1.0d0) * x_46re) ** y_46re)
else if (x_46re <= (-1.15d-227)) then
tmp = t_0 * (y_46im * log(((-1.0d0) * x_46re)))
else if (x_46re <= 3.6d-167) then
tmp = t_1 * (((-1.0d0) * x_46im) ** y_46re)
else
tmp = t_0 * (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.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5.5e+50) {
tmp = t_1 * Math.pow((-1.0 * x_46_re), y_46_re);
} else if (x_46_re <= -1.15e-227) {
tmp = t_0 * (y_46_im * Math.log((-1.0 * x_46_re)));
} else if (x_46_re <= 3.6e-167) {
tmp = t_1 * Math.pow((-1.0 * x_46_im), y_46_re);
} else {
tmp = t_0 * (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.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -5.5e+50: tmp = t_1 * math.pow((-1.0 * x_46_re), y_46_re) elif x_46_re <= -1.15e-227: tmp = t_0 * (y_46_im * math.log((-1.0 * x_46_re))) elif x_46_re <= 3.6e-167: tmp = t_1 * math.pow((-1.0 * x_46_im), y_46_re) else: tmp = t_0 * (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 = 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -5.5e+50) tmp = Float64(t_1 * (Float64(-1.0 * x_46_re) ^ y_46_re)); elseif (x_46_re <= -1.15e-227) tmp = Float64(t_0 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); elseif (x_46_re <= 3.6e-167) tmp = Float64(t_1 * (Float64(-1.0 * x_46_im) ^ y_46_re)); else tmp = Float64(t_0 * 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 = 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_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -5.5e+50) tmp = t_1 * ((-1.0 * x_46_re) ^ y_46_re); elseif (x_46_re <= -1.15e-227) tmp = t_0 * (y_46_im * log((-1.0 * x_46_re))); elseif (x_46_re <= 3.6e-167) tmp = t_1 * ((-1.0 * x_46_im) ^ y_46_re); else tmp = t_0 * (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[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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5.5e+50], N[(t$95$1 * N[Power[N[(-1.0 * x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.15e-227], N[(t$95$0 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.6e-167], N[(t$95$1 * N[Power[N[(-1.0 * x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -5.5 \cdot 10^{+50}:\\
\;\;\;\;t\_1 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq -1.15 \cdot 10^{-227}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-167}:\\
\;\;\;\;t\_1 \cdot {\left(-1 \cdot x.im\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -5.4999999999999998e50Initial program 23.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.re around -inf
lower-*.f6444.9
Applied rewrites44.9%
if -5.4999999999999998e50 < x.re < -1.15000000000000006e-227Initial program 57.1%
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-*.f6459.8
Applied rewrites59.8%
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.f6453.0
Applied rewrites53.0%
Taylor expanded in x.re around -inf
lower-*.f6454.9
Applied rewrites54.9%
if -1.15000000000000006e-227 < x.re < 3.6000000000000001e-167Initial program 39.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-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around -inf
lower-*.f6437.8
Applied rewrites37.8%
if 3.6000000000000001e-167 < x.re Initial program 39.2%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.2
Applied rewrites46.2%
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.f6443.6
Applied rewrites43.6%
Taylor expanded in x.re around inf
Applied rewrites56.2%
(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)))))
(if (<= x.re -1.15e-227)
(* t_0 (* y.im (log (* -1.0 x.re))))
(if (<= x.re 3.6e-167)
(* (sin (* y.re (atan2 x.im x.re))) (pow (* -1.0 x.im) y.re))
(* t_0 (* y.im (log x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (x_46_re <= -1.15e-227) {
tmp = t_0 * (y_46_im * log((-1.0 * x_46_re)));
} else if (x_46_re <= 3.6e-167) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow((-1.0 * x_46_im), y_46_re);
} else {
tmp = t_0 * (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) :: tmp
t_0 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im)))
if (x_46re <= (-1.15d-227)) then
tmp = t_0 * (y_46im * log(((-1.0d0) * x_46re)))
else if (x_46re <= 3.6d-167) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (((-1.0d0) * x_46im) ** y_46re)
else
tmp = t_0 * (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.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1.15e-227) {
tmp = t_0 * (y_46_im * Math.log((-1.0 * x_46_re)));
} else if (x_46_re <= 3.6e-167) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow((-1.0 * x_46_im), y_46_re);
} else {
tmp = t_0 * (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.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if x_46_re <= -1.15e-227: tmp = t_0 * (y_46_im * math.log((-1.0 * x_46_re))) elif x_46_re <= 3.6e-167: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow((-1.0 * x_46_im), y_46_re) else: tmp = t_0 * (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 = 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))) tmp = 0.0 if (x_46_re <= -1.15e-227) tmp = Float64(t_0 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); elseif (x_46_re <= 3.6e-167) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (Float64(-1.0 * x_46_im) ^ y_46_re)); else tmp = Float64(t_0 * 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 = 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))); tmp = 0.0; if (x_46_re <= -1.15e-227) tmp = t_0 * (y_46_im * log((-1.0 * x_46_re))); elseif (x_46_re <= 3.6e-167) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * ((-1.0 * x_46_im) ^ y_46_re); else tmp = t_0 * (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[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]}, If[LessEqual[x$46$re, -1.15e-227], N[(t$95$0 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.6e-167], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(-1.0 * x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $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}\\
\mathbf{if}\;x.re \leq -1.15 \cdot 10^{-227}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 3.6 \cdot 10^{-167}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-1 \cdot x.im\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.15000000000000006e-227Initial program 41.0%
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.2
Applied rewrites47.2%
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.f6442.4
Applied rewrites42.4%
Taylor expanded in x.re around -inf
lower-*.f6452.7
Applied rewrites52.7%
if -1.15000000000000006e-227 < x.re < 3.6000000000000001e-167Initial program 39.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-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x.im around -inf
lower-*.f6437.8
Applied rewrites37.8%
if 3.6000000000000001e-167 < x.re Initial program 39.2%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.2
Applied rewrites46.2%
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.f6443.6
Applied rewrites43.6%
Taylor expanded in x.re around inf
Applied rewrites56.2%
(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 (log t_1))
(t_3 (* y.im t_2)))
(if (<= y.re -7800000000.0)
(* t_0 (pow t_1 y.re))
(if (<= y.re -1.05e-137)
(* (sin t_0) 1.0)
(if (<= y.re 3900000.0)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_3)
(* (exp (* y.re t_2)) 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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = log(t_1);
double t_3 = y_46_im * t_2;
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_0 * pow(t_1, y_46_re);
} else if (y_46_re <= -1.05e-137) {
tmp = sin(t_0) * 1.0;
} else if (y_46_re <= 3900000.0) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_3;
} else {
tmp = exp((y_46_re * t_2)) * 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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = log(t_1) t_3 = Float64(y_46_im * t_2) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = Float64(t_0 * (t_1 ^ y_46_re)); elseif (y_46_re <= -1.05e-137) tmp = Float64(sin(t_0) * 1.0); elseif (y_46_re <= 3900000.0) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_3); else tmp = Float64(exp(Float64(y_46_re * t_2)) * 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -7800000000.0], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.05e-137], N[(N[Sin[t$95$0], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 3900000.0], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$3), $MachinePrecision], N[(N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]
\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 := \log t\_1\\
t_3 := y.im \cdot t\_2\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq -1.05 \cdot 10^{-137}:\\
\;\;\;\;\sin t\_0 \cdot 1\\
\mathbf{elif}\;y.re \leq 3900000:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t\_2} \cdot t\_3\\
\end{array}
\end{array}
if y.re < -7.8e9Initial program 38.7%
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-*.f6478.2
Applied rewrites78.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6477.7
Applied rewrites77.7%
if -7.8e9 < y.re < -1.04999999999999996e-137Initial program 43.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-*.f6429.8
Applied rewrites29.8%
Taylor expanded in y.re around 0
Applied rewrites29.4%
if -1.04999999999999996e-137 < y.re < 3.9e6Initial program 43.1%
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-*.f6445.0
Applied rewrites45.0%
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.f6436.9
Applied rewrites36.9%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6439.0
Applied rewrites39.0%
if 3.9e6 < y.re Initial program 35.0%
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-*.f6456.0
Applied rewrites56.0%
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.f6461.1
Applied rewrites61.1%
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.f6456.8
Applied rewrites56.8%
(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 (log t_1))
(t_3 (* y.im t_2)))
(if (<= y.re -7800000000.0)
(* t_0 (pow t_1 y.re))
(if (<= y.re -1.05e-137)
t_0
(if (<= y.re 3900000.0)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_3)
(* (exp (* y.re t_2)) 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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = log(t_1);
double t_3 = y_46_im * t_2;
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_0 * pow(t_1, y_46_re);
} else if (y_46_re <= -1.05e-137) {
tmp = t_0;
} else if (y_46_re <= 3900000.0) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_3;
} else {
tmp = exp((y_46_re * t_2)) * 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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = log(t_1) t_3 = Float64(y_46_im * t_2) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = Float64(t_0 * (t_1 ^ y_46_re)); elseif (y_46_re <= -1.05e-137) tmp = t_0; elseif (y_46_re <= 3900000.0) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_3); else tmp = Float64(exp(Float64(y_46_re * t_2)) * 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -7800000000.0], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.05e-137], t$95$0, If[LessEqual[y$46$re, 3900000.0], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$3), $MachinePrecision], N[(N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]
\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 := \log t\_1\\
t_3 := y.im \cdot t\_2\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq -1.05 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3900000:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t\_2} \cdot t\_3\\
\end{array}
\end{array}
if y.re < -7.8e9Initial program 38.7%
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-*.f6478.2
Applied rewrites78.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6477.7
Applied rewrites77.7%
if -7.8e9 < y.re < -1.04999999999999996e-137Initial program 43.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-*.f6429.8
Applied rewrites29.8%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6429.4
Applied rewrites29.4%
if -1.04999999999999996e-137 < y.re < 3.9e6Initial program 43.1%
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-*.f6445.0
Applied rewrites45.0%
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.f6436.9
Applied rewrites36.9%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lift-atan2.f6439.0
Applied rewrites39.0%
if 3.9e6 < y.re Initial program 35.0%
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-*.f6456.0
Applied rewrites56.0%
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.f6461.1
Applied rewrites61.1%
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.f6456.8
Applied rewrites56.8%
(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 (log t_1))
(t_3 (* (exp (* y.re t_2)) (* y.im t_2))))
(if (<= y.re -7800000000.0)
(* t_0 (pow t_1 y.re))
(if (<= y.re -6.8e-137)
t_0
(if (<= y.re -4.2e-271)
(* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.re)))
(if (<= y.re 2.6e-162) t_3 (if (<= y.re 1.65e-49) t_0 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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = log(t_1);
double t_3 = exp((y_46_re * t_2)) * (y_46_im * t_2);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_0 * pow(t_1, y_46_re);
} else if (y_46_re <= -6.8e-137) {
tmp = t_0;
} else if (y_46_re <= -4.2e-271) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_re));
} else if (y_46_re <= 2.6e-162) {
tmp = t_3;
} else if (y_46_re <= 1.65e-49) {
tmp = t_0;
} 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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = log(t_1) t_3 = Float64(exp(Float64(y_46_re * t_2)) * Float64(y_46_im * t_2)) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = Float64(t_0 * (t_1 ^ y_46_re)); elseif (y_46_re <= -6.8e-137) tmp = t_0; elseif (y_46_re <= -4.2e-271) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(x_46_re))); elseif (y_46_re <= 2.6e-162) tmp = t_3; elseif (y_46_re <= 1.65e-49) tmp = t_0; 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7800000000.0], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -6.8e-137], t$95$0, If[LessEqual[y$46$re, -4.2e-271], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e-162], t$95$3, If[LessEqual[y$46$re, 1.65e-49], t$95$0, t$95$3]]]]]]]]]
\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 := \log t\_1\\
t_3 := e^{y.re \cdot t\_2} \cdot \left(y.im \cdot t\_2\right)\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.2 \cdot 10^{-271}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-162}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -7.8e9Initial program 38.7%
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-*.f6478.2
Applied rewrites78.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6477.7
Applied rewrites77.7%
if -7.8e9 < y.re < -6.80000000000000028e-137 or 2.6e-162 < y.re < 1.65e-49Initial program 42.3%
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-*.f6425.7
Applied rewrites25.7%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6429.1
Applied rewrites29.1%
if -6.80000000000000028e-137 < y.re < -4.2000000000000001e-271Initial program 44.0%
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.f6431.5
Applied rewrites31.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.f6427.1
Applied rewrites27.1%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6426.5
Applied rewrites26.5%
if -4.2000000000000001e-271 < y.re < 2.6e-162 or 1.65e-49 < y.re Initial program 38.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6452.2
Applied rewrites52.2%
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.f6452.1
Applied rewrites52.1%
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.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)))))
(if (<= x.re -5e-310)
(* t_0 (* y.im (log (* -1.0 x.re))))
(* t_0 (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (x_46_re <= -5e-310) {
tmp = t_0 * (y_46_im * log((-1.0 * x_46_re)));
} else {
tmp = t_0 * (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) :: tmp
t_0 = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im)))
if (x_46re <= (-5d-310)) then
tmp = t_0 * (y_46im * log(((-1.0d0) * x_46re)))
else
tmp = t_0 * (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.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_0 * (y_46_im * Math.log((-1.0 * x_46_re)));
} else {
tmp = t_0 * (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.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if x_46_re <= -5e-310: tmp = t_0 * (y_46_im * math.log((-1.0 * x_46_re))) else: tmp = t_0 * (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 = 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))) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(t_0 * Float64(y_46_im * log(Float64(-1.0 * x_46_re)))); else tmp = Float64(t_0 * 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 = 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))); tmp = 0.0; if (x_46_re <= -5e-310) tmp = t_0 * (y_46_im * log((-1.0 * x_46_re))); else tmp = t_0 * (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[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]}, If[LessEqual[x$46$re, -5e-310], N[(t$95$0 * N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $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}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log \left(-1 \cdot x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 40.8%
Taylor expanded in y.im around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6447.5
Applied rewrites47.5%
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.f6443.0
Applied rewrites43.0%
Taylor expanded in x.re around -inf
lower-*.f6452.5
Applied rewrites52.5%
if -4.999999999999985e-310 < 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-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6446.0
Applied rewrites46.0%
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.f6443.4
Applied rewrites43.4%
Taylor expanded in x.re around inf
Applied rewrites54.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.re -7800000000.0)
t_1
(if (<= y.re -6.8e-137)
t_0
(if (<= y.re 3.5e-174)
(* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.re)))
(if (<= y.re 7.5e+179) t_1 (log (pow x.re y.im))))))))
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 = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_1;
} else if (y_46_re <= -6.8e-137) {
tmp = t_0;
} else if (y_46_re <= 3.5e-174) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_re));
} else if (y_46_re <= 7.5e+179) {
tmp = t_1;
} else {
tmp = log(pow(x_46_re, y_46_im));
}
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(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = t_1; elseif (y_46_re <= -6.8e-137) tmp = t_0; elseif (y_46_re <= 3.5e-174) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(x_46_re))); elseif (y_46_re <= 7.5e+179) tmp = t_1; else tmp = log((x_46_re ^ y_46_im)); 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[(t$95$0 * 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, -7800000000.0], t$95$1, If[LessEqual[y$46$re, -6.8e-137], t$95$0, If[LessEqual[y$46$re, 3.5e-174], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+179], t$95$1, N[Log[N[Power[x$46$re, y$46$im], $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-174}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\log \left({x.re}^{y.im}\right)\\
\end{array}
\end{array}
if y.re < -7.8e9 or 3.49999999999999987e-174 < y.re < 7.50000000000000007e179Initial program 38.5%
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-*.f6456.1
Applied rewrites56.1%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6454.9
Applied rewrites54.9%
if -7.8e9 < y.re < -6.80000000000000028e-137Initial program 43.3%
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-*.f6429.8
Applied rewrites29.8%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6429.5
Applied rewrites29.5%
if -6.80000000000000028e-137 < y.re < 3.49999999999999987e-174Initial program 44.5%
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.f6431.0
Applied rewrites31.0%
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.f6427.6
Applied rewrites27.6%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6427.2
Applied rewrites27.2%
if 7.50000000000000007e179 < y.re Initial program 33.7%
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.f6426.4
Applied rewrites26.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
lower-sin.f64N/A
lower-*.f64N/A
lift-log.f648.2
Applied rewrites8.2%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f641.4
Applied rewrites1.4%
lift-*.f64N/A
lift-log.f64N/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f6422.7
Applied rewrites22.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* t_0 (pow x.im y.re))))
(if (<= y.re -7800000000.0)
t_1
(if (<= y.re -6.8e-137)
t_0
(if (<= y.re 1.72e-174)
(* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.re)))
(if (<= y.re 120.0) t_0 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_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_1;
} else if (y_46_re <= -6.8e-137) {
tmp = t_0;
} else if (y_46_re <= 1.72e-174) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_re));
} else if (y_46_re <= 120.0) {
tmp = t_0;
} 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 = y_46re * atan2(x_46im, x_46re)
t_1 = t_0 * (x_46im ** y_46re)
if (y_46re <= (-7800000000.0d0)) then
tmp = t_1
else if (y_46re <= (-6.8d-137)) then
tmp = t_0
else if (y_46re <= 1.72d-174) then
tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * (y_46im * log(x_46re))
else if (y_46re <= 120.0d0) then
tmp = t_0
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_1;
} else if (y_46_re <= -6.8e-137) {
tmp = t_0;
} else if (y_46_re <= 1.72e-174) {
tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(x_46_re));
} else if (y_46_re <= 120.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -7800000000.0: tmp = t_1 elif y_46_re <= -6.8e-137: tmp = t_0 elif y_46_re <= 1.72e-174: tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(x_46_re)) elif y_46_re <= 120.0: tmp = t_0 else: tmp = t_1 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(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = t_1; elseif (y_46_re <= -6.8e-137) tmp = t_0; elseif (y_46_re <= 1.72e-174) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(x_46_re))); elseif (y_46_re <= 120.0) tmp = t_0; 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -7800000000.0) tmp = t_1; elseif (y_46_re <= -6.8e-137) tmp = t_0; elseif (y_46_re <= 1.72e-174) tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_re)); elseif (y_46_re <= 120.0) tmp = t_0; 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7800000000.0], t$95$1, If[LessEqual[y$46$re, -6.8e-137], t$95$0, If[LessEqual[y$46$re, 1.72e-174], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 120.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.72 \cdot 10^{-174}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.re \leq 120:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -7.8e9 or 120 < y.re Initial program 37.0%
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-*.f6465.9
Applied rewrites65.9%
Taylor expanded in x.re around 0
Applied rewrites50.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6449.9
Applied rewrites49.9%
if -7.8e9 < y.re < -6.80000000000000028e-137 or 1.71999999999999999e-174 < y.re < 120Initial program 41.7%
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-*.f6425.2
Applied rewrites25.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6428.9
Applied rewrites28.9%
if -6.80000000000000028e-137 < y.re < 1.71999999999999999e-174Initial program 44.5%
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.f6431.0
Applied rewrites31.0%
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.f6427.6
Applied rewrites27.6%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6427.1
Applied rewrites27.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* t_0 (pow x.im y.re))))
(if (<= y.re -7800000000.0)
t_1
(if (<= y.re -3.3e-185)
t_0
(if (<= y.re 8.2e-175)
(* y.im (log x.re))
(if (<= y.re 120.0) t_0 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_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_1;
} else if (y_46_re <= -3.3e-185) {
tmp = t_0;
} else if (y_46_re <= 8.2e-175) {
tmp = y_46_im * log(x_46_re);
} else if (y_46_re <= 120.0) {
tmp = t_0;
} 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 = y_46re * atan2(x_46im, x_46re)
t_1 = t_0 * (x_46im ** y_46re)
if (y_46re <= (-7800000000.0d0)) then
tmp = t_1
else if (y_46re <= (-3.3d-185)) then
tmp = t_0
else if (y_46re <= 8.2d-175) then
tmp = y_46im * log(x_46re)
else if (y_46re <= 120.0d0) then
tmp = t_0
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -7800000000.0) {
tmp = t_1;
} else if (y_46_re <= -3.3e-185) {
tmp = t_0;
} else if (y_46_re <= 8.2e-175) {
tmp = y_46_im * Math.log(x_46_re);
} else if (y_46_re <= 120.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -7800000000.0: tmp = t_1 elif y_46_re <= -3.3e-185: tmp = t_0 elif y_46_re <= 8.2e-175: tmp = y_46_im * math.log(x_46_re) elif y_46_re <= 120.0: tmp = t_0 else: tmp = t_1 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(t_0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7800000000.0) tmp = t_1; elseif (y_46_re <= -3.3e-185) tmp = t_0; elseif (y_46_re <= 8.2e-175) tmp = Float64(y_46_im * log(x_46_re)); elseif (y_46_re <= 120.0) tmp = t_0; 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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -7800000000.0) tmp = t_1; elseif (y_46_re <= -3.3e-185) tmp = t_0; elseif (y_46_re <= 8.2e-175) tmp = y_46_im * log(x_46_re); elseif (y_46_re <= 120.0) tmp = t_0; 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7800000000.0], t$95$1, If[LessEqual[y$46$re, -3.3e-185], t$95$0, If[LessEqual[y$46$re, 8.2e-175], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 120.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -7800000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -3.3 \cdot 10^{-185}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-175}:\\
\;\;\;\;y.im \cdot \log x.re\\
\mathbf{elif}\;y.re \leq 120:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -7.8e9 or 120 < y.re Initial program 37.0%
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-*.f6465.9
Applied rewrites65.9%
Taylor expanded in x.re around 0
Applied rewrites50.2%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6449.9
Applied rewrites49.9%
if -7.8e9 < y.re < -3.2999999999999997e-185 or 8.19999999999999997e-175 < y.re < 120Initial program 42.1%
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-*.f6424.8
Applied rewrites24.8%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6427.7
Applied rewrites27.7%
if -3.2999999999999997e-185 < y.re < 8.19999999999999997e-175Initial program 44.4%
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.f6430.4
Applied rewrites30.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
lower-sin.f64N/A
lower-*.f64N/A
lift-log.f6427.3
Applied rewrites27.3%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6413.9
Applied rewrites13.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (pow x.re y.im))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.0003)
t_0
(if (<= y.re -3.3e-185)
t_1
(if (<= y.re 8.2e-175)
(* y.im (log x.re))
(if (<= y.re 120.0) t_1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(pow(x_46_re, y_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0003) {
tmp = t_0;
} else if (y_46_re <= -3.3e-185) {
tmp = t_1;
} else if (y_46_re <= 8.2e-175) {
tmp = y_46_im * log(x_46_re);
} else if (y_46_re <= 120.0) {
tmp = t_1;
} else {
tmp = t_0;
}
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 = log((x_46re ** y_46im))
t_1 = y_46re * atan2(x_46im, x_46re)
if (y_46re <= (-0.0003d0)) then
tmp = t_0
else if (y_46re <= (-3.3d-185)) then
tmp = t_1
else if (y_46re <= 8.2d-175) then
tmp = y_46im * log(x_46re)
else if (y_46re <= 120.0d0) then
tmp = t_1
else
tmp = t_0
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.log(Math.pow(x_46_re, y_46_im));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.0003) {
tmp = t_0;
} else if (y_46_re <= -3.3e-185) {
tmp = t_1;
} else if (y_46_re <= 8.2e-175) {
tmp = y_46_im * Math.log(x_46_re);
} else if (y_46_re <= 120.0) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.pow(x_46_re, y_46_im)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.0003: tmp = t_0 elif y_46_re <= -3.3e-185: tmp = t_1 elif y_46_re <= 8.2e-175: tmp = y_46_im * math.log(x_46_re) elif y_46_re <= 120.0: tmp = t_1 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((x_46_re ^ y_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.0003) tmp = t_0; elseif (y_46_re <= -3.3e-185) tmp = t_1; elseif (y_46_re <= 8.2e-175) tmp = Float64(y_46_im * log(x_46_re)); elseif (y_46_re <= 120.0) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((x_46_re ^ y_46_im)); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.0003) tmp = t_0; elseif (y_46_re <= -3.3e-185) tmp = t_1; elseif (y_46_re <= 8.2e-175) tmp = y_46_im * log(x_46_re); elseif (y_46_re <= 120.0) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Power[x$46$re, y$46$im], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0003], t$95$0, If[LessEqual[y$46$re, -3.3e-185], t$95$1, If[LessEqual[y$46$re, 8.2e-175], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 120.0], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left({x.re}^{y.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.0003:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -3.3 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-175}:\\
\;\;\;\;y.im \cdot \log x.re\\
\mathbf{elif}\;y.re \leq 120:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -2.99999999999999974e-4 or 120 < y.re Initial program 37.2%
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.8
Applied rewrites32.8%
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.f6411.3
Applied rewrites11.3%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f641.6
Applied rewrites1.6%
lift-*.f64N/A
lift-log.f64N/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f6425.0
Applied rewrites25.0%
if -2.99999999999999974e-4 < y.re < -3.2999999999999997e-185 or 8.19999999999999997e-175 < y.re < 120Initial program 41.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-*.f6423.4
Applied rewrites23.4%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6428.5
Applied rewrites28.5%
if -3.2999999999999997e-185 < y.re < 8.19999999999999997e-175Initial program 44.4%
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.f6430.4
Applied rewrites30.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
lower-sin.f64N/A
lower-*.f64N/A
lift-log.f6427.3
Applied rewrites27.3%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6413.9
Applied rewrites13.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 9.2e-46) (* y.re (atan2 x.im x.re)) (* 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 <= 9.2e-46) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = 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 <= 9.2d-46) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = 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 <= 9.2e-46) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = 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 <= 9.2e-46: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = 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 <= 9.2e-46) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = 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 <= 9.2e-46) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = 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, 9.2e-46], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 9.2 \cdot 10^{-46}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < 9.1999999999999997e-46Initial program 43.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6444.8
Applied rewrites44.8%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6413.4
Applied rewrites13.4%
if 9.1999999999999997e-46 < x.re Initial program 32.6%
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.f6471.4
Applied rewrites71.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
lower-sin.f64N/A
lower-*.f64N/A
lift-log.f6436.2
Applied rewrites36.2%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f6418.3
Applied rewrites18.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * log(x_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
code = y_46im * log(x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * Math.log(x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * math.log(x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_im * log(x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \log x.re
\end{array}
Initial program 40.1%
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.9
Applied rewrites32.9%
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.f6418.5
Applied rewrites18.5%
Taylor expanded in y.im around 0
lift-log.f64N/A
lift-*.f646.8
Applied rewrites6.8%
herbie shell --seed 2025114
(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)))))