
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))))
(if (<= t_1 4e+294)
(- t_1 (* j (* k 27.0)))
(if (<= t_1 INFINITY)
(-
(-
(*
(fma
(* -18.0 t)
(* z x)
(- (/ (- (* c b) (* 4.0 (fma a t (* i x)))) y)))
y))
(* (* j 27.0) k))
(fma
(* k j)
-27.0
(fma (fma (* (* z y) t) 18.0 (* -4.0 i)) x (* c b)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_1 <= 4e+294) {
tmp = t_1 - (j * (k * 27.0));
} else if (t_1 <= ((double) INFINITY)) {
tmp = -(fma((-18.0 * t), (z * x), -(((c * b) - (4.0 * fma(a, t, (i * x)))) / y)) * y) - ((j * 27.0) * k);
} else {
tmp = fma((k * j), -27.0, fma(fma(((z * y) * t), 18.0, (-4.0 * i)), x, (c * b)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) tmp = 0.0 if (t_1 <= 4e+294) tmp = Float64(t_1 - Float64(j * Float64(k * 27.0))); elseif (t_1 <= Inf) tmp = Float64(Float64(-Float64(fma(Float64(-18.0 * t), Float64(z * x), Float64(-Float64(Float64(Float64(c * b) - Float64(4.0 * fma(a, t, Float64(i * x)))) / y))) * y)) - Float64(Float64(j * 27.0) * k)); else tmp = fma(Float64(k * j), -27.0, fma(fma(Float64(Float64(z * y) * t), 18.0, Float64(-4.0 * i)), x, Float64(c * b))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+294], N[(t$95$1 - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[((-N[(N[(N[(-18.0 * t), $MachinePrecision] * N[(z * x), $MachinePrecision] + (-N[(N[(N[(c * b), $MachinePrecision] - N[(4.0 * N[(a * t + N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision])), $MachinePrecision] * y), $MachinePrecision]) - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+294}:\\
\;\;\;\;t\_1 - j \cdot \left(k \cdot 27\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(-\mathsf{fma}\left(-18 \cdot t, z \cdot x, -\frac{c \cdot b - 4 \cdot \mathsf{fma}\left(a, t, i \cdot x\right)}{y}\right) \cdot y\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(\mathsf{fma}\left(\left(z \cdot y\right) \cdot t, 18, -4 \cdot i\right), x, c \cdot b\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < 4.00000000000000027e294Initial program 85.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6485.4
Applied rewrites85.4%
if 4.00000000000000027e294 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 85.4%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites76.8%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -4e+43)
(-
(fma (fma (* 18.0 t) (* z y) (* -4.0 i)) x (* c b))
(fma (* k j) 27.0 (* (* a t) 4.0)))
(if (<= x 1.05e+146)
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))
(* j (* k 27.0)))
(fma (* k j) -27.0 (fma (fma (* (* z y) t) 18.0 (* -4.0 i)) x (* c b))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4e+43) {
tmp = fma(fma((18.0 * t), (z * y), (-4.0 * i)), x, (c * b)) - fma((k * j), 27.0, ((a * t) * 4.0));
} else if (x <= 1.05e+146) {
tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - (j * (k * 27.0));
} else {
tmp = fma((k * j), -27.0, fma(fma(((z * y) * t), 18.0, (-4.0 * i)), x, (c * b)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4e+43) tmp = Float64(fma(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)), x, Float64(c * b)) - fma(Float64(k * j), 27.0, Float64(Float64(a * t) * 4.0))); elseif (x <= 1.05e+146) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(j * Float64(k * 27.0))); else tmp = fma(Float64(k * j), -27.0, fma(fma(Float64(Float64(z * y) * t), 18.0, Float64(-4.0 * i)), x, Float64(c * b))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -4e+43], N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0 + N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+146], N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+43}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right), x, c \cdot b\right) - \mathsf{fma}\left(k \cdot j, 27, \left(a \cdot t\right) \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+146}:\\
\;\;\;\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - j \cdot \left(k \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(\mathsf{fma}\left(\left(z \cdot y\right) \cdot t, 18, -4 \cdot i\right), x, c \cdot b\right)\right)\\
\end{array}
\end{array}
if x < -4.00000000000000006e43Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
if -4.00000000000000006e43 < x < 1.05e146Initial program 85.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6485.4
Applied rewrites85.4%
if 1.05e146 < x Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -9e-182)
(-
(fma (fma (* 18.0 t) (* z y) (* -4.0 i)) x (* c b))
(fma (* k j) 27.0 (* (* a t) 4.0)))
(if (<= x 7.1e+34)
(fma (* -4.0 a) t (- (fma (* i x) -4.0 (* c b)) (* (* k j) 27.0)))
(fma (* k j) -27.0 (fma (fma (* (* z y) t) 18.0 (* -4.0 i)) x (* c b))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -9e-182) {
tmp = fma(fma((18.0 * t), (z * y), (-4.0 * i)), x, (c * b)) - fma((k * j), 27.0, ((a * t) * 4.0));
} else if (x <= 7.1e+34) {
tmp = fma((-4.0 * a), t, (fma((i * x), -4.0, (c * b)) - ((k * j) * 27.0)));
} else {
tmp = fma((k * j), -27.0, fma(fma(((z * y) * t), 18.0, (-4.0 * i)), x, (c * b)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -9e-182) tmp = Float64(fma(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)), x, Float64(c * b)) - fma(Float64(k * j), 27.0, Float64(Float64(a * t) * 4.0))); elseif (x <= 7.1e+34) tmp = fma(Float64(-4.0 * a), t, Float64(fma(Float64(i * x), -4.0, Float64(c * b)) - Float64(Float64(k * j) * 27.0))); else tmp = fma(Float64(k * j), -27.0, fma(fma(Float64(Float64(z * y) * t), 18.0, Float64(-4.0 * i)), x, Float64(c * b))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -9e-182], N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0 + N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.1e+34], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{-182}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right), x, c \cdot b\right) - \mathsf{fma}\left(k \cdot j, 27, \left(a \cdot t\right) \cdot 4\right)\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(i \cdot x, -4, c \cdot b\right) - \left(k \cdot j\right) \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(\mathsf{fma}\left(\left(z \cdot y\right) \cdot t, 18, -4 \cdot i\right), x, c \cdot b\right)\right)\\
\end{array}
\end{array}
if x < -8.9999999999999998e-182Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
if -8.9999999999999998e-182 < x < 7.09999999999999956e34Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
if 7.09999999999999956e34 < x Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))
INFINITY)
(fma
(* -27.0 j)
k
(fma (* 18.0 t) (* (* z y) x) (- (* c b) (* 4.0 (fma a t (* i x))))))
(fma (* k j) -27.0 (fma (fma (* (* z y) t) 18.0 (* -4.0 i)) x (* c b)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) <= ((double) INFINITY)) {
tmp = fma((-27.0 * j), k, fma((18.0 * t), ((z * y) * x), ((c * b) - (4.0 * fma(a, t, (i * x))))));
} else {
tmp = fma((k * j), -27.0, fma(fma(((z * y) * t), 18.0, (-4.0 * i)), x, (c * b)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) <= Inf) tmp = fma(Float64(-27.0 * j), k, fma(Float64(18.0 * t), Float64(Float64(z * y) * x), Float64(Float64(c * b) - Float64(4.0 * fma(a, t, Float64(i * x)))))); else tmp = fma(Float64(k * j), -27.0, fma(fma(Float64(Float64(z * y) * t), 18.0, Float64(-4.0 * i)), x, Float64(c * b))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(18.0 * t), $MachinePrecision] * N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(4.0 * N[(a * t + N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(18 \cdot t, \left(z \cdot y\right) \cdot x, c \cdot b - 4 \cdot \mathsf{fma}\left(a, t, i \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(\mathsf{fma}\left(\left(z \cdot y\right) \cdot t, 18, -4 \cdot i\right), x, c \cdot b\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 85.4%
Taylor expanded in j around 0
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites87.5%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
(* k j)
-27.0
(fma (fma (* (* z y) t) 18.0 (* -4.0 i)) x (* c b)))))
(if (<= x -1.02e+152)
t_1
(if (<= x 7.1e+34)
(fma (* -4.0 a) t (- (fma (* i x) -4.0 (* c b)) (* (* k j) 27.0)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((k * j), -27.0, fma(fma(((z * y) * t), 18.0, (-4.0 * i)), x, (c * b)));
double tmp;
if (x <= -1.02e+152) {
tmp = t_1;
} else if (x <= 7.1e+34) {
tmp = fma((-4.0 * a), t, (fma((i * x), -4.0, (c * b)) - ((k * j) * 27.0)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(k * j), -27.0, fma(fma(Float64(Float64(z * y) * t), 18.0, Float64(-4.0 * i)), x, Float64(c * b))) tmp = 0.0 if (x <= -1.02e+152) tmp = t_1; elseif (x <= 7.1e+34) tmp = fma(Float64(-4.0 * a), t, Float64(fma(Float64(i * x), -4.0, Float64(c * b)) - Float64(Float64(k * j) * 27.0))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * j), $MachinePrecision] * -27.0 + N[(N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+152], t$95$1, If[LessEqual[x, 7.1e+34], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(\mathsf{fma}\left(\left(z \cdot y\right) \cdot t, 18, -4 \cdot i\right), x, c \cdot b\right)\right)\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(i \cdot x, -4, c \cdot b\right) - \left(k \cdot j\right) \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.01999999999999999e152 or 7.09999999999999956e34 < x Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.1%
if -1.01999999999999999e152 < x < 7.09999999999999956e34Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -4.5e+28)
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)
(if (<= z 1.75e+263)
(fma (* -4.0 a) t (fma (* -4.0 i) x (fma -27.0 (* k j) (* c b))))
(* (fma (* (* 18.0 x) y) z (* -4.0 a)) t))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -4.5e+28) {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
} else if (z <= 1.75e+263) {
tmp = fma((-4.0 * a), t, fma((-4.0 * i), x, fma(-27.0, (k * j), (c * b))));
} else {
tmp = fma(((18.0 * x) * y), z, (-4.0 * a)) * t;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -4.5e+28) tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); elseif (z <= 1.75e+263) tmp = fma(Float64(-4.0 * a), t, fma(Float64(-4.0 * i), x, fma(-27.0, Float64(k * j), Float64(c * b)))); else tmp = Float64(fma(Float64(Float64(18.0 * x) * y), z, Float64(-4.0 * a)) * t); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -4.5e+28], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.75e+263], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(-4.0 * i), $MachinePrecision] * x + N[(-27.0 * N[(k * j), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * z + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+263}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(-4 \cdot i, x, \mathsf{fma}\left(-27, k \cdot j, c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(18 \cdot x\right) \cdot y, z, -4 \cdot a\right) \cdot t\\
\end{array}
\end{array}
if z < -4.4999999999999997e28Initial program 85.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.0
Applied rewrites43.0%
if -4.4999999999999997e28 < z < 1.74999999999999999e263Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
lift--.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6478.0
Applied rewrites78.0%
if 1.74999999999999999e263 < z Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in t around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites43.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
Applied rewrites43.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -3.6e+27)
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)
(if (<= z 1.75e+263)
(- (* c b) (fma 4.0 (fma a t (* i x)) (* (* k j) 27.0)))
(* (fma (* (* 18.0 x) y) z (* -4.0 a)) t))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -3.6e+27) {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
} else if (z <= 1.75e+263) {
tmp = (c * b) - fma(4.0, fma(a, t, (i * x)), ((k * j) * 27.0));
} else {
tmp = fma(((18.0 * x) * y), z, (-4.0 * a)) * t;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -3.6e+27) tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); elseif (z <= 1.75e+263) tmp = Float64(Float64(c * b) - fma(4.0, fma(a, t, Float64(i * x)), Float64(Float64(k * j) * 27.0))); else tmp = Float64(fma(Float64(Float64(18.0 * x) * y), z, Float64(-4.0 * a)) * t); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -3.6e+27], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.75e+263], N[(N[(c * b), $MachinePrecision] - N[(4.0 * N[(a * t + N[(i * x), $MachinePrecision]), $MachinePrecision] + N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * z + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+263}:\\
\;\;\;\;c \cdot b - \mathsf{fma}\left(4, \mathsf{fma}\left(a, t, i \cdot x\right), \left(k \cdot j\right) \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(18 \cdot x\right) \cdot y, z, -4 \cdot a\right) \cdot t\\
\end{array}
\end{array}
if z < -3.59999999999999983e27Initial program 85.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.0
Applied rewrites43.0%
if -3.59999999999999983e27 < z < 1.74999999999999999e263Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
if 1.74999999999999999e263 < z Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in t around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites43.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
Applied rewrites43.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.5e+18)
(* (fma (* (* y x) 18.0) z (* -4.0 a)) t)
(if (<= t 5e-15)
(- (* c b) (fma (* i x) 4.0 (* (* k j) 27.0)))
(if (<= t 1.08e+130)
(fma c b (* -4.0 (fma i x (* a t))))
(* (fma (* (* 18.0 x) y) z (* -4.0 a)) t)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.5e+18) {
tmp = fma(((y * x) * 18.0), z, (-4.0 * a)) * t;
} else if (t <= 5e-15) {
tmp = (c * b) - fma((i * x), 4.0, ((k * j) * 27.0));
} else if (t <= 1.08e+130) {
tmp = fma(c, b, (-4.0 * fma(i, x, (a * t))));
} else {
tmp = fma(((18.0 * x) * y), z, (-4.0 * a)) * t;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.5e+18) tmp = Float64(fma(Float64(Float64(y * x) * 18.0), z, Float64(-4.0 * a)) * t); elseif (t <= 5e-15) tmp = Float64(Float64(c * b) - fma(Float64(i * x), 4.0, Float64(Float64(k * j) * 27.0))); elseif (t <= 1.08e+130) tmp = fma(c, b, Float64(-4.0 * fma(i, x, Float64(a * t)))); else tmp = Float64(fma(Float64(Float64(18.0 * x) * y), z, Float64(-4.0 * a)) * t); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.5e+18], N[(N[(N[(N[(y * x), $MachinePrecision] * 18.0), $MachinePrecision] * z + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 5e-15], N[(N[(c * b), $MachinePrecision] - N[(N[(i * x), $MachinePrecision] * 4.0 + N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e+130], N[(c * b + N[(-4.0 * N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * z + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(\left(y \cdot x\right) \cdot 18, z, -4 \cdot a\right) \cdot t\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-15}:\\
\;\;\;\;c \cdot b - \mathsf{fma}\left(i \cdot x, 4, \left(k \cdot j\right) \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+130}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -4 \cdot \mathsf{fma}\left(i, x, a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(18 \cdot x\right) \cdot y, z, -4 \cdot a\right) \cdot t\\
\end{array}
\end{array}
if t < -2.5e18Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in t around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites43.7%
if -2.5e18 < t < 4.99999999999999999e-15Initial program 85.4%
Taylor expanded in t around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.7
Applied rewrites60.7%
if 4.99999999999999999e-15 < t < 1.08e130Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
if 1.08e130 < t Initial program 85.4%
Taylor expanded in x around 0
lower--.f64N/A
Applied rewrites87.5%
Taylor expanded in t around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites43.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
Applied rewrites43.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)))
(if (<= x -1.9e+131)
t_1
(if (<= x 6e+33) (fma (* -4.0 a) t (fma -27.0 (* k j) (* c b))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
double tmp;
if (x <= -1.9e+131) {
tmp = t_1;
} else if (x <= 6e+33) {
tmp = fma((-4.0 * a), t, fma(-27.0, (k * j), (c * b)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x) tmp = 0.0 if (x <= -1.9e+131) tmp = t_1; elseif (x <= 6e+33) tmp = fma(Float64(-4.0 * a), t, fma(-27.0, Float64(k * j), Float64(c * b))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.9e+131], t$95$1, If[LessEqual[x, 6e+33], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(-27.0 * N[(k * j), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(-27, k \cdot j, c \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.9000000000000002e131 or 5.99999999999999967e33 < x Initial program 85.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.0
Applied rewrites43.0%
if -1.9000000000000002e131 < x < 5.99999999999999967e33Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -2.9e+44)
(fma (* -4.0 a) t (* (* k j) -27.0))
(if (<= k 2.1e+152)
(fma c b (* -4.0 (fma i x (* a t))))
(- (* c b) (* (* k j) 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -2.9e+44) {
tmp = fma((-4.0 * a), t, ((k * j) * -27.0));
} else if (k <= 2.1e+152) {
tmp = fma(c, b, (-4.0 * fma(i, x, (a * t))));
} else {
tmp = (c * b) - ((k * j) * 27.0);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -2.9e+44) tmp = fma(Float64(-4.0 * a), t, Float64(Float64(k * j) * -27.0)); elseif (k <= 2.1e+152) tmp = fma(c, b, Float64(-4.0 * fma(i, x, Float64(a * t)))); else tmp = Float64(Float64(c * b) - Float64(Float64(k * j) * 27.0)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -2.9e+44], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(k * j), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.1e+152], N[(c * b + N[(-4.0 * N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * b), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.9 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \left(k \cdot j\right) \cdot -27\right)\\
\mathbf{elif}\;k \leq 2.1 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -4 \cdot \mathsf{fma}\left(i, x, a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot b - \left(k \cdot j\right) \cdot 27\\
\end{array}
\end{array}
if k < -2.9000000000000002e44Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
Taylor expanded in b around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6442.8
Applied rewrites42.8%
if -2.9000000000000002e44 < k < 2.1000000000000002e152Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
if 2.1000000000000002e152 < k Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.5
Applied rewrites41.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.6
Applied rewrites41.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6444.5
Applied rewrites44.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -3.1e-89)
(fma (* -4.0 a) t (* (* k j) -27.0))
(if (<= k 1.9e+64)
(fma (* -4.0 a) t (* c b))
(if (<= k 1.4e+152)
(* (fma i x (* a t)) -4.0)
(- (* c b) (* (* k j) 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.1e-89) {
tmp = fma((-4.0 * a), t, ((k * j) * -27.0));
} else if (k <= 1.9e+64) {
tmp = fma((-4.0 * a), t, (c * b));
} else if (k <= 1.4e+152) {
tmp = fma(i, x, (a * t)) * -4.0;
} else {
tmp = (c * b) - ((k * j) * 27.0);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.1e-89) tmp = fma(Float64(-4.0 * a), t, Float64(Float64(k * j) * -27.0)); elseif (k <= 1.9e+64) tmp = fma(Float64(-4.0 * a), t, Float64(c * b)); elseif (k <= 1.4e+152) tmp = Float64(fma(i, x, Float64(a * t)) * -4.0); else tmp = Float64(Float64(c * b) - Float64(Float64(k * j) * 27.0)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -3.1e-89], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(k * j), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.9e+64], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e+152], N[(N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(c * b), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.1 \cdot 10^{-89}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, \left(k \cdot j\right) \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.9 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(i, x, a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;c \cdot b - \left(k \cdot j\right) \cdot 27\\
\end{array}
\end{array}
if k < -3.09999999999999996e-89Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-+r+N/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.2%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
Taylor expanded in b around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6442.8
Applied rewrites42.8%
if -3.09999999999999996e-89 < k < 1.9000000000000001e64Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in x around 0
associate-*l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.0
Applied rewrites42.0%
if 1.9000000000000001e64 < k < 1.4000000000000001e152Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in b around 0
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f6439.6
Applied rewrites39.6%
if 1.4000000000000001e152 < k Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.5
Applied rewrites41.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.6
Applied rewrites41.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6444.5
Applied rewrites44.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -1.65e+24)
(* (* -27.0 j) k)
(if (<= k 1.9e+64)
(fma (* -4.0 a) t (* c b))
(if (<= k 1.4e+152)
(* (fma i x (* a t)) -4.0)
(- (* c b) (* (* k j) 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.65e+24) {
tmp = (-27.0 * j) * k;
} else if (k <= 1.9e+64) {
tmp = fma((-4.0 * a), t, (c * b));
} else if (k <= 1.4e+152) {
tmp = fma(i, x, (a * t)) * -4.0;
} else {
tmp = (c * b) - ((k * j) * 27.0);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.65e+24) tmp = Float64(Float64(-27.0 * j) * k); elseif (k <= 1.9e+64) tmp = fma(Float64(-4.0 * a), t, Float64(c * b)); elseif (k <= 1.4e+152) tmp = Float64(fma(i, x, Float64(a * t)) * -4.0); else tmp = Float64(Float64(c * b) - Float64(Float64(k * j) * 27.0)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.65e+24], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision], If[LessEqual[k, 1.9e+64], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e+152], N[(N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(c * b), $MachinePrecision] - N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\left(-27 \cdot j\right) \cdot k\\
\mathbf{elif}\;k \leq 1.9 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(i, x, a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;c \cdot b - \left(k \cdot j\right) \cdot 27\\
\end{array}
\end{array}
if k < -1.6499999999999999e24Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -1.6499999999999999e24 < k < 1.9000000000000001e64Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in x around 0
associate-*l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.0
Applied rewrites42.0%
if 1.9000000000000001e64 < k < 1.4000000000000001e152Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in b around 0
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f6439.6
Applied rewrites39.6%
if 1.4000000000000001e152 < k Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.5
Applied rewrites41.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6441.6
Applied rewrites41.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6444.5
Applied rewrites44.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -1.65e+24)
(* (* -27.0 j) k)
(if (<= k 1.9e+64)
(fma (* -4.0 a) t (* c b))
(if (<= k 4.5e+154) (* (fma i x (* a t)) -4.0) (* (* -27.0 k) j)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.65e+24) {
tmp = (-27.0 * j) * k;
} else if (k <= 1.9e+64) {
tmp = fma((-4.0 * a), t, (c * b));
} else if (k <= 4.5e+154) {
tmp = fma(i, x, (a * t)) * -4.0;
} else {
tmp = (-27.0 * k) * j;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.65e+24) tmp = Float64(Float64(-27.0 * j) * k); elseif (k <= 1.9e+64) tmp = fma(Float64(-4.0 * a), t, Float64(c * b)); elseif (k <= 4.5e+154) tmp = Float64(fma(i, x, Float64(a * t)) * -4.0); else tmp = Float64(Float64(-27.0 * k) * j); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.65e+24], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision], If[LessEqual[k, 1.9e+64], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.5e+154], N[(N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(-27.0 * k), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\left(-27 \cdot j\right) \cdot k\\
\mathbf{elif}\;k \leq 1.9 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(i, x, a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\end{array}
\end{array}
if k < -1.6499999999999999e24Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -1.6499999999999999e24 < k < 1.9000000000000001e64Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in x around 0
associate-*l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.0
Applied rewrites42.0%
if 1.9000000000000001e64 < k < 4.50000000000000009e154Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in b around 0
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f6439.6
Applied rewrites39.6%
if 4.50000000000000009e154 < k Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -4e+220)
(* (* -27.0 k) j)
(if (<= t_1 4e+159) (* (fma i x (* a t)) -4.0) (* (* -27.0 j) k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -4e+220) {
tmp = (-27.0 * k) * j;
} else if (t_1 <= 4e+159) {
tmp = fma(i, x, (a * t)) * -4.0;
} else {
tmp = (-27.0 * j) * k;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -4e+220) tmp = Float64(Float64(-27.0 * k) * j); elseif (t_1 <= 4e+159) tmp = Float64(fma(i, x, Float64(a * t)) * -4.0); else tmp = Float64(Float64(-27.0 * j) * k); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+220], N[(N[(-27.0 * k), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t$95$1, 4e+159], N[(N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+220}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+159}:\\
\;\;\;\;\mathsf{fma}\left(i, x, a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot j\right) \cdot k\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4e220Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -4e220 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.9999999999999997e159Initial program 85.4%
Taylor expanded in y around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in j around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
Taylor expanded in b around 0
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
lift-fma.f64N/A
lift-*.f6439.6
Applied rewrites39.6%
if 3.9999999999999997e159 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -3.5e-60)
(* (* -27.0 j) k)
(if (<= k 7.2e+14)
(* (* a t) -4.0)
(if (<= k 1.4e+152) (* (* -4.0 i) x) (* (* -27.0 k) j)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.5e-60) {
tmp = (-27.0 * j) * k;
} else if (k <= 7.2e+14) {
tmp = (a * t) * -4.0;
} else if (k <= 1.4e+152) {
tmp = (-4.0 * i) * x;
} else {
tmp = (-27.0 * k) * j;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-3.5d-60)) then
tmp = ((-27.0d0) * j) * k
else if (k <= 7.2d+14) then
tmp = (a * t) * (-4.0d0)
else if (k <= 1.4d+152) then
tmp = ((-4.0d0) * i) * x
else
tmp = ((-27.0d0) * k) * j
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.5e-60) {
tmp = (-27.0 * j) * k;
} else if (k <= 7.2e+14) {
tmp = (a * t) * -4.0;
} else if (k <= 1.4e+152) {
tmp = (-4.0 * i) * x;
} else {
tmp = (-27.0 * k) * j;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3.5e-60: tmp = (-27.0 * j) * k elif k <= 7.2e+14: tmp = (a * t) * -4.0 elif k <= 1.4e+152: tmp = (-4.0 * i) * x else: tmp = (-27.0 * k) * j return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.5e-60) tmp = Float64(Float64(-27.0 * j) * k); elseif (k <= 7.2e+14) tmp = Float64(Float64(a * t) * -4.0); elseif (k <= 1.4e+152) tmp = Float64(Float64(-4.0 * i) * x); else tmp = Float64(Float64(-27.0 * k) * j); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -3.5e-60)
tmp = (-27.0 * j) * k;
elseif (k <= 7.2e+14)
tmp = (a * t) * -4.0;
elseif (k <= 1.4e+152)
tmp = (-4.0 * i) * x;
else
tmp = (-27.0 * k) * j;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -3.5e-60], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision], If[LessEqual[k, 7.2e+14], N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[k, 1.4e+152], N[(N[(-4.0 * i), $MachinePrecision] * x), $MachinePrecision], N[(N[(-27.0 * k), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.5 \cdot 10^{-60}:\\
\;\;\;\;\left(-27 \cdot j\right) \cdot k\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+14}:\\
\;\;\;\;\left(a \cdot t\right) \cdot -4\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+152}:\\
\;\;\;\;\left(-4 \cdot i\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\end{array}
\end{array}
if k < -3.49999999999999976e-60Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -3.49999999999999976e-60 < k < 7.2e14Initial program 85.4%
Taylor expanded in t around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift-*.f6421.4
Applied rewrites21.4%
if 7.2e14 < k < 1.4000000000000001e152Initial program 85.4%
Taylor expanded in i around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f6421.4
Applied rewrites21.4%
if 1.4000000000000001e152 < k Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -1e+24)
(* (* -27.0 k) j)
(if (<= t_1 2e+53) (* (* a t) -4.0) (* -27.0 (* k j))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+24) {
tmp = (-27.0 * k) * j;
} else if (t_1 <= 2e+53) {
tmp = (a * t) * -4.0;
} else {
tmp = -27.0 * (k * j);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+24)) then
tmp = ((-27.0d0) * k) * j
else if (t_1 <= 2d+53) then
tmp = (a * t) * (-4.0d0)
else
tmp = (-27.0d0) * (k * j)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+24) {
tmp = (-27.0 * k) * j;
} else if (t_1 <= 2e+53) {
tmp = (a * t) * -4.0;
} else {
tmp = -27.0 * (k * j);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+24: tmp = (-27.0 * k) * j elif t_1 <= 2e+53: tmp = (a * t) * -4.0 else: tmp = -27.0 * (k * j) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+24) tmp = Float64(Float64(-27.0 * k) * j); elseif (t_1 <= 2e+53) tmp = Float64(Float64(a * t) * -4.0); else tmp = Float64(-27.0 * Float64(k * j)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+24)
tmp = (-27.0 * k) * j;
elseif (t_1 <= 2e+53)
tmp = (a * t) * -4.0;
else
tmp = -27.0 * (k * j);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+24], N[(N[(-27.0 * k), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t$95$1, 2e+53], N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+24}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+53}:\\
\;\;\;\;\left(a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(k \cdot j\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e23Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.9999999999999998e23 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e53Initial program 85.4%
Taylor expanded in t around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift-*.f6421.4
Applied rewrites21.4%
if 2e53 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (let* ((t_1 (* -27.0 (* k j))) (t_2 (* (* j 27.0) k))) (if (<= t_2 -1e+24) t_1 (if (<= t_2 2e+53) (* (* a t) -4.0) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (k * j);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+24) {
tmp = t_1;
} else if (t_2 <= 2e+53) {
tmp = (a * t) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (k * j)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-1d+24)) then
tmp = t_1
else if (t_2 <= 2d+53) then
tmp = (a * t) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (k * j);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+24) {
tmp = t_1;
} else if (t_2 <= 2e+53) {
tmp = (a * t) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (k * j) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -1e+24: tmp = t_1 elif t_2 <= 2e+53: tmp = (a * t) * -4.0 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(k * j)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+24) tmp = t_1; elseif (t_2 <= 2e+53) tmp = Float64(Float64(a * t) * -4.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (k * j);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -1e+24)
tmp = t_1;
elseif (t_2 <= 2e+53)
tmp = (a * t) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+24], t$95$1, If[LessEqual[t$95$2, 2e+53], N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(k \cdot j\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+53}:\\
\;\;\;\;\left(a \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e23 or 2e53 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.4%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.9999999999999998e23 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e53Initial program 85.4%
Taylor expanded in t around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift-*.f6421.4
Applied rewrites21.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* (* a t) -4.0))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (a * t) * -4.0;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (a * t) * (-4.0d0)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (a * t) * -4.0;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return (a * t) * -4.0
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(a * t) * -4.0) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = (a * t) * -4.0;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\left(a \cdot t\right) \cdot -4
\end{array}
Initial program 85.4%
Taylor expanded in t around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift-*.f6421.4
Applied rewrites21.4%
herbie shell --seed 2025136
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))