
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -2e+89)
(* (exp (- (* -1.0 (* y.re t_2)) t_0)) (sin (fma -1.0 (* y.im t_2) t_1)))
(if (<= x.re 1.8e-261)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(fma y.im (log (sqrt (fma x.im x.im (* x.re x.re)))) t_1))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (fma y.im (log x.re) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -2e+89) {
tmp = exp(((-1.0 * (y_46_re * t_2)) - t_0)) * sin(fma(-1.0, (y_46_im * t_2), t_1));
} else if (x_46_re <= 1.8e-261) {
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))) * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))), t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -2e+89) tmp = Float64(exp(Float64(Float64(-1.0 * Float64(y_46_re * t_2)) - t_0)) * sin(fma(-1.0, Float64(y_46_im * t_2), t_1))); elseif (x_46_re <= 1.8e-261) 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))) * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))), t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e+89], N[(N[Exp[N[(N[(-1.0 * N[(y$46$re * t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(-1.0 * N[(y$46$im * t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.8e-261], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{+89}:\\
\;\;\;\;e^{-1 \cdot \left(y.re \cdot t\_2\right) - t\_0} \cdot \sin \left(\mathsf{fma}\left(-1, y.im \cdot t\_2, t\_1\right)\right)\\
\mathbf{elif}\;x.re \leq 1.8 \cdot 10^{-261}:\\
\;\;\;\;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 \mathsf{fma}\left(y.im, \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right)\\
\end{array}
\end{array}
if x.re < -1.99999999999999999e89Initial program 17.6%
Taylor expanded in x.re around -inf
lower-*.f64N/A
Applied rewrites79.0%
if -1.99999999999999999e89 < x.re < 1.79999999999999999e-261Initial program 52.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-*.f6458.3
Applied rewrites58.3%
Taylor expanded in y.re around 0
lower-fma.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6457.4
Applied rewrites57.4%
if 1.79999999999999999e-261 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6466.8
Applied rewrites66.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
(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 -1.4e-11)
(* (exp (- (* -1.0 (* y.re t_3)) t_0)) (sin (fma -1.0 (* y.im t_3) t_1)))
(if (<= x.im 8.5e-309)
(* t_2 (fma y.im (log (sqrt (fma x.im x.im (* x.re x.re)))) t_1))
(if (<= x.im 1.75e-68)
(* t_2 (sin (fma y.im (log x.im) t_1)))
(* (exp (- (* y.re (log x.im)) t_0)) (sin (* y.im (log x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 <= -1.4e-11) {
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 <= 8.5e-309) {
tmp = t_2 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))), t_1);
} else if (x_46_im <= 1.75e-68) {
tmp = t_2 * sin(fma(y_46_im, log(x_46_im), t_1));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * sin((y_46_im * log(x_46_im)));
}
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 <= -1.4e-11) 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 <= 8.5e-309) tmp = Float64(t_2 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))), t_1)); elseif (x_46_im <= 1.75e-68) tmp = Float64(t_2 * sin(fma(y_46_im, log(x_46_im), t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * sin(Float64(y_46_im * log(x_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$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, -1.4e-11], 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, 8.5e-309], 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] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.75e-68], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $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 -1.4 \cdot 10^{-11}:\\
\;\;\;\;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 8.5 \cdot 10^{-309}:\\
\;\;\;\;t\_2 \cdot \mathsf{fma}\left(y.im, \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), t\_1\right)\\
\mathbf{elif}\;x.im \leq 1.75 \cdot 10^{-68}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -1.4e-11Initial program 31.8%
Taylor expanded in x.im around -inf
lower-*.f64N/A
Applied rewrites76.5%
if -1.4e-11 < x.im < 8.4999999999999987e-309Initial program 51.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-*.f6456.1
Applied rewrites56.1%
Taylor expanded in y.re around 0
lower-fma.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6455.6
Applied rewrites55.6%
if 8.4999999999999987e-309 < x.im < 1.75000000000000006e-68Initial program 48.1%
Taylor expanded in x.re around 0
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6455.9
Applied rewrites55.9%
if 1.75000000000000006e-68 < x.im Initial program 35.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6473.7
Applied rewrites73.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
lift-log.f6463.8
Applied rewrites63.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= x.re -1.7e+120)
(* t_1 t_0)
(if (<= x.re 1.8e-261)
(* t_1 (fma y.im (log (sqrt (fma x.im x.im (* x.re x.re)))) t_0))
(*
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re))))
(sin (fma y.im (log x.re) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1.7e+120) {
tmp = t_1 * t_0;
} else if (x_46_re <= 1.8e-261) {
tmp = t_1 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))), t_0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (x_46_re <= -1.7e+120) tmp = Float64(t_1 * t_0); elseif (x_46_re <= 1.8e-261) tmp = Float64(t_1 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))), t_0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.7e+120], N[(t$95$1 * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 1.8e-261], 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] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;x.re \leq -1.7 \cdot 10^{+120}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{elif}\;x.re \leq 1.8 \cdot 10^{-261}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(y.im, \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)\\
\end{array}
\end{array}
if x.re < -1.69999999999999999e120Initial program 11.0%
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 rewrites10.6%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6444.5
Applied rewrites44.5%
if -1.69999999999999999e120 < x.re < 1.79999999999999999e-261Initial program 52.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-*.f6458.3
Applied rewrites58.3%
Taylor expanded in y.re around 0
lower-fma.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6457.6
Applied rewrites57.6%
if 1.79999999999999999e-261 < x.re Initial program 40.9%
Taylor expanded in x.im around 0
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lift-atan2.f6466.8
Applied rewrites66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (exp (- (* y.im (atan2 x.im x.re)))) t_0))
(t_2 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3 (* y.im (log t_2)))
(t_4 (pow t_2 y.re)))
(if (<= y.re -3.9e-19)
(* (sin t_0) t_4)
(if (<= y.re -2.5e-151)
t_1
(if (<= y.re 2.6e-86)
(* (exp (* y.im (- (atan2 x.im x.re)))) t_3)
(if (<= y.re 0.0011)
t_1
(if (<= y.re 8e+189)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_3)
(* t_0 t_4))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
double t_2 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = y_46_im * log(t_2);
double t_4 = pow(t_2, y_46_re);
double tmp;
if (y_46_re <= -3.9e-19) {
tmp = sin(t_0) * t_4;
} else if (y_46_re <= -2.5e-151) {
tmp = t_1;
} else if (y_46_re <= 2.6e-86) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * t_3;
} else if (y_46_re <= 0.0011) {
tmp = t_1;
} else if (y_46_re <= 8e+189) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
} else {
tmp = t_0 * t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(y_46_im * log(t_2)) t_4 = t_2 ^ y_46_re tmp = 0.0 if (y_46_re <= -3.9e-19) tmp = Float64(sin(t_0) * t_4); elseif (y_46_re <= -2.5e-151) tmp = t_1; elseif (y_46_re <= 2.6e-86) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * t_3); elseif (y_46_re <= 0.0011) tmp = t_1; elseif (y_46_re <= 8e+189) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3); else tmp = Float64(t_0 * t_4); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[t$95$2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$2, y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.9e-19], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[y$46$re, -2.5e-151], t$95$1, If[LessEqual[y$46$re, 2.6e-86], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 0.0011], t$95$1, If[LessEqual[y$46$re, 8e+189], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], N[(t$95$0 * t$95$4), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := y.im \cdot \log t\_2\\
t_4 := {t\_2}^{y.re}\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;\sin t\_0 \cdot t\_4\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-86}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_3\\
\mathbf{elif}\;y.re \leq 0.0011:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+189}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_4\\
\end{array}
\end{array}
if y.re < -3.89999999999999995e-19Initial program 42.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-*.f6477.9
Applied rewrites77.9%
if -3.89999999999999995e-19 < y.re < -2.50000000000000002e-151 or 2.6000000000000001e-86 < y.re < 0.00110000000000000007Initial program 42.1%
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 rewrites42.1%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6441.5
Applied rewrites41.5%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6461.3
Applied rewrites61.3%
if -2.50000000000000002e-151 < y.re < 2.6000000000000001e-86Initial program 40.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites34.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6439.8
Applied rewrites39.8%
if 0.00110000000000000007 < y.re < 8.0000000000000002e189Initial program 40.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-*.f6461.1
Applied rewrites61.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f6462.9
Applied rewrites62.9%
if 8.0000000000000002e189 < y.re Initial program 37.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-*.f6459.1
Applied rewrites59.1%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6456.1
Applied rewrites56.1%
(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 (* y.im (log 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 (* (exp (- (* y.im (atan2 x.im x.re)))) t_0)))
(if (<= y.re -3.9e-19)
(* t_3 t_0)
(if (<= y.re -2.5e-151)
t_4
(if (<= y.re 2.6e-86)
(* (exp (* y.im (- (atan2 x.im x.re)))) t_2)
(if (<= y.re 0.0011)
t_4
(if (<= y.re 8e+189) (* t_3 t_2) (* t_0 (pow t_1 y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = y_46_im * log(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 = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
double tmp;
if (y_46_re <= -3.9e-19) {
tmp = t_3 * t_0;
} else if (y_46_re <= -2.5e-151) {
tmp = t_4;
} else if (y_46_re <= 2.6e-86) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * t_2;
} else if (y_46_re <= 0.0011) {
tmp = t_4;
} else if (y_46_re <= 8e+189) {
tmp = t_3 * t_2;
} else {
tmp = t_0 * pow(t_1, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = Float64(y_46_im * log(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 = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0) tmp = 0.0 if (y_46_re <= -3.9e-19) tmp = Float64(t_3 * t_0); elseif (y_46_re <= -2.5e-151) tmp = t_4; elseif (y_46_re <= 2.6e-86) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * t_2); elseif (y_46_re <= 0.0011) tmp = t_4; elseif (y_46_re <= 8e+189) tmp = Float64(t_3 * t_2); else tmp = Float64(t_0 * (t_1 ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, 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[(y$46$im * N[Log[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[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3.9e-19], N[(t$95$3 * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, -2.5e-151], t$95$4, If[LessEqual[y$46$re, 2.6e-86], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 0.0011], t$95$4, If[LessEqual[y$46$re, 8e+189], N[(t$95$3 * t$95$2), $MachinePrecision], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $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 := y.im \cdot \log t\_1\\
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 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;t\_3 \cdot t\_0\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{-151}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-86}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 0.0011:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+189}:\\
\;\;\;\;t\_3 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.89999999999999995e-19Initial program 42.4%
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 rewrites41.9%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6480.4
Applied rewrites80.4%
if -3.89999999999999995e-19 < y.re < -2.50000000000000002e-151 or 2.6000000000000001e-86 < y.re < 0.00110000000000000007Initial program 42.1%
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 rewrites42.1%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6441.5
Applied rewrites41.5%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6461.3
Applied rewrites61.3%
if -2.50000000000000002e-151 < y.re < 2.6000000000000001e-86Initial program 40.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites34.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6439.8
Applied rewrites39.8%
if 0.00110000000000000007 < y.re < 8.0000000000000002e189Initial program 40.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-*.f6461.1
Applied rewrites61.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f6462.9
Applied rewrites62.9%
if 8.0000000000000002e189 < y.re Initial program 37.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-*.f6459.1
Applied rewrites59.1%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6456.1
Applied rewrites56.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (exp (- (* y.im (atan2 x.im x.re)))) t_0))
(t_2 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3 (* y.im (log t_2)))
(t_4 (* t_0 (pow t_2 y.re))))
(if (<= y.re -2.7e+23)
t_4
(if (<= y.re -2.5e-151)
t_1
(if (<= y.re 2.6e-86)
(* (exp (* y.im (- (atan2 x.im x.re)))) t_3)
(if (<= y.re 0.0011)
t_1
(if (<= y.re 8e+189)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_3)
t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
double t_2 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = y_46_im * log(t_2);
double t_4 = t_0 * pow(t_2, y_46_re);
double tmp;
if (y_46_re <= -2.7e+23) {
tmp = t_4;
} else if (y_46_re <= -2.5e-151) {
tmp = t_1;
} else if (y_46_re <= 2.6e-86) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * t_3;
} else if (y_46_re <= 0.0011) {
tmp = t_1;
} else if (y_46_re <= 8e+189) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_3;
} else {
tmp = t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(y_46_im * log(t_2)) t_4 = Float64(t_0 * (t_2 ^ y_46_re)) tmp = 0.0 if (y_46_re <= -2.7e+23) tmp = t_4; elseif (y_46_re <= -2.5e-151) tmp = t_1; elseif (y_46_re <= 2.6e-86) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * t_3); elseif (y_46_re <= 0.0011) tmp = t_1; elseif (y_46_re <= 8e+189) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_3); else tmp = t_4; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[t$95$2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.7e+23], t$95$4, If[LessEqual[y$46$re, -2.5e-151], t$95$1, If[LessEqual[y$46$re, 2.6e-86], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 0.0011], t$95$1, If[LessEqual[y$46$re, 8e+189], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := y.im \cdot \log t\_2\\
t_4 := t\_0 \cdot {t\_2}^{y.re}\\
\mathbf{if}\;y.re \leq -2.7 \cdot 10^{+23}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-86}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_3\\
\mathbf{elif}\;y.re \leq 0.0011:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+189}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.re < -2.6999999999999999e23 or 8.0000000000000002e189 < y.re Initial 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-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6475.0
Applied rewrites75.0%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6472.7
Applied rewrites72.7%
if -2.6999999999999999e23 < y.re < -2.50000000000000002e-151 or 2.6000000000000001e-86 < y.re < 0.00110000000000000007Initial program 42.2%
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 rewrites42.3%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6444.8
Applied rewrites44.8%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6458.9
Applied rewrites58.9%
if -2.50000000000000002e-151 < y.re < 2.6000000000000001e-86Initial program 40.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites34.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6439.8
Applied rewrites39.8%
if 0.00110000000000000007 < y.re < 8.0000000000000002e189Initial program 40.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-*.f6461.1
Applied rewrites61.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f6462.9
Applied rewrites62.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -3.9e-19)
(* t_1 (sin t_0))
(if (<= y.re -2.15e-117)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
(* t_1 (fma y.im (log (sqrt (fma x.im x.im (* x.re x.re)))) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -3.9e-19) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= -2.15e-117) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = t_1 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))), t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -3.9e-19) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= -2.15e-117) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0); else tmp = Float64(t_1 * fma(y_46_im, log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))), t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.9e-19], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.15e-117], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$1 * N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq -2.15 \cdot 10^{-117}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(y.im, \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), t\_0\right)\\
\end{array}
\end{array}
if y.re < -3.89999999999999995e-19Initial program 42.4%
Taylor expanded in y.re around inf
lower-*.f64N/A
lift-atan2.f6482.4
Applied rewrites82.4%
if -3.89999999999999995e-19 < y.re < -2.15e-117Initial program 42.6%
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 rewrites42.6%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6441.3
Applied rewrites41.3%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6460.6
Applied rewrites60.6%
if -2.15e-117 < y.re Initial program 40.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-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
lower-fma.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6450.3
Applied rewrites50.3%
(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)))))
(if (<= y.re -3.9e-19)
(* (sin t_0) (pow t_1 y.re))
(if (<= y.re -2.15e-117)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(fma y.im (log 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -3.9e-19) {
tmp = sin(t_0) * pow(t_1, y_46_re);
} else if (y_46_re <= -2.15e-117) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * fma(y_46_im, log(t_1), t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -3.9e-19) tmp = Float64(sin(t_0) * (t_1 ^ y_46_re)); elseif (y_46_re <= -2.15e-117) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0); else tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * fma(y_46_im, log(t_1), t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.9e-19], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.15e-117], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[t$95$1], $MachinePrecision] + t$95$0), $MachinePrecision]), $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)}\\
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;\sin t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq -2.15 \cdot 10^{-117}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(y.im, \log t\_1, t\_0\right)\\
\end{array}
\end{array}
if y.re < -3.89999999999999995e-19Initial program 42.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-*.f6477.9
Applied rewrites77.9%
if -3.89999999999999995e-19 < y.re < -2.15e-117Initial program 42.6%
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 rewrites42.6%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6441.3
Applied rewrites41.3%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6460.6
Applied rewrites60.6%
if -2.15e-117 < y.re Initial program 40.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-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
lower-fma.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f64N/A
lift-atan2.f64N/A
lift-*.f6450.3
Applied rewrites50.3%
(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 (* t_0 (pow t_1 y.re))))
(if (<= y.re -2.7e+23)
t_2
(if (<= y.re -2.5e-151)
(* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
(if (<= y.re 8e+187)
(* (exp (* y.im (- (atan2 x.im x.re)))) (* y.im (log t_1)))
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_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 = t_0 * pow(t_1, y_46_re);
double tmp;
if (y_46_re <= -2.7e+23) {
tmp = t_2;
} else if (y_46_re <= -2.5e-151) {
tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 8e+187) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * (y_46_im * log(t_1));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = Float64(t_0 * (t_1 ^ y_46_re)) tmp = 0.0 if (y_46_re <= -2.7e+23) tmp = t_2; elseif (y_46_re <= -2.5e-151) tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0); elseif (y_46_re <= 8e+187) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(t_1))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.7e+23], t$95$2, If[LessEqual[y$46$re, -2.5e-151], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 8e+187], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_2 := t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{if}\;y.re \leq -2.7 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{-151}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+187}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \left(y.im \cdot \log t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -2.6999999999999999e23 or 7.99999999999999926e187 < y.re Initial program 40.9%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6474.9
Applied rewrites74.9%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6472.7
Applied rewrites72.7%
if -2.6999999999999999e23 < y.re < -2.50000000000000002e-151Initial program 41.9%
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 rewrites42.1%
Taylor expanded in y.im around 0
lift-atan2.f64N/A
lift-*.f6445.4
Applied rewrites45.4%
Taylor expanded in y.re around 0
lower-exp.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lift-*.f6456.2
Applied rewrites56.2%
if -2.50000000000000002e-151 < y.re < 7.99999999999999926e187Initial program 40.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites27.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6438.0
Applied rewrites38.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sqrt (fma x.im x.im (* x.re x.re))))
(t_1 (* (* y.re (atan2 x.im x.re)) (pow t_0 y.re))))
(if (<= y.re -7e-103)
t_1
(if (<= y.re 8e+187)
(* (exp (* y.im (- (atan2 x.im x.re)))) (* y.im (log 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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_1 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(t_0, y_46_re);
double tmp;
if (y_46_re <= -7e-103) {
tmp = t_1;
} else if (y_46_re <= 8e+187) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * (y_46_im * log(t_0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_1 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (t_0 ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7e-103) tmp = t_1; elseif (y_46_re <= 8e+187) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(t_0))); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[t$95$0, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-103], t$95$1, If[LessEqual[y$46$re, 8e+187], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_1 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_0}^{y.re}\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+187}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \left(y.im \cdot \log t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -7.00000000000000032e-103 or 7.99999999999999926e187 < y.re Initial program 41.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-*.f6465.3
Applied rewrites65.3%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6463.6
Applied rewrites63.6%
if -7.00000000000000032e-103 < y.re < 7.99999999999999926e187Initial program 40.6%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites28.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6437.7
Applied rewrites37.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sqrt (fma x.im x.im (* x.re x.re))))
(t_2 (pow t_1 y.re))
(t_3 (* t_0 t_2)))
(if (<= y.re -2.6e-19)
t_3
(if (<= y.re -1.25e-233)
t_0
(if (<= y.re 1e+189) (* t_2 (* y.im (log t_1))) t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_2 = pow(t_1, y_46_re);
double t_3 = t_0 * t_2;
double tmp;
if (y_46_re <= -2.6e-19) {
tmp = t_3;
} else if (y_46_re <= -1.25e-233) {
tmp = t_0;
} else if (y_46_re <= 1e+189) {
tmp = t_2 * (y_46_im * log(t_1));
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_2 = t_1 ^ y_46_re t_3 = Float64(t_0 * t_2) tmp = 0.0 if (y_46_re <= -2.6e-19) tmp = t_3; elseif (y_46_re <= -1.25e-233) tmp = t_0; elseif (y_46_re <= 1e+189) tmp = Float64(t_2 * Float64(y_46_im * log(t_1))); else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -2.6e-19], t$95$3, If[LessEqual[y$46$re, -1.25e-233], t$95$0, If[LessEqual[y$46$re, 1e+189], N[(t$95$2 * N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := {t\_1}^{y.re}\\
t_3 := t\_0 \cdot t\_2\\
\mathbf{if}\;y.re \leq -2.6 \cdot 10^{-19}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -1.25 \cdot 10^{-233}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 10^{+189}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -2.60000000000000013e-19 or 1e189 < y.re Initial 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-pow.f64N/A
lower-sqrt.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6472.9
Applied rewrites72.9%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6470.8
Applied rewrites70.8%
if -2.60000000000000013e-19 < y.re < -1.25000000000000003e-233Initial 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-*.f6424.3
Applied rewrites24.3%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6426.0
Applied rewrites26.0%
if -1.25000000000000003e-233 < y.re < 1e189Initial program 40.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-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f6445.4
Applied rewrites45.4%
Taylor expanded in y.im around 0
sqrt-pow2N/A
pow2N/A
pow2N/A
sqrt-pow2N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f6431.9
Applied rewrites31.9%
(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 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<=
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))
0.9)
(* (pow t_1 y.re) (* y.im (log t_1)))
(log (pow t_1 y.im)))))
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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if ((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)))) <= 0.9) {
tmp = pow(t_1, y_46_re) * (y_46_im * log(t_1));
} else {
tmp = log(pow(t_1, y_46_im));
}
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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (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)))) <= 0.9) tmp = Float64((t_1 ^ y_46_re) * Float64(y_46_im * log(t_1))); else tmp = log((t_1 ^ 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[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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[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], 0.9], N[(N[Power[t$95$1, y$46$re], $MachinePrecision] * N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[t$95$1, y$46$im], $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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;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) \leq 0.9:\\
\;\;\;\;{t\_1}^{y.re} \cdot \left(y.im \cdot \log t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left({t\_1}^{y.im}\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 0.900000000000000022Initial program 86.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-*.f6486.5
Applied rewrites86.5%
Taylor expanded in y.re around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-log.f6473.7
Applied rewrites73.7%
Taylor expanded in y.im around 0
sqrt-pow2N/A
pow2N/A
pow2N/A
sqrt-pow2N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f6452.5
Applied rewrites52.5%
if 0.900000000000000022 < (*.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 9.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites4.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.5
Applied rewrites17.5%
lift-*.f64N/A
lift-log.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6422.5
Applied rewrites22.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -2.1e-148)
(* y.re (atan2 x.im x.re))
(if (<= y.re 1.26e-57) (* y.im (log t_0)) (log (pow t_0 y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -2.1e-148) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else if (y_46_re <= 1.26e-57) {
tmp = y_46_im * log(t_0);
} else {
tmp = log(pow(t_0, y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -2.1e-148) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); elseif (y_46_re <= 1.26e-57) tmp = Float64(y_46_im * log(t_0)); else tmp = log((t_0 ^ 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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.1e-148], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.26e-57], N[(y$46$im * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision], N[Log[N[Power[t$95$0, y$46$im], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -2.1 \cdot 10^{-148}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{elif}\;y.re \leq 1.26 \cdot 10^{-57}:\\
\;\;\;\;y.im \cdot \log t\_0\\
\mathbf{else}:\\
\;\;\;\;\log \left({t\_0}^{y.im}\right)\\
\end{array}
\end{array}
if y.re < -2.1e-148Initial 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-*.f6462.0
Applied rewrites62.0%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6415.3
Applied rewrites15.3%
if -2.1e-148 < y.re < 1.26e-57Initial program 40.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites33.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6422.0
Applied rewrites22.0%
if 1.26e-57 < y.re Initial program 39.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites15.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6423.1
Applied rewrites23.1%
lift-*.f64N/A
lift-log.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-sqrt.f6437.0
Applied rewrites37.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -2.1e-148) (* y.re (atan2 x.im x.re)) (* y.im (log (sqrt (fma x.im x.im (* x.re x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -2.1e-148) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -2.1e-148) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -2.1e-148], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.1 \cdot 10^{-148}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.1e-148Initial 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-*.f6462.0
Applied rewrites62.0%
Taylor expanded in y.re around 0
lift-atan2.f64N/A
lift-*.f6415.3
Applied rewrites15.3%
if -2.1e-148 < y.re Initial program 40.1%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites25.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6422.5
Applied rewrites22.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (sqrt (* x.re x.re))))))
(if (<= x.re -65.0)
t_0
(if (<= x.re 1.56e-291) (* y.im (log (sqrt (* x.im x.im)))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(sqrt((x_46_re * x_46_re)));
double tmp;
if (x_46_re <= -65.0) {
tmp = t_0;
} else if (x_46_re <= 1.56e-291) {
tmp = y_46_im * log(sqrt((x_46_im * x_46_im)));
} 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) :: tmp
t_0 = y_46im * log(sqrt((x_46re * x_46re)))
if (x_46re <= (-65.0d0)) then
tmp = t_0
else if (x_46re <= 1.56d-291) then
tmp = y_46im * log(sqrt((x_46im * x_46im)))
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 = y_46_im * Math.log(Math.sqrt((x_46_re * x_46_re)));
double tmp;
if (x_46_re <= -65.0) {
tmp = t_0;
} else if (x_46_re <= 1.56e-291) {
tmp = y_46_im * Math.log(Math.sqrt((x_46_im * x_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.log(math.sqrt((x_46_re * x_46_re))) tmp = 0 if x_46_re <= -65.0: tmp = t_0 elif x_46_re <= 1.56e-291: tmp = y_46_im * math.log(math.sqrt((x_46_im * x_46_im))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(sqrt(Float64(x_46_re * x_46_re)))) tmp = 0.0 if (x_46_re <= -65.0) tmp = t_0; elseif (x_46_re <= 1.56e-291) tmp = Float64(y_46_im * log(sqrt(Float64(x_46_im * x_46_im)))); 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 = y_46_im * log(sqrt((x_46_re * x_46_re))); tmp = 0.0; if (x_46_re <= -65.0) tmp = t_0; elseif (x_46_re <= 1.56e-291) tmp = y_46_im * log(sqrt((x_46_im * x_46_im))); 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[(y$46$im * N[Log[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -65.0], t$95$0, If[LessEqual[x$46$re, 1.56e-291], N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\sqrt{x.re \cdot x.re}\right)\\
\mathbf{if}\;x.re \leq -65:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 1.56 \cdot 10^{-291}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.im \cdot x.im}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x.re < -65 or 1.56e-291 < x.re Initial program 36.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites20.4%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6418.2
Applied rewrites18.2%
Taylor expanded in x.re around inf
pow2N/A
lift-*.f6415.1
Applied rewrites15.1%
if -65 < x.re < 1.56e-291Initial program 52.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites29.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6416.8
Applied rewrites16.8%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6417.0
Applied rewrites17.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]
\begin{array}{l}
\\
y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)
\end{array}
Initial program 40.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.9
Applied rewrites17.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 5.2e-45) (* y.im (log (sqrt (* x.im x.im)))) (* 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 <= 5.2e-45) {
tmp = y_46_im * log(sqrt((x_46_im * x_46_im)));
} 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 <= 5.2d-45) then
tmp = y_46im * log(sqrt((x_46im * x_46im)))
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 <= 5.2e-45) {
tmp = y_46_im * Math.log(Math.sqrt((x_46_im * x_46_im)));
} 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 <= 5.2e-45: tmp = y_46_im * math.log(math.sqrt((x_46_im * x_46_im))) 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 <= 5.2e-45) tmp = Float64(y_46_im * log(sqrt(Float64(x_46_im * x_46_im)))); 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 <= 5.2e-45) tmp = y_46_im * log(sqrt((x_46_im * x_46_im))); 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, 5.2e-45], N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.im \cdot x.im}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < 5.19999999999999973e-45Initial program 44.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites25.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.3
Applied rewrites17.3%
Taylor expanded in x.re around 0
pow2N/A
lift-*.f6415.0
Applied rewrites15.0%
if 5.19999999999999973e-45 < x.re Initial program 32.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites17.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6419.3
Applied rewrites19.3%
Taylor expanded in x.re around inf
Applied rewrites18.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -3.1e-105) (* y.im (log (* -1.0 x.im))) (if (<= x.im 2.6e-252) (* y.im (log x.re)) (* y.im (log x.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.1e-105) {
tmp = y_46_im * log((-1.0 * x_46_im));
} else if (x_46_im <= 2.6e-252) {
tmp = y_46_im * log(x_46_re);
} else {
tmp = y_46_im * log(x_46_im);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-3.1d-105)) then
tmp = y_46im * log(((-1.0d0) * x_46im))
else if (x_46im <= 2.6d-252) then
tmp = y_46im * log(x_46re)
else
tmp = y_46im * log(x_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.1e-105) {
tmp = y_46_im * Math.log((-1.0 * x_46_im));
} else if (x_46_im <= 2.6e-252) {
tmp = y_46_im * Math.log(x_46_re);
} else {
tmp = y_46_im * Math.log(x_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -3.1e-105: tmp = y_46_im * math.log((-1.0 * x_46_im)) elif x_46_im <= 2.6e-252: tmp = y_46_im * math.log(x_46_re) else: tmp = y_46_im * math.log(x_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -3.1e-105) tmp = Float64(y_46_im * log(Float64(-1.0 * x_46_im))); elseif (x_46_im <= 2.6e-252) tmp = Float64(y_46_im * log(x_46_re)); else tmp = Float64(y_46_im * log(x_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -3.1e-105) tmp = y_46_im * log((-1.0 * x_46_im)); elseif (x_46_im <= 2.6e-252) tmp = y_46_im * log(x_46_re); else tmp = y_46_im * log(x_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -3.1e-105], N[(y$46$im * N[Log[N[(-1.0 * x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.6e-252], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.1 \cdot 10^{-105}:\\
\;\;\;\;y.im \cdot \log \left(-1 \cdot x.im\right)\\
\mathbf{elif}\;x.im \leq 2.6 \cdot 10^{-252}:\\
\;\;\;\;y.im \cdot \log x.re\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.im\\
\end{array}
\end{array}
if x.im < -3.10000000000000014e-105Initial program 39.4%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.3
Applied rewrites17.3%
Taylor expanded in x.im around -inf
lower-*.f6411.3
Applied rewrites11.3%
if -3.10000000000000014e-105 < x.im < 2.5999999999999999e-252Initial program 43.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites23.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6418.9
Applied rewrites18.9%
Taylor expanded in x.re around inf
Applied rewrites10.6%
if 2.5999999999999999e-252 < x.im Initial program 40.7%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.9
Applied rewrites17.9%
Taylor expanded in x.re around 0
lower-log.f649.8
Applied rewrites9.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -2e-310) (* y.im (log (* -1.0 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 <= -2e-310) {
tmp = y_46_im * log((-1.0 * 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 <= (-2d-310)) then
tmp = y_46im * log(((-1.0d0) * 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 <= -2e-310) {
tmp = y_46_im * Math.log((-1.0 * 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 <= -2e-310: tmp = y_46_im * math.log((-1.0 * 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 <= -2e-310) tmp = Float64(y_46_im * log(Float64(-1.0 * 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 <= -2e-310) tmp = y_46_im * log((-1.0 * 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, -2e-310], N[(y$46$im * N[Log[N[(-1.0 * x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;y.im \cdot \log \left(-1 \cdot x.re\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < -1.999999999999994e-310Initial program 41.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites23.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.3
Applied rewrites17.3%
Taylor expanded in x.re around -inf
lower-*.f649.3
Applied rewrites9.3%
if -1.999999999999994e-310 < x.re Initial program 40.8%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6418.5
Applied rewrites18.5%
Taylor expanded in x.re around inf
Applied rewrites13.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 4.3e-268) (* y.im (log x.im)) (* 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 <= 4.3e-268) {
tmp = y_46_im * log(x_46_im);
} 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 <= 4.3d-268) then
tmp = y_46im * log(x_46im)
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 <= 4.3e-268) {
tmp = y_46_im * Math.log(x_46_im);
} 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 <= 4.3e-268: tmp = y_46_im * math.log(x_46_im) 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 <= 4.3e-268) tmp = Float64(y_46_im * log(x_46_im)); 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 <= 4.3e-268) tmp = y_46_im * log(x_46_im); 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, 4.3e-268], N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 4.3 \cdot 10^{-268}:\\
\;\;\;\;y.im \cdot \log x.im\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < 4.3e-268Initial program 41.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites23.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.5
Applied rewrites17.5%
Taylor expanded in x.re around 0
lower-log.f644.7
Applied rewrites4.7%
if 4.3e-268 < x.re Initial program 40.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6418.3
Applied rewrites18.3%
Taylor expanded in x.re around inf
Applied rewrites14.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log x.im)))
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_im);
}
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_46im)
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_im);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * math.log(x_46_im)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(x_46_im)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_im * log(x_46_im); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \log x.im
\end{array}
Initial program 40.9%
Taylor expanded in y.re around 0
lower-*.f64N/A
distribute-lft-neg-inN/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-atan2.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-sqrt.f64N/A
Applied rewrites22.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
pow2N/A
pow2N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f6417.9
Applied rewrites17.9%
Taylor expanded in x.re around 0
lower-log.f644.7
Applied rewrites4.7%
herbie shell --seed 2025110
(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)))))