
(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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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}
Sampling outcomes in binary64 precision:
Herbie found 19 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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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
(if (<=
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (+ (* -4.0 i) (* 18.0 (* z (* t y)))))))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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
}
return tmp;
}
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 ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
}
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 (((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y)))) 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(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(z * Float64(t * y))))); 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 ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
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[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-4 \cdot i + 18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\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 95.1%
Simplified96.7%
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 0.0%
pow10.0%
associate-*l*0.0%
*-commutative0.0%
Applied egg-rr0.0%
unpow10.0%
associate-*l*21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in x around inf 47.9%
cancel-sign-sub-inv47.9%
associate-*r*47.9%
metadata-eval47.9%
*-commutative47.9%
Simplified47.9%
Final simplification93.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 (+ (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i)))) (* j (* k -27.0))))
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 fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
}
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(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))) 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[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $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])\\
\\
\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)
\end{array}
Initial program 88.0%
Simplified92.6%
Final simplification92.6%
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 (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* x i)))))
(if (<= t -1.15e+180)
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))
(if (<= t -1.35e+54)
(* x (+ (* -4.0 i) (* 18.0 (* z (* t y)))))
(if (<= t -14000.0)
(+ (* k (* j -27.0)) (* -4.0 (* t a)))
(if (<= t -1.45e-114)
t_2
(if (<= t -1.22e-247)
(+ t_1 (* b c))
(if (<= t 2.6e-257)
t_2
(if (<= t 2.3e+63)
(- (* b c) (* 27.0 (* j k)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))))))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 * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if (t <= -1.15e+180) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -1.35e+54) {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
} else if (t <= -14000.0) {
tmp = (k * (j * -27.0)) + (-4.0 * (t * a));
} else if (t <= -1.45e-114) {
tmp = t_2;
} else if (t <= -1.22e-247) {
tmp = t_1 + (b * c);
} else if (t <= 2.6e-257) {
tmp = t_2;
} else if (t <= 2.3e+63) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (x * i))
if (t <= (-1.15d+180)) then
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
else if (t <= (-1.35d+54)) then
tmp = x * (((-4.0d0) * i) + (18.0d0 * (z * (t * y))))
else if (t <= (-14000.0d0)) then
tmp = (k * (j * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (t <= (-1.45d-114)) then
tmp = t_2
else if (t <= (-1.22d-247)) then
tmp = t_1 + (b * c)
else if (t <= 2.6d-257) then
tmp = t_2
else if (t <= 2.3d+63) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
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 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if (t <= -1.15e+180) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -1.35e+54) {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
} else if (t <= -14000.0) {
tmp = (k * (j * -27.0)) + (-4.0 * (t * a));
} else if (t <= -1.45e-114) {
tmp = t_2;
} else if (t <= -1.22e-247) {
tmp = t_1 + (b * c);
} else if (t <= 2.6e-257) {
tmp = t_2;
} else if (t <= 2.3e+63) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
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 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (x * i)) tmp = 0 if t <= -1.15e+180: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) elif t <= -1.35e+54: tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y)))) elif t <= -14000.0: tmp = (k * (j * -27.0)) + (-4.0 * (t * a)) elif t <= -1.45e-114: tmp = t_2 elif t <= -1.22e-247: tmp = t_1 + (b * c) elif t <= 2.6e-257: tmp = t_2 elif t <= 2.3e+63: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) 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(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (t <= -1.15e+180) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); elseif (t <= -1.35e+54) tmp = Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(z * Float64(t * y))))); elseif (t <= -14000.0) tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (t <= -1.45e-114) tmp = t_2; elseif (t <= -1.22e-247) tmp = Float64(t_1 + Float64(b * c)); elseif (t <= 2.6e-257) tmp = t_2; elseif (t <= 2.3e+63) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); 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 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (x * i));
tmp = 0.0;
if (t <= -1.15e+180)
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
elseif (t <= -1.35e+54)
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
elseif (t <= -14000.0)
tmp = (k * (j * -27.0)) + (-4.0 * (t * a));
elseif (t <= -1.45e-114)
tmp = t_2;
elseif (t <= -1.22e-247)
tmp = t_1 + (b * c);
elseif (t <= 2.6e-257)
tmp = t_2;
elseif (t <= 2.3e+63)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+180], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e+54], N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -14000.0], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-114], t$95$2, If[LessEqual[t, -1.22e-247], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-257], t$95$2, If[LessEqual[t, 2.3e+63], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+180}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \left(-4 \cdot i + 18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq -14000:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-114}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{-247}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-257}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+63}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.1499999999999999e180Initial program 86.4%
pow186.4%
associate-*l*77.9%
*-commutative77.9%
Applied egg-rr77.9%
unpow177.9%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in t around inf 82.1%
pow182.1%
associate-*r*82.1%
Applied egg-rr82.1%
unpow182.1%
*-commutative82.1%
Simplified82.1%
if -1.1499999999999999e180 < t < -1.35000000000000005e54Initial program 75.1%
pow175.1%
associate-*l*68.8%
*-commutative68.8%
Applied egg-rr68.8%
unpow168.8%
associate-*l*63.4%
*-commutative63.4%
Simplified63.4%
Taylor expanded in x around inf 58.2%
cancel-sign-sub-inv58.2%
associate-*r*58.6%
metadata-eval58.6%
*-commutative58.6%
Simplified58.6%
if -1.35000000000000005e54 < t < -14000Initial program 99.9%
Simplified99.8%
Taylor expanded in y around 0 85.8%
Taylor expanded in b around 0 71.7%
associate--r+71.7%
associate-*r*71.7%
sub-neg71.7%
cancel-sign-sub-inv71.7%
metadata-eval71.7%
distribute-lft-out71.7%
*-commutative71.7%
distribute-rgt-neg-in71.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in a around inf 64.8%
*-commutative64.8%
Simplified64.8%
if -14000 < t < -1.44999999999999998e-114 or -1.22e-247 < t < 2.6000000000000001e-257Initial program 87.8%
Simplified93.7%
Taylor expanded in i around inf 73.4%
if -1.44999999999999998e-114 < t < -1.22e-247Initial program 81.3%
Simplified87.7%
Taylor expanded in b around inf 72.6%
if 2.6000000000000001e-257 < t < 2.29999999999999993e63Initial program 89.2%
Simplified87.9%
Taylor expanded in x around 0 79.1%
Taylor expanded in a around 0 71.0%
if 2.29999999999999993e63 < t Initial program 92.8%
pow192.8%
associate-*l*83.6%
*-commutative83.6%
Applied egg-rr83.6%
unpow183.6%
associate-*l*85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in t around inf 75.2%
Final simplification73.2%
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 (+ (* b c) (* -4.0 (* t a))))
(t_2 (+ (* j (* k -27.0)) (* -4.0 (* x i)))))
(if (<= j -1.35e+178)
t_2
(if (<= j -6.2e-25)
t_1
(if (<= j -1.4e-76)
t_2
(if (<= j 1.1e-297)
t_1
(if (<= j 2.5e-258)
(* x (* z (* y (* t 18.0))))
(if (<= j 1.25e-130) 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 = (b * c) + (-4.0 * (t * a));
double t_2 = (j * (k * -27.0)) + (-4.0 * (x * i));
double tmp;
if (j <= -1.35e+178) {
tmp = t_2;
} else if (j <= -6.2e-25) {
tmp = t_1;
} else if (j <= -1.4e-76) {
tmp = t_2;
} else if (j <= 1.1e-297) {
tmp = t_1;
} else if (j <= 2.5e-258) {
tmp = x * (z * (y * (t * 18.0)));
} else if (j <= 1.25e-130) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
if (j <= (-1.35d+178)) then
tmp = t_2
else if (j <= (-6.2d-25)) then
tmp = t_1
else if (j <= (-1.4d-76)) then
tmp = t_2
else if (j <= 1.1d-297) then
tmp = t_1
else if (j <= 2.5d-258) then
tmp = x * (z * (y * (t * 18.0d0)))
else if (j <= 1.25d-130) then
tmp = t_1
else
tmp = t_2
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 = (b * c) + (-4.0 * (t * a));
double t_2 = (j * (k * -27.0)) + (-4.0 * (x * i));
double tmp;
if (j <= -1.35e+178) {
tmp = t_2;
} else if (j <= -6.2e-25) {
tmp = t_1;
} else if (j <= -1.4e-76) {
tmp = t_2;
} else if (j <= 1.1e-297) {
tmp = t_1;
} else if (j <= 2.5e-258) {
tmp = x * (z * (y * (t * 18.0)));
} else if (j <= 1.25e-130) {
tmp = 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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = (j * (k * -27.0)) + (-4.0 * (x * i)) tmp = 0 if j <= -1.35e+178: tmp = t_2 elif j <= -6.2e-25: tmp = t_1 elif j <= -1.4e-76: tmp = t_2 elif j <= 1.1e-297: tmp = t_1 elif j <= 2.5e-258: tmp = x * (z * (y * (t * 18.0))) elif j <= 1.25e-130: tmp = 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(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (j <= -1.35e+178) tmp = t_2; elseif (j <= -6.2e-25) tmp = t_1; elseif (j <= -1.4e-76) tmp = t_2; elseif (j <= 1.1e-297) tmp = t_1; elseif (j <= 2.5e-258) tmp = Float64(x * Float64(z * Float64(y * Float64(t * 18.0)))); elseif (j <= 1.25e-130) tmp = t_1; else tmp = t_2; 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 = (b * c) + (-4.0 * (t * a));
t_2 = (j * (k * -27.0)) + (-4.0 * (x * i));
tmp = 0.0;
if (j <= -1.35e+178)
tmp = t_2;
elseif (j <= -6.2e-25)
tmp = t_1;
elseif (j <= -1.4e-76)
tmp = t_2;
elseif (j <= 1.1e-297)
tmp = t_1;
elseif (j <= 2.5e-258)
tmp = x * (z * (y * (t * 18.0)));
elseif (j <= 1.25e-130)
tmp = t_1;
else
tmp = t_2;
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[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.35e+178], t$95$2, If[LessEqual[j, -6.2e-25], t$95$1, If[LessEqual[j, -1.4e-76], t$95$2, If[LessEqual[j, 1.1e-297], t$95$1, If[LessEqual[j, 2.5e-258], N[(x * N[(z * N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.25e-130], t$95$1, 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 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;j \leq -1.35 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -6.2 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.4 \cdot 10^{-76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 1.1 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.5 \cdot 10^{-258}:\\
\;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(t \cdot 18\right)\right)\right)\\
\mathbf{elif}\;j \leq 1.25 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -1.35000000000000009e178 or -6.19999999999999989e-25 < j < -1.40000000000000005e-76 or 1.2499999999999999e-130 < j Initial program 84.0%
Simplified93.7%
Taylor expanded in i around inf 58.6%
if -1.35000000000000009e178 < j < -6.19999999999999989e-25 or -1.40000000000000005e-76 < j < 1.0999999999999999e-297 or 2.4999999999999999e-258 < j < 1.2499999999999999e-130Initial program 92.7%
Simplified91.2%
Taylor expanded in x around 0 64.2%
Taylor expanded in j around 0 59.1%
if 1.0999999999999999e-297 < j < 2.4999999999999999e-258Initial program 75.5%
pow175.5%
associate-*l*75.0%
*-commutative75.0%
Applied egg-rr75.0%
unpow175.0%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in t around inf 99.6%
Taylor expanded in x around inf 100.0%
associate-*r*100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification59.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 (+ (* b c) (* -4.0 (* t a)))))
(if (<= j -1.3e+178)
(* -27.0 (* j k))
(if (<= j -1.7e-44)
t_1
(if (<= j -5e-153)
(* -4.0 (+ (* x i) (* t a)))
(if (<= j 1.3e-297)
t_1
(if (<= j 2.5e-258)
(* x (* z (* y (* t 18.0))))
(if (<= j 7e-114) t_1 (* j (* k -27.0))))))))))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 = (b * c) + (-4.0 * (t * a));
double tmp;
if (j <= -1.3e+178) {
tmp = -27.0 * (j * k);
} else if (j <= -1.7e-44) {
tmp = t_1;
} else if (j <= -5e-153) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (j <= 1.3e-297) {
tmp = t_1;
} else if (j <= 2.5e-258) {
tmp = x * (z * (y * (t * 18.0)));
} else if (j <= 7e-114) {
tmp = t_1;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = (b * c) + ((-4.0d0) * (t * a))
if (j <= (-1.3d+178)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-1.7d-44)) then
tmp = t_1
else if (j <= (-5d-153)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (j <= 1.3d-297) then
tmp = t_1
else if (j <= 2.5d-258) then
tmp = x * (z * (y * (t * 18.0d0)))
else if (j <= 7d-114) then
tmp = t_1
else
tmp = j * (k * (-27.0d0))
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 = (b * c) + (-4.0 * (t * a));
double tmp;
if (j <= -1.3e+178) {
tmp = -27.0 * (j * k);
} else if (j <= -1.7e-44) {
tmp = t_1;
} else if (j <= -5e-153) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (j <= 1.3e-297) {
tmp = t_1;
} else if (j <= 2.5e-258) {
tmp = x * (z * (y * (t * 18.0)));
} else if (j <= 7e-114) {
tmp = t_1;
} else {
tmp = j * (k * -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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if j <= -1.3e+178: tmp = -27.0 * (j * k) elif j <= -1.7e-44: tmp = t_1 elif j <= -5e-153: tmp = -4.0 * ((x * i) + (t * a)) elif j <= 1.3e-297: tmp = t_1 elif j <= 2.5e-258: tmp = x * (z * (y * (t * 18.0))) elif j <= 7e-114: tmp = t_1 else: tmp = j * (k * -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (j <= -1.3e+178) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -1.7e-44) tmp = t_1; elseif (j <= -5e-153) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (j <= 1.3e-297) tmp = t_1; elseif (j <= 2.5e-258) tmp = Float64(x * Float64(z * Float64(y * Float64(t * 18.0)))); elseif (j <= 7e-114) tmp = t_1; else tmp = Float64(j * Float64(k * -27.0)); 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 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (j <= -1.3e+178)
tmp = -27.0 * (j * k);
elseif (j <= -1.7e-44)
tmp = t_1;
elseif (j <= -5e-153)
tmp = -4.0 * ((x * i) + (t * a));
elseif (j <= 1.3e-297)
tmp = t_1;
elseif (j <= 2.5e-258)
tmp = x * (z * (y * (t * 18.0)));
elseif (j <= 7e-114)
tmp = t_1;
else
tmp = j * (k * -27.0);
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[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.3e+178], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.7e-44], t$95$1, If[LessEqual[j, -5e-153], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.3e-297], t$95$1, If[LessEqual[j, 2.5e-258], N[(x * N[(z * N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7e-114], t$95$1, N[(j * N[(k * -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])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;j \leq -1.3 \cdot 10^{+178}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -1.7 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -5 \cdot 10^{-153}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;j \leq 1.3 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.5 \cdot 10^{-258}:\\
\;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(t \cdot 18\right)\right)\right)\\
\mathbf{elif}\;j \leq 7 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.3e178Initial program 71.6%
Simplified82.0%
Taylor expanded in j around inf 78.9%
if -1.3e178 < j < -1.70000000000000008e-44 or -5.00000000000000033e-153 < j < 1.3e-297 or 2.4999999999999999e-258 < j < 7e-114Initial program 93.1%
Simplified93.1%
Taylor expanded in x around 0 65.1%
Taylor expanded in j around 0 58.8%
if -1.70000000000000008e-44 < j < -5.00000000000000033e-153Initial program 94.7%
Simplified84.7%
Taylor expanded in y around 0 77.8%
Taylor expanded in b around 0 60.1%
associate--r+60.1%
associate-*r*60.1%
sub-neg60.1%
cancel-sign-sub-inv60.1%
metadata-eval60.1%
distribute-lft-out60.1%
*-commutative60.1%
distribute-rgt-neg-in60.1%
distribute-lft-neg-in60.1%
metadata-eval60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in k around 0 55.0%
if 1.3e-297 < j < 2.4999999999999999e-258Initial program 75.5%
pow175.5%
associate-*l*75.0%
*-commutative75.0%
Applied egg-rr75.0%
unpow175.0%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in t around inf 99.6%
Taylor expanded in x around inf 100.0%
associate-*r*100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
if 7e-114 < j Initial program 85.9%
Simplified96.6%
Taylor expanded in j around inf 38.7%
*-commutative38.7%
associate-*r*38.8%
*-commutative38.8%
Simplified38.8%
Final simplification54.2%
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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* -4.0 (* x i)))))
(if (<= t -4.6e+102)
t_1
(if (<= t -1.75e-114)
t_3
(if (<= t -3.1e-249)
(+ t_2 (* b c))
(if (<= t 2.4e-257)
t_3
(if (<= t 2.35e+67) (- (* b c) (* 27.0 (* j k))) 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -4.6e+102) {
tmp = t_1;
} else if (t <= -1.75e-114) {
tmp = t_3;
} else if (t <= -3.1e-249) {
tmp = t_2 + (b * c);
} else if (t <= 2.4e-257) {
tmp = t_3;
} else if (t <= 2.35e+67) {
tmp = (b * c) - (27.0 * (j * k));
} 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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + ((-4.0d0) * (x * i))
if (t <= (-4.6d+102)) then
tmp = t_1
else if (t <= (-1.75d-114)) then
tmp = t_3
else if (t <= (-3.1d-249)) then
tmp = t_2 + (b * c)
else if (t <= 2.4d-257) then
tmp = t_3
else if (t <= 2.35d+67) then
tmp = (b * c) - (27.0d0 * (j * k))
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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -4.6e+102) {
tmp = t_1;
} else if (t <= -1.75e-114) {
tmp = t_3;
} else if (t <= -3.1e-249) {
tmp = t_2 + (b * c);
} else if (t <= 2.4e-257) {
tmp = t_3;
} else if (t <= 2.35e+67) {
tmp = (b * c) - (27.0 * (j * k));
} 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (-4.0 * (x * i)) tmp = 0 if t <= -4.6e+102: tmp = t_1 elif t <= -1.75e-114: tmp = t_3 elif t <= -3.1e-249: tmp = t_2 + (b * c) elif t <= 2.4e-257: tmp = t_3 elif t <= 2.35e+67: tmp = (b * c) - (27.0 * (j * k)) 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (t <= -4.6e+102) tmp = t_1; elseif (t <= -1.75e-114) tmp = t_3; elseif (t <= -3.1e-249) tmp = Float64(t_2 + Float64(b * c)); elseif (t <= 2.4e-257) tmp = t_3; elseif (t <= 2.35e+67) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (-4.0 * (x * i));
tmp = 0.0;
if (t <= -4.6e+102)
tmp = t_1;
elseif (t <= -1.75e-114)
tmp = t_3;
elseif (t <= -3.1e-249)
tmp = t_2 + (b * c);
elseif (t <= 2.4e-257)
tmp = t_3;
elseif (t <= 2.35e+67)
tmp = (b * c) - (27.0 * (j * k));
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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+102], t$95$1, If[LessEqual[t, -1.75e-114], t$95$3, If[LessEqual[t, -3.1e-249], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-257], t$95$3, If[LessEqual[t, 2.35e+67], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-114}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-249}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-257}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+67}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.5999999999999998e102 or 2.35000000000000009e67 < t Initial program 88.0%
pow188.0%
associate-*l*78.9%
*-commutative78.9%
Applied egg-rr78.9%
unpow178.9%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in t around inf 74.6%
if -4.5999999999999998e102 < t < -1.75e-114 or -3.09999999999999986e-249 < t < 2.40000000000000017e-257Initial program 90.7%
Simplified96.1%
Taylor expanded in i around inf 65.4%
if -1.75e-114 < t < -3.09999999999999986e-249Initial program 81.3%
Simplified87.7%
Taylor expanded in b around inf 72.6%
if 2.40000000000000017e-257 < t < 2.35000000000000009e67Initial program 89.2%
Simplified87.9%
Taylor expanded in x around 0 79.1%
Taylor expanded in a around 0 71.0%
Final simplification71.6%
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 (<= j -9.2e+159)
(* j (- (+ (* -4.0 (/ (* t a) j)) (/ (* b c) j)) (* k 27.0)))
(if (or (<= j -1.35e-44) (and (not (<= j -8e-76)) (<= j 4e-140)))
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(+ (* -4.0 (+ (* x i) (* t a))) (* k (* j -27.0))))))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 (j <= -9.2e+159) {
tmp = j * (((-4.0 * ((t * a) / j)) + ((b * c) / j)) - (k * 27.0));
} else if ((j <= -1.35e-44) || (!(j <= -8e-76) && (j <= 4e-140))) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 (j <= (-9.2d+159)) then
tmp = j * ((((-4.0d0) * ((t * a) / j)) + ((b * c) / j)) - (k * 27.0d0))
else if ((j <= (-1.35d-44)) .or. (.not. (j <= (-8d-76))) .and. (j <= 4d-140)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = ((-4.0d0) * ((x * i) + (t * a))) + (k * (j * (-27.0d0)))
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 (j <= -9.2e+159) {
tmp = j * (((-4.0 * ((t * a) / j)) + ((b * c) / j)) - (k * 27.0));
} else if ((j <= -1.35e-44) || (!(j <= -8e-76) && (j <= 4e-140))) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (-4.0 * ((x * i) + (t * a))) + (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -9.2e+159: tmp = j * (((-4.0 * ((t * a) / j)) + ((b * c) / j)) - (k * 27.0)) elif (j <= -1.35e-44) or (not (j <= -8e-76) and (j <= 4e-140)): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = (-4.0 * ((x * i) + (t * a))) + (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -9.2e+159) tmp = Float64(j * Float64(Float64(Float64(-4.0 * Float64(Float64(t * a) / j)) + Float64(Float64(b * c) / j)) - Float64(k * 27.0))); elseif ((j <= -1.35e-44) || (!(j <= -8e-76) && (j <= 4e-140))) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) + Float64(k * Float64(j * -27.0))); 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 (j <= -9.2e+159)
tmp = j * (((-4.0 * ((t * a) / j)) + ((b * c) / j)) - (k * 27.0));
elseif ((j <= -1.35e-44) || (~((j <= -8e-76)) && (j <= 4e-140)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
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[j, -9.2e+159], N[(j * N[(N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision] - N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -1.35e-44], And[N[Not[LessEqual[j, -8e-76]], $MachinePrecision], LessEqual[j, 4e-140]]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -9.2 \cdot 10^{+159}:\\
\;\;\;\;j \cdot \left(\left(-4 \cdot \frac{t \cdot a}{j} + \frac{b \cdot c}{j}\right) - k \cdot 27\right)\\
\mathbf{elif}\;j \leq -1.35 \cdot 10^{-44} \lor \neg \left(j \leq -8 \cdot 10^{-76}\right) \land j \leq 4 \cdot 10^{-140}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -9.19999999999999981e159Initial program 72.8%
Simplified78.6%
Taylor expanded in x around 0 82.2%
Taylor expanded in j around inf 88.1%
if -9.19999999999999981e159 < j < -1.35e-44 or -7.99999999999999942e-76 < j < 3.9999999999999999e-140Initial program 92.6%
Simplified91.8%
Taylor expanded in j around 0 87.0%
Taylor expanded in i around 0 74.6%
if -1.35e-44 < j < -7.99999999999999942e-76 or 3.9999999999999999e-140 < j Initial program 87.6%
Simplified97.1%
Taylor expanded in y around 0 76.7%
Taylor expanded in b around 0 63.3%
associate--r+63.3%
associate-*r*63.4%
sub-neg63.4%
cancel-sign-sub-inv63.4%
metadata-eval63.4%
distribute-lft-out63.4%
*-commutative63.4%
distribute-rgt-neg-in63.4%
distribute-lft-neg-in63.4%
metadata-eval63.4%
*-commutative63.4%
Simplified63.4%
Final simplification71.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 (* 4.0 (* x i))))
(if (or (<= t -1.02e+54) (not (<= t 2.2e+189)))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_1 (* 27.0 (* 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 = 4.0 * (x * i);
double tmp;
if ((t <= -1.02e+54) || !(t <= 2.2e+189)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = 4.0d0 * (x * i)
if ((t <= (-1.02d+54)) .or. (.not. (t <= 2.2d+189))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_1 + (27.0d0 * (j * k)))
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 = 4.0 * (x * i);
double tmp;
if ((t <= -1.02e+54) || !(t <= 2.2e+189)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if (t <= -1.02e+54) or not (t <= 2.2e+189): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if ((t <= -1.02e+54) || !(t <= 2.2e+189)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); 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 = 4.0 * (x * i);
tmp = 0.0;
if ((t <= -1.02e+54) || ~((t <= 2.2e+189)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k)));
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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1.02e+54], N[Not[LessEqual[t, 2.2e+189]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{+54} \lor \neg \left(t \leq 2.2 \cdot 10^{+189}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.02e54 or 2.20000000000000005e189 < t Initial program 84.1%
Simplified92.5%
Taylor expanded in j around 0 90.4%
if -1.02e54 < t < 2.20000000000000005e189Initial program 89.8%
Simplified92.1%
Taylor expanded in y around 0 87.3%
Final simplification88.3%
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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.7e+104)
(+ (* b c) t_1)
(if (<= t 1.8e+190)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.7e+104) {
tmp = (b * c) + t_1;
} else if (t <= 1.8e+190) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} 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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.7d+104)) then
tmp = (b * c) + t_1
else if (t <= 1.8d+190) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.7e+104) {
tmp = (b * c) + t_1;
} else if (t <= 1.8e+190) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.7e+104: tmp = (b * c) + t_1 elif t <= 1.8e+190: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.7e+104) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 1.8e+190) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.7e+104)
tmp = (b * c) + t_1;
elseif (t <= 1.8e+190)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+104], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.8e+190], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+190}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6999999999999998e104Initial program 83.1%
Simplified90.5%
Taylor expanded in j around 0 88.8%
Taylor expanded in i around 0 85.1%
if -1.6999999999999998e104 < t < 1.79999999999999989e190Initial program 89.7%
Simplified92.4%
Taylor expanded in y around 0 87.0%
if 1.79999999999999989e190 < t Initial program 85.9%
pow185.9%
associate-*l*81.2%
*-commutative81.2%
Applied egg-rr81.2%
unpow181.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in t around inf 91.5%
Final simplification87.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 (* -4.0 (* t a))))
(if (<= j -1.3e+178)
(* -27.0 (* j k))
(if (<= j -4.2e+145)
(* b c)
(if (<= j -7.4e+117)
t_1
(if (<= j 1.4e-234)
(* b c)
(if (<= j 2.05e-125) t_1 (* j (* k -27.0)))))))))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 = -4.0 * (t * a);
double tmp;
if (j <= -1.3e+178) {
tmp = -27.0 * (j * k);
} else if (j <= -4.2e+145) {
tmp = b * c;
} else if (j <= -7.4e+117) {
tmp = t_1;
} else if (j <= 1.4e-234) {
tmp = b * c;
} else if (j <= 2.05e-125) {
tmp = t_1;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = (-4.0d0) * (t * a)
if (j <= (-1.3d+178)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-4.2d+145)) then
tmp = b * c
else if (j <= (-7.4d+117)) then
tmp = t_1
else if (j <= 1.4d-234) then
tmp = b * c
else if (j <= 2.05d-125) then
tmp = t_1
else
tmp = j * (k * (-27.0d0))
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 = -4.0 * (t * a);
double tmp;
if (j <= -1.3e+178) {
tmp = -27.0 * (j * k);
} else if (j <= -4.2e+145) {
tmp = b * c;
} else if (j <= -7.4e+117) {
tmp = t_1;
} else if (j <= 1.4e-234) {
tmp = b * c;
} else if (j <= 2.05e-125) {
tmp = t_1;
} else {
tmp = j * (k * -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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) tmp = 0 if j <= -1.3e+178: tmp = -27.0 * (j * k) elif j <= -4.2e+145: tmp = b * c elif j <= -7.4e+117: tmp = t_1 elif j <= 1.4e-234: tmp = b * c elif j <= 2.05e-125: tmp = t_1 else: tmp = j * (k * -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (j <= -1.3e+178) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -4.2e+145) tmp = Float64(b * c); elseif (j <= -7.4e+117) tmp = t_1; elseif (j <= 1.4e-234) tmp = Float64(b * c); elseif (j <= 2.05e-125) tmp = t_1; else tmp = Float64(j * Float64(k * -27.0)); 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 = -4.0 * (t * a);
tmp = 0.0;
if (j <= -1.3e+178)
tmp = -27.0 * (j * k);
elseif (j <= -4.2e+145)
tmp = b * c;
elseif (j <= -7.4e+117)
tmp = t_1;
elseif (j <= 1.4e-234)
tmp = b * c;
elseif (j <= 2.05e-125)
tmp = t_1;
else
tmp = j * (k * -27.0);
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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.3e+178], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -4.2e+145], N[(b * c), $MachinePrecision], If[LessEqual[j, -7.4e+117], t$95$1, If[LessEqual[j, 1.4e-234], N[(b * c), $MachinePrecision], If[LessEqual[j, 2.05e-125], t$95$1, N[(j * N[(k * -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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;j \leq -1.3 \cdot 10^{+178}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -4.2 \cdot 10^{+145}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq -7.4 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.4 \cdot 10^{-234}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 2.05 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.3e178Initial program 71.6%
Simplified82.0%
Taylor expanded in j around inf 78.9%
if -1.3e178 < j < -4.19999999999999979e145 or -7.3999999999999997e117 < j < 1.3999999999999999e-234Initial program 90.7%
pow190.7%
associate-*l*86.6%
*-commutative86.6%
Applied egg-rr86.6%
unpow186.6%
associate-*l*88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in b around inf 35.3%
if -4.19999999999999979e145 < j < -7.3999999999999997e117 or 1.3999999999999999e-234 < j < 2.0499999999999999e-125Initial program 97.5%
pow197.5%
associate-*l*97.3%
*-commutative97.3%
Applied egg-rr97.3%
unpow197.3%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in a around inf 44.7%
*-commutative44.7%
*-commutative44.7%
Simplified44.7%
if 2.0499999999999999e-125 < j Initial program 86.3%
Simplified96.7%
Taylor expanded in j around inf 37.5%
*-commutative37.5%
associate-*r*37.6%
*-commutative37.6%
Simplified37.6%
Final simplification42.3%
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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= j -7.8e+189)
(* -27.0 (* j k))
(if (<= j 1.2e-304)
t_1
(if (<= j 5.1e-239)
(* 18.0 (* t (* x (* y z))))
(if (<= j 3.8e-113) t_1 (* j (* k -27.0))))))))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 = -4.0 * ((x * i) + (t * a));
double tmp;
if (j <= -7.8e+189) {
tmp = -27.0 * (j * k);
} else if (j <= 1.2e-304) {
tmp = t_1;
} else if (j <= 5.1e-239) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 3.8e-113) {
tmp = t_1;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = (-4.0d0) * ((x * i) + (t * a))
if (j <= (-7.8d+189)) then
tmp = (-27.0d0) * (j * k)
else if (j <= 1.2d-304) then
tmp = t_1
else if (j <= 5.1d-239) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (j <= 3.8d-113) then
tmp = t_1
else
tmp = j * (k * (-27.0d0))
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 = -4.0 * ((x * i) + (t * a));
double tmp;
if (j <= -7.8e+189) {
tmp = -27.0 * (j * k);
} else if (j <= 1.2e-304) {
tmp = t_1;
} else if (j <= 5.1e-239) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 3.8e-113) {
tmp = t_1;
} else {
tmp = j * (k * -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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if j <= -7.8e+189: tmp = -27.0 * (j * k) elif j <= 1.2e-304: tmp = t_1 elif j <= 5.1e-239: tmp = 18.0 * (t * (x * (y * z))) elif j <= 3.8e-113: tmp = t_1 else: tmp = j * (k * -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (j <= -7.8e+189) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= 1.2e-304) tmp = t_1; elseif (j <= 5.1e-239) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (j <= 3.8e-113) tmp = t_1; else tmp = Float64(j * Float64(k * -27.0)); 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 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if (j <= -7.8e+189)
tmp = -27.0 * (j * k);
elseif (j <= 1.2e-304)
tmp = t_1;
elseif (j <= 5.1e-239)
tmp = 18.0 * (t * (x * (y * z)));
elseif (j <= 3.8e-113)
tmp = t_1;
else
tmp = j * (k * -27.0);
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[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.8e+189], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.2e-304], t$95$1, If[LessEqual[j, 5.1e-239], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.8e-113], t$95$1, N[(j * N[(k * -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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;j \leq -7.8 \cdot 10^{+189}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 1.2 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 5.1 \cdot 10^{-239}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;j \leq 3.8 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -7.7999999999999999e189Initial program 71.6%
Simplified82.0%
Taylor expanded in j around inf 78.9%
if -7.7999999999999999e189 < j < 1.2e-304 or 5.09999999999999958e-239 < j < 3.79999999999999983e-113Initial program 93.2%
Simplified91.7%
Taylor expanded in y around 0 80.3%
Taylor expanded in b around 0 56.0%
associate--r+56.0%
associate-*r*56.0%
sub-neg56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
distribute-lft-out56.0%
*-commutative56.0%
distribute-rgt-neg-in56.0%
distribute-lft-neg-in56.0%
metadata-eval56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in k around 0 50.0%
if 1.2e-304 < j < 5.09999999999999958e-239Initial program 87.7%
pow187.7%
associate-*l*87.5%
*-commutative87.5%
Applied egg-rr87.5%
unpow187.5%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in t around inf 75.1%
Taylor expanded in x around inf 63.1%
if 3.79999999999999983e-113 < j Initial program 85.7%
Simplified96.6%
Taylor expanded in j around inf 39.1%
*-commutative39.1%
associate-*r*39.1%
*-commutative39.1%
Simplified39.1%
Final simplification49.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
(if (<= (* b c) -2.1e+288)
(* b c)
(if (<= (* b c) 4.3e+144)
(+ (* -4.0 (+ (* x i) (* t a))) (* k (* j -27.0)))
(- (* b c) (* 27.0 (* 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 ((b * c) <= -2.1e+288) {
tmp = b * c;
} else if ((b * c) <= 4.3e+144) {
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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) <= (-2.1d+288)) then
tmp = b * c
else if ((b * c) <= 4.3d+144) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) + (k * (j * (-27.0d0)))
else
tmp = (b * c) - (27.0d0 * (j * k))
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) <= -2.1e+288) {
tmp = b * c;
} else if ((b * c) <= 4.3e+144) {
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
} else {
tmp = (b * c) - (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.1e+288: tmp = b * c elif (b * c) <= 4.3e+144: tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0)) else: tmp = (b * c) - (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.1e+288) tmp = Float64(b * c); elseif (Float64(b * c) <= 4.3e+144) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) + Float64(k * Float64(j * -27.0))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); 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) <= -2.1e+288)
tmp = b * c;
elseif ((b * c) <= 4.3e+144)
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
else
tmp = (b * c) - (27.0 * (j * k));
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], -2.1e+288], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.3e+144], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.1 \cdot 10^{+288}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+144}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.09999999999999999e288Initial program 80.0%
pow180.0%
associate-*l*80.0%
*-commutative80.0%
Applied egg-rr80.0%
unpow180.0%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in b around inf 90.6%
if -2.09999999999999999e288 < (*.f64 b c) < 4.29999999999999984e144Initial program 90.2%
Simplified94.8%
Taylor expanded in y around 0 75.6%
Taylor expanded in b around 0 70.2%
associate--r+70.2%
associate-*r*69.7%
sub-neg69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
distribute-lft-out69.7%
*-commutative69.7%
distribute-rgt-neg-in69.7%
distribute-lft-neg-in69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if 4.29999999999999984e144 < (*.f64 b c) Initial program 82.0%
Simplified84.4%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around 0 81.2%
Final simplification73.3%
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 -1.05e+52)
(+ (* -4.0 (+ (* x i) (* t a))) (* k (* j -27.0)))
(if (<= x 8.2e+34)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))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 <= -1.05e+52) {
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
} else if (x <= 8.2e+34) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 (x <= (-1.05d+52)) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) + (k * (j * (-27.0d0)))
else if (x <= 8.2d+34) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
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 (x <= -1.05e+52) {
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
} else if (x <= 8.2e+34) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
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 x <= -1.05e+52: tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0)) elif x <= 8.2e+34: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) 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 <= -1.05e+52) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) + Float64(k * Float64(j * -27.0))); elseif (x <= 8.2e+34) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); 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 (x <= -1.05e+52)
tmp = (-4.0 * ((x * i) + (t * a))) + (k * (j * -27.0));
elseif (x <= 8.2e+34)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
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[x, -1.05e+52], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e+34], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+52}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+34}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -1.05e52Initial program 78.6%
Simplified91.0%
Taylor expanded in y around 0 75.2%
Taylor expanded in b around 0 59.5%
associate--r+59.5%
associate-*r*59.5%
sub-neg59.5%
cancel-sign-sub-inv59.5%
metadata-eval59.5%
distribute-lft-out59.5%
*-commutative59.5%
distribute-rgt-neg-in59.5%
distribute-lft-neg-in59.5%
metadata-eval59.5%
*-commutative59.5%
Simplified59.5%
if -1.05e52 < x < 8.1999999999999997e34Initial program 96.5%
Simplified95.9%
Taylor expanded in x around 0 83.1%
if 8.1999999999999997e34 < x Initial program 75.7%
Simplified84.3%
Taylor expanded in x around inf 76.3%
Final simplification76.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
(if (<= x -6.5e+143)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= x 1.4e+38)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))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 <= -6.5e+143) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.4e+38) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 (x <= (-6.5d+143)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (x <= 1.4d+38) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
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 (x <= -6.5e+143) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.4e+38) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
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 x <= -6.5e+143: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif x <= 1.4e+38: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) 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 <= -6.5e+143) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (x <= 1.4e+38) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); 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 (x <= -6.5e+143)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (x <= 1.4e+38)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
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[x, -6.5e+143], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e+38], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+143}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -6.4999999999999997e143Initial program 74.2%
Simplified90.5%
Taylor expanded in j around 0 81.4%
Taylor expanded in i around 0 63.3%
if -6.4999999999999997e143 < x < 1.4e38Initial program 96.2%
Simplified95.6%
Taylor expanded in x around 0 80.2%
if 1.4e38 < x Initial program 75.7%
Simplified84.3%
Taylor expanded in x around inf 76.3%
Final simplification76.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 (if (or (<= (* b c) -1.5e-172) (not (<= (* b c) 4.3e+144))) (+ (* j (* k -27.0)) (* b c)) (* -4.0 (+ (* x i) (* t a)))))
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) <= -1.5e-172) || !((b * c) <= 4.3e+144)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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) <= (-1.5d-172)) .or. (.not. ((b * c) <= 4.3d+144))) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (-4.0d0) * ((x * i) + (t * a))
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) <= -1.5e-172) || !((b * c) <= 4.3e+144)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
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) <= -1.5e-172) or not ((b * c) <= 4.3e+144): tmp = (j * (k * -27.0)) + (b * c) else: tmp = -4.0 * ((x * i) + (t * a)) 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) <= -1.5e-172) || !(Float64(b * c) <= 4.3e+144)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); 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) <= -1.5e-172) || ~(((b * c) <= 4.3e+144)))
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = -4.0 * ((x * i) + (t * a));
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[Or[LessEqual[N[(b * c), $MachinePrecision], -1.5e-172], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4.3e+144]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{-172} \lor \neg \left(b \cdot c \leq 4.3 \cdot 10^{+144}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.49999999999999992e-172 or 4.29999999999999984e144 < (*.f64 b c) Initial program 88.0%
Simplified91.8%
Taylor expanded in b around inf 64.5%
if -1.49999999999999992e-172 < (*.f64 b c) < 4.29999999999999984e144Initial program 88.0%
Simplified93.5%
Taylor expanded in y around 0 73.1%
Taylor expanded in b around 0 70.8%
associate--r+70.8%
associate-*r*70.0%
sub-neg70.0%
cancel-sign-sub-inv70.0%
metadata-eval70.0%
distribute-lft-out70.0%
*-commutative70.0%
distribute-rgt-neg-in70.0%
distribute-lft-neg-in70.0%
metadata-eval70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in k around 0 47.9%
Final simplification56.6%
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) -1.6e-172)
(+ (* j (* k -27.0)) (* b c))
(if (<= (* b c) 7e+147)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) (* 27.0 (* 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 ((b * c) <= -1.6e-172) {
tmp = (j * (k * -27.0)) + (b * c);
} else if ((b * c) <= 7e+147) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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) <= (-1.6d-172)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if ((b * c) <= 7d+147) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - (27.0d0 * (j * k))
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) <= -1.6e-172) {
tmp = (j * (k * -27.0)) + (b * c);
} else if ((b * c) <= 7e+147) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.6e-172: tmp = (j * (k * -27.0)) + (b * c) elif (b * c) <= 7e+147: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.6e-172) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (Float64(b * c) <= 7e+147) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); 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) <= -1.6e-172)
tmp = (j * (k * -27.0)) + (b * c);
elseif ((b * c) <= 7e+147)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - (27.0 * (j * k));
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], -1.6e-172], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7e+147], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.6 \cdot 10^{-172}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+147}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.6000000000000001e-172Initial program 91.0%
Simplified95.5%
Taylor expanded in b around inf 57.3%
if -1.6000000000000001e-172 < (*.f64 b c) < 6.99999999999999949e147Initial program 88.0%
Simplified93.5%
Taylor expanded in y around 0 73.1%
Taylor expanded in b around 0 70.8%
associate--r+70.8%
associate-*r*70.0%
sub-neg70.0%
cancel-sign-sub-inv70.0%
metadata-eval70.0%
distribute-lft-out70.0%
*-commutative70.0%
distribute-rgt-neg-in70.0%
distribute-lft-neg-in70.0%
metadata-eval70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in k around 0 47.9%
if 6.99999999999999949e147 < (*.f64 b c) Initial program 82.0%
Simplified84.4%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around 0 81.2%
Final simplification56.9%
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 (<= j -1.05e+190) (* -27.0 (* j k)) (if (<= j 3.8e-113) (* -4.0 (+ (* x i) (* t a))) (* j (* k -27.0)))))
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 (j <= -1.05e+190) {
tmp = -27.0 * (j * k);
} else if (j <= 3.8e-113) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 (j <= (-1.05d+190)) then
tmp = (-27.0d0) * (j * k)
else if (j <= 3.8d-113) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = j * (k * (-27.0d0))
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 (j <= -1.05e+190) {
tmp = -27.0 * (j * k);
} else if (j <= 3.8e-113) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = j * (k * -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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.05e+190: tmp = -27.0 * (j * k) elif j <= 3.8e-113: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = j * (k * -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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1.05e+190) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= 3.8e-113) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(j * Float64(k * -27.0)); 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 (j <= -1.05e+190)
tmp = -27.0 * (j * k);
elseif (j <= 3.8e-113)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = j * (k * -27.0);
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[j, -1.05e+190], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.8e-113], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -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])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.05 \cdot 10^{+190}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 3.8 \cdot 10^{-113}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.05e190Initial program 71.6%
Simplified82.0%
Taylor expanded in j around inf 78.9%
if -1.05e190 < j < 3.79999999999999983e-113Initial program 92.9%
Simplified92.2%
Taylor expanded in y around 0 78.6%
Taylor expanded in b around 0 53.6%
associate--r+53.6%
associate-*r*53.6%
sub-neg53.6%
cancel-sign-sub-inv53.6%
metadata-eval53.6%
distribute-lft-out53.6%
*-commutative53.6%
distribute-rgt-neg-in53.6%
distribute-lft-neg-in53.6%
metadata-eval53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in k around 0 48.0%
if 3.79999999999999983e-113 < j Initial program 85.7%
Simplified96.6%
Taylor expanded in j around inf 39.1%
*-commutative39.1%
associate-*r*39.1%
*-commutative39.1%
Simplified39.1%
Final simplification48.3%
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 (or (<= b -7.4e+210) (not (<= b 6.6e-18))) (* b c) (* -27.0 (* 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 ((b <= -7.4e+210) || !(b <= 6.6e-18)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 <= (-7.4d+210)) .or. (.not. (b <= 6.6d-18))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
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 <= -7.4e+210) || !(b <= 6.6e-18)) {
tmp = b * c;
} 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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -7.4e+210) or not (b <= 6.6e-18): tmp = b * c 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -7.4e+210) || !(b <= 6.6e-18)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); 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 <= -7.4e+210) || ~((b <= 6.6e-18)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
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[Or[LessEqual[b, -7.4e+210], N[Not[LessEqual[b, 6.6e-18]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.4 \cdot 10^{+210} \lor \neg \left(b \leq 6.6 \cdot 10^{-18}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if b < -7.39999999999999996e210 or 6.6000000000000003e-18 < b Initial program 85.3%
pow185.3%
associate-*l*81.9%
*-commutative81.9%
Applied egg-rr81.9%
unpow181.9%
associate-*l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in b around inf 45.9%
if -7.39999999999999996e210 < b < 6.6000000000000003e-18Initial program 89.4%
Simplified94.6%
Taylor expanded in j around inf 31.1%
Final simplification36.2%
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 (* b c))
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 b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = b * c
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 b * c;
}
[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 b * c
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(b * c) 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 = b * c;
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[(b * c), $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])\\
\\
b \cdot c
\end{array}
Initial program 88.0%
pow188.0%
associate-*l*85.0%
*-commutative85.0%
Applied egg-rr85.0%
unpow185.0%
associate-*l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in b around inf 24.9%
Final simplification24.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
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 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
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) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024115
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))