
(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}
Sampling outcomes in binary64 precision:
Herbie found 26 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 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (* y.im t_0))
(t_3 (exp (* (- y.im) (atan2 x.im x.re))))
(t_4 (* t_3 (sin (* (fma t_0 (/ y.im y.re) (atan2 x.im x.re)) y.re)))))
(if (<= y.re -1.35)
(* t_1 (sin (* t_0 y.im)))
(if (<= y.re -2.2e-200)
t_4
(if (<= y.re 3.5e-138)
(* t_3 (sin t_2))
(if (<= y.re 1.05e+14) t_4 (* 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 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_im * t_0;
double t_3 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_4 = t_3 * sin((fma(t_0, (y_46_im / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
double tmp;
if (y_46_re <= -1.35) {
tmp = t_1 * sin((t_0 * y_46_im));
} else if (y_46_re <= -2.2e-200) {
tmp = t_4;
} else if (y_46_re <= 3.5e-138) {
tmp = t_3 * sin(t_2);
} else if (y_46_re <= 1.05e+14) {
tmp = t_4;
} else {
tmp = t_1 * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_im * t_0) t_3 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_4 = Float64(t_3 * sin(Float64(fma(t_0, Float64(y_46_im / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))) tmp = 0.0 if (y_46_re <= -1.35) tmp = Float64(t_1 * sin(Float64(t_0 * y_46_im))); elseif (y_46_re <= -2.2e-200) tmp = t_4; elseif (y_46_re <= 3.5e-138) tmp = Float64(t_3 * sin(t_2)); elseif (y_46_re <= 1.05e+14) tmp = t_4; else tmp = Float64(t_1 * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$0 * N[(y$46$im / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.35], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.2e-200], t$95$4, If[LessEqual[y$46$re, 3.5e-138], N[(t$95$3 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+14], t$95$4, N[(t$95$1 * t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.im \cdot t\_0\\
t_3 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := t\_3 \cdot \sin \left(\mathsf{fma}\left(t\_0, \frac{y.im}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.35:\\
\;\;\;\;t\_1 \cdot \sin \left(t\_0 \cdot y.im\right)\\
\mathbf{elif}\;y.re \leq -2.2 \cdot 10^{-200}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-138}:\\
\;\;\;\;t\_3 \cdot \sin t\_2\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\end{array}
\end{array}
if y.re < -1.3500000000000001Initial program 44.9%
Taylor expanded in y.re around 0
Applied rewrites81.7%
if -1.3500000000000001 < y.re < -2.20000000000000013e-200 or 3.4999999999999999e-138 < y.re < 1.05e14Initial program 33.9%
Taylor expanded in y.re around inf
Applied rewrites38.6%
Applied rewrites40.8%
Taylor expanded in y.re around 0
Applied rewrites76.4%
if -2.20000000000000013e-200 < y.re < 3.4999999999999999e-138Initial program 38.6%
Taylor expanded in y.im around 0
Applied rewrites44.4%
Taylor expanded in y.re around 0
Applied rewrites81.0%
if 1.05e14 < y.re Initial program 41.7%
Taylor expanded in y.im around 0
Applied rewrites61.7%
Taylor expanded in y.re around 0
Applied rewrites73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.im t_0))
(t_2
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_1))
(t_3 (exp (* (- y.im) (atan2 x.im x.re))))
(t_4 (* t_3 (sin (* (fma t_0 (/ y.im y.re) (atan2 x.im x.re)) y.re)))))
(if (<= y.re -65000000000000.0)
t_2
(if (<= y.re -2.2e-200)
t_4
(if (<= y.re 3.5e-138)
(* t_3 (sin t_1))
(if (<= y.re 1.05e+14) t_4 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_im * t_0;
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
double t_3 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
double t_4 = t_3 * sin((fma(t_0, (y_46_im / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
double tmp;
if (y_46_re <= -65000000000000.0) {
tmp = t_2;
} else if (y_46_re <= -2.2e-200) {
tmp = t_4;
} else if (y_46_re <= 3.5e-138) {
tmp = t_3 * sin(t_1);
} else if (y_46_re <= 1.05e+14) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_im * t_0) t_2 = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_1) t_3 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) t_4 = Float64(t_3 * sin(Float64(fma(t_0, Float64(y_46_im / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))) tmp = 0.0 if (y_46_re <= -65000000000000.0) tmp = t_2; elseif (y_46_re <= -2.2e-200) tmp = t_4; elseif (y_46_re <= 3.5e-138) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_re <= 1.05e+14) tmp = t_4; 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$0 * N[(y$46$im / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -65000000000000.0], t$95$2, If[LessEqual[y$46$re, -2.2e-200], t$95$4, If[LessEqual[y$46$re, 3.5e-138], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+14], t$95$4, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.im \cdot t\_0\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_1\\
t_3 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := t\_3 \cdot \sin \left(\mathsf{fma}\left(t\_0, \frac{y.im}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -65000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.2 \cdot 10^{-200}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-138}:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -6.5e13 or 1.05e14 < y.re Initial program 42.5%
Taylor expanded in y.im around 0
Applied rewrites70.8%
Taylor expanded in y.re around 0
Applied rewrites76.5%
if -6.5e13 < y.re < -2.20000000000000013e-200 or 3.4999999999999999e-138 < y.re < 1.05e14Initial program 34.9%
Taylor expanded in y.re around inf
Applied rewrites39.5%
Applied rewrites41.7%
Taylor expanded in y.re around 0
Applied rewrites75.1%
if -2.20000000000000013e-200 < y.re < 3.4999999999999999e-138Initial program 38.6%
Taylor expanded in y.im around 0
Applied rewrites44.4%
Taylor expanded in y.re around 0
Applied rewrites81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.im x.re)))
(t_3 (* y.im t_2)))
(if (<= y.im -1.7e+106)
(* (sin (* t_2 y.im)) (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im -1.58e+28)
(* t_1 t_3)
(if (<= y.im 5e-161)
(* t_0 (sin (* (fma y.im (/ t_2 y.re) (atan2 x.im x.re)) y.re)))
(if (<= y.im 52000000000000.0)
(* t_0 (sin t_3))
(* t_1 (sin (* (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = y_46_im * t_2;
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = sin((t_2 * y_46_im)) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.58e+28) {
tmp = t_1 * t_3;
} else if (y_46_im <= 5e-161) {
tmp = t_0 * sin((fma(y_46_im, (t_2 / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
} else if (y_46_im <= 52000000000000.0) {
tmp = t_0 * sin(t_3);
} else {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(y_46_im * t_2) tmp = 0.0 if (y_46_im <= -1.7e+106) tmp = Float64(sin(Float64(t_2 * y_46_im)) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= -1.58e+28) tmp = Float64(t_1 * t_3); elseif (y_46_im <= 5e-161) tmp = Float64(t_0 * sin(Float64(fma(y_46_im, Float64(t_2 / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); elseif (y_46_im <= 52000000000000.0) tmp = Float64(t_0 * sin(t_3)); else tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -1.7e+106], N[(N[Sin[N[(t$95$2 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.58e+28], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, 5e-161], N[(t$95$0 * N[Sin[N[(N[(y$46$im * N[(t$95$2 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 52000000000000.0], N[(t$95$0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := y.im \cdot t\_2\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;\sin \left(t\_2 \cdot y.im\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq -1.58 \cdot 10^{+28}:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{-161}:\\
\;\;\;\;t\_0 \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{t\_2}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{elif}\;y.im \leq 52000000000000:\\
\;\;\;\;t\_0 \cdot \sin t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.im < -1.69999999999999997e106Initial program 53.7%
Taylor expanded in y.re around 0
Applied rewrites78.7%
if -1.69999999999999997e106 < y.im < -1.57999999999999998e28Initial program 35.3%
Taylor expanded in y.im around 0
Applied rewrites76.7%
Taylor expanded in y.re around 0
Applied rewrites76.7%
if -1.57999999999999998e28 < y.im < 4.9999999999999999e-161Initial program 40.9%
Taylor expanded in y.re around inf
Applied rewrites58.0%
Taylor expanded in y.im around 0
Applied rewrites88.3%
if 4.9999999999999999e-161 < y.im < 5.2e13Initial program 39.4%
Taylor expanded in y.re around inf
Applied rewrites49.7%
Taylor expanded in y.im around 0
Applied rewrites76.3%
Taylor expanded in y.re around 0
Applied rewrites85.9%
if 5.2e13 < y.im Initial program 24.9%
Taylor expanded in y.re around inf
Applied rewrites46.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.im x.re)))
(t_3 (* y.im t_2))
(t_4 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.im -1.7e+106)
(* (sin (* t_2 y.im)) (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im -1.58e+28)
(* t_1 t_3)
(if (<= y.im -1.65e-256)
(* t_0 (sin (* y.im (fma y.re (/ (atan2 x.im x.re) y.im) t_2))))
(if (<= y.im 7.5e-175)
(* t_0 t_4)
(if (<= y.im 52000000000000.0) (* t_0 (sin t_3)) (* t_1 t_4))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = y_46_im * t_2;
double t_4 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = sin((t_2 * y_46_im)) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.58e+28) {
tmp = t_1 * t_3;
} else if (y_46_im <= -1.65e-256) {
tmp = t_0 * sin((y_46_im * fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), t_2)));
} else if (y_46_im <= 7.5e-175) {
tmp = t_0 * t_4;
} else if (y_46_im <= 52000000000000.0) {
tmp = t_0 * sin(t_3);
} else {
tmp = t_1 * t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(y_46_im * t_2) t_4 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_im <= -1.7e+106) tmp = Float64(sin(Float64(t_2 * y_46_im)) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= -1.58e+28) tmp = Float64(t_1 * t_3); elseif (y_46_im <= -1.65e-256) tmp = Float64(t_0 * sin(Float64(y_46_im * fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), t_2)))); elseif (y_46_im <= 7.5e-175) tmp = Float64(t_0 * t_4); elseif (y_46_im <= 52000000000000.0) tmp = Float64(t_0 * sin(t_3)); else tmp = Float64(t_1 * t_4); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.7e+106], N[(N[Sin[N[(t$95$2 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.58e+28], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, -1.65e-256], N[(t$95$0 * N[Sin[N[(y$46$im * N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e-175], N[(t$95$0 * t$95$4), $MachinePrecision], If[LessEqual[y$46$im, 52000000000000.0], N[(t$95$0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$4), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := y.im \cdot t\_2\\
t_4 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;\sin \left(t\_2 \cdot y.im\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq -1.58 \cdot 10^{+28}:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;y.im \leq -1.65 \cdot 10^{-256}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, t\_2\right)\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-175}:\\
\;\;\;\;t\_0 \cdot t\_4\\
\mathbf{elif}\;y.im \leq 52000000000000:\\
\;\;\;\;t\_0 \cdot \sin t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_4\\
\end{array}
\end{array}
if y.im < -1.69999999999999997e106Initial program 53.7%
Taylor expanded in y.re around 0
Applied rewrites78.7%
if -1.69999999999999997e106 < y.im < -1.57999999999999998e28Initial program 35.3%
Taylor expanded in y.im around 0
Applied rewrites76.7%
Taylor expanded in y.re around 0
Applied rewrites76.7%
if -1.57999999999999998e28 < y.im < -1.65e-256Initial program 32.2%
Taylor expanded in y.re around inf
Applied rewrites46.5%
Taylor expanded in y.im around 0
Applied rewrites82.8%
Taylor expanded in y.im around inf
Applied rewrites73.4%
if -1.65e-256 < y.im < 7.50000000000000053e-175Initial program 58.0%
Taylor expanded in y.im around 0
Applied rewrites99.8%
if 7.50000000000000053e-175 < y.im < 5.2e13Initial program 39.8%
Taylor expanded in y.re around inf
Applied rewrites50.9%
Taylor expanded in y.im around 0
Applied rewrites77.6%
Taylor expanded in y.re around 0
Applied rewrites84.0%
if 5.2e13 < y.im Initial program 24.9%
Taylor expanded in y.re around inf
Applied rewrites46.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.im x.re)))
(t_3 (* y.im t_2))
(t_4 (* t_0 (sin t_3)))
(t_5 (sin (* (atan2 x.im x.re) y.re))))
(if (<= y.im -1.7e+106)
(* (sin (* t_2 y.im)) (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.im -1.58e+28)
(* t_1 t_3)
(if (<= y.im -1.48e-171)
t_4
(if (<= y.im 7.5e-175)
(* t_0 t_5)
(if (<= y.im 52000000000000.0) t_4 (* t_1 t_5))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = y_46_im * t_2;
double t_4 = t_0 * sin(t_3);
double t_5 = sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = sin((t_2 * y_46_im)) * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.58e+28) {
tmp = t_1 * t_3;
} else if (y_46_im <= -1.48e-171) {
tmp = t_4;
} else if (y_46_im <= 7.5e-175) {
tmp = t_0 * t_5;
} else if (y_46_im <= 52000000000000.0) {
tmp = t_4;
} else {
tmp = t_1 * t_5;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = y_46_im * t_2;
double t_4 = t_0 * Math.sin(t_3);
double t_5 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = Math.sin((t_2 * y_46_im)) * Math.pow(Math.exp(-y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_im <= -1.58e+28) {
tmp = t_1 * t_3;
} else if (y_46_im <= -1.48e-171) {
tmp = t_4;
} else if (y_46_im <= 7.5e-175) {
tmp = t_0 * t_5;
} else if (y_46_im <= 52000000000000.0) {
tmp = t_4;
} else {
tmp = t_1 * t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = y_46_im * t_2 t_4 = t_0 * math.sin(t_3) t_5 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_im <= -1.7e+106: tmp = math.sin((t_2 * y_46_im)) * math.pow(math.exp(-y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_im <= -1.58e+28: tmp = t_1 * t_3 elif y_46_im <= -1.48e-171: tmp = t_4 elif y_46_im <= 7.5e-175: tmp = t_0 * t_5 elif y_46_im <= 52000000000000.0: tmp = t_4 else: tmp = t_1 * t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(y_46_im * t_2) t_4 = Float64(t_0 * sin(t_3)) t_5 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) tmp = 0.0 if (y_46_im <= -1.7e+106) tmp = Float64(sin(Float64(t_2 * y_46_im)) * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_im <= -1.58e+28) tmp = Float64(t_1 * t_3); elseif (y_46_im <= -1.48e-171) tmp = t_4; elseif (y_46_im <= 7.5e-175) tmp = Float64(t_0 * t_5); elseif (y_46_im <= 52000000000000.0) tmp = t_4; else tmp = Float64(t_1 * t_5); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; 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))); t_2 = log(hypot(x_46_im, x_46_re)); t_3 = y_46_im * t_2; t_4 = t_0 * sin(t_3); t_5 = sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_im <= -1.7e+106) tmp = sin((t_2 * y_46_im)) * (exp(-y_46_im) ^ atan2(x_46_im, x_46_re)); elseif (y_46_im <= -1.58e+28) tmp = t_1 * t_3; elseif (y_46_im <= -1.48e-171) tmp = t_4; elseif (y_46_im <= 7.5e-175) tmp = t_0 * t_5; elseif (y_46_im <= 52000000000000.0) tmp = t_4; else tmp = t_1 * t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.7e+106], N[(N[Sin[N[(t$95$2 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.58e+28], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, -1.48e-171], t$95$4, If[LessEqual[y$46$im, 7.5e-175], N[(t$95$0 * t$95$5), $MachinePrecision], If[LessEqual[y$46$im, 52000000000000.0], t$95$4, N[(t$95$1 * t$95$5), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := y.im \cdot t\_2\\
t_4 := t\_0 \cdot \sin t\_3\\
t_5 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;\sin \left(t\_2 \cdot y.im\right) \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.im \leq -1.58 \cdot 10^{+28}:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;y.im \leq -1.48 \cdot 10^{-171}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-175}:\\
\;\;\;\;t\_0 \cdot t\_5\\
\mathbf{elif}\;y.im \leq 52000000000000:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_5\\
\end{array}
\end{array}
if y.im < -1.69999999999999997e106Initial program 53.7%
Taylor expanded in y.re around 0
Applied rewrites78.7%
if -1.69999999999999997e106 < y.im < -1.57999999999999998e28Initial program 35.3%
Taylor expanded in y.im around 0
Applied rewrites76.7%
Taylor expanded in y.re around 0
Applied rewrites76.7%
if -1.57999999999999998e28 < y.im < -1.48e-171 or 7.50000000000000053e-175 < y.im < 5.2e13Initial program 35.7%
Taylor expanded in y.re around inf
Applied rewrites49.9%
Taylor expanded in y.im around 0
Applied rewrites78.5%
Taylor expanded in y.re around 0
Applied rewrites77.2%
if -1.48e-171 < y.im < 7.50000000000000053e-175Initial program 49.0%
Taylor expanded in y.im around 0
Applied rewrites86.3%
if 5.2e13 < y.im Initial program 24.9%
Taylor expanded in y.re around inf
Applied rewrites46.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (* y.im t_0)))
(if (<= y.re -4.2e-68)
(* t_1 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re -2.02e-199)
(* (sin (* (fma (/ y.im y.re) t_0 (atan2 x.im x.re)) y.re)) 1.0)
(if (<= y.re 4.8e-80)
(* (exp (* (- y.im) (atan2 x.im x.re))) (sin t_2))
(if (<= y.re 1.05e+14)
(*
(pow (hypot x.im x.re) y.re)
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.re))))
(* 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 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_im * t_0;
double tmp;
if (y_46_re <= -4.2e-68) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= -2.02e-199) {
tmp = sin((fma((y_46_im / y_46_re), t_0, atan2(x_46_im, x_46_re)) * y_46_re)) * 1.0;
} else if (y_46_re <= 4.8e-80) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * sin(t_2);
} else if (y_46_re <= 1.05e+14) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_im * t_0) tmp = 0.0 if (y_46_re <= -4.2e-68) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= -2.02e-199) tmp = Float64(sin(Float64(fma(Float64(y_46_im / y_46_re), t_0, atan(x_46_im, x_46_re)) * y_46_re)) * 1.0); elseif (y_46_re <= 4.8e-80) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * sin(t_2)); elseif (y_46_re <= 1.05e+14) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -4.2e-68], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.02e-199], N[(N[Sin[N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * t$95$0 + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 4.8e-80], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+14], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.im \cdot t\_0\\
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{-68}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq -2.02 \cdot 10^{-199}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\frac{y.im}{y.re}, t\_0, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-80}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_2\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+14}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\end{array}
\end{array}
if y.re < -4.20000000000000016e-68Initial program 42.9%
Taylor expanded in y.re around inf
Applied rewrites71.8%
if -4.20000000000000016e-68 < y.re < -2.0200000000000001e-199Initial program 37.3%
Taylor expanded in y.re around inf
Applied rewrites39.3%
Taylor expanded in y.im around 0
Applied rewrites72.9%
Applied rewrites73.0%
Taylor expanded in y.re around 0
Applied rewrites73.0%
if -2.0200000000000001e-199 < y.re < 4.7999999999999998e-80Initial program 40.2%
Taylor expanded in y.im around 0
Applied rewrites46.3%
Taylor expanded in y.re around 0
Applied rewrites76.8%
if 4.7999999999999998e-80 < y.re < 1.05e14Initial program 23.3%
Taylor expanded in y.im around 0
Applied rewrites47.8%
Taylor expanded in y.re around 0
Applied rewrites47.8%
if 1.05e14 < y.re Initial program 41.7%
Taylor expanded in y.im around 0
Applied rewrites61.7%
Taylor expanded in y.re around 0
Applied rewrites73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (sin t_0))
(t_3 (* t_1 t_2))
(t_4 (* (exp (* (- y.im) (atan2 x.im x.re))) t_2)))
(if (<= y.im -1.7e+106)
t_4
(if (<= y.im -1.58e+28)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
t_0)
(if (<= y.im -1.48e-171)
t_3
(if (<= y.im 7.5e-175)
(* t_1 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.im 2.6) 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_im * log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0);
double t_3 = t_1 * t_2;
double t_4 = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_2;
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = t_4;
} else if (y_46_im <= -1.58e+28) {
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_0;
} else if (y_46_im <= -1.48e-171) {
tmp = t_3;
} else if (y_46_im <= 7.5e-175) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_im <= 2.6) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
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.hypot(x_46_im, x_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin(t_0);
double t_3 = t_1 * t_2;
double t_4 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * t_2;
double tmp;
if (y_46_im <= -1.7e+106) {
tmp = t_4;
} else if (y_46_im <= -1.58e+28) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
} else if (y_46_im <= -1.48e-171) {
tmp = t_3;
} else if (y_46_im <= 7.5e-175) {
tmp = t_1 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_im <= 2.6) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin(t_0) t_3 = t_1 * t_2 t_4 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * t_2 tmp = 0 if y_46_im <= -1.7e+106: tmp = t_4 elif y_46_im <= -1.58e+28: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 elif y_46_im <= -1.48e-171: tmp = t_3 elif y_46_im <= 7.5e-175: tmp = t_1 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_im <= 2.6: tmp = 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_im * log(hypot(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = sin(t_0) t_3 = Float64(t_1 * t_2) t_4 = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_2) tmp = 0.0 if (y_46_im <= -1.7e+106) tmp = t_4; elseif (y_46_im <= -1.58e+28) 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_0); elseif (y_46_im <= -1.48e-171) tmp = t_3; elseif (y_46_im <= 7.5e-175) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_im <= 2.6) tmp = t_3; else tmp = t_4; 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(hypot(x_46_im, x_46_re)); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin(t_0); t_3 = t_1 * t_2; t_4 = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_2; tmp = 0.0; if (y_46_im <= -1.7e+106) tmp = t_4; elseif (y_46_im <= -1.58e+28) 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_0; elseif (y_46_im <= -1.48e-171) tmp = t_3; elseif (y_46_im <= 7.5e-175) tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_im <= 2.6) tmp = t_3; else tmp = t_4; 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[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -1.7e+106], t$95$4, If[LessEqual[y$46$im, -1.58e+28], 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$0), $MachinePrecision], If[LessEqual[y$46$im, -1.48e-171], t$95$3, If[LessEqual[y$46$im, 7.5e-175], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.6], t$95$3, t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t\_0\\
t_3 := t\_1 \cdot t\_2\\
t_4 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.im \leq -1.58 \cdot 10^{+28}:\\
\;\;\;\;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\_0\\
\mathbf{elif}\;y.im \leq -1.48 \cdot 10^{-171}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{-175}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.im \leq 2.6:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.im < -1.69999999999999997e106 or 2.60000000000000009 < y.im Initial program 36.4%
Taylor expanded in y.im around 0
Applied rewrites48.5%
Taylor expanded in y.re around 0
Applied rewrites57.5%
if -1.69999999999999997e106 < y.im < -1.57999999999999998e28Initial program 35.3%
Taylor expanded in y.im around 0
Applied rewrites76.7%
Taylor expanded in y.re around 0
Applied rewrites76.7%
if -1.57999999999999998e28 < y.im < -1.48e-171 or 7.50000000000000053e-175 < y.im < 2.60000000000000009Initial program 36.5%
Taylor expanded in y.re around inf
Applied rewrites50.9%
Taylor expanded in y.im around 0
Applied rewrites80.1%
Taylor expanded in y.re around 0
Applied rewrites78.8%
if -1.48e-171 < y.im < 7.50000000000000053e-175Initial program 49.0%
Taylor expanded in y.im around 0
Applied rewrites86.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -8.6e-88)
(* t_1 (* y.re (atan2 x.im x.re)))
(if (<= y.re 4.8e-80)
(* (exp (* (- y.im) (atan2 x.im x.re))) t_0)
(if (<= y.re 1.05e+14)
(*
t_1
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.re))))
(* 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -8.6e-88) {
tmp = t_1 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 4.8e-80) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.05e+14) {
tmp = t_1 * (y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -8.6e-88) tmp = Float64(t_1 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 4.8e-80) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.05e+14) tmp = Float64(t_1 * Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re)))); else tmp = Float64(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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -8.6e-88], N[(t$95$1 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.8e-80], 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, 1.05e+14], N[(t$95$1 * N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -8.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-80}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1 \cdot \left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -8.5999999999999995e-88Initial program 42.4%
Taylor expanded in y.im around 0
Applied rewrites62.6%
Taylor expanded in y.re around 0
Applied rewrites67.1%
if -8.5999999999999995e-88 < y.re < 4.7999999999999998e-80Initial program 39.6%
Taylor expanded in y.im around 0
Applied rewrites44.3%
Taylor expanded in y.re around 0
Applied rewrites72.5%
if 4.7999999999999998e-80 < y.re < 1.05e14Initial program 23.3%
Taylor expanded in y.im around 0
Applied rewrites47.8%
Taylor expanded in y.re around 0
Applied rewrites47.8%
if 1.05e14 < y.re Initial program 41.7%
Taylor expanded in y.re around inf
Applied rewrites63.4%
Taylor expanded in y.im around 0
Applied rewrites61.8%
Taylor expanded in y.re around 0
Applied rewrites71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* y.im t_0)))
(if (<= y.re -6.7e-18)
(* t_1 (* y.re (atan2 x.im x.re)))
(if (<= y.re -2.2e-200)
(* (sin (* (fma (/ y.im y.re) t_0 (atan2 x.im x.re)) y.re)) 1.0)
(if (<= y.re 6.2e-74)
(* t_2 (pow (exp (- y.im)) (atan2 x.im x.re)))
(if (<= y.re 1.75e+14)
(* t_1 (sin (* (atan2 x.im x.re) y.re)))
(* t_1 (sin t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = y_46_im * t_0;
double tmp;
if (y_46_re <= -6.7e-18) {
tmp = t_1 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= -2.2e-200) {
tmp = sin((fma((y_46_im / y_46_re), t_0, atan2(x_46_im, x_46_re)) * y_46_re)) * 1.0;
} else if (y_46_re <= 6.2e-74) {
tmp = t_2 * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.75e+14) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_1 * sin(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(y_46_im * t_0) tmp = 0.0 if (y_46_re <= -6.7e-18) tmp = Float64(t_1 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= -2.2e-200) tmp = Float64(sin(Float64(fma(Float64(y_46_im / y_46_re), t_0, atan(x_46_im, x_46_re)) * y_46_re)) * 1.0); elseif (y_46_re <= 6.2e-74) tmp = Float64(t_2 * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.75e+14) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(t_1 * sin(t_2)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -6.7e-18], N[(t$95$1 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2.2e-200], N[(N[Sin[N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * t$95$0 + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 6.2e-74], N[(t$95$2 * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.75e+14], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := y.im \cdot t\_0\\
\mathbf{if}\;y.re \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;t\_1 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq -2.2 \cdot 10^{-200}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\frac{y.im}{y.re}, t\_0, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-74}:\\
\;\;\;\;t\_2 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 1.75 \cdot 10^{+14}:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin t\_2\\
\end{array}
\end{array}
if y.re < -6.6999999999999998e-18Initial program 44.0%
Taylor expanded in y.im around 0
Applied rewrites68.2%
Taylor expanded in y.re around 0
Applied rewrites74.2%
if -6.6999999999999998e-18 < y.re < -2.20000000000000013e-200Initial program 37.6%
Taylor expanded in y.re around inf
Applied rewrites43.9%
Taylor expanded in y.im around 0
Applied rewrites60.9%
Applied rewrites61.8%
Taylor expanded in y.re around 0
Applied rewrites61.8%
if -2.20000000000000013e-200 < y.re < 6.2000000000000003e-74Initial program 39.7%
Taylor expanded in y.re around 0
Applied rewrites75.2%
Taylor expanded in y.im around 0
Applied rewrites72.3%
if 6.2000000000000003e-74 < y.re < 1.75e14Initial program 24.1%
Taylor expanded in y.im around 0
Applied rewrites49.5%
if 1.75e14 < y.re Initial program 41.7%
Taylor expanded in y.re around inf
Applied rewrites63.4%
Taylor expanded in y.im around 0
Applied rewrites61.8%
Taylor expanded in y.re around 0
Applied rewrites71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -8.6e-88)
(* t_1 (* y.re (atan2 x.im x.re)))
(if (<= y.re 4.8e-80)
(* (exp (* (- y.im) (atan2 x.im x.re))) t_0)
(if (<= y.re 2000000.0)
(* t_1 (sin (* (atan2 x.im x.re) y.re)))
(* 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -8.6e-88) {
tmp = t_1 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 4.8e-80) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2000000.0) {
tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -8.6e-88) {
tmp = t_1 * (y_46_re * Math.atan2(x_46_im, x_46_re));
} else if (y_46_re <= 4.8e-80) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2000000.0) {
tmp = t_1 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_1 * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -8.6e-88: tmp = t_1 * (y_46_re * math.atan2(x_46_im, x_46_re)) elif y_46_re <= 4.8e-80: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 2000000.0: tmp = t_1 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = t_1 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -8.6e-88) tmp = Float64(t_1 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 4.8e-80) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 2000000.0) tmp = Float64(t_1 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = Float64(t_1 * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -8.6e-88) tmp = t_1 * (y_46_re * atan2(x_46_im, x_46_re)); elseif (y_46_re <= 4.8e-80) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 2000000.0) tmp = t_1 * sin((atan2(x_46_im, x_46_re) * y_46_re)); else tmp = t_1 * 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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -8.6e-88], N[(t$95$1 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.8e-80], 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, 2000000.0], N[(t$95$1 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -8.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-80}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 2000000:\\
\;\;\;\;t\_1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\end{array}
\end{array}
if y.re < -8.5999999999999995e-88Initial program 42.4%
Taylor expanded in y.im around 0
Applied rewrites62.6%
Taylor expanded in y.re around 0
Applied rewrites67.1%
if -8.5999999999999995e-88 < y.re < 4.7999999999999998e-80Initial program 39.6%
Taylor expanded in y.im around 0
Applied rewrites44.3%
Taylor expanded in y.re around 0
Applied rewrites72.5%
if 4.7999999999999998e-80 < y.re < 2e6Initial program 21.4%
Taylor expanded in y.im around 0
Applied rewrites47.6%
if 2e6 < y.re Initial program 41.9%
Taylor expanded in y.re around inf
Applied rewrites63.0%
Taylor expanded in y.im around 0
Applied rewrites61.4%
Taylor expanded in y.re around 0
Applied rewrites71.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -6.7e-18)
(* t_1 (* y.re (atan2 x.im x.re)))
(if (<= y.re 180000.0)
(* (sin (* (fma (/ y.im y.re) t_0 (atan2 x.im x.re)) y.re)) 1.0)
(* t_1 (sin (* y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -6.7e-18) {
tmp = t_1 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 180000.0) {
tmp = sin((fma((y_46_im / y_46_re), t_0, atan2(x_46_im, x_46_re)) * y_46_re)) * 1.0;
} else {
tmp = t_1 * sin((y_46_im * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -6.7e-18) tmp = Float64(t_1 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 180000.0) tmp = Float64(sin(Float64(fma(Float64(y_46_im / y_46_re), t_0, atan(x_46_im, x_46_re)) * y_46_re)) * 1.0); else tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); 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[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -6.7e-18], N[(t$95$1 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 180000.0], N[(N[Sin[N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * t$95$0 + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;t\_1 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 180000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\frac{y.im}{y.re}, t\_0, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -6.6999999999999998e-18Initial program 44.0%
Taylor expanded in y.im around 0
Applied rewrites68.2%
Taylor expanded in y.re around 0
Applied rewrites74.2%
if -6.6999999999999998e-18 < y.re < 1.8e5Initial program 35.8%
Taylor expanded in y.re around inf
Applied rewrites34.1%
Taylor expanded in y.im around 0
Applied rewrites54.6%
Applied rewrites54.8%
Taylor expanded in y.re around 0
Applied rewrites53.3%
if 1.8e5 < y.re Initial program 41.9%
Taylor expanded in y.re around inf
Applied rewrites63.0%
Taylor expanded in y.im around 0
Applied rewrites61.4%
Taylor expanded in y.re around 0
Applied rewrites71.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -6.7e-18)
(* t_0 (* y.re (atan2 x.im x.re)))
(if (<= y.re 1.26e-26)
(*
(sin
(*
(fma (/ y.im y.re) (log (hypot x.im x.re)) (atan2 x.im x.re))
y.re))
1.0)
(* t_0 (sin (* (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -6.7e-18) {
tmp = t_0 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.26e-26) {
tmp = sin((fma((y_46_im / y_46_re), log(hypot(x_46_im, x_46_re)), atan2(x_46_im, x_46_re)) * y_46_re)) * 1.0;
} else {
tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -6.7e-18) tmp = Float64(t_0 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.26e-26) tmp = Float64(sin(Float64(fma(Float64(y_46_im / y_46_re), log(hypot(x_46_im, x_46_re)), atan(x_46_im, x_46_re)) * y_46_re)) * 1.0); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -6.7e-18], N[(t$95$0 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.26e-26], N[(N[Sin[N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;t\_0 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1.26 \cdot 10^{-26}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\frac{y.im}{y.re}, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -6.6999999999999998e-18Initial program 44.0%
Taylor expanded in y.im around 0
Applied rewrites68.2%
Taylor expanded in y.re around 0
Applied rewrites74.2%
if -6.6999999999999998e-18 < y.re < 1.26000000000000002e-26Initial program 38.3%
Taylor expanded in y.re around inf
Applied rewrites35.5%
Taylor expanded in y.im around 0
Applied rewrites54.2%
Applied rewrites54.5%
Taylor expanded in y.re around 0
Applied rewrites54.5%
if 1.26000000000000002e-26 < y.re Initial program 36.5%
Taylor expanded in y.im around 0
Applied rewrites61.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -6.7e-18)
(* t_0 (* y.re (atan2 x.im x.re)))
(if (<= y.re 1.26e-26)
(*
1.0
(sin
(*
(fma y.im (/ (log (hypot x.im x.re)) y.re) (atan2 x.im x.re))
y.re)))
(* t_0 (sin (* (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -6.7e-18) {
tmp = t_0 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1.26e-26) {
tmp = 1.0 * sin((fma(y_46_im, (log(hypot(x_46_im, x_46_re)) / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
} else {
tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -6.7e-18) tmp = Float64(t_0 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.26e-26) tmp = Float64(1.0 * sin(Float64(fma(y_46_im, Float64(log(hypot(x_46_im, x_46_re)) / y_46_re), atan(x_46_im, x_46_re)) * y_46_re))); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -6.7e-18], N[(t$95$0 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.26e-26], N[(1.0 * N[Sin[N[(N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;t\_0 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1.26 \cdot 10^{-26}:\\
\;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -6.6999999999999998e-18Initial program 44.0%
Taylor expanded in y.im around 0
Applied rewrites68.2%
Taylor expanded in y.re around 0
Applied rewrites74.2%
if -6.6999999999999998e-18 < y.re < 1.26000000000000002e-26Initial program 38.3%
Taylor expanded in y.re around inf
Applied rewrites35.5%
Taylor expanded in y.im around 0
Applied rewrites54.2%
Taylor expanded in y.re around 0
Applied rewrites54.2%
if 1.26000000000000002e-26 < y.re Initial program 36.5%
Taylor expanded in y.im around 0
Applied rewrites61.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -4.1e-138)
(* t_0 (* y.re (atan2 x.im x.re)))
(if (<= y.re 7.8e-131)
(*
(* y.im (log (hypot x.im x.re)))
(fma (- y.im) (atan2 x.im x.re) 1.0))
(* t_0 (sin (* (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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.1e-138) {
tmp = t_0 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_re <= 7.8e-131) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * fma(-y_46_im, atan2(x_46_im, x_46_re), 1.0);
} else {
tmp = t_0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -4.1e-138) tmp = Float64(t_0 * Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 7.8e-131) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * fma(Float64(-y_46_im), atan(x_46_im, x_46_re), 1.0)); else tmp = Float64(t_0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -4.1e-138], N[(t$95$0 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-131], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;t\_0 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-131}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.re < -4.09999999999999999e-138Initial program 44.3%
Taylor expanded in y.im around 0
Applied rewrites57.8%
Taylor expanded in y.re around 0
Applied rewrites61.6%
if -4.09999999999999999e-138 < y.re < 7.80000000000000039e-131Initial program 35.0%
Taylor expanded in y.re around 0
Applied rewrites73.4%
Taylor expanded in y.im around 0
Applied rewrites70.4%
Taylor expanded in y.im around 0
Applied rewrites52.5%
if 7.80000000000000039e-131 < y.re Initial program 37.6%
Taylor expanded in y.im around 0
Applied rewrites54.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (pow x.im y.re) (sin (* (atan2 x.im x.re) y.re)))))
(if (<= y.re -1.05e-21)
t_1
(if (<= y.re -4.1e-138)
t_0
(if (<= y.re 6.9e-134)
(* (sin (* (log (hypot x.im x.re)) y.im)) 1.0)
(if (<= y.re 0.0045) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.05e-21) {
tmp = t_1;
} else if (y_46_re <= -4.1e-138) {
tmp = t_0;
} else if (y_46_re <= 6.9e-134) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
} else if (y_46_re <= 0.0045) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
double tmp;
if (y_46_re <= -1.05e-21) {
tmp = t_1;
} else if (y_46_re <= -4.1e-138) {
tmp = t_0;
} else if (y_46_re <= 6.9e-134) {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
} else if (y_46_re <= 0.0045) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) tmp = 0 if y_46_re <= -1.05e-21: tmp = t_1 elif y_46_re <= -4.1e-138: tmp = t_0 elif y_46_re <= 6.9e-134: tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0 elif y_46_re <= 0.0045: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))) tmp = 0.0 if (y_46_re <= -1.05e-21) tmp = t_1; elseif (y_46_re <= -4.1e-138) tmp = t_0; elseif (y_46_re <= 6.9e-134) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0); elseif (y_46_re <= 0.0045) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re)); tmp = 0.0; if (y_46_re <= -1.05e-21) tmp = t_1; elseif (y_46_re <= -4.1e-138) tmp = t_0; elseif (y_46_re <= 6.9e-134) tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0; elseif (y_46_re <= 0.0045) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.05e-21], t$95$1, If[LessEqual[y$46$re, -4.1e-138], t$95$0, If[LessEqual[y$46$re, 6.9e-134], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 0.0045], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{if}\;y.re \leq -1.05 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.9 \cdot 10^{-134}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 0.0045:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.05000000000000006e-21 or 0.00449999999999999966 < y.re Initial program 43.0%
Taylor expanded in y.im around 0
Applied rewrites64.2%
Taylor expanded in x.re around 0
Applied rewrites52.2%
if -1.05000000000000006e-21 < y.re < -4.09999999999999999e-138 or 6.9000000000000001e-134 < y.re < 0.00449999999999999966Initial program 35.8%
Taylor expanded in y.im around 0
Applied rewrites40.5%
Taylor expanded in y.re around 0
Applied rewrites38.8%
if -4.09999999999999999e-138 < y.re < 6.9000000000000001e-134Initial program 35.4%
Taylor expanded in y.re around 0
Applied rewrites74.3%
Taylor expanded in y.im around 0
Applied rewrites50.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.1e-138) (not (<= y.re 7.8e-131))) (* (pow (hypot x.im x.re) y.re) (* y.re (atan2 x.im x.re))) (* (* y.im (log (hypot x.im x.re))) (fma (- y.im) (atan2 x.im x.re) 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.1e-138) || !(y_46_re <= 7.8e-131)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (y_46_re * atan2(x_46_im, x_46_re));
} else {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * fma(-y_46_im, atan2(x_46_im, x_46_re), 1.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.1e-138) || !(y_46_re <= 7.8e-131)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * fma(Float64(-y_46_im), atan(x_46_im, x_46_re), 1.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.1e-138], N[Not[LessEqual[y$46$re, 7.8e-131]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-138} \lor \neg \left(y.re \leq 7.8 \cdot 10^{-131}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, 1\right)\\
\end{array}
\end{array}
if y.re < -4.09999999999999999e-138 or 7.80000000000000039e-131 < y.re Initial program 40.5%
Taylor expanded in y.im around 0
Applied rewrites55.7%
Taylor expanded in y.re around 0
Applied rewrites54.5%
if -4.09999999999999999e-138 < y.re < 7.80000000000000039e-131Initial program 35.0%
Taylor expanded in y.re around 0
Applied rewrites73.4%
Taylor expanded in y.im around 0
Applied rewrites70.4%
Taylor expanded in y.im around 0
Applied rewrites52.5%
Final simplification53.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (pow (hypot x.im x.re) y.im))))
(if (<= y.re -78.0)
t_0
(if (<= y.re -4.1e-138)
(* 1.0 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 6.9e-134)
(* (sin (* (log (hypot x.im x.re)) y.im)) 1.0)
(if (<= y.re 1.2e+20) (* y.re (atan2 x.im x.re)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(pow(hypot(x_46_im, x_46_re), y_46_im));
double tmp;
if (y_46_re <= -78.0) {
tmp = t_0;
} else if (y_46_re <= -4.1e-138) {
tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 6.9e-134) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
} else if (y_46_re <= 1.2e+20) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), y_46_im));
double tmp;
if (y_46_re <= -78.0) {
tmp = t_0;
} else if (y_46_re <= -4.1e-138) {
tmp = 1.0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 6.9e-134) {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
} else if (y_46_re <= 1.2e+20) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.pow(math.hypot(x_46_im, x_46_re), y_46_im)) tmp = 0 if y_46_re <= -78.0: tmp = t_0 elif y_46_re <= -4.1e-138: tmp = 1.0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 6.9e-134: tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0 elif y_46_re <= 1.2e+20: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((hypot(x_46_im, x_46_re) ^ y_46_im)) tmp = 0.0 if (y_46_re <= -78.0) tmp = t_0; elseif (y_46_re <= -4.1e-138) tmp = Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 6.9e-134) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0); elseif (y_46_re <= 1.2e+20) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((hypot(x_46_im, x_46_re) ^ y_46_im)); tmp = 0.0; if (y_46_re <= -78.0) tmp = t_0; elseif (y_46_re <= -4.1e-138) tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 6.9e-134) tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0; elseif (y_46_re <= 1.2e+20) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$im], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -78.0], t$95$0, If[LessEqual[y$46$re, -4.1e-138], N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.9e-134], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+20], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.im}\right)\\
\mathbf{if}\;y.re \leq -78:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 6.9 \cdot 10^{-134}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot 1\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -78 or 1.2e20 < y.re Initial program 42.5%
Taylor expanded in y.re around 0
Applied rewrites24.2%
Taylor expanded in y.im around 0
Applied rewrites3.3%
Applied rewrites38.5%
if -78 < y.re < -4.09999999999999999e-138Initial program 41.9%
Taylor expanded in y.im around 0
Applied rewrites40.4%
Taylor expanded in y.re around 0
Applied rewrites39.1%
if -4.09999999999999999e-138 < y.re < 6.9000000000000001e-134Initial program 35.4%
Taylor expanded in y.re around 0
Applied rewrites74.3%
Taylor expanded in y.im around 0
Applied rewrites50.6%
if 6.9000000000000001e-134 < y.re < 1.2e20Initial program 34.0%
Taylor expanded in y.im around 0
Applied rewrites44.6%
Taylor expanded in y.re around 0
Applied rewrites33.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (pow (hypot x.im x.re) y.im))))
(if (<= y.re -78.0)
t_0
(if (<= y.re -4.1e-138)
(* 1.0 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 7.8e-131)
(* y.im (log (hypot x.im x.re)))
(if (<= y.re 1.2e+20) (* y.re (atan2 x.im x.re)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(pow(hypot(x_46_im, x_46_re), y_46_im));
double tmp;
if (y_46_re <= -78.0) {
tmp = t_0;
} else if (y_46_re <= -4.1e-138) {
tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 7.8e-131) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else if (y_46_re <= 1.2e+20) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), y_46_im));
double tmp;
if (y_46_re <= -78.0) {
tmp = t_0;
} else if (y_46_re <= -4.1e-138) {
tmp = 1.0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 7.8e-131) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else if (y_46_re <= 1.2e+20) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.pow(math.hypot(x_46_im, x_46_re), y_46_im)) tmp = 0 if y_46_re <= -78.0: tmp = t_0 elif y_46_re <= -4.1e-138: tmp = 1.0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re)) elif y_46_re <= 7.8e-131: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) elif y_46_re <= 1.2e+20: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((hypot(x_46_im, x_46_re) ^ y_46_im)) tmp = 0.0 if (y_46_re <= -78.0) tmp = t_0; elseif (y_46_re <= -4.1e-138) tmp = Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 7.8e-131) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); elseif (y_46_re <= 1.2e+20) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((hypot(x_46_im, x_46_re) ^ y_46_im)); tmp = 0.0; if (y_46_re <= -78.0) tmp = t_0; elseif (y_46_re <= -4.1e-138) tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re)); elseif (y_46_re <= 7.8e-131) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); elseif (y_46_re <= 1.2e+20) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$im], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -78.0], t$95$0, If[LessEqual[y$46$re, -4.1e-138], N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-131], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+20], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.im}\right)\\
\mathbf{if}\;y.re \leq -78:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-131}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -78 or 1.2e20 < y.re Initial program 42.5%
Taylor expanded in y.re around 0
Applied rewrites24.2%
Taylor expanded in y.im around 0
Applied rewrites3.3%
Applied rewrites38.5%
if -78 < y.re < -4.09999999999999999e-138Initial program 41.9%
Taylor expanded in y.im around 0
Applied rewrites40.4%
Taylor expanded in y.re around 0
Applied rewrites39.1%
if -4.09999999999999999e-138 < y.re < 7.80000000000000039e-131Initial program 35.0%
Taylor expanded in y.re around 0
Applied rewrites73.4%
Taylor expanded in y.im around 0
Applied rewrites49.2%
if 7.80000000000000039e-131 < y.re < 1.2e20Initial program 34.8%
Taylor expanded in y.im around 0
Applied rewrites45.7%
Taylor expanded in y.re around 0
Applied rewrites34.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.1e-138) (not (<= y.re 6.9e-134))) (* (pow (hypot x.im x.re) y.re) (* y.re (atan2 x.im x.re))) (* (sin (* (log (hypot x.im x.re)) y.im)) 1.0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.1e-138) || !(y_46_re <= 6.9e-134)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (y_46_re * atan2(x_46_im, x_46_re));
} else {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.1e-138) || !(y_46_re <= 6.9e-134)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_re * Math.atan2(x_46_im, x_46_re));
} else {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.1e-138) or not (y_46_re <= 6.9e-134): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_re * math.atan2(x_46_im, x_46_re)) else: tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.1e-138) || !(y_46_re <= 6.9e-134)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -4.1e-138) || ~((y_46_re <= 6.9e-134))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * (y_46_re * atan2(x_46_im, x_46_re)); else tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.1e-138], N[Not[LessEqual[y$46$re, 6.9e-134]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-138} \lor \neg \left(y.re \leq 6.9 \cdot 10^{-134}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot 1\\
\end{array}
\end{array}
if y.re < -4.09999999999999999e-138 or 6.9000000000000001e-134 < y.re Initial program 40.3%
Taylor expanded in y.im around 0
Applied rewrites55.4%
Taylor expanded in y.re around 0
Applied rewrites54.2%
if -4.09999999999999999e-138 < y.re < 6.9000000000000001e-134Initial program 35.4%
Taylor expanded in y.re around 0
Applied rewrites74.3%
Taylor expanded in y.im around 0
Applied rewrites50.6%
Final simplification53.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4.1e-138)
(* 1.0 (sin (* (atan2 x.im x.re) y.re)))
(if (<= y.re 7.8e-131)
(* y.im (log (hypot x.im x.re)))
(if (<= y.re 1.3e+21)
(* y.re (atan2 x.im x.re))
(* y.im (fma 0.5 (/ (* x.re x.re) (* x.im x.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 (y_46_re <= -4.1e-138) {
tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
} else if (y_46_re <= 7.8e-131) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else if (y_46_re <= 1.3e+21) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * fma(0.5, ((x_46_re * x_46_re) / (x_46_im * x_46_im)), log(x_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4.1e-138) tmp = Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re))); elseif (y_46_re <= 7.8e-131) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); elseif (y_46_re <= 1.3e+21) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_re * x_46_re) / Float64(x_46_im * x_46_im)), log(x_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.1e-138], N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-131], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.3e+21], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-131}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im \cdot x.im}, \log x.im\right)\\
\end{array}
\end{array}
if y.re < -4.09999999999999999e-138Initial program 44.3%
Taylor expanded in y.im around 0
Applied rewrites57.8%
Taylor expanded in y.re around 0
Applied rewrites24.4%
if -4.09999999999999999e-138 < y.re < 7.80000000000000039e-131Initial program 35.0%
Taylor expanded in y.re around 0
Applied rewrites73.4%
Taylor expanded in y.im around 0
Applied rewrites49.2%
if 7.80000000000000039e-131 < y.re < 1.3e21Initial program 34.8%
Taylor expanded in y.im around 0
Applied rewrites45.7%
Taylor expanded in y.re around 0
Applied rewrites34.0%
if 1.3e21 < y.re Initial program 39.7%
Taylor expanded in y.re around 0
Applied rewrites19.3%
Taylor expanded in y.im around 0
Applied rewrites3.0%
Taylor expanded in x.re around 0
Applied rewrites16.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.1e-138)
t_0
(if (<= y.re 7.8e-131)
(* y.im (log (hypot x.im x.re)))
(if (<= y.re 1.3e+21)
t_0
(* y.im (fma 0.5 (/ (* x.re x.re) (* x.im x.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_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.1e-138) {
tmp = t_0;
} else if (y_46_re <= 7.8e-131) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else if (y_46_re <= 1.3e+21) {
tmp = t_0;
} else {
tmp = y_46_im * fma(0.5, ((x_46_re * x_46_re) / (x_46_im * x_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_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4.1e-138) tmp = t_0; elseif (y_46_re <= 7.8e-131) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); elseif (y_46_re <= 1.3e+21) tmp = t_0; else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_re * x_46_re) / Float64(x_46_im * x_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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.1e-138], t$95$0, If[LessEqual[y$46$re, 7.8e-131], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.3e+21], t$95$0, N[(y$46$im * N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-138}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-131}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im \cdot x.im}, \log x.im\right)\\
\end{array}
\end{array}
if y.re < -4.09999999999999999e-138 or 7.80000000000000039e-131 < y.re < 1.3e21Initial program 41.0%
Taylor expanded in y.im around 0
Applied rewrites53.5%
Taylor expanded in y.re around 0
Applied rewrites27.7%
if -4.09999999999999999e-138 < y.re < 7.80000000000000039e-131Initial program 35.0%
Taylor expanded in y.re around 0
Applied rewrites73.4%
Taylor expanded in y.im around 0
Applied rewrites49.2%
if 1.3e21 < y.re Initial program 39.7%
Taylor expanded in y.re around 0
Applied rewrites19.3%
Taylor expanded in y.im around 0
Applied rewrites3.0%
Taylor expanded in x.re around 0
Applied rewrites16.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 1.3e+21) (* y.re (atan2 x.im x.re)) (* y.im (fma 0.5 (/ (* x.re x.re) (* x.im x.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 (y_46_re <= 1.3e+21) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * fma(0.5, ((x_46_re * x_46_re) / (x_46_im * x_46_im)), log(x_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 1.3e+21) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_re * x_46_re) / Float64(x_46_im * x_46_im)), log(x_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 1.3e+21], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im \cdot x.im}, \log x.im\right)\\
\end{array}
\end{array}
if y.re < 1.3e21Initial program 38.7%
Taylor expanded in y.im around 0
Applied rewrites38.8%
Taylor expanded in y.re around 0
Applied rewrites22.9%
if 1.3e21 < y.re Initial program 39.7%
Taylor expanded in y.re around 0
Applied rewrites19.3%
Taylor expanded in y.im around 0
Applied rewrites3.0%
Taylor expanded in x.re around 0
Applied rewrites16.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 1.3e+21) (* y.re (atan2 x.im x.re)) (* y.im (log (fma 0.5 (/ (* x.re x.re) x.im) x.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 1.3e+21) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * log(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 1.3e+21) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * log(fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 1.3e+21], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)\\
\end{array}
\end{array}
if y.re < 1.3e21Initial program 38.7%
Taylor expanded in y.im around 0
Applied rewrites38.8%
Taylor expanded in y.re around 0
Applied rewrites22.9%
if 1.3e21 < y.re Initial program 39.7%
Taylor expanded in y.re around 0
Applied rewrites19.3%
Taylor expanded in y.im around 0
Applied rewrites3.0%
Taylor expanded in x.re around 0
Applied rewrites13.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 1.25e+194) (* y.re (atan2 x.im x.re)) (* y.im (log x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.25e+194) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * log(x_46_re);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= 1.25d+194) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = y_46im * log(x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 1.25e+194) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * Math.log(x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 1.25e+194: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = y_46_im * math.log(x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 1.25e+194) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * log(x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 1.25e+194) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = y_46_im * log(x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 1.25e+194], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.25 \cdot 10^{+194}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < 1.24999999999999997e194Initial program 42.9%
Taylor expanded in y.im around 0
Applied rewrites45.4%
Taylor expanded in y.re around 0
Applied rewrites19.1%
if 1.24999999999999997e194 < x.re Initial program 0.0%
Taylor expanded in y.re around 0
Applied rewrites39.8%
Taylor expanded in y.im around 0
Applied rewrites35.2%
Taylor expanded in x.re around inf
Applied rewrites35.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 2.95e-283) (* 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 <= 2.95e-283) {
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 <= 2.95d-283) 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 <= 2.95e-283) {
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 <= 2.95e-283: 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 <= 2.95e-283) 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 <= 2.95e-283) 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, 2.95e-283], 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 2.95 \cdot 10^{-283}:\\
\;\;\;\;y.im \cdot \log x.im\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if x.re < 2.94999999999999992e-283Initial program 39.4%
Taylor expanded in y.re around 0
Applied rewrites48.5%
Taylor expanded in y.im around 0
Applied rewrites21.4%
Taylor expanded in x.re around 0
Applied rewrites4.6%
if 2.94999999999999992e-283 < x.re Initial program 38.4%
Taylor expanded in y.re around 0
Applied rewrites39.0%
Taylor expanded in y.im around 0
Applied rewrites16.7%
Taylor expanded in x.re around inf
Applied rewrites13.1%
(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 38.9%
Taylor expanded in y.re around 0
Applied rewrites43.6%
Taylor expanded in y.im around 0
Applied rewrites19.0%
Taylor expanded in x.re around 0
Applied rewrites4.1%
herbie shell --seed 2025018
(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)))))