
(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 20 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -2.4e+67)
(- (+ (* b c) (* (* x (* z t)) (* 18.0 y))) (* 27.0 (* j k)))
(+
(fma t (fma x (* 18.0 (* z y)) (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.4e+67) {
tmp = ((b * c) + ((x * (z * t)) * (18.0 * y))) - (27.0 * (j * k));
} else {
tmp = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -2.4e+67) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * Float64(z * t)) * Float64(18.0 * y))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -2.4e+67], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(x * N[(18.0 * N[(z * y), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+67}:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot \left(z \cdot t\right)\right) \cdot \left(18 \cdot y\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\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}
\end{array}
if z < -2.40000000000000002e67Initial program 80.3%
Simplified76.1%
Taylor expanded in i around 0 72.8%
Taylor expanded in x around inf 59.1%
associate-*r*63.2%
*-commutative63.2%
associate-*l*71.7%
associate-*r*67.4%
associate-*r*67.4%
*-commutative67.4%
associate-*l*67.4%
*-commutative67.4%
associate-*l*71.7%
Simplified71.7%
if -2.40000000000000002e67 < z Initial program 85.5%
Simplified93.0%
Final simplification89.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* 27.0 j)))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* z (* t y))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (z * (t * y))) - (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]) [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) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (z * (t * y))) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - 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])){:}
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) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (z * (t * y))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(z * N[(t * y), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\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.0%
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%
Simplified35.7%
Taylor expanded in x around inf 57.2%
pow157.2%
associate-*r*57.2%
Applied egg-rr57.2%
unpow157.2%
associate-*r*57.2%
associate-*r*60.7%
Simplified60.7%
Final simplification91.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* a (* t -4.0))) (t_2 (* 18.0 (* t (* x (* z y))))))
(if (<= k -1.25e-68)
(* k (* j -27.0))
(if (<= k -1.16e-253)
t_2
(if (<= k 3.3e-261)
t_1
(if (<= k 9.2e-28)
(* b c)
(if (<= k 1.36e+87)
t_1
(if (<= k 2.9e+138) t_2 (* j (* k -27.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = 18.0 * (t * (x * (z * y)));
double tmp;
if (k <= -1.25e-68) {
tmp = k * (j * -27.0);
} else if (k <= -1.16e-253) {
tmp = t_2;
} else if (k <= 3.3e-261) {
tmp = t_1;
} else if (k <= 9.2e-28) {
tmp = b * c;
} else if (k <= 1.36e+87) {
tmp = t_1;
} else if (k <= 2.9e+138) {
tmp = t_2;
} 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.
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 = a * (t * (-4.0d0))
t_2 = 18.0d0 * (t * (x * (z * y)))
if (k <= (-1.25d-68)) then
tmp = k * (j * (-27.0d0))
else if (k <= (-1.16d-253)) then
tmp = t_2
else if (k <= 3.3d-261) then
tmp = t_1
else if (k <= 9.2d-28) then
tmp = b * c
else if (k <= 1.36d+87) then
tmp = t_1
else if (k <= 2.9d+138) then
tmp = t_2
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;
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 = a * (t * -4.0);
double t_2 = 18.0 * (t * (x * (z * y)));
double tmp;
if (k <= -1.25e-68) {
tmp = k * (j * -27.0);
} else if (k <= -1.16e-253) {
tmp = t_2;
} else if (k <= 3.3e-261) {
tmp = t_1;
} else if (k <= 9.2e-28) {
tmp = b * c;
} else if (k <= 1.36e+87) {
tmp = t_1;
} else if (k <= 2.9e+138) {
tmp = t_2;
} 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]) [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 = a * (t * -4.0) t_2 = 18.0 * (t * (x * (z * y))) tmp = 0 if k <= -1.25e-68: tmp = k * (j * -27.0) elif k <= -1.16e-253: tmp = t_2 elif k <= 3.3e-261: tmp = t_1 elif k <= 9.2e-28: tmp = b * c elif k <= 1.36e+87: tmp = t_1 elif k <= 2.9e+138: tmp = t_2 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]) 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(a * Float64(t * -4.0)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))) tmp = 0.0 if (k <= -1.25e-68) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= -1.16e-253) tmp = t_2; elseif (k <= 3.3e-261) tmp = t_1; elseif (k <= 9.2e-28) tmp = Float64(b * c); elseif (k <= 1.36e+87) tmp = t_1; elseif (k <= 2.9e+138) tmp = t_2; 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])){:}
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 = a * (t * -4.0);
t_2 = 18.0 * (t * (x * (z * y)));
tmp = 0.0;
if (k <= -1.25e-68)
tmp = k * (j * -27.0);
elseif (k <= -1.16e-253)
tmp = t_2;
elseif (k <= 3.3e-261)
tmp = t_1;
elseif (k <= 9.2e-28)
tmp = b * c;
elseif (k <= 1.36e+87)
tmp = t_1;
elseif (k <= 2.9e+138)
tmp = t_2;
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.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.25e-68], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -1.16e-253], t$95$2, If[LessEqual[k, 3.3e-261], t$95$1, If[LessEqual[k, 9.2e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.36e+87], t$95$1, If[LessEqual[k, 2.9e+138], t$95$2, 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])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{if}\;k \leq -1.25 \cdot 10^{-68}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq -1.16 \cdot 10^{-253}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 3.3 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 9.2 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 1.36 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 2.9 \cdot 10^{+138}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.24999999999999993e-68Initial program 81.0%
Simplified92.0%
Taylor expanded in j around inf 33.2%
associate-*r*33.2%
Simplified33.2%
if -1.24999999999999993e-68 < k < -1.16e-253 or 1.3599999999999999e87 < k < 2.9000000000000001e138Initial program 84.9%
Simplified91.3%
Taylor expanded in t around inf 80.8%
Taylor expanded in y around inf 40.6%
if -1.16e-253 < k < 3.2999999999999998e-261 or 9.19999999999999942e-28 < k < 1.3599999999999999e87Initial program 84.3%
Simplified88.7%
Taylor expanded in t around inf 73.4%
Taylor expanded in a around inf 36.0%
*-commutative36.0%
associate-*r*36.0%
Simplified36.0%
if 3.2999999999999998e-261 < k < 9.19999999999999942e-28Initial program 89.5%
Taylor expanded in t around 0 51.7%
Taylor expanded in i around 0 32.3%
Taylor expanded in b around inf 27.2%
if 2.9000000000000001e138 < k Initial program 84.4%
Simplified81.8%
associate-*r*84.3%
distribute-rgt-out--84.3%
associate-+l-84.3%
associate-*l*84.0%
fma-neg84.0%
associate-*l*84.0%
*-commutative84.0%
Applied egg-rr84.0%
fma-undefine84.0%
unsub-neg84.0%
*-commutative84.0%
associate-*r*84.0%
*-commutative84.0%
*-commutative84.0%
*-commutative84.0%
associate-*l*84.0%
*-commutative84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in j around inf 58.6%
metadata-eval58.6%
distribute-lft-neg-in58.6%
*-commutative58.6%
associate-*r*58.5%
distribute-rgt-neg-in58.5%
distribute-rgt-neg-in58.5%
metadata-eval58.5%
*-commutative58.5%
Simplified58.5%
Final simplification37.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -5.4e+19)
(* (* j k) -27.0)
(if (<= k 1.6e-302)
(* z (* y (* 18.0 (* x t))))
(if (<= k 1.7e-28)
(* b c)
(if (<= k 4.2e+87)
(* a (* t -4.0))
(if (<= k 3.6e+135)
(* 18.0 (* t (* x (* z y))))
(* j (* k -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.4e+19) {
tmp = (j * k) * -27.0;
} else if (k <= 1.6e-302) {
tmp = z * (y * (18.0 * (x * t)));
} else if (k <= 1.7e-28) {
tmp = b * c;
} else if (k <= 4.2e+87) {
tmp = a * (t * -4.0);
} else if (k <= 3.6e+135) {
tmp = 18.0 * (t * (x * (z * y)));
} 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.
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 (k <= (-5.4d+19)) then
tmp = (j * k) * (-27.0d0)
else if (k <= 1.6d-302) then
tmp = z * (y * (18.0d0 * (x * t)))
else if (k <= 1.7d-28) then
tmp = b * c
else if (k <= 4.2d+87) then
tmp = a * (t * (-4.0d0))
else if (k <= 3.6d+135) then
tmp = 18.0d0 * (t * (x * (z * y)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.4e+19) {
tmp = (j * k) * -27.0;
} else if (k <= 1.6e-302) {
tmp = z * (y * (18.0 * (x * t)));
} else if (k <= 1.7e-28) {
tmp = b * c;
} else if (k <= 4.2e+87) {
tmp = a * (t * -4.0);
} else if (k <= 3.6e+135) {
tmp = 18.0 * (t * (x * (z * y)));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -5.4e+19: tmp = (j * k) * -27.0 elif k <= 1.6e-302: tmp = z * (y * (18.0 * (x * t))) elif k <= 1.7e-28: tmp = b * c elif k <= 4.2e+87: tmp = a * (t * -4.0) elif k <= 3.6e+135: tmp = 18.0 * (t * (x * (z * y))) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -5.4e+19) tmp = Float64(Float64(j * k) * -27.0); elseif (k <= 1.6e-302) tmp = Float64(z * Float64(y * Float64(18.0 * Float64(x * t)))); elseif (k <= 1.7e-28) tmp = Float64(b * c); elseif (k <= 4.2e+87) tmp = Float64(a * Float64(t * -4.0)); elseif (k <= 3.6e+135) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -5.4e+19)
tmp = (j * k) * -27.0;
elseif (k <= 1.6e-302)
tmp = z * (y * (18.0 * (x * t)));
elseif (k <= 1.7e-28)
tmp = b * c;
elseif (k <= 4.2e+87)
tmp = a * (t * -4.0);
elseif (k <= 3.6e+135)
tmp = 18.0 * (t * (x * (z * y)));
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -5.4e+19], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[k, 1.6e-302], N[(z * N[(y * N[(18.0 * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.7e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 4.2e+87], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.6e+135], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5.4 \cdot 10^{+19}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\
\;\;\;\;z \cdot \left(y \cdot \left(18 \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.7 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 4.2 \cdot 10^{+87}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{+135}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -5.4e19Initial program 76.7%
Simplified90.4%
Taylor expanded in j around inf 39.0%
if -5.4e19 < k < 1.59999999999999989e-302Initial program 86.2%
Simplified92.5%
Taylor expanded in x around inf 45.2%
Taylor expanded in z around inf 39.1%
Taylor expanded in i around 0 29.9%
associate-*r*32.3%
associate-*r*32.3%
Simplified32.3%
if 1.59999999999999989e-302 < k < 1.7e-28Initial program 88.7%
Taylor expanded in t around 0 50.8%
Taylor expanded in i around 0 33.0%
Taylor expanded in b around inf 28.2%
if 1.7e-28 < k < 4.2e87Initial program 85.4%
Simplified85.3%
Taylor expanded in t around inf 66.7%
Taylor expanded in a around inf 30.7%
*-commutative30.7%
associate-*r*30.7%
Simplified30.7%
if 4.2e87 < k < 3.5999999999999998e135Initial program 87.5%
Simplified87.5%
Taylor expanded in t around inf 87.5%
Taylor expanded in y around inf 63.2%
if 3.5999999999999998e135 < k Initial program 84.4%
Simplified81.8%
associate-*r*84.3%
distribute-rgt-out--84.3%
associate-+l-84.3%
associate-*l*84.0%
fma-neg84.0%
associate-*l*84.0%
*-commutative84.0%
Applied egg-rr84.0%
fma-undefine84.0%
unsub-neg84.0%
*-commutative84.0%
associate-*r*84.0%
*-commutative84.0%
*-commutative84.0%
*-commutative84.0%
associate-*l*84.0%
*-commutative84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in j around inf 58.6%
metadata-eval58.6%
distribute-lft-neg-in58.6%
*-commutative58.6%
associate-*r*58.5%
distribute-rgt-neg-in58.5%
distribute-rgt-neg-in58.5%
metadata-eval58.5%
*-commutative58.5%
Simplified58.5%
Final simplification37.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -1e-68)
(* k (* j -27.0))
(if (<= k 1.6e-302)
(* 18.0 (* y (* z (* x t))))
(if (<= k 1.85e-28)
(* b c)
(if (<= k 8.5e+91)
(* a (* t -4.0))
(if (<= k 1.08e+137)
(* 18.0 (* t (* x (* z y))))
(* j (* k -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1e-68) {
tmp = k * (j * -27.0);
} else if (k <= 1.6e-302) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (k <= 1.85e-28) {
tmp = b * c;
} else if (k <= 8.5e+91) {
tmp = a * (t * -4.0);
} else if (k <= 1.08e+137) {
tmp = 18.0 * (t * (x * (z * y)));
} 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.
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 (k <= (-1d-68)) then
tmp = k * (j * (-27.0d0))
else if (k <= 1.6d-302) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if (k <= 1.85d-28) then
tmp = b * c
else if (k <= 8.5d+91) then
tmp = a * (t * (-4.0d0))
else if (k <= 1.08d+137) then
tmp = 18.0d0 * (t * (x * (z * y)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1e-68) {
tmp = k * (j * -27.0);
} else if (k <= 1.6e-302) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (k <= 1.85e-28) {
tmp = b * c;
} else if (k <= 8.5e+91) {
tmp = a * (t * -4.0);
} else if (k <= 1.08e+137) {
tmp = 18.0 * (t * (x * (z * y)));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1e-68: tmp = k * (j * -27.0) elif k <= 1.6e-302: tmp = 18.0 * (y * (z * (x * t))) elif k <= 1.85e-28: tmp = b * c elif k <= 8.5e+91: tmp = a * (t * -4.0) elif k <= 1.08e+137: tmp = 18.0 * (t * (x * (z * y))) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1e-68) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 1.6e-302) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (k <= 1.85e-28) tmp = Float64(b * c); elseif (k <= 8.5e+91) tmp = Float64(a * Float64(t * -4.0)); elseif (k <= 1.08e+137) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -1e-68)
tmp = k * (j * -27.0);
elseif (k <= 1.6e-302)
tmp = 18.0 * (y * (z * (x * t)));
elseif (k <= 1.85e-28)
tmp = b * c;
elseif (k <= 8.5e+91)
tmp = a * (t * -4.0);
elseif (k <= 1.08e+137)
tmp = 18.0 * (t * (x * (z * y)));
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1e-68], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e-302], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.85e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 8.5e+91], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.08e+137], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1 \cdot 10^{-68}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.85 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{+91}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;k \leq 1.08 \cdot 10^{+137}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.00000000000000007e-68Initial program 81.0%
Simplified92.0%
Taylor expanded in j around inf 33.2%
associate-*r*33.2%
Simplified33.2%
if -1.00000000000000007e-68 < k < 1.59999999999999989e-302Initial program 84.3%
Simplified91.2%
Taylor expanded in t around inf 79.1%
Taylor expanded in y around inf 30.2%
associate-*r*33.5%
*-commutative33.5%
associate-*r*33.5%
associate-*r*31.8%
*-commutative31.8%
*-commutative31.8%
associate-*l*33.5%
*-commutative33.5%
Simplified33.5%
if 1.59999999999999989e-302 < k < 1.8500000000000001e-28Initial program 88.7%
Taylor expanded in t around 0 50.8%
Taylor expanded in i around 0 33.0%
Taylor expanded in b around inf 28.2%
if 1.8500000000000001e-28 < k < 8.4999999999999995e91Initial program 85.4%
Simplified85.3%
Taylor expanded in t around inf 66.7%
Taylor expanded in a around inf 30.7%
*-commutative30.7%
associate-*r*30.7%
Simplified30.7%
if 8.4999999999999995e91 < k < 1.0800000000000001e137Initial program 87.5%
Simplified87.5%
Taylor expanded in t around inf 87.5%
Taylor expanded in y around inf 63.2%
if 1.0800000000000001e137 < k Initial program 84.4%
Simplified81.8%
associate-*r*84.3%
distribute-rgt-out--84.3%
associate-+l-84.3%
associate-*l*84.0%
fma-neg84.0%
associate-*l*84.0%
*-commutative84.0%
Applied egg-rr84.0%
fma-undefine84.0%
unsub-neg84.0%
*-commutative84.0%
associate-*r*84.0%
*-commutative84.0%
*-commutative84.0%
*-commutative84.0%
associate-*l*84.0%
*-commutative84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in j around inf 58.6%
metadata-eval58.6%
distribute-lft-neg-in58.6%
*-commutative58.6%
associate-*r*58.5%
distribute-rgt-neg-in58.5%
distribute-rgt-neg-in58.5%
metadata-eval58.5%
*-commutative58.5%
Simplified58.5%
Final simplification36.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 4e+202)
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* 27.0 k))))
(* x (- (* (* z y) (* t 18.0)) (* i 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 4e+202) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
} else {
tmp = x * (((z * y) * (t * 18.0)) - (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.
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 <= 4d+202) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (27.0d0 * k)))
else
tmp = x * (((z * y) * (t * 18.0d0)) - (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;
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 <= 4e+202) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
} else {
tmp = x * (((z * y) * (t * 18.0)) - (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]) [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 <= 4e+202: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k))) else: tmp = x * (((z * y) * (t * 18.0)) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 4e+202) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(Float64(z * y) * Float64(t * 18.0)) - 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])){:}
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 <= 4e+202)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
else
tmp = x * (((z * y) * (t * 18.0)) - (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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 4e+202], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $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[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z * y), $MachinePrecision] * N[(t * 18.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+202}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z \cdot y\right) \cdot \left(t \cdot 18\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < 3.9999999999999996e202Initial program 88.4%
Simplified90.4%
if 3.9999999999999996e202 < x Initial program 37.7%
Simplified53.5%
Taylor expanded in x around inf 86.7%
pow186.7%
associate-*r*86.7%
Applied egg-rr86.7%
unpow186.7%
*-commutative86.7%
Simplified86.7%
Final simplification90.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= i -1.65e+165) (not (<= i 4e-56)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
(-
(+ (* b c) (* t (- (* z (* y (* x 18.0))) (* a 4.0))))
(* 27.0 (* j k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((i <= -1.65e+165) || !(i <= 4e-56)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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.
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 ((i <= (-1.65d+165)) .or. (.not. (i <= 4d-56))) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
else
tmp = ((b * c) + (t * ((z * (y * (x * 18.0d0))) - (a * 4.0d0)))) - (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;
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 ((i <= -1.65e+165) || !(i <= 4e-56)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (i <= -1.65e+165) or not (i <= 4e-56): tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j)) else: tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((i <= -1.65e+165) || !(i <= 4e-56)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(y * Float64(x * 18.0))) - Float64(a * 4.0)))) - 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])){:}
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 ((i <= -1.65e+165) || ~((i <= 4e-56)))
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
else
tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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. 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[i, -1.65e+165], N[Not[LessEqual[i, 4e-56]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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])\\\\
[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}\;i \leq -1.65 \cdot 10^{+165} \lor \neg \left(i \leq 4 \cdot 10^{-56}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if i < -1.6499999999999999e165 or 4.0000000000000002e-56 < i Initial program 82.9%
Taylor expanded in y around 0 88.7%
distribute-lft-out88.7%
*-commutative88.7%
Simplified88.7%
if -1.6499999999999999e165 < i < 4.0000000000000002e-56Initial program 85.8%
Simplified88.4%
Taylor expanded in i around 0 84.3%
pow184.3%
associate-*r*83.7%
Applied egg-rr83.7%
unpow183.7%
associate-*r*84.3%
Simplified84.3%
Final simplification86.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= i -1.7e-12) (not (<= i 6e-59)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))))
(* 27.0 (* j k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((i <= -1.7e-12) || !(i <= 6e-59)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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.
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 ((i <= (-1.7d-12)) .or. (.not. (i <= 6d-59))) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0)))) - (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;
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 ((i <= -1.7e-12) || !(i <= 6e-59)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (i <= -1.7e-12) or not (i <= 6e-59): tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j)) else: tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((i <= -1.7e-12) || !(i <= 6e-59)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0)))) - 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])){:}
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 ((i <= -1.7e-12) || ~((i <= 6e-59)))
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
else
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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. 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[i, -1.7e-12], N[Not[LessEqual[i, 6e-59]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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])\\\\
[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}\;i \leq -1.7 \cdot 10^{-12} \lor \neg \left(i \leq 6 \cdot 10^{-59}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if i < -1.7e-12 or 6.0000000000000002e-59 < i Initial program 86.2%
Taylor expanded in y around 0 85.5%
distribute-lft-out85.5%
*-commutative85.5%
Simplified85.5%
if -1.7e-12 < i < 6.0000000000000002e-59Initial program 82.5%
Simplified88.6%
Taylor expanded in i around 0 88.2%
Final simplification86.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t -7.2e+20)
(+ (* b c) t_1)
(if (<= t 7.3e+101)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -7.2e+20) {
tmp = (b * c) + t_1;
} else if (t <= 7.3e+101) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * (z * y))) - (a * 4.0d0))
if (t <= (-7.2d+20)) then
tmp = (b * c) + t_1
else if (t <= 7.3d+101) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -7.2e+20) {
tmp = (b * c) + t_1;
} else if (t <= 7.3e+101) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t <= -7.2e+20: tmp = (b * c) + t_1 elif t <= 7.3e+101: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7.2e+20) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 7.3e+101) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -7.2e+20)
tmp = (b * c) + t_1;
elseif (t <= 7.3e+101)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+20], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 7.3e+101], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+20}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{+101}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.2e20Initial program 82.8%
Simplified89.2%
Taylor expanded in i around 0 82.3%
Taylor expanded in j around 0 82.4%
if -7.2e20 < t < 7.2999999999999994e101Initial program 86.5%
Taylor expanded in y around 0 86.6%
distribute-lft-out86.6%
*-commutative86.6%
Simplified86.6%
if 7.2999999999999994e101 < t Initial program 80.6%
Simplified90.2%
Taylor expanded in t around inf 83.5%
Final simplification85.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -6e+37)
(* b c)
(if (<= (* b c) -4.15e-72)
(* a (* t -4.0))
(if (<= (* b c) 3e+46) (* j (* k -27.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6e+37) {
tmp = b * c;
} else if ((b * c) <= -4.15e-72) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 3e+46) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-6d+37)) then
tmp = b * c
else if ((b * c) <= (-4.15d-72)) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 3d+46) then
tmp = j * (k * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6e+37) {
tmp = b * c;
} else if ((b * c) <= -4.15e-72) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 3e+46) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -6e+37: tmp = b * c elif (b * c) <= -4.15e-72: tmp = a * (t * -4.0) elif (b * c) <= 3e+46: tmp = j * (k * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -6e+37) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.15e-72) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 3e+46) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -6e+37)
tmp = b * c;
elseif ((b * c) <= -4.15e-72)
tmp = a * (t * -4.0);
elseif ((b * c) <= 3e+46)
tmp = j * (k * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -6e+37], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.15e-72], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e+46], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], 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])\\\\
[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 -6 \cdot 10^{+37}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.15 \cdot 10^{-72}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+46}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.00000000000000043e37 or 3.00000000000000023e46 < (*.f64 b c) Initial program 82.3%
Taylor expanded in t around 0 65.5%
Taylor expanded in i around 0 52.7%
Taylor expanded in b around inf 46.2%
if -6.00000000000000043e37 < (*.f64 b c) < -4.1499999999999999e-72Initial program 88.4%
Simplified96.3%
Taylor expanded in t around inf 92.3%
Taylor expanded in a around inf 38.3%
*-commutative38.3%
associate-*r*38.3%
Simplified38.3%
if -4.1499999999999999e-72 < (*.f64 b c) < 3.00000000000000023e46Initial program 85.8%
Simplified89.0%
associate-*r*89.8%
distribute-rgt-out--85.8%
associate-+l-85.8%
associate-*l*86.4%
fma-neg87.2%
associate-*l*88.0%
*-commutative88.0%
Applied egg-rr88.0%
fma-undefine87.2%
unsub-neg87.2%
*-commutative87.2%
associate-*r*87.2%
*-commutative87.2%
*-commutative87.2%
*-commutative87.2%
associate-*l*86.4%
*-commutative86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in j around inf 36.9%
metadata-eval36.9%
distribute-lft-neg-in36.9%
*-commutative36.9%
associate-*r*36.9%
distribute-rgt-neg-in36.9%
distribute-rgt-neg-in36.9%
metadata-eval36.9%
*-commutative36.9%
Simplified36.9%
Final simplification40.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -78.0) (not (<= t 7.3e+101))) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))) (- (- (* b c) (* 4.0 (* x i))) (* k (* 27.0 j)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -78.0) || !(t <= 7.3e+101)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((t <= (-78.0d0)) .or. (.not. (t <= 7.3d+101))) then
tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (27.0d0 * j))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -78.0) || !(t <= 7.3e+101)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -78.0) or not (t <= 7.3e+101): tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) else: tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -78.0) || !(t <= 7.3e+101)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(27.0 * j))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -78.0) || ~((t <= 7.3e+101)))
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
else
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -78.0], N[Not[LessEqual[t, 7.3e+101]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -78 \lor \neg \left(t \leq 7.3 \cdot 10^{+101}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(27 \cdot j\right)\\
\end{array}
\end{array}
if t < -78 or 7.2999999999999994e101 < t Initial program 81.4%
Simplified89.3%
Taylor expanded in t around inf 76.0%
if -78 < t < 7.2999999999999994e101Initial program 87.1%
Taylor expanded in t around 0 79.7%
Final simplification78.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2e+47) (not (<= (* b c) 2e+46))) (- (* b c) (* 4.0 (* x i))) (+ (* j (* k -27.0)) (* a (* t -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2e+47) || !((b * c) <= 2e+46)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (a * (t * -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.
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) <= (-2d+47)) .or. (.not. ((b * c) <= 2d+46))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (j * (k * (-27.0d0))) + (a * (t * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2e+47) || !((b * c) <= 2e+46)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (a * (t * -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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2e+47) or not ((b * c) <= 2e+46): tmp = (b * c) - (4.0 * (x * i)) else: tmp = (j * (k * -27.0)) + (a * (t * -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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2e+47) || !(Float64(b * c) <= 2e+46)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2e+47) || ~(((b * c) <= 2e+46)))
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (j * (k * -27.0)) + (a * (t * -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. 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], -2e+47], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2e+46]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+47} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+46}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0000000000000001e47 or 2e46 < (*.f64 b c) Initial program 81.8%
Taylor expanded in t around 0 64.5%
Taylor expanded in j around 0 60.6%
if -2.0000000000000001e47 < (*.f64 b c) < 2e46Initial program 86.5%
Simplified90.4%
Taylor expanded in a around inf 58.5%
metadata-eval58.5%
distribute-lft-neg-in58.5%
*-commutative58.5%
associate-*l*58.5%
distribute-lft-neg-in58.5%
distribute-lft-neg-in58.5%
metadata-eval58.5%
Simplified58.5%
Final simplification59.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t -5.5e-5)
(+ (* b c) t_1)
(if (<= t 7.3e+101)
(- (- (* b c) (* 4.0 (* x i))) (* k (* 27.0 j)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -5.5e-5) {
tmp = (b * c) + t_1;
} else if (t <= 7.3e+101) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * (z * y))) - (a * 4.0d0))
if (t <= (-5.5d-5)) then
tmp = (b * c) + t_1
else if (t <= 7.3d+101) then
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (27.0d0 * j))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -5.5e-5) {
tmp = (b * c) + t_1;
} else if (t <= 7.3e+101) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t <= -5.5e-5: tmp = (b * c) + t_1 elif t <= 7.3e+101: tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.5e-5) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 7.3e+101) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(27.0 * j))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.5e-5)
tmp = (b * c) + t_1;
elseif (t <= 7.3e+101)
tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-5], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 7.3e+101], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-5}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{+101}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5000000000000002e-5Initial program 81.8%
Simplified88.8%
Taylor expanded in i around 0 82.6%
Taylor expanded in j around 0 80.1%
if -5.5000000000000002e-5 < t < 7.2999999999999994e101Initial program 87.1%
Taylor expanded in t around 0 79.7%
if 7.2999999999999994e101 < t Initial program 80.6%
Simplified90.2%
Taylor expanded in t around inf 83.5%
Final simplification80.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.55e+86)
(* x (* z (+ (* -4.0 (/ i z)) (* 18.0 (* t y)))))
(if (<= x 4.7e+142)
(- (- (* b c) (* 4.0 (* t a))) (* k (* 27.0 j)))
(* x (- (* (* z y) (* t 18.0)) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.55e+86) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 4.7e+142) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (27.0 * j));
} else {
tmp = x * (((z * y) * (t * 18.0)) - (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.
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.55d+86)) then
tmp = x * (z * (((-4.0d0) * (i / z)) + (18.0d0 * (t * y))))
else if (x <= 4.7d+142) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (27.0d0 * j))
else
tmp = x * (((z * y) * (t * 18.0d0)) - (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;
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.55e+86) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 4.7e+142) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (27.0 * j));
} else {
tmp = x * (((z * y) * (t * 18.0)) - (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]) [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.55e+86: tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y)))) elif x <= 4.7e+142: tmp = ((b * c) - (4.0 * (t * a))) - (k * (27.0 * j)) else: tmp = x * (((z * y) * (t * 18.0)) - (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]) 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.55e+86) tmp = Float64(x * Float64(z * Float64(Float64(-4.0 * Float64(i / z)) + Float64(18.0 * Float64(t * y))))); elseif (x <= 4.7e+142) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(x * Float64(Float64(Float64(z * y) * Float64(t * 18.0)) - 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])){:}
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.55e+86)
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
elseif (x <= 4.7e+142)
tmp = ((b * c) - (4.0 * (t * a))) - (k * (27.0 * j));
else
tmp = x * (((z * y) * (t * 18.0)) - (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. 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.55e+86], N[(x * N[(z * N[(N[(-4.0 * N[(i / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.7e+142], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z * y), $MachinePrecision] * N[(t * 18.0), $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])\\\\
[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.55 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-4 \cdot \frac{i}{z} + 18 \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{+142}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z \cdot y\right) \cdot \left(t \cdot 18\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -1.5500000000000001e86Initial program 77.6%
Simplified85.5%
Taylor expanded in x around inf 71.5%
Taylor expanded in z around inf 61.7%
Taylor expanded in x around 0 71.5%
if -1.5500000000000001e86 < x < 4.7e142Initial program 91.7%
Taylor expanded in x around 0 78.7%
if 4.7e142 < x Initial program 52.3%
Simplified62.6%
Taylor expanded in x around inf 77.6%
pow177.6%
associate-*r*77.6%
Applied egg-rr77.6%
unpow177.6%
*-commutative77.6%
Simplified77.6%
Final simplification77.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.2e+160)
(* a (* t -4.0))
(if (<= t -6.5e+32)
(* t (* 18.0 (* x (* z y))))
(if (<= t 2.6e+84) (- (* b c) (* 27.0 (* j k))) (* t (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.2e+160) {
tmp = a * (t * -4.0);
} else if (t <= -6.5e+32) {
tmp = t * (18.0 * (x * (z * y)));
} else if (t <= 2.6e+84) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t * (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.
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 (t <= (-2.2d+160)) then
tmp = a * (t * (-4.0d0))
else if (t <= (-6.5d+32)) then
tmp = t * (18.0d0 * (x * (z * y)))
else if (t <= 2.6d+84) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t * (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;
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 <= -2.2e+160) {
tmp = a * (t * -4.0);
} else if (t <= -6.5e+32) {
tmp = t * (18.0 * (x * (z * y)));
} else if (t <= 2.6e+84) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t * (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]) [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 <= -2.2e+160: tmp = a * (t * -4.0) elif t <= -6.5e+32: tmp = t * (18.0 * (x * (z * y))) elif t <= 2.6e+84: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.2e+160) tmp = Float64(a * Float64(t * -4.0)); elseif (t <= -6.5e+32) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(z * y)))); elseif (t <= 2.6e+84) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = Float64(t * 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])){:}
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 <= -2.2e+160)
tmp = a * (t * -4.0);
elseif (t <= -6.5e+32)
tmp = t * (18.0 * (x * (z * y)));
elseif (t <= 2.6e+84)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = t * (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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.2e+160], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e+32], N[(t * N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+84], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+160}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+84}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -2.19999999999999992e160Initial program 75.0%
Simplified84.4%
Taylor expanded in t around inf 87.5%
Taylor expanded in a around inf 48.0%
*-commutative48.0%
associate-*r*48.0%
Simplified48.0%
if -2.19999999999999992e160 < t < -6.4999999999999994e32Initial program 89.7%
Simplified93.4%
Taylor expanded in t around inf 75.1%
Taylor expanded in x around inf 56.3%
if -6.4999999999999994e32 < t < 2.6000000000000001e84Initial program 87.9%
Taylor expanded in t around 0 77.7%
Taylor expanded in i around 0 59.8%
if 2.6000000000000001e84 < t Initial program 76.9%
Simplified88.3%
Taylor expanded in t around inf 81.9%
Taylor expanded in x around 0 54.3%
*-commutative54.3%
*-commutative54.3%
associate-*r*54.3%
*-commutative54.3%
Simplified54.3%
Final simplification57.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -6.8e+161)
(* a (* t -4.0))
(if (<= t -1.7e+30)
(* t (* 18.0 (* x (* z y))))
(if (<= t 5.5e+82) (+ (* b c) (* j (* k -27.0))) (* t (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -6.8e+161) {
tmp = a * (t * -4.0);
} else if (t <= -1.7e+30) {
tmp = t * (18.0 * (x * (z * y)));
} else if (t <= 5.5e+82) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t * (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.
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 (t <= (-6.8d+161)) then
tmp = a * (t * (-4.0d0))
else if (t <= (-1.7d+30)) then
tmp = t * (18.0d0 * (x * (z * y)))
else if (t <= 5.5d+82) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t * (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;
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 <= -6.8e+161) {
tmp = a * (t * -4.0);
} else if (t <= -1.7e+30) {
tmp = t * (18.0 * (x * (z * y)));
} else if (t <= 5.5e+82) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t * (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]) [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 <= -6.8e+161: tmp = a * (t * -4.0) elif t <= -1.7e+30: tmp = t * (18.0 * (x * (z * y))) elif t <= 5.5e+82: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -6.8e+161) tmp = Float64(a * Float64(t * -4.0)); elseif (t <= -1.7e+30) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(z * y)))); elseif (t <= 5.5e+82) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(t * 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])){:}
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 <= -6.8e+161)
tmp = a * (t * -4.0);
elseif (t <= -1.7e+30)
tmp = t * (18.0 * (x * (z * y)));
elseif (t <= 5.5e+82)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t * (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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -6.8e+161], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e+30], N[(t * N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+82], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+161}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{+30}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+82}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -6.79999999999999986e161Initial program 75.0%
Simplified84.4%
Taylor expanded in t around inf 87.5%
Taylor expanded in a around inf 48.0%
*-commutative48.0%
associate-*r*48.0%
Simplified48.0%
if -6.79999999999999986e161 < t < -1.7000000000000001e30Initial program 89.7%
Simplified93.4%
Taylor expanded in t around inf 75.1%
Taylor expanded in x around inf 56.3%
if -1.7000000000000001e30 < t < 5.49999999999999997e82Initial program 87.9%
Simplified89.8%
Taylor expanded in b around inf 59.8%
if 5.49999999999999997e82 < t Initial program 76.9%
Simplified88.3%
Taylor expanded in t around inf 81.9%
Taylor expanded in x around 0 54.3%
*-commutative54.3%
*-commutative54.3%
associate-*r*54.3%
*-commutative54.3%
Simplified54.3%
Final simplification57.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -10.0) (not (<= t 3.05e+78))) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -10.0) || !(t <= 3.05e+78)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = (b * c) + (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.
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 ((t <= (-10.0d0)) .or. (.not. (t <= 3.05d+78))) then
tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
else
tmp = (b * c) + (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;
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 <= -10.0) || !(t <= 3.05e+78)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = (b * c) + (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]) [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 <= -10.0) or not (t <= 3.05e+78): tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) else: tmp = (b * c) + (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -10.0) || !(t <= 3.05e+78)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) + 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])){:}
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 <= -10.0) || ~((t <= 3.05e+78)))
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
else
tmp = (b * c) + (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. 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[t, -10.0], N[Not[LessEqual[t, 3.05e+78]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10 \lor \neg \left(t \leq 3.05 \cdot 10^{+78}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -10 or 3.05000000000000006e78 < t Initial program 79.9%
Simplified88.6%
Taylor expanded in t around inf 75.6%
if -10 < t < 3.05000000000000006e78Initial program 88.4%
Simplified89.7%
Taylor expanded in b around inf 60.9%
Final simplification67.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -2.65e-19)
(* b c)
(if (<= c 5.8e+35)
(* (* j k) -27.0)
(if (<= c 5.7e+103) (* a (* t -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -2.65e-19) {
tmp = b * c;
} else if (c <= 5.8e+35) {
tmp = (j * k) * -27.0;
} else if (c <= 5.7e+103) {
tmp = a * (t * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (c <= (-2.65d-19)) then
tmp = b * c
else if (c <= 5.8d+35) then
tmp = (j * k) * (-27.0d0)
else if (c <= 5.7d+103) then
tmp = a * (t * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -2.65e-19) {
tmp = b * c;
} else if (c <= 5.8e+35) {
tmp = (j * k) * -27.0;
} else if (c <= 5.7e+103) {
tmp = a * (t * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -2.65e-19: tmp = b * c elif c <= 5.8e+35: tmp = (j * k) * -27.0 elif c <= 5.7e+103: tmp = a * (t * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -2.65e-19) tmp = Float64(b * c); elseif (c <= 5.8e+35) tmp = Float64(Float64(j * k) * -27.0); elseif (c <= 5.7e+103) tmp = Float64(a * Float64(t * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -2.65e-19)
tmp = b * c;
elseif (c <= 5.8e+35)
tmp = (j * k) * -27.0;
elseif (c <= 5.7e+103)
tmp = a * (t * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -2.65e-19], N[(b * c), $MachinePrecision], If[LessEqual[c, 5.8e+35], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[c, 5.7e+103], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], 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])\\\\
[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}\;c \leq -2.65 \cdot 10^{-19}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;c \leq 5.7 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -2.64999999999999986e-19 or 5.70000000000000033e103 < c Initial program 83.8%
Taylor expanded in t around 0 61.4%
Taylor expanded in i around 0 47.0%
Taylor expanded in b around inf 36.9%
if -2.64999999999999986e-19 < c < 5.79999999999999989e35Initial program 84.2%
Simplified89.6%
Taylor expanded in j around inf 33.1%
if 5.79999999999999989e35 < c < 5.70000000000000033e103Initial program 100.0%
Simplified100.0%
Taylor expanded in t around inf 90.5%
Taylor expanded in a around inf 42.1%
*-commutative42.1%
associate-*r*42.1%
Simplified42.1%
Final simplification35.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.2e+61) (not (<= (* b c) 1e+47))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.2e+61) || !((b * c) <= 1e+47)) {
tmp = b * c;
} 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.
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) <= (-4.2d+61)) .or. (.not. ((b * c) <= 1d+47))) then
tmp = b * c
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;
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) <= -4.2e+61) || !((b * c) <= 1e+47)) {
tmp = b * c;
} 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]) [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) <= -4.2e+61) or not ((b * c) <= 1e+47): tmp = b * c 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]) 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) <= -4.2e+61) || !(Float64(b * c) <= 1e+47)) tmp = Float64(b * c); else tmp = Float64(Float64(j * 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])){:}
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) <= -4.2e+61) || ~(((b * c) <= 1e+47)))
tmp = b * c;
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. 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], -4.2e+61], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+47]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+61} \lor \neg \left(b \cdot c \leq 10^{+47}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -4.2000000000000002e61 or 1e47 < (*.f64 b c) Initial program 82.1%
Taylor expanded in t around 0 65.0%
Taylor expanded in i around 0 52.3%
Taylor expanded in b around inf 48.4%
if -4.2000000000000002e61 < (*.f64 b c) < 1e47Initial program 86.2%
Simplified90.6%
Taylor expanded in j around inf 33.5%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 84.6%
Taylor expanded in t around 0 58.8%
Taylor expanded in i around 0 43.9%
Taylor expanded in b around inf 23.2%
(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 2024133
(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
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))