
(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 15 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.
(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))
(* (* j 27.0) k))))
(if (<= t_1 5e+301)
t_1
(if (<= t_1 INFINITY)
(-
(*
(fma
(* -18.0 t)
(* z x)
(- (/ (- (* c b) (fma 4.0 (fma a t (* i x)) (* (* k j) 27.0))) y)))
y))
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)))))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)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= 5e+301) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = -(fma((-18.0 * t), (z * x), -(((c * b) - fma(4.0, fma(a, t, (i * x)), ((k * j) * 27.0))) / y)) * y);
} else {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
}
return tmp;
}
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(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)) tmp = 0.0 if (t_1 <= 5e+301) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(-Float64(fma(Float64(-18.0 * t), Float64(z * x), Float64(-Float64(Float64(Float64(c * b) - fma(4.0, fma(a, t, Float64(i * x)), Float64(Float64(k * j) * 27.0))) / y))) * y)); else tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 5e+301], t$95$1, If[LessEqual[t$95$1, Infinity], (-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] + N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision])), $MachinePrecision] * y), $MachinePrecision]), N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $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])\\
\\
\begin{array}{l}
t_1 := \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\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;-\mathsf{fma}\left(-18 \cdot t, z \cdot x, -\frac{c \cdot b - \mathsf{fma}\left(4, \mathsf{fma}\left(a, t, i \cdot x\right), \left(k \cdot j\right) \cdot 27\right)}{y}\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\end{array}
\end{array}
if (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 5.0000000000000004e301Initial program 84.7%
if 5.0000000000000004e301 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
if +inf.0 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
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))
(* (* j 27.0) k))))
(if (<= t_1 1e+308)
t_1
(if (<= t_1 INFINITY)
(-
(*
(fma
(* -18.0 t)
(* y x)
(- (/ (- (* c b) (fma 4.0 (fma a t (* i x)) (* (* k j) 27.0))) z)))
z))
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)))))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)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= 1e+308) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = -(fma((-18.0 * t), (y * x), -(((c * b) - fma(4.0, fma(a, t, (i * x)), ((k * j) * 27.0))) / z)) * z);
} else {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
}
return tmp;
}
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(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)) tmp = 0.0 if (t_1 <= 1e+308) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(-Float64(fma(Float64(-18.0 * t), Float64(y * x), Float64(-Float64(Float64(Float64(c * b) - fma(4.0, fma(a, t, Float64(i * x)), Float64(Float64(k * j) * 27.0))) / z))) * z)); else tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 1e+308], t$95$1, If[LessEqual[t$95$1, Infinity], (-N[(N[(N[(-18.0 * t), $MachinePrecision] * N[(y * x), $MachinePrecision] + (-N[(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] / z), $MachinePrecision])), $MachinePrecision] * z), $MachinePrecision]), N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $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])\\
\\
\begin{array}{l}
t_1 := \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\\
\mathbf{if}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;-\mathsf{fma}\left(-18 \cdot t, y \cdot x, -\frac{c \cdot b - \mathsf{fma}\left(4, \mathsf{fma}\left(a, t, i \cdot x\right), \left(k \cdot j\right) \cdot 27\right)}{z}\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\end{array}
\end{array}
if (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 1e308Initial program 84.7%
if 1e308 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 84.7%
Taylor expanded in z around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites76.1%
if +inf.0 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
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 4.0) i))
(t_2 (* (* j 27.0) k))
(t_3 (* (* a 4.0) t))
(t_4 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)))
(if (<= t_4 1e+299)
t_4
(if (<= t_4 INFINITY)
(- (- (+ (- (* (* (* 18.0 x) y) (* z t)) t_3) (* b c)) t_1) t_2)
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x)))))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 * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = (a * 4.0) * t;
double t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= 1e+299) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = ((((((18.0 * x) * y) * (z * t)) - t_3) + (b * c)) - t_1) - t_2;
} else {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
}
return tmp;
}
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(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(a * 4.0) * t) t_4 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_3) + Float64(b * c)) - t_1) - t_2) tmp = 0.0 if (t_4 <= 1e+299) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(18.0 * x) * y) * Float64(z * t)) - t_3) + Float64(b * c)) - t_1) - t_2); else tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, 1e+299], t$95$4, If[LessEqual[t$95$4, Infinity], N[(N[(N[(N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $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])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \left(a \cdot 4\right) \cdot t\\
t_4 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{if}\;t\_4 \leq 10^{+299}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(\left(18 \cdot x\right) \cdot y\right) \cdot \left(z \cdot t\right) - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\end{array}
\end{array}
if (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 1.0000000000000001e299Initial program 84.7%
if 1.0000000000000001e299 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 84.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6483.6
Applied rewrites83.6%
if +inf.0 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
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 4.0) i)) (t_2 (* (* j 27.0) k)) (t_3 (* (* a 4.0) t)))
(if (<=
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)
INFINITY)
(- (- (+ (- (* (* (* 18.0 x) y) (* z t)) t_3) (* b c)) t_1) t_2)
(* (fma (* 18.0 t) (* z y) (* -4.0 i)) x))))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 * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = (a * 4.0) * t;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2) <= ((double) INFINITY)) {
tmp = ((((((18.0 * x) * y) * (z * t)) - t_3) + (b * c)) - t_1) - t_2;
} else {
tmp = fma((18.0 * t), (z * y), (-4.0 * i)) * x;
}
return tmp;
}
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(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(a * 4.0) * t) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_3) + Float64(b * c)) - t_1) - t_2) <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(18.0 * x) * y) * Float64(z * t)) - t_3) + Float64(b * c)) - t_1) - t_2); else tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $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])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \left(a \cdot 4\right) \cdot t\\
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2 \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(\left(18 \cdot x\right) \cdot y\right) \cdot \left(z \cdot t\right) - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\end{array}
\end{array}
if (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 84.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6483.6
Applied rewrites83.6%
if +inf.0 < (-.f64 (-.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)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
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+188)
(- (fma c b (* -4.0 (* a t))) t_1)
(if (<= t_1 5e+92)
(fma (* (* (* z y) x) t) 18.0 (fma c b (* -4.0 (fma i x (* a t)))))
(- (fma c b (* (* -4.0 i) x)) t_1)))))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+188) {
tmp = fma(c, b, (-4.0 * (a * t))) - t_1;
} else if (t_1 <= 5e+92) {
tmp = fma((((z * y) * x) * t), 18.0, fma(c, b, (-4.0 * fma(i, x, (a * t)))));
} else {
tmp = fma(c, b, ((-4.0 * i) * x)) - 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]) 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+188) tmp = Float64(fma(c, b, Float64(-4.0 * Float64(a * t))) - t_1); elseif (t_1 <= 5e+92) tmp = fma(Float64(Float64(Float64(z * y) * x) * t), 18.0, fma(c, b, Float64(-4.0 * fma(i, x, Float64(a * t))))); else tmp = Float64(fma(c, b, Float64(Float64(-4.0 * i) * x)) - 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.
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+188], N[(N[(c * b + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 5e+92], N[(N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(c * b + N[(-4.0 * N[(i * x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * b + N[(N[(-4.0 * i), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] - t$95$1), $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])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+188}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -4 \cdot \left(a \cdot t\right)\right) - t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+92}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(z \cdot y\right) \cdot x\right) \cdot t, 18, \mathsf{fma}\left(c, b, -4 \cdot \mathsf{fma}\left(i, x, a \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \left(-4 \cdot i\right) \cdot x\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e188Initial program 84.7%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
if -1e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.00000000000000022e92Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
if 5.00000000000000022e92 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in t around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.4
Applied rewrites62.4%
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)) (t_2 (* (fma (* (* z y) x) 18.0 (* -4.0 a)) t)))
(if (<= t -5.2e+157)
t_2
(if (<= t 4.6e-133)
(- (fma c b (* (* -4.0 i) x)) t_1)
(if (<= t 8.2e+80) (- (fma c b (* -4.0 (* a t))) t_1) t_2)))))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 t_2 = fma(((z * y) * x), 18.0, (-4.0 * a)) * t;
double tmp;
if (t <= -5.2e+157) {
tmp = t_2;
} else if (t <= 4.6e-133) {
tmp = fma(c, b, ((-4.0 * i) * x)) - t_1;
} else if (t <= 8.2e+80) {
tmp = fma(c, b, (-4.0 * (a * t))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
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) t_2 = Float64(fma(Float64(Float64(z * y) * x), 18.0, Float64(-4.0 * a)) * t) tmp = 0.0 if (t <= -5.2e+157) tmp = t_2; elseif (t <= 4.6e-133) tmp = Float64(fma(c, b, Float64(Float64(-4.0 * i) * x)) - t_1); elseif (t <= 8.2e+80) tmp = Float64(fma(c, b, Float64(-4.0 * Float64(a * t))) - t_1); else tmp = t_2; 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] * 18.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.2e+157], t$95$2, If[LessEqual[t, 4.6e-133], N[(N[(c * b + N[(N[(-4.0 * i), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 8.2e+80], N[(N[(c * b + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\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])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \mathsf{fma}\left(\left(z \cdot y\right) \cdot x, 18, -4 \cdot a\right) \cdot t\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-133}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \left(-4 \cdot i\right) \cdot x\right) - t\_1\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -4 \cdot \left(a \cdot t\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.20000000000000022e157 or 8.20000000000000003e80 < t Initial program 84.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.3
Applied rewrites41.3%
if -5.20000000000000022e157 < t < 4.6000000000000001e-133Initial program 84.7%
Taylor expanded in t around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.4
Applied rewrites62.4%
if 4.6000000000000001e-133 < t < 8.20000000000000003e80Initial program 84.7%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
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 -8e+165)
(- (* (fma -18.0 (* (* z y) t) (* i 4.0)) x))
(if (<= x 2.9e+29)
(- (fma c b (* -4.0 (* a t))) (* (* j 27.0) k))
(* (fma (* (* t 18.0) z) y (* -4.0 i)) x))))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 <= -8e+165) {
tmp = -(fma(-18.0, ((z * y) * t), (i * 4.0)) * x);
} else if (x <= 2.9e+29) {
tmp = fma(c, b, (-4.0 * (a * t))) - ((j * 27.0) * k);
} else {
tmp = fma(((t * 18.0) * z), y, (-4.0 * i)) * x;
}
return tmp;
}
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 <= -8e+165) tmp = Float64(-Float64(fma(-18.0, Float64(Float64(z * y) * t), Float64(i * 4.0)) * x)); elseif (x <= 2.9e+29) tmp = Float64(fma(c, b, Float64(-4.0 * Float64(a * t))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(fma(Float64(Float64(t * 18.0) * z), y, Float64(-4.0 * i)) * x); 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8e+165], (-N[(N[(-18.0 * N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] + N[(i * 4.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[x, 2.9e+29], N[(N[(c * b + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * 18.0), $MachinePrecision] * z), $MachinePrecision] * y + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+165}:\\
\;\;\;\;-\mathsf{fma}\left(-18, \left(z \cdot y\right) \cdot t, i \cdot 4\right) \cdot x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -4 \cdot \left(a \cdot t\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(t \cdot 18\right) \cdot z, y, -4 \cdot i\right) \cdot x\\
\end{array}
\end{array}
if x < -7.9999999999999992e165Initial program 84.7%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
if -7.9999999999999992e165 < x < 2.8999999999999999e29Initial program 84.7%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
if 2.8999999999999999e29 < x Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f6443.5
Applied rewrites43.5%
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 (* a t) -4.0 (* c b))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+146)
(- (* c b) t_2)
(if (<= t_2 2e-244)
t_1
(if (<= t_2 4e-79)
(fma (* i x) -4.0 (* c b))
(if (<= t_2 1e+126)
t_1
(if (<= t_2 2e+200)
(* (fma (* 18.0 t) (* z y) (* -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);
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((a * t), -4.0, (c * b));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+146) {
tmp = (c * b) - t_2;
} else if (t_2 <= 2e-244) {
tmp = t_1;
} else if (t_2 <= 4e-79) {
tmp = fma((i * x), -4.0, (c * b));
} else if (t_2 <= 1e+126) {
tmp = t_1;
} else if (t_2 <= 2e+200) {
tmp = fma((18.0 * t), (z * y), (-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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(a * t), -4.0, Float64(c * b)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+146) tmp = Float64(Float64(c * b) - t_2); elseif (t_2 <= 2e-244) tmp = t_1; elseif (t_2 <= 4e-79) tmp = fma(Float64(i * x), -4.0, Float64(c * b)); elseif (t_2 <= 1e+126) tmp = t_1; elseif (t_2 <= 2e+200) tmp = Float64(fma(Float64(18.0 * t), Float64(z * y), Float64(-4.0 * i)) * x); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * t), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+146], N[(N[(c * b), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 2e-244], t$95$1, If[LessEqual[t$95$2, 4e-79], N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+126], t$95$1, If[LessEqual[t$95$2, 2e+200], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a \cdot t, -4, c \cdot b\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+146}:\\
\;\;\;\;c \cdot b - t\_2\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot x, -4, c \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+200}:\\
\;\;\;\;\mathsf{fma}\left(18 \cdot t, z \cdot y, -4 \cdot i\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e146Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
if -4.9999999999999999e146 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e-244 or 4e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999925e125Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6440.5
Applied rewrites40.5%
if 1.9999999999999999e-244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4e-79Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6441.8
Applied rewrites41.8%
if 9.99999999999999925e125 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e200Initial program 84.7%
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-*.f6442.5
Applied rewrites42.5%
if 1.9999999999999999e200 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
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 (* a t) -4.0 (* c b)))
(t_2 (* (* j 27.0) k))
(t_3 (- (* c b) t_2)))
(if (<= t_2 -5e+146)
t_3
(if (<= t_2 2e-244)
t_1
(if (<= t_2 4e-79)
(fma (* i x) -4.0 (* c b))
(if (<= t_2 4e+99) t_1 t_3))))))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((a * t), -4.0, (c * b));
double t_2 = (j * 27.0) * k;
double t_3 = (c * b) - t_2;
double tmp;
if (t_2 <= -5e+146) {
tmp = t_3;
} else if (t_2 <= 2e-244) {
tmp = t_1;
} else if (t_2 <= 4e-79) {
tmp = fma((i * x), -4.0, (c * b));
} else if (t_2 <= 4e+99) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
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(a * t), -4.0, Float64(c * b)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(c * b) - t_2) tmp = 0.0 if (t_2 <= -5e+146) tmp = t_3; elseif (t_2 <= 2e-244) tmp = t_1; elseif (t_2 <= 4e-79) tmp = fma(Float64(i * x), -4.0, Float64(c * b)); elseif (t_2 <= 4e+99) tmp = t_1; else tmp = t_3; 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * t), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * b), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+146], t$95$3, If[LessEqual[t$95$2, 2e-244], t$95$1, If[LessEqual[t$95$2, 4e-79], N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+99], t$95$1, t$95$3]]]]]]]
\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])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a \cdot t, -4, c \cdot b\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := c \cdot b - t\_2\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+146}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot x, -4, c \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e146 or 3.9999999999999999e99 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
if -4.9999999999999999e146 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e-244 or 4e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.9999999999999999e99Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6440.5
Applied rewrites40.5%
if 1.9999999999999999e-244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4e-79Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6441.8
Applied rewrites41.8%
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 (* a t) -4.0 (* c b))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -1e+234)
(* -27.0 (* k j))
(if (<= t_2 2e-244)
t_1
(if (<= t_2 4e-79)
(fma (* i x) -4.0 (* c b))
(if (<= t_2 1e+195) t_1 (* (* -27.0 k) j)))))))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((a * t), -4.0, (c * b));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+234) {
tmp = -27.0 * (k * j);
} else if (t_2 <= 2e-244) {
tmp = t_1;
} else if (t_2 <= 4e-79) {
tmp = fma((i * x), -4.0, (c * b));
} else if (t_2 <= 1e+195) {
tmp = t_1;
} 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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(a * t), -4.0, Float64(c * b)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+234) tmp = Float64(-27.0 * Float64(k * j)); elseif (t_2 <= 2e-244) tmp = t_1; elseif (t_2 <= 4e-79) tmp = fma(Float64(i * x), -4.0, Float64(c * b)); elseif (t_2 <= 1e+195) tmp = t_1; 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * t), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+234], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-244], t$95$1, If[LessEqual[t$95$2, 4e-79], N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+195], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a \cdot t, -4, c \cdot b\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+234}:\\
\;\;\;\;-27 \cdot \left(k \cdot j\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot x, -4, c \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000002e234Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
if -1.00000000000000002e234 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e-244 or 4e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999977e194Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6440.5
Applied rewrites40.5%
if 1.9999999999999999e-244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4e-79Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6441.8
Applied rewrites41.8%
if 9.99999999999999977e194 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
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 (* (* z y) x) 18.0 (* -4.0 a)) t)))
(if (<= t -1600000.0)
t_1
(if (<= t 4.6e-51) (fma (* i x) -4.0 (* c b)) t_1))))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(((z * y) * x), 18.0, (-4.0 * a)) * t;
double tmp;
if (t <= -1600000.0) {
tmp = t_1;
} else if (t <= 4.6e-51) {
tmp = fma((i * x), -4.0, (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(Float64(Float64(z * y) * x), 18.0, Float64(-4.0 * a)) * t) tmp = 0.0 if (t <= -1600000.0) tmp = t_1; elseif (t <= 4.6e-51) tmp = fma(Float64(i * x), -4.0, 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] * 18.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1600000.0], t$95$1, If[LessEqual[t, 4.6e-51], N[(N[(i * x), $MachinePrecision] * -4.0 + N[(c * b), $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])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(z \cdot y\right) \cdot x, 18, -4 \cdot a\right) \cdot t\\
\mathbf{if}\;t \leq -1600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-51}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot x, -4, c \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6e6 or 4.60000000000000004e-51 < t Initial program 84.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.3
Applied rewrites41.3%
if -1.6e6 < t < 4.60000000000000004e-51Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6441.8
Applied rewrites41.8%
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+234)
(* -27.0 (* k j))
(if (<= t_1 1e+195) (fma (* a t) -4.0 (* c b)) (* (* -27.0 k) j)))))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+234) {
tmp = -27.0 * (k * j);
} else if (t_1 <= 1e+195) {
tmp = fma((a * t), -4.0, (c * b));
} 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]) 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+234) tmp = Float64(-27.0 * Float64(k * j)); elseif (t_1 <= 1e+195) tmp = fma(Float64(a * t), -4.0, Float64(c * b)); 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.
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+234], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+195], N[(N[(a * t), $MachinePrecision] * -4.0 + N[(c * b), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+234}:\\
\;\;\;\;-27 \cdot \left(k \cdot j\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+195}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot t, -4, c \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-27 \cdot k\right) \cdot j\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000002e234Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
if -1.00000000000000002e234 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999977e194Initial program 84.7%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in j around 0
distribute-lft-outN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6440.5
Applied rewrites40.5%
if 9.99999999999999977e194 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
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 (<= (* b c) -2e+61) (* c b) (if (<= (* b c) 5e+62) (* -4.0 (* a t)) (* c b))))
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 ((b * c) <= -2e+61) {
tmp = c * b;
} else if ((b * c) <= 5e+62) {
tmp = -4.0 * (a * t);
} else {
tmp = c * b;
}
return tmp;
}
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 ((b * c) <= (-2d+61)) then
tmp = c * b
else if ((b * c) <= 5d+62) then
tmp = (-4.0d0) * (a * t)
else
tmp = c * b
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;
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 ((b * c) <= -2e+61) {
tmp = c * b;
} else if ((b * c) <= 5e+62) {
tmp = -4.0 * (a * t);
} else {
tmp = 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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2e+61: tmp = c * b elif (b * c) <= 5e+62: tmp = -4.0 * (a * t) else: tmp = 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2e+61) tmp = Float64(c * b); elseif (Float64(b * c) <= 5e+62) tmp = Float64(-4.0 * Float64(a * t)); else tmp = Float64(c * b); 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2e+61)
tmp = c * b;
elseif ((b * c) <= 5e+62)
tmp = -4.0 * (a * t);
else
tmp = c * b;
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2e+61], N[(c * b), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+62], N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision], N[(c * b), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+61}:\\
\;\;\;\;c \cdot b\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+62}:\\
\;\;\;\;-4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot b\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9999999999999999e61 or 5.00000000000000029e62 < (*.f64 b c) Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6423.7
Applied rewrites23.7%
if -1.9999999999999999e61 < (*.f64 b c) < 5.00000000000000029e62Initial program 84.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6420.4
Applied rewrites20.4%
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 -5e+195) t_1 (if (<= t_2 2e+130) (* c b) t_1))))
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 <= -5e+195) {
tmp = t_1;
} else if (t_2 <= 2e+130) {
tmp = c * b;
} 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.
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 <= (-5d+195)) then
tmp = t_1
else if (t_2 <= 2d+130) then
tmp = c * b
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;
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 <= -5e+195) {
tmp = t_1;
} else if (t_2 <= 2e+130) {
tmp = 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]) 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 <= -5e+195: tmp = t_1 elif t_2 <= 2e+130: tmp = 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]) 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 <= -5e+195) tmp = t_1; elseif (t_2 <= 2e+130) tmp = Float64(c * b); 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])){:}
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 <= -5e+195)
tmp = t_1;
elseif (t_2 <= 2e+130)
tmp = c * b;
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.
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, -5e+195], t$95$1, If[LessEqual[t$95$2, 2e+130], N[(c * b), $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])\\
\\
\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 -5 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+130}:\\
\;\;\;\;c \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999998e195 or 2.0000000000000001e130 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
if -4.9999999999999998e195 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e130Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6423.7
Applied rewrites23.7%
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 (* c b))
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 c * b;
}
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 = c * b
end function
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 c * b;
}
[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 c * b
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(c * b) end
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 = c * b;
end
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[(c * b), $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])\\
\\
c \cdot b
\end{array}
Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6423.7
Applied rewrites23.7%
herbie shell --seed 2025123
(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)))