
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
(if (<=
(+
x
(/
t_1
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))
INFINITY)
(+
x
(/
t_1
(+
(*
(+
(*
(+
(* (/ (- (* z z) 232.09570038900438) (- z 15.234687407)) z)
31.4690115749)
z)
11.9400905721)
z)
0.607771387771)))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double tmp;
if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= ((double) INFINITY)) {
tmp = x + (t_1 / (((((((((z * z) - 232.09570038900438) / (z - 15.234687407)) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double tmp;
if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Double.POSITIVE_INFINITY) {
tmp = x + (t_1 / (((((((((z * z) - 232.09570038900438) / (z - 15.234687407)) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b) tmp = 0 if (x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= math.inf: tmp = x + (t_1 / (((((((((z * z) - 232.09570038900438) / (z - 15.234687407)) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) tmp = 0.0 if (Float64(x + Float64(t_1 / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Inf) tmp = Float64(x + Float64(t_1 / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * z) - 232.09570038900438) / Float64(z - 15.234687407)) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b); tmp = 0.0; if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Inf) tmp = x + (t_1 / (((((((((z * z) - 232.09570038900438) / (z - 15.234687407)) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + N[(t$95$1 / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(t$95$1 / N[(N[(N[(N[(N[(N[(N[(N[(N[(z * z), $MachinePrecision] - 232.09570038900438), $MachinePrecision] / N[(z - 15.234687407), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)\\
\mathbf{if}\;x + \frac{t\_1}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \leq \infty:\\
\;\;\;\;x + \frac{t\_1}{\left(\left(\frac{z \cdot z - 232.09570038900438}{z - 15.234687407} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) < +inf.0Initial program 94.0%
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
unpow2N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6494.0
Applied rewrites94.0%
if +inf.0 < (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) Initial program 0.0%
Taylor expanded in z around 0
Applied rewrites49.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval97.2
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(/
(*
y
(+
(*
(+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a)
z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))))
(if (<= t_1 INFINITY) t_1 (- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) < +inf.0Initial program 94.0%
if +inf.0 < (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) Initial program 0.0%
Taylor expanded in z around 0
Applied rewrites49.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval97.2
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b)))
(t_2 (* (* z z) (* z z))))
(if (<= z -4.5e+70)
(fma 3.13060547623 y x)
(if (<= z -850.0)
(*
(fma
y
(/
(fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
(* t_2 x))
1.0)
x)
(if (<= z 0.9)
(+ x (/ t_1 0.607771387771))
(if (<= z 2.2e+55) (+ x (/ t_1 t_2)) (- x (* -3.13060547623 y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double t_2 = (z * z) * (z * z);
double tmp;
if (z <= -4.5e+70) {
tmp = fma(3.13060547623, y, x);
} else if (z <= -850.0) {
tmp = fma(y, (fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / (t_2 * x)), 1.0) * x;
} else if (z <= 0.9) {
tmp = x + (t_1 / 0.607771387771);
} else if (z <= 2.2e+55) {
tmp = x + (t_1 / t_2);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) t_2 = Float64(Float64(z * z) * Float64(z * z)) tmp = 0.0 if (z <= -4.5e+70) tmp = fma(3.13060547623, y, x); elseif (z <= -850.0) tmp = Float64(fma(y, Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / Float64(t_2 * x)), 1.0) * x); elseif (z <= 0.9) tmp = Float64(x + Float64(t_1 / 0.607771387771)); elseif (z <= 2.2e+55) tmp = Float64(x + Float64(t_1 / t_2)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * z), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+70], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, -850.0], N[(N[(y * N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] / N[(t$95$2 * x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 0.9], N[(x + N[(t$95$1 / 0.607771387771), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+55], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)\\
t_2 := \left(z \cdot z\right) \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq -850:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{t\_2 \cdot x}, 1\right) \cdot x\\
\mathbf{elif}\;z \leq 0.9:\\
\;\;\;\;x + \frac{t\_1}{0.607771387771}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+55}:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -4.4999999999999999e70Initial program 0.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.1
Applied rewrites97.1%
if -4.4999999999999999e70 < z < -850Initial program 73.9%
Taylor expanded in x around inf
Applied rewrites70.8%
Taylor expanded in z around inf
sqr-powN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6469.3
Applied rewrites69.3%
if -850 < z < 0.900000000000000022Initial program 99.7%
Taylor expanded in z around 0
Applied rewrites98.5%
if 0.900000000000000022 < z < 2.2000000000000001e55Initial program 77.6%
Taylor expanded in z around inf
metadata-evalN/A
pow-prod-upN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6472.1
Applied rewrites72.1%
if 2.2000000000000001e55 < z Initial program 3.8%
Taylor expanded in z around 0
Applied rewrites49.5%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval94.6
Applied rewrites94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b)))
(t_2 (+ x (/ t_1 (* (* z z) (* z z))))))
(if (<= z -1.8e+58)
(fma 3.13060547623 y x)
(if (<= z -0.88)
t_2
(if (<= z 0.9)
(+ x (/ t_1 0.607771387771))
(if (<= z 2.2e+55) t_2 (- x (* -3.13060547623 y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double t_2 = x + (t_1 / ((z * z) * (z * z)));
double tmp;
if (z <= -1.8e+58) {
tmp = fma(3.13060547623, y, x);
} else if (z <= -0.88) {
tmp = t_2;
} else if (z <= 0.9) {
tmp = x + (t_1 / 0.607771387771);
} else if (z <= 2.2e+55) {
tmp = t_2;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) t_2 = Float64(x + Float64(t_1 / Float64(Float64(z * z) * Float64(z * z)))) tmp = 0.0 if (z <= -1.8e+58) tmp = fma(3.13060547623, y, x); elseif (z <= -0.88) tmp = t_2; elseif (z <= 0.9) tmp = Float64(x + Float64(t_1 / 0.607771387771)); elseif (z <= 2.2e+55) tmp = t_2; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t$95$1 / N[(N[(z * z), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+58], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, -0.88], t$95$2, If[LessEqual[z, 0.9], N[(x + N[(t$95$1 / 0.607771387771), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+55], t$95$2, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)\\
t_2 := x + \frac{t\_1}{\left(z \cdot z\right) \cdot \left(z \cdot z\right)}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq -0.88:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 0.9:\\
\;\;\;\;x + \frac{t\_1}{0.607771387771}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.79999999999999998e58Initial program 3.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.8
Applied rewrites95.8%
if -1.79999999999999998e58 < z < -0.880000000000000004 or 0.900000000000000022 < z < 2.2000000000000001e55Initial program 79.0%
Taylor expanded in z around inf
metadata-evalN/A
pow-prod-upN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6474.1
Applied rewrites74.1%
if -0.880000000000000004 < z < 0.900000000000000022Initial program 99.7%
Taylor expanded in z around 0
Applied rewrites98.7%
if 2.2000000000000001e55 < z Initial program 3.8%
Taylor expanded in z around 0
Applied rewrites49.5%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval94.6
Applied rewrites94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
(if (<=
(+
x
(/
t_1
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))
INFINITY)
(+ x (/ t_1 (+ (* (* (* z z) z) z) 0.607771387771)))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double tmp;
if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= ((double) INFINITY)) {
tmp = x + (t_1 / ((((z * z) * z) * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b);
double tmp;
if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Double.POSITIVE_INFINITY) {
tmp = x + (t_1 / ((((z * z) * z) * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b) tmp = 0 if (x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= math.inf: tmp = x + (t_1 / ((((z * z) * z) * z) + 0.607771387771)) else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) tmp = 0.0 if (Float64(x + Float64(t_1 / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Inf) tmp = Float64(x + Float64(t_1 / Float64(Float64(Float64(Float64(z * z) * z) * z) + 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b); tmp = 0.0; if ((x + (t_1 / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) <= Inf) tmp = x + (t_1 / ((((z * z) * z) * z) + 0.607771387771)); else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + N[(t$95$1 / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(t$95$1 / N[(N[(N[(N[(z * z), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)\\
\mathbf{if}\;x + \frac{t\_1}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \leq \infty:\\
\;\;\;\;x + \frac{t\_1}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) < +inf.0Initial program 94.0%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6492.4
Applied rewrites92.4%
if +inf.0 < (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) Initial program 0.0%
Taylor expanded in z around 0
Applied rewrites49.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval97.2
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.75e+54)
(fma 3.13060547623 y x)
(if (<= z 1.2e+44)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
0.607771387771))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+54) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 1.2e+44) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+54) tmp = fma(3.13060547623, y, x); elseif (z <= 1.2e+44) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+54], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 1.2e+44], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.7500000000000001e54Initial program 3.8%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.7500000000000001e54 < z < 1.20000000000000007e44Initial program 97.3%
Taylor expanded in z around 0
Applied rewrites90.8%
if 1.20000000000000007e44 < z Initial program 6.7%
Taylor expanded in z around 0
Applied rewrites49.1%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval92.6
Applied rewrites92.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.75e+54)
(fma 3.13060547623 y x)
(if (<= z 3.15e+38)
(+
x
(/
(* y (fma a z b))
(+ 0.607771387771 (* z (- 11.9400905721 (* -31.4690115749 z))))))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+54) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 3.15e+38) {
tmp = x + ((y * fma(a, z, b)) / (0.607771387771 + (z * (11.9400905721 - (-31.4690115749 * z)))));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+54) tmp = fma(3.13060547623, y, x); elseif (z <= 3.15e+38) tmp = Float64(x + Float64(Float64(y * fma(a, z, b)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 - Float64(-31.4690115749 * z)))))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+54], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 3.15e+38], N[(x + N[(N[(y * N[(a * z + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 - N[(-31.4690115749 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+38}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(a, z, b\right)}{0.607771387771 + z \cdot \left(11.9400905721 - -31.4690115749 \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.7500000000000001e54Initial program 3.8%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.7500000000000001e54 < z < 3.15000000000000001e38Initial program 97.7%
Taylor expanded in z around 0
Applied rewrites91.3%
Taylor expanded in z around 0
Applied rewrites86.5%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6486.5
Applied rewrites86.5%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval87.3
Applied rewrites87.3%
if 3.15000000000000001e38 < z Initial program 8.0%
Taylor expanded in z around 0
Applied rewrites48.7%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval91.4
Applied rewrites91.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.75e+54)
(fma 3.13060547623 y x)
(if (<= z 3.15e+38)
(+ x (/ (* y (+ (* a z) b)) 0.607771387771))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+54) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 3.15e+38) {
tmp = x + ((y * ((a * z) + b)) / 0.607771387771);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+54) tmp = fma(3.13060547623, y, x); elseif (z <= 3.15e+38) tmp = Float64(x + Float64(Float64(y * Float64(Float64(a * z) + b)) / 0.607771387771)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+54], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 3.15e+38], N[(x + N[(N[(y * N[(N[(a * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+38}:\\
\;\;\;\;x + \frac{y \cdot \left(a \cdot z + b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.7500000000000001e54Initial program 3.8%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.7500000000000001e54 < z < 3.15000000000000001e38Initial program 97.7%
Taylor expanded in z around 0
Applied rewrites91.3%
Taylor expanded in z around 0
Applied rewrites86.5%
if 3.15000000000000001e38 < z Initial program 8.0%
Taylor expanded in z around 0
Applied rewrites48.7%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval91.4
Applied rewrites91.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.75e+54)
(fma 3.13060547623 y x)
(if (<= z 3.15e+38)
(+ x (/ (* y (fma a z b)) 0.607771387771))
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+54) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 3.15e+38) {
tmp = x + ((y * fma(a, z, b)) / 0.607771387771);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+54) tmp = fma(3.13060547623, y, x); elseif (z <= 3.15e+38) tmp = Float64(x + Float64(Float64(y * fma(a, z, b)) / 0.607771387771)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+54], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 3.15e+38], N[(x + N[(N[(y * N[(a * z + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+38}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(a, z, b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.7500000000000001e54Initial program 3.8%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.7500000000000001e54 < z < 3.15000000000000001e38Initial program 97.7%
Taylor expanded in z around 0
Applied rewrites91.3%
Taylor expanded in z around 0
Applied rewrites86.5%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6486.5
Applied rewrites86.5%
if 3.15000000000000001e38 < z Initial program 8.0%
Taylor expanded in z around 0
Applied rewrites48.7%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval91.4
Applied rewrites91.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.5e+64)
(fma 3.13060547623 y x)
(if (<= z 2.5e-95)
(fma (* b y) 1.6453555072203998 x)
(if (<= z 1.2e+44)
(+ x (/ (* y (* a z)) 0.607771387771))
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+64) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 2.5e-95) {
tmp = fma((b * y), 1.6453555072203998, x);
} else if (z <= 1.2e+44) {
tmp = x + ((y * (a * z)) / 0.607771387771);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+64) tmp = fma(3.13060547623, y, x); elseif (z <= 2.5e-95) tmp = fma(Float64(b * y), 1.6453555072203998, x); elseif (z <= 1.2e+44) tmp = Float64(x + Float64(Float64(y * Float64(a * z)) / 0.607771387771)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+64], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 2.5e-95], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], If[LessEqual[z, 1.2e+44], N[(x + N[(N[(y * N[(a * z), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{y \cdot \left(a \cdot z\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -8.4999999999999998e64Initial program 1.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6496.6
Applied rewrites96.6%
if -8.4999999999999998e64 < z < 2.4999999999999999e-95Initial program 97.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6479.4
Applied rewrites79.4%
if 2.4999999999999999e-95 < z < 1.20000000000000007e44Initial program 94.1%
Taylor expanded in z around 0
Applied rewrites77.5%
Taylor expanded in z around 0
Applied rewrites69.0%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6469.0
Applied rewrites69.0%
Taylor expanded in a around inf
lower-*.f6450.9
Applied rewrites50.9%
if 1.20000000000000007e44 < z Initial program 6.7%
Taylor expanded in z around 0
Applied rewrites49.1%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval92.6
Applied rewrites92.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.5e+64)
(fma 3.13060547623 y x)
(if (<= z 2.35e+24)
(fma (* b y) 1.6453555072203998 x)
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+64) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 2.35e+24) {
tmp = fma((b * y), 1.6453555072203998, x);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+64) tmp = fma(3.13060547623, y, x); elseif (z <= 2.35e+24) tmp = fma(Float64(b * y), 1.6453555072203998, x); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+64], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 2.35e+24], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -8.4999999999999998e64Initial program 1.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6496.6
Applied rewrites96.6%
if -8.4999999999999998e64 < z < 2.35e24Initial program 97.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6476.0
Applied rewrites76.0%
if 2.35e24 < z Initial program 11.4%
Taylor expanded in z around 0
Applied rewrites48.5%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval89.5
Applied rewrites89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -1e+43)
(* 1.6453555072203998 (* b y))
(if (<= t_1 1e+167)
x
(if (<= t_1 INFINITY)
(* b (* 1.6453555072203998 y))
(- x (* -3.13060547623 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -1e+43) {
tmp = 1.6453555072203998 * (b * y);
} else if (t_1 <= 1e+167) {
tmp = x;
} else if (t_1 <= ((double) INFINITY)) {
tmp = b * (1.6453555072203998 * y);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -1e+43) {
tmp = 1.6453555072203998 * (b * y);
} else if (t_1 <= 1e+167) {
tmp = x;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = b * (1.6453555072203998 * y);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) tmp = 0 if t_1 <= -1e+43: tmp = 1.6453555072203998 * (b * y) elif t_1 <= 1e+167: tmp = x elif t_1 <= math.inf: tmp = b * (1.6453555072203998 * y) else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -1e+43) tmp = Float64(1.6453555072203998 * Float64(b * y)); elseif (t_1 <= 1e+167) tmp = x; elseif (t_1 <= Inf) tmp = Float64(b * Float64(1.6453555072203998 * y)); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771); tmp = 0.0; if (t_1 <= -1e+43) tmp = 1.6453555072203998 * (b * y); elseif (t_1 <= 1e+167) tmp = x; elseif (t_1 <= Inf) tmp = b * (1.6453555072203998 * y); else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+43], N[(1.6453555072203998 * N[(b * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+167], x, If[LessEqual[t$95$1, Infinity], N[(b * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+43}:\\
\;\;\;\;1.6453555072203998 \cdot \left(b \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+167}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;b \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -1.00000000000000001e43Initial program 89.8%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
Applied rewrites50.8%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6449.7
Applied rewrites49.7%
if -1.00000000000000001e43 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 1e167Initial program 99.7%
Taylor expanded in x around inf
Applied rewrites65.8%
if 1e167 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 83.5%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
Applied rewrites52.4%
Taylor expanded in z around 0
lower-*.f6451.2
Applied rewrites51.2%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Taylor expanded in z around 0
Applied rewrites49.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval97.2
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* b y)))
(t_2
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_2 -1e+43)
t_1
(if (<= t_2 1e+167)
x
(if (<= t_2 INFINITY) t_1 (- x (* -3.13060547623 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (b * y);
double t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -1e+43) {
tmp = t_1;
} else if (t_2 <= 1e+167) {
tmp = x;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (b * y);
double t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -1e+43) {
tmp = t_1;
} else if (t_2 <= 1e+167) {
tmp = x;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.6453555072203998 * (b * y) t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) tmp = 0 if t_2 <= -1e+43: tmp = t_1 elif t_2 <= 1e+167: tmp = x elif t_2 <= math.inf: tmp = t_1 else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(b * y)) t_2 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_2 <= -1e+43) tmp = t_1; elseif (t_2 <= 1e+167) tmp = x; elseif (t_2 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.6453555072203998 * (b * y); t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771); tmp = 0.0; if (t_2 <= -1e+43) tmp = t_1; elseif (t_2 <= 1e+167) tmp = x; elseif (t_2 <= Inf) tmp = t_1; else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(b * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+43], t$95$1, If[LessEqual[t$95$2, 1e+167], x, If[LessEqual[t$95$2, Infinity], t$95$1, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(b \cdot y\right)\\
t_2 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+167}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -1.00000000000000001e43 or 1e167 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 87.3%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
Applied rewrites51.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6450.3
Applied rewrites50.3%
if -1.00000000000000001e43 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 1e167Initial program 99.7%
Taylor expanded in x around inf
Applied rewrites65.8%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Taylor expanded in z around 0
Applied rewrites49.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval97.2
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))
5e+113)
x
(- x (* -3.13060547623 y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) {
tmp = x;
} else {
tmp = x - (-3.13060547623 * y);
}
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, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0)) <= 5d+113) then
tmp = x
else
tmp = x - ((-3.13060547623d0) * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) {
tmp = x;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113: tmp = x else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) tmp = x; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) tmp = x; else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], 5e+113], x, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \leq 5 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 5e113Initial program 96.2%
Taylor expanded in x around inf
Applied rewrites50.7%
if 5e113 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 22.8%
Taylor expanded in z around 0
Applied rewrites52.2%
Taylor expanded in z around inf
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
metadata-eval76.0
Applied rewrites76.0%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))
5e+113)
x
(fma 3.13060547623 y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) {
tmp = x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= 5e+113) tmp = x; else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], 5e+113], x, N[(3.13060547623 * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \leq 5 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 5e113Initial program 96.2%
Taylor expanded in x around inf
Applied rewrites50.7%
if 5e113 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 22.8%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6476.0
Applied rewrites76.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.8e-87) x (if (<= x 3e-36) (* 3.13060547623 y) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.8e-87) {
tmp = x;
} else if (x <= 3e-36) {
tmp = 3.13060547623 * y;
} else {
tmp = x;
}
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, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2.8d-87)) then
tmp = x
else if (x <= 3d-36) then
tmp = 3.13060547623d0 * y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.8e-87) {
tmp = x;
} else if (x <= 3e-36) {
tmp = 3.13060547623 * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.8e-87: tmp = x elif x <= 3e-36: tmp = 3.13060547623 * y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.8e-87) tmp = x; elseif (x <= 3e-36) tmp = Float64(3.13060547623 * y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.8e-87) tmp = x; elseif (x <= 3e-36) tmp = 3.13060547623 * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.8e-87], x, If[LessEqual[x, 3e-36], N[(3.13060547623 * y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-36}:\\
\;\;\;\;3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.8000000000000001e-87 or 3.0000000000000002e-36 < x Initial program 58.3%
Taylor expanded in x around inf
Applied rewrites63.3%
if -2.8000000000000001e-87 < x < 3.0000000000000002e-36Initial program 58.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6448.2
Applied rewrites48.2%
Taylor expanded in x around 0
lower-*.f6434.7
Applied rewrites34.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 58.3%
Taylor expanded in x around inf
Applied rewrites45.7%
herbie shell --seed 2025110
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))