
(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 22 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
(let* ((t_1
(-
(+ (* x (* (* 18.0 y) (* z t))) (- (* b c) (* a (* t 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(t_2
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 2e+234)
(- t_2 (* k (* j 27.0)))
(if (<= t_2 INFINITY)
t_1
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = ((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 2e+234) {
tmp = t_2 - (k * (j * 27.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
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 = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = ((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 2e+234) {
tmp = t_2 - (k * (j * 27.0));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
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 = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) t_2 = ((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 2e+234: tmp = t_2 - (k * (j * 27.0)) elif t_2 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) 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(x * Float64(Float64(18.0 * y) * Float64(z * t))) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) t_2 = Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t))) - Float64(Float64(x * 4.0) * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 2e+234) tmp = Float64(t_2 - Float64(k * Float64(j * 27.0))); elseif (t_2 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); 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 = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
t_2 = ((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i);
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= 2e+234)
tmp = t_2 - (k * (j * 27.0));
elseif (t_2 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
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[(x * N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+234], N[(t$95$2 - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $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(x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right)\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
t_2 := \left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+234}:\\
\;\;\;\;t\_2 - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < -inf.0 or 2.00000000000000004e234 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 81.3%
Simplified85.9%
associate-*r*81.3%
distribute-rgt-out--81.3%
associate-+l-81.3%
associate-*l*84.1%
fmm-def84.1%
associate-*l*84.1%
*-commutative84.1%
Applied egg-rr84.1%
fmm-undef84.1%
*-commutative84.1%
Simplified84.1%
sub-neg84.1%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
unsub-neg92.8%
associate-*r*92.8%
Simplified92.8%
if -inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < 2.00000000000000004e234Initial program 98.8%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 0.0%
Simplified27.3%
Taylor expanded in x around inf 77.3%
Final simplification94.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -2.12e+117)
(* b c)
(if (<= (* b c) -2e-74)
(* t (* a -4.0))
(if (<= (* b c) -1.05e-291)
(* j (* k -27.0))
(if (<= (* b c) 1.8e-306)
t_1
(if (<= (* b c) 7e+30)
(* -27.0 (* j k))
(if (<= (* b c) 8e+144) t_1 (* 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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -2.12e+117) {
tmp = b * c;
} else if ((b * c) <= -2e-74) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.05e-291) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1.8e-306) {
tmp = t_1;
} else if ((b * c) <= 7e+30) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8e+144) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-2.12d+117)) then
tmp = b * c
else if ((b * c) <= (-2d-74)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-1.05d-291)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 1.8d-306) then
tmp = t_1
else if ((b * c) <= 7d+30) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 8d+144) then
tmp = t_1
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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -2.12e+117) {
tmp = b * c;
} else if ((b * c) <= -2e-74) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.05e-291) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1.8e-306) {
tmp = t_1;
} else if ((b * c) <= 7e+30) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8e+144) {
tmp = t_1;
} 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): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -2.12e+117: tmp = b * c elif (b * c) <= -2e-74: tmp = t * (a * -4.0) elif (b * c) <= -1.05e-291: tmp = j * (k * -27.0) elif (b * c) <= 1.8e-306: tmp = t_1 elif (b * c) <= 7e+30: tmp = -27.0 * (j * k) elif (b * c) <= 8e+144: tmp = t_1 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) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -2.12e+117) tmp = Float64(b * c); elseif (Float64(b * c) <= -2e-74) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -1.05e-291) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 1.8e-306) tmp = t_1; elseif (Float64(b * c) <= 7e+30) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 8e+144) tmp = t_1; 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)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -2.12e+117)
tmp = b * c;
elseif ((b * c) <= -2e-74)
tmp = t * (a * -4.0);
elseif ((b * c) <= -1.05e-291)
tmp = j * (k * -27.0);
elseif ((b * c) <= 1.8e-306)
tmp = t_1;
elseif ((b * c) <= 7e+30)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 8e+144)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.12e+117], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-74], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-291], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.8e-306], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7e+30], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8e+144], t$95$1, 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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -2.12 \cdot 10^{+117}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-291}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+30}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.1200000000000001e117 or 8.00000000000000019e144 < (*.f64 b c) Initial program 82.3%
Simplified87.0%
associate-*r*83.5%
distribute-rgt-out--82.3%
associate-+l-82.3%
associate-*l*79.7%
fmm-def82.1%
associate-*l*82.1%
*-commutative82.1%
Applied egg-rr82.1%
fmm-undef79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 57.2%
if -2.1200000000000001e117 < (*.f64 b c) < -1.99999999999999992e-74Initial program 77.3%
Simplified80.3%
associate-*r*83.0%
distribute-rgt-out--80.2%
associate-+l-80.2%
associate-*l*80.5%
fmm-def83.3%
associate-*l*83.4%
*-commutative83.4%
Applied egg-rr83.4%
fmm-undef80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in a around inf 37.3%
metadata-eval37.3%
distribute-lft-neg-in37.3%
associate-*r*37.3%
*-commutative37.3%
distribute-rgt-neg-in37.3%
distribute-lft-neg-in37.3%
metadata-eval37.3%
Simplified37.3%
if -1.99999999999999992e-74 < (*.f64 b c) < -1.05e-291Initial program 89.5%
Simplified89.7%
associate-*r*89.7%
distribute-rgt-out--89.7%
associate-+l-89.7%
associate-*l*92.8%
fmm-def92.8%
associate-*l*92.7%
*-commutative92.7%
Applied egg-rr92.7%
fmm-undef92.7%
*-commutative92.7%
Simplified92.7%
sub-neg92.7%
associate-*l*92.6%
*-commutative92.6%
Applied egg-rr92.6%
unsub-neg92.6%
associate-*r*92.6%
Simplified92.6%
Taylor expanded in j around inf 40.7%
*-commutative40.7%
associate-*l*40.8%
Simplified40.8%
if -1.05e-291 < (*.f64 b c) < 1.79999999999999996e-306 or 7.00000000000000042e30 < (*.f64 b c) < 8.00000000000000019e144Initial program 75.9%
Simplified77.4%
associate-*r*77.5%
distribute-rgt-out--75.9%
associate-+l-75.9%
associate-*l*75.7%
fmm-def75.7%
associate-*l*75.7%
*-commutative75.7%
Applied egg-rr75.7%
fmm-undef75.7%
*-commutative75.7%
Simplified75.7%
sub-neg75.7%
associate-*l*82.3%
*-commutative82.3%
Applied egg-rr82.3%
unsub-neg82.3%
associate-*r*82.3%
Simplified82.3%
Taylor expanded in i around inf 39.0%
*-commutative39.0%
Simplified39.0%
if 1.79999999999999996e-306 < (*.f64 b c) < 7.00000000000000042e30Initial program 87.4%
Simplified87.5%
Taylor expanded in j around inf 44.8%
Final simplification46.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
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (- (- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z)))))) t_1)))
(if (<= t -7.2e-49)
t_2
(if (<= t 2.05e-302)
(- (- (* b c) t_1) (* k (* j 27.0)))
(if (<= t 4e+15)
(-
(+ (* b c) (* a (* 18.0 (* (* y (* x t)) (/ z a)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
t_2)))))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 = 4.0 * (x * i);
double t_2 = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
double tmp;
if (t <= -7.2e-49) {
tmp = t_2;
} else if (t <= 2.05e-302) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else if (t <= 4e+15) {
tmp = ((b * c) + (a * (18.0 * ((y * (x * t)) * (z / a))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 4.0d0 * (x * i)
t_2 = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - t_1
if (t <= (-7.2d-49)) then
tmp = t_2
else if (t <= 2.05d-302) then
tmp = ((b * c) - t_1) - (k * (j * 27.0d0))
else if (t <= 4d+15) then
tmp = ((b * c) + (a * (18.0d0 * ((y * (x * t)) * (z / a))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
double tmp;
if (t <= -7.2e-49) {
tmp = t_2;
} else if (t <= 2.05e-302) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else if (t <= 4e+15) {
tmp = ((b * c) + (a * (18.0 * ((y * (x * t)) * (z / a))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1 tmp = 0 if t <= -7.2e-49: tmp = t_2 elif t <= 2.05e-302: tmp = ((b * c) - t_1) - (k * (j * 27.0)) elif t <= 4e+15: tmp = ((b * c) + (a * (18.0 * ((y * (x * t)) * (z / a))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - t_1) tmp = 0.0 if (t <= -7.2e-49) tmp = t_2; elseif (t <= 2.05e-302) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(k * Float64(j * 27.0))); elseif (t <= 4e+15) tmp = Float64(Float64(Float64(b * c) + Float64(a * Float64(18.0 * Float64(Float64(y * Float64(x * t)) * Float64(z / a))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
tmp = 0.0;
if (t <= -7.2e-49)
tmp = t_2;
elseif (t <= 2.05e-302)
tmp = ((b * c) - t_1) - (k * (j * 27.0));
elseif (t <= 4e+15)
tmp = ((b * c) + (a * (18.0 * ((y * (x * t)) * (z / a))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t, -7.2e-49], t$95$2, If[LessEqual[t, 2.05e-302], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+15], N[(N[(N[(b * c), $MachinePrecision] + N[(a * N[(18.0 * N[(N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - t\_1\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-302}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\left(b \cdot c + a \cdot \left(18 \cdot \left(\left(y \cdot \left(x \cdot t\right)\right) \cdot \frac{z}{a}\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.19999999999999939e-49 or 4e15 < t Initial program 86.4%
Simplified90.4%
Taylor expanded in j around 0 86.6%
if -7.19999999999999939e-49 < t < 2.0499999999999999e-302Initial program 77.3%
Taylor expanded in t around 0 86.7%
if 2.0499999999999999e-302 < t < 4e15Initial program 77.6%
Simplified75.3%
Taylor expanded in a around inf 74.0%
fma-define74.0%
associate-/l*72.8%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in x around inf 68.2%
associate-*r*74.1%
associate-*r/71.7%
associate-*r/75.4%
associate-*l*78.9%
*-commutative78.9%
Simplified78.9%
Final simplification84.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
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= t -9.2e-192)
(-
(-
(- (* b c) (* (* x 4.0) i))
(* t (- (* a 4.0) (* x (* z (* 18.0 y))))))
(* k (* j 27.0)))
(if (<= t 5e-109)
(- (+ (* x (* (* 18.0 y) (* z t))) (- (* b c) (* a (* t 4.0)))) t_1)
(- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (t <= -9.2e-192) {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
} else if (t <= 5e-109) {
tmp = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - 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 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if (t <= (-9.2d-192)) then
tmp = (((b * c) - ((x * 4.0d0) * i)) - (t * ((a * 4.0d0) - (x * (z * (18.0d0 * y)))))) - (k * (j * 27.0d0))
else if (t <= 5d-109) then
tmp = ((x * ((18.0d0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0d0)))) - t_1
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (t <= -9.2e-192) {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
} else if (t <= 5e-109) {
tmp = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if t <= -9.2e-192: tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0)) elif t <= 5e-109: tmp = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - t_1 else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - 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(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (t <= -9.2e-192) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(t * Float64(Float64(a * 4.0) - Float64(x * Float64(z * Float64(18.0 * y)))))) - Float64(k * Float64(j * 27.0))); elseif (t <= 5e-109) tmp = Float64(Float64(Float64(x * Float64(Float64(18.0 * y) * Float64(z * t))) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if (t <= -9.2e-192)
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
elseif (t <= 5e-109)
tmp = ((x * ((18.0 * y) * (z * t))) + ((b * c) - (a * (t * 4.0)))) - t_1;
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - 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[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e-192], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-109], N[(N[(N[(x * N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-192}:\\
\;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t \cdot \left(a \cdot 4 - x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-109}:\\
\;\;\;\;\left(x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right)\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -9.20000000000000073e-192Initial program 88.6%
associate--l+88.6%
distribute-rgt-out--92.8%
associate-*r*93.7%
associate-*l*93.8%
associate-*r*93.7%
*-commutative93.7%
Applied egg-rr93.7%
if -9.20000000000000073e-192 < t < 5.0000000000000002e-109Initial program 70.0%
Simplified71.2%
associate-*r*71.1%
distribute-rgt-out--71.1%
associate-+l-71.1%
associate-*l*80.0%
fmm-def80.0%
associate-*l*80.0%
*-commutative80.0%
Applied egg-rr80.0%
fmm-undef80.0%
*-commutative80.0%
Simplified80.0%
sub-neg80.0%
associate-*l*90.4%
*-commutative90.4%
Applied egg-rr90.4%
unsub-neg90.4%
associate-*r*90.4%
Simplified90.4%
if 5.0000000000000002e-109 < t Initial program 86.6%
Simplified88.0%
Final simplification90.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
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -1.4e+194)
(* b c)
(if (<= (* b c) -4.6e-271)
(* t (* 18.0 (* x (* y z))))
(if (<= (* b c) 6.8e-306)
t_1
(if (<= (* b c) 2.4e+31)
(* -27.0 (* j k))
(if (<= (* b c) 6.3e+144) t_1 (* 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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.4e+194) {
tmp = b * c;
} else if ((b * c) <= -4.6e-271) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 6.8e-306) {
tmp = t_1;
} else if ((b * c) <= 2.4e+31) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 6.3e+144) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-1.4d+194)) then
tmp = b * c
else if ((b * c) <= (-4.6d-271)) then
tmp = t * (18.0d0 * (x * (y * z)))
else if ((b * c) <= 6.8d-306) then
tmp = t_1
else if ((b * c) <= 2.4d+31) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 6.3d+144) then
tmp = t_1
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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.4e+194) {
tmp = b * c;
} else if ((b * c) <= -4.6e-271) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 6.8e-306) {
tmp = t_1;
} else if ((b * c) <= 2.4e+31) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 6.3e+144) {
tmp = t_1;
} 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): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -1.4e+194: tmp = b * c elif (b * c) <= -4.6e-271: tmp = t * (18.0 * (x * (y * z))) elif (b * c) <= 6.8e-306: tmp = t_1 elif (b * c) <= 2.4e+31: tmp = -27.0 * (j * k) elif (b * c) <= 6.3e+144: tmp = t_1 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) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -1.4e+194) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.6e-271) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 6.8e-306) tmp = t_1; elseif (Float64(b * c) <= 2.4e+31) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 6.3e+144) tmp = t_1; 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)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -1.4e+194)
tmp = b * c;
elseif ((b * c) <= -4.6e-271)
tmp = t * (18.0 * (x * (y * z)));
elseif ((b * c) <= 6.8e-306)
tmp = t_1;
elseif ((b * c) <= 2.4e+31)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 6.3e+144)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.4e+194], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.6e-271], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.8e-306], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.4e+31], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.3e+144], t$95$1, 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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.4 \cdot 10^{+194}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.6 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+31}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 6.3 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.40000000000000005e194 or 6.30000000000000024e144 < (*.f64 b c) Initial program 79.5%
Simplified84.0%
associate-*r*81.0%
distribute-rgt-out--79.5%
associate-+l-79.5%
associate-*l*77.9%
fmm-def80.9%
associate-*l*80.9%
*-commutative80.9%
Applied egg-rr80.9%
fmm-undef77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in b around inf 63.8%
if -1.40000000000000005e194 < (*.f64 b c) < -4.60000000000000017e-271Initial program 84.9%
Simplified87.4%
associate-*r*87.5%
distribute-rgt-out--86.2%
associate-+l-86.2%
associate-*l*86.1%
fmm-def87.4%
associate-*l*87.4%
*-commutative87.4%
Applied egg-rr87.4%
fmm-undef86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in t around inf 56.6%
Taylor expanded in x around inf 37.0%
if -4.60000000000000017e-271 < (*.f64 b c) < 6.7999999999999996e-306 or 2.39999999999999982e31 < (*.f64 b c) < 6.30000000000000024e144Initial program 76.3%
Simplified77.8%
associate-*r*77.9%
distribute-rgt-out--76.3%
associate-+l-76.3%
associate-*l*76.1%
fmm-def76.1%
associate-*l*76.1%
*-commutative76.1%
Applied egg-rr76.1%
fmm-undef76.1%
*-commutative76.1%
Simplified76.1%
sub-neg76.1%
associate-*l*82.6%
*-commutative82.6%
Applied egg-rr82.6%
unsub-neg82.6%
associate-*r*82.6%
Simplified82.6%
Taylor expanded in i around inf 38.5%
*-commutative38.5%
Simplified38.5%
if 6.7999999999999996e-306 < (*.f64 b c) < 2.39999999999999982e31Initial program 87.4%
Simplified87.5%
Taylor expanded in j around inf 44.8%
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 (<= y -2.8e+215)
(-
(* y (+ (* -4.0 (/ (* t a) y)) (+ (* 18.0 (* t (* x z))) (/ (* b c) y))))
(* 4.0 (* x i)))
(-
(- (- (* b c) (* (* x 4.0) i)) (* t (- (* a 4.0) (* x (* z (* 18.0 y))))))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -2.8e+215) {
tmp = (y * ((-4.0 * ((t * a) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y)))) - (4.0 * (x * i));
} else {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (y <= (-2.8d+215)) then
tmp = (y * (((-4.0d0) * ((t * a) / y)) + ((18.0d0 * (t * (x * z))) + ((b * c) / y)))) - (4.0d0 * (x * i))
else
tmp = (((b * c) - ((x * 4.0d0) * i)) - (t * ((a * 4.0d0) - (x * (z * (18.0d0 * y)))))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (y <= -2.8e+215) {
tmp = (y * ((-4.0 * ((t * a) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y)))) - (4.0 * (x * i));
} else {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -2.8e+215: tmp = (y * ((-4.0 * ((t * a) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y)))) - (4.0 * (x * i)) else: tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -2.8e+215) tmp = Float64(Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(t * Float64(Float64(a * 4.0) - Float64(x * Float64(z * Float64(18.0 * y)))))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 (y <= -2.8e+215)
tmp = (y * ((-4.0 * ((t * a) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y)))) - (4.0 * (x * i));
else
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[y, -2.8e+215], N[(N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;y \leq -2.8 \cdot 10^{+215}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t \cdot \left(a \cdot 4 - x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if y < -2.8e215Initial program 35.9%
Simplified45.5%
Taylor expanded in j around 0 44.9%
Taylor expanded in y around inf 74.6%
if -2.8e215 < y Initial program 85.7%
associate--l+85.7%
distribute-rgt-out--87.4%
associate-*r*87.5%
associate-*l*87.5%
associate-*r*87.5%
*-commutative87.5%
Applied egg-rr87.5%
Final simplification86.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 (<= (* b c) -2.5e+200)
(* b c)
(if (<= (* b c) 7.5e-235)
(* t (* 18.0 (* z (* x y))))
(if (<= (* b c) 3.2e+30)
(* -27.0 (* j k))
(if (<= (* b c) 8.5e+144) (* -4.0 (* x i)) (* 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) <= -2.5e+200) {
tmp = b * c;
} else if ((b * c) <= 7.5e-235) {
tmp = t * (18.0 * (z * (x * y)));
} else if ((b * c) <= 3.2e+30) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8.5e+144) {
tmp = -4.0 * (x * i);
} 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) <= (-2.5d+200)) then
tmp = b * c
else if ((b * c) <= 7.5d-235) then
tmp = t * (18.0d0 * (z * (x * y)))
else if ((b * c) <= 3.2d+30) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 8.5d+144) then
tmp = (-4.0d0) * (x * i)
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) <= -2.5e+200) {
tmp = b * c;
} else if ((b * c) <= 7.5e-235) {
tmp = t * (18.0 * (z * (x * y)));
} else if ((b * c) <= 3.2e+30) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8.5e+144) {
tmp = -4.0 * (x * i);
} 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) <= -2.5e+200: tmp = b * c elif (b * c) <= 7.5e-235: tmp = t * (18.0 * (z * (x * y))) elif (b * c) <= 3.2e+30: tmp = -27.0 * (j * k) elif (b * c) <= 8.5e+144: tmp = -4.0 * (x * i) 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) <= -2.5e+200) tmp = Float64(b * c); elseif (Float64(b * c) <= 7.5e-235) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); elseif (Float64(b * c) <= 3.2e+30) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 8.5e+144) tmp = Float64(-4.0 * Float64(x * i)); 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) <= -2.5e+200)
tmp = b * c;
elseif ((b * c) <= 7.5e-235)
tmp = t * (18.0 * (z * (x * y)));
elseif ((b * c) <= 3.2e+30)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 8.5e+144)
tmp = -4.0 * (x * i);
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], -2.5e+200], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.5e-235], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.2e+30], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.5e+144], N[(-4.0 * N[(x * i), $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 -2.5 \cdot 10^{+200}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{-235}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+30}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{+144}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.50000000000000009e200 or 8.4999999999999998e144 < (*.f64 b c) Initial program 79.5%
Simplified84.0%
associate-*r*81.0%
distribute-rgt-out--79.5%
associate-+l-79.5%
associate-*l*77.9%
fmm-def80.9%
associate-*l*80.9%
*-commutative80.9%
Applied egg-rr80.9%
fmm-undef77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in b around inf 63.8%
if -2.50000000000000009e200 < (*.f64 b c) < 7.49999999999999968e-235Initial program 81.6%
Simplified83.2%
associate-*r*83.2%
distribute-rgt-out--82.4%
associate-+l-82.4%
associate-*l*82.3%
fmm-def83.1%
associate-*l*83.1%
*-commutative83.1%
Applied egg-rr83.1%
fmm-undef82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around inf 33.1%
associate-*r*35.5%
Simplified35.5%
if 7.49999999999999968e-235 < (*.f64 b c) < 3.19999999999999973e30Initial program 88.5%
Simplified88.7%
Taylor expanded in j around inf 44.3%
if 3.19999999999999973e30 < (*.f64 b c) < 8.4999999999999998e144Initial program 76.9%
Simplified81.2%
associate-*r*81.6%
distribute-rgt-out--76.9%
associate-+l-76.9%
associate-*l*76.6%
fmm-def76.6%
associate-*l*76.6%
*-commutative76.6%
Applied egg-rr76.6%
fmm-undef76.6%
*-commutative76.6%
Simplified76.6%
sub-neg76.6%
associate-*l*86.4%
*-commutative86.4%
Applied egg-rr86.4%
unsub-neg86.4%
associate-*r*86.4%
Simplified86.4%
Taylor expanded in i around inf 44.1%
*-commutative44.1%
Simplified44.1%
Final simplification45.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
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -2.9e+232)
(* b c)
(if (<= (* b c) 8.2e-308)
t_1
(if (<= (* b c) 1.8e+31)
(* -27.0 (* j k))
(if (<= (* b c) 3.8e+144) t_1 (* 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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -2.9e+232) {
tmp = b * c;
} else if ((b * c) <= 8.2e-308) {
tmp = t_1;
} else if ((b * c) <= 1.8e+31) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.8e+144) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-2.9d+232)) then
tmp = b * c
else if ((b * c) <= 8.2d-308) then
tmp = t_1
else if ((b * c) <= 1.8d+31) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 3.8d+144) then
tmp = t_1
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 t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -2.9e+232) {
tmp = b * c;
} else if ((b * c) <= 8.2e-308) {
tmp = t_1;
} else if ((b * c) <= 1.8e+31) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.8e+144) {
tmp = t_1;
} 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): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -2.9e+232: tmp = b * c elif (b * c) <= 8.2e-308: tmp = t_1 elif (b * c) <= 1.8e+31: tmp = -27.0 * (j * k) elif (b * c) <= 3.8e+144: tmp = t_1 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) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -2.9e+232) tmp = Float64(b * c); elseif (Float64(b * c) <= 8.2e-308) tmp = t_1; elseif (Float64(b * c) <= 1.8e+31) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 3.8e+144) tmp = t_1; 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)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -2.9e+232)
tmp = b * c;
elseif ((b * c) <= 8.2e-308)
tmp = t_1;
elseif ((b * c) <= 1.8e+31)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 3.8e+144)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.9e+232], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-308], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.8e+31], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.8e+144], t$95$1, 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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -2.9 \cdot 10^{+232}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{+31}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.90000000000000023e232 or 3.80000000000000026e144 < (*.f64 b c) Initial program 82.5%
Simplified85.7%
associate-*r*84.1%
distribute-rgt-out--82.5%
associate-+l-82.5%
associate-*l*79.4%
fmm-def82.5%
associate-*l*82.5%
*-commutative82.5%
Applied egg-rr82.5%
fmm-undef79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in b around inf 66.9%
if -2.90000000000000023e232 < (*.f64 b c) < 8.19999999999999965e-308 or 1.79999999999999998e31 < (*.f64 b c) < 3.80000000000000026e144Initial program 79.7%
Simplified82.4%
associate-*r*81.8%
distribute-rgt-out--80.4%
associate-+l-80.4%
associate-*l*80.9%
fmm-def81.6%
associate-*l*81.6%
*-commutative81.6%
Applied egg-rr81.6%
fmm-undef80.9%
*-commutative80.9%
Simplified80.9%
sub-neg80.9%
associate-*l*84.4%
*-commutative84.4%
Applied egg-rr84.4%
unsub-neg84.4%
associate-*r*84.4%
Simplified84.4%
Taylor expanded in i around inf 30.8%
*-commutative30.8%
Simplified30.8%
if 8.19999999999999965e-308 < (*.f64 b c) < 1.79999999999999998e31Initial program 87.4%
Simplified87.5%
Taylor expanded in j around inf 44.8%
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 (* 4.0 (* x i))))
(if (or (<= t -5.8e-49) (not (<= t 3e-40)))
(- (- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z)))))) t_1)
(- (- (* b c) t_1) (* k (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -5.8e-49) || !(t <= 3e-40)) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
} else {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if ((t <= (-5.8d-49)) .or. (.not. (t <= 3d-40))) then
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - t_1
else
tmp = ((b * c) - t_1) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -5.8e-49) || !(t <= 3e-40)) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
} else {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if (t <= -5.8e-49) or not (t <= 3e-40): tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1 else: tmp = ((b * c) - t_1) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if ((t <= -5.8e-49) || !(t <= 3e-40)) tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - t_1); else tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if ((t <= -5.8e-49) || ~((t <= 3e-40)))
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - t_1;
else
tmp = ((b * c) - t_1) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -5.8e-49], N[Not[LessEqual[t, 3e-40]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{-49} \lor \neg \left(t \leq 3 \cdot 10^{-40}\right):\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -5.8e-49 or 3.0000000000000002e-40 < t Initial program 86.5%
Simplified91.0%
Taylor expanded in j around 0 86.0%
if -5.8e-49 < t < 3.0000000000000002e-40Initial program 76.7%
Taylor expanded in t around 0 77.9%
Final simplification82.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -5e+128)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) -5e-198)
(+ t_1 (* -4.0 (* t a)))
(if (<= (* b c) 5e+144)
(+ (* i (* x -4.0)) t_1)
(- (* b c) (* 27.0 (* j k))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+128) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5e-198) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 5e+144) {
tmp = (i * (x * -4.0)) + t_1;
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = j * (k * (-27.0d0))
if ((b * c) <= (-5d+128)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= (-5d-198)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if ((b * c) <= 5d+144) then
tmp = (i * (x * (-4.0d0))) + t_1
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+128) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5e-198) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 5e+144) {
tmp = (i * (x * -4.0)) + t_1;
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -5e+128: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= -5e-198: tmp = t_1 + (-4.0 * (t * a)) elif (b * c) <= 5e+144: tmp = (i * (x * -4.0)) + t_1 else: tmp = (b * c) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -5e+128) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= -5e-198) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (Float64(b * c) <= 5e+144) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -5e+128)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= -5e-198)
tmp = t_1 + (-4.0 * (t * a));
elseif ((b * c) <= 5e+144)
tmp = (i * (x * -4.0)) + t_1;
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+128], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-198], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+144], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+128}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-198}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+144}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5e128Initial program 82.9%
Taylor expanded in t around 0 75.3%
Taylor expanded in j around 0 73.1%
if -5e128 < (*.f64 b c) < -4.9999999999999999e-198Initial program 83.9%
Simplified87.7%
Taylor expanded in a around inf 53.9%
*-commutative53.9%
Simplified53.9%
if -4.9999999999999999e-198 < (*.f64 b c) < 4.9999999999999999e144Initial program 80.8%
Simplified81.7%
Taylor expanded in i around inf 53.6%
metadata-eval53.6%
distribute-lft-neg-in53.6%
*-commutative53.6%
associate-*r*53.6%
distribute-rgt-neg-in53.6%
distribute-rgt-neg-in53.6%
metadata-eval53.6%
*-commutative53.6%
Simplified53.6%
if 4.9999999999999999e144 < (*.f64 b c) Initial program 80.9%
Taylor expanded in t around 0 78.9%
Taylor expanded in x around inf 58.6%
cancel-sign-sub-inv58.6%
associate-/l*63.3%
metadata-eval63.3%
Simplified63.3%
Taylor expanded in x around 0 74.5%
Final simplification60.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= i -2.9e+66)
(- (* b c) (* 4.0 (* x i)))
(if (<= i -2.8e-177)
t_1
(if (<= i 1.86e-230)
(+ (* b c) (* j (* k -27.0)))
(if (<= i 2.65e+57) t_1 (* x (+ (* b (/ c x)) (* 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) + (-4.0 * (t * a));
double tmp;
if (i <= -2.9e+66) {
tmp = (b * c) - (4.0 * (x * i));
} else if (i <= -2.8e-177) {
tmp = t_1;
} else if (i <= 1.86e-230) {
tmp = (b * c) + (j * (k * -27.0));
} else if (i <= 2.65e+57) {
tmp = t_1;
} else {
tmp = x * ((b * (c / x)) + (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) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (i <= (-2.9d+66)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (i <= (-2.8d-177)) then
tmp = t_1
else if (i <= 1.86d-230) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (i <= 2.65d+57) then
tmp = t_1
else
tmp = x * ((b * (c / x)) + (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 t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (i <= -2.9e+66) {
tmp = (b * c) - (4.0 * (x * i));
} else if (i <= -2.8e-177) {
tmp = t_1;
} else if (i <= 1.86e-230) {
tmp = (b * c) + (j * (k * -27.0));
} else if (i <= 2.65e+57) {
tmp = t_1;
} else {
tmp = x * ((b * (c / x)) + (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) + (-4.0 * (t * a)) tmp = 0 if i <= -2.9e+66: tmp = (b * c) - (4.0 * (x * i)) elif i <= -2.8e-177: tmp = t_1 elif i <= 1.86e-230: tmp = (b * c) + (j * (k * -27.0)) elif i <= 2.65e+57: tmp = t_1 else: tmp = x * ((b * (c / x)) + (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(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (i <= -2.9e+66) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (i <= -2.8e-177) tmp = t_1; elseif (i <= 1.86e-230) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (i <= 2.65e+57) tmp = t_1; else tmp = Float64(x * Float64(Float64(b * Float64(c / x)) + 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) + (-4.0 * (t * a));
tmp = 0.0;
if (i <= -2.9e+66)
tmp = (b * c) - (4.0 * (x * i));
elseif (i <= -2.8e-177)
tmp = t_1;
elseif (i <= 1.86e-230)
tmp = (b * c) + (j * (k * -27.0));
elseif (i <= 2.65e+57)
tmp = t_1;
else
tmp = x * ((b * (c / x)) + (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[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.9e+66], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -2.8e-177], t$95$1, If[LessEqual[i, 1.86e-230], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.65e+57], t$95$1, N[(x * N[(N[(b * N[(c / x), $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 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;i \leq -2.9 \cdot 10^{+66}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;i \leq -2.8 \cdot 10^{-177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.86 \cdot 10^{-230}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;i \leq 2.65 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \frac{c}{x} + i \cdot -4\right)\\
\end{array}
\end{array}
if i < -2.89999999999999986e66Initial program 80.4%
Taylor expanded in t around 0 75.8%
Taylor expanded in j around 0 65.1%
if -2.89999999999999986e66 < i < -2.79999999999999987e-177 or 1.86000000000000004e-230 < i < 2.64999999999999993e57Initial program 83.3%
Simplified87.0%
Taylor expanded in j around 0 76.8%
Taylor expanded in x around 0 50.6%
if -2.79999999999999987e-177 < i < 1.86000000000000004e-230Initial program 92.9%
Simplified90.7%
Taylor expanded in b around inf 63.4%
if 2.64999999999999993e57 < i Initial program 71.2%
Taylor expanded in t around 0 75.2%
Taylor expanded in j around 0 62.0%
Taylor expanded in x around inf 58.3%
cancel-sign-sub-inv67.7%
associate-/l*69.7%
metadata-eval69.7%
Simplified60.2%
Final simplification57.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
(let* ((t_1 (* k (* j 27.0)))
(t_2 (* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))))
(if (<= t -9.6e+190)
t_2
(if (<= t -47.0)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 2.6e+19) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))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 = k * (j * 27.0);
double t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -9.6e+190) {
tmp = t_2;
} else if (t <= -47.0) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.6e+19) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
t_2 = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
if (t <= (-9.6d+190)) then
tmp = t_2
else if (t <= (-47.0d0)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 2.6d+19) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -9.6e+190) {
tmp = t_2;
} else if (t <= -47.0) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.6e+19) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0)) tmp = 0 if t <= -9.6e+190: tmp = t_2 elif t <= -47.0: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 2.6e+19: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -9.6e+190) tmp = t_2; elseif (t <= -47.0) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 2.6e+19) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
tmp = 0.0;
if (t <= -9.6e+190)
tmp = t_2;
elseif (t <= -47.0)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (t <= 2.6e+19)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e+190], t$95$2, If[LessEqual[t, -47.0], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e+19], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
t_2 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{+190}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -47:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+19}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.5999999999999994e190 or 2.6e19 < t Initial program 83.7%
Simplified88.8%
associate-*r*89.9%
distribute-rgt-out--84.9%
associate-+l-84.9%
associate-*l*80.0%
fmm-def81.3%
associate-*l*81.3%
*-commutative81.3%
Applied egg-rr81.3%
fmm-undef80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in t around inf 76.9%
cancel-sign-sub-inv76.9%
associate-*r*78.2%
metadata-eval78.2%
Simplified78.2%
if -9.5999999999999994e190 < t < -47Initial program 92.0%
Taylor expanded in x around 0 71.0%
if -47 < t < 2.6e19Initial program 78.1%
Taylor expanded in t around 0 75.6%
Final simplification75.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= i -5.2e+67)
t_2
(if (<= i -6e-179)
t_1
(if (<= i 8.2e-231)
(+ (* b c) (* j (* k -27.0)))
(if (<= i 4.7e+58) t_1 t_2))))))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) + (-4.0 * (t * a));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (i <= -5.2e+67) {
tmp = t_2;
} else if (i <= -6e-179) {
tmp = t_1;
} else if (i <= 8.2e-231) {
tmp = (b * c) + (j * (k * -27.0));
} else if (i <= 4.7e+58) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (b * c) - (4.0d0 * (x * i))
if (i <= (-5.2d+67)) then
tmp = t_2
else if (i <= (-6d-179)) then
tmp = t_1
else if (i <= 8.2d-231) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (i <= 4.7d+58) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (i <= -5.2e+67) {
tmp = t_2;
} else if (i <= -6e-179) {
tmp = t_1;
} else if (i <= 8.2e-231) {
tmp = (b * c) + (j * (k * -27.0));
} else if (i <= 4.7e+58) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if i <= -5.2e+67: tmp = t_2 elif i <= -6e-179: tmp = t_1 elif i <= 8.2e-231: tmp = (b * c) + (j * (k * -27.0)) elif i <= 4.7e+58: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (i <= -5.2e+67) tmp = t_2; elseif (i <= -6e-179) tmp = t_1; elseif (i <= 8.2e-231) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (i <= 4.7e+58) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (i <= -5.2e+67)
tmp = t_2;
elseif (i <= -6e-179)
tmp = t_1;
elseif (i <= 8.2e-231)
tmp = (b * c) + (j * (k * -27.0));
elseif (i <= 4.7e+58)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5.2e+67], t$95$2, If[LessEqual[i, -6e-179], t$95$1, If[LessEqual[i, 8.2e-231], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.7e+58], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -5.2 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq -6 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 8.2 \cdot 10^{-231}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;i \leq 4.7 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -5.2000000000000001e67 or 4.69999999999999972e58 < i Initial program 76.0%
Taylor expanded in t around 0 75.5%
Taylor expanded in j around 0 63.6%
if -5.2000000000000001e67 < i < -6.00000000000000012e-179 or 8.2000000000000003e-231 < i < 4.69999999999999972e58Initial program 83.3%
Simplified87.0%
Taylor expanded in j around 0 76.8%
Taylor expanded in x around 0 50.6%
if -6.00000000000000012e-179 < i < 8.2000000000000003e-231Initial program 92.9%
Simplified90.7%
Taylor expanded in b around inf 63.4%
Final simplification58.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
(let* ((t_1 (* j (* k -27.0))))
(if (<= t -6.3e-49)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 3.6e-196)
(+ (* i (* x -4.0)) t_1)
(if (<= t 3.8e+18)
(+ (* b c) t_1)
(* t (+ (* 18.0 (* z (* x y))) (* 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 t_1 = j * (k * -27.0);
double tmp;
if (t <= -6.3e-49) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 3.6e-196) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 3.8e+18) {
tmp = (b * c) + t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) + (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) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (t <= (-6.3d-49)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 3.6d-196) then
tmp = (i * (x * (-4.0d0))) + t_1
else if (t <= 3.8d+18) then
tmp = (b * c) + t_1
else
tmp = t * ((18.0d0 * (z * (x * y))) + (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 t_1 = j * (k * -27.0);
double tmp;
if (t <= -6.3e-49) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 3.6e-196) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 3.8e+18) {
tmp = (b * c) + t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) + (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): t_1 = j * (k * -27.0) tmp = 0 if t <= -6.3e-49: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 3.6e-196: tmp = (i * (x * -4.0)) + t_1 elif t <= 3.8e+18: tmp = (b * c) + t_1 else: tmp = t * ((18.0 * (z * (x * y))) + (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) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -6.3e-49) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 3.6e-196) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); elseif (t <= 3.8e+18) tmp = Float64(Float64(b * c) + t_1); else tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + 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)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (t <= -6.3e-49)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 3.6e-196)
tmp = (i * (x * -4.0)) + t_1;
elseif (t <= 3.8e+18)
tmp = (b * c) + t_1;
else
tmp = t * ((18.0 * (z * (x * y))) + (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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.3e-49], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-196], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 3.8e+18], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -6.3 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-196}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+18}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -6.2999999999999997e-49Initial program 87.9%
Simplified94.5%
associate-*r*93.3%
distribute-rgt-out--87.9%
associate-+l-87.9%
associate-*l*82.5%
fmm-def82.5%
associate-*l*82.5%
*-commutative82.5%
Applied egg-rr82.5%
fmm-undef82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in t around inf 68.8%
if -6.2999999999999997e-49 < t < 3.6000000000000001e-196Initial program 72.6%
Simplified76.3%
Taylor expanded in i around inf 65.8%
metadata-eval65.8%
distribute-lft-neg-in65.8%
*-commutative65.8%
associate-*r*65.8%
distribute-rgt-neg-in65.8%
distribute-rgt-neg-in65.8%
metadata-eval65.8%
*-commutative65.8%
Simplified65.8%
if 3.6000000000000001e-196 < t < 3.8e18Initial program 85.7%
Simplified83.8%
Taylor expanded in b around inf 59.9%
if 3.8e18 < t Initial program 84.2%
Simplified84.4%
associate-*r*86.2%
distribute-rgt-out--86.2%
associate-+l-86.2%
associate-*l*78.5%
fmm-def80.5%
associate-*l*80.5%
*-commutative80.5%
Applied egg-rr80.5%
fmm-undef78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in t around inf 71.4%
cancel-sign-sub-inv71.4%
associate-*r*73.3%
metadata-eval73.3%
Simplified73.3%
Final simplification67.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
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))))
(if (<= t -7.2e-49)
t_2
(if (<= t 2.9e-196)
(+ (* i (* x -4.0)) t_1)
(if (<= t 1.06e+21) (+ (* b c) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -7.2e-49) {
tmp = t_2;
} else if (t <= 2.9e-196) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 1.06e+21) {
tmp = (b * c) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
if (t <= (-7.2d-49)) then
tmp = t_2
else if (t <= 2.9d-196) then
tmp = (i * (x * (-4.0d0))) + t_1
else if (t <= 1.06d+21) then
tmp = (b * c) + t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -7.2e-49) {
tmp = t_2;
} else if (t <= 2.9e-196) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 1.06e+21) {
tmp = (b * c) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0)) tmp = 0 if t <= -7.2e-49: tmp = t_2 elif t <= 2.9e-196: tmp = (i * (x * -4.0)) + t_1 elif t <= 1.06e+21: tmp = (b * c) + t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -7.2e-49) tmp = t_2; elseif (t <= 2.9e-196) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); elseif (t <= 1.06e+21) tmp = Float64(Float64(b * c) + t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
tmp = 0.0;
if (t <= -7.2e-49)
tmp = t_2;
elseif (t <= 2.9e-196)
tmp = (i * (x * -4.0)) + t_1;
elseif (t <= 1.06e+21)
tmp = (b * c) + t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-49], t$95$2, If[LessEqual[t, 2.9e-196], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.06e+21], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-196}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{+21}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.19999999999999939e-49 or 1.06e21 < t Initial program 86.4%
Simplified90.4%
associate-*r*90.4%
distribute-rgt-out--87.2%
associate-+l-87.2%
associate-*l*80.9%
fmm-def81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fmm-undef80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in t around inf 69.9%
cancel-sign-sub-inv69.9%
associate-*r*69.2%
metadata-eval69.2%
Simplified69.2%
if -7.19999999999999939e-49 < t < 2.89999999999999987e-196Initial program 72.6%
Simplified76.3%
Taylor expanded in i around inf 65.8%
metadata-eval65.8%
distribute-lft-neg-in65.8%
*-commutative65.8%
associate-*r*65.8%
distribute-rgt-neg-in65.8%
distribute-rgt-neg-in65.8%
metadata-eval65.8%
*-commutative65.8%
Simplified65.8%
if 2.89999999999999987e-196 < t < 1.06e21Initial program 85.7%
Simplified83.8%
Taylor expanded in b around inf 59.9%
Final simplification66.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 (or (<= t -8.6e-49) (not (<= t 4.2e-41))) (- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z)))))) (- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -8.6e-49) || !(t <= 4.2e-41)) {
tmp = (b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-8.6d-49)) .or. (.not. (t <= 4.2d-41))) then
tmp = (b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -8.6e-49) || !(t <= 4.2e-41)) {
tmp = (b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -8.6e-49) or not (t <= 4.2e-41): tmp = (b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z))))) else: tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -8.6e-49) || !(t <= 4.2e-41)) tmp = Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -8.6e-49) || ~((t <= 4.2e-41)))
tmp = (b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))));
else
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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, -8.6e-49], N[Not[LessEqual[t, 4.2e-41]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -8.6 \cdot 10^{-49} \lor \neg \left(t \leq 4.2 \cdot 10^{-41}\right):\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -8.60000000000000033e-49 or 4.20000000000000025e-41 < t Initial program 86.5%
Simplified91.0%
Taylor expanded in j around 0 86.0%
Taylor expanded in i around 0 81.1%
if -8.60000000000000033e-49 < t < 4.20000000000000025e-41Initial program 76.7%
Taylor expanded in t around 0 77.9%
Final simplification79.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 (or (<= x -2.05e+114) (not (<= x 15600000.0))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2.05e+114) || !(x <= 15600000.0)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2.05d+114)) .or. (.not. (x <= 15600000.0d0))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2.05e+114) || !(x <= 15600000.0)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -2.05e+114) or not (x <= 15600000.0): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2.05e+114) || !(x <= 15600000.0)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2.05e+114) || ~((x <= 15600000.0)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[x, -2.05e+114], N[Not[LessEqual[x, 15600000.0]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -2.05 \cdot 10^{+114} \lor \neg \left(x \leq 15600000\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if x < -2.05e114 or 1.56e7 < x Initial program 70.7%
Simplified79.3%
Taylor expanded in x around inf 71.2%
if -2.05e114 < x < 1.56e7Initial program 90.7%
Taylor expanded in x around 0 72.0%
Final simplification71.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -5e+128) (not (<= (* b c) 1e+30))) (- (* b c) (* 4.0 (* x i))) (+ (* j (* k -27.0)) (* -4.0 (* t a)))))
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) <= -5e+128) || !((b * c) <= 1e+30)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-5d+128)) .or. (.not. ((b * c) <= 1d+30))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -5e+128) || !((b * c) <= 1e+30)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) <= -5e+128) or not ((b * c) <= 1e+30): tmp = (b * c) - (4.0 * (x * i)) else: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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) <= -5e+128) || !(Float64(b * c) <= 1e+30)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) <= -5e+128) || ~(((b * c) <= 1e+30)))
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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], -5e+128], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+30]], $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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -5 \cdot 10^{+128} \lor \neg \left(b \cdot c \leq 10^{+30}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5e128 or 1e30 < (*.f64 b c) Initial program 80.9%
Taylor expanded in t around 0 73.0%
Taylor expanded in j around 0 66.5%
if -5e128 < (*.f64 b c) < 1e30Initial program 82.5%
Simplified83.9%
Taylor expanded in a around inf 51.3%
*-commutative51.3%
Simplified51.3%
Final simplification57.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= j -2.35e+140)
t_1
(if (<= j 2.9e-302)
(+ (* b c) (* -4.0 (* t a)))
(if (<= j 1.02e-112) (* t (* 18.0 (* z (* x y)))) 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 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2.35e+140) {
tmp = t_1;
} else if (j <= 2.9e-302) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 1.02e-112) {
tmp = t * (18.0 * (z * (x * y)));
} 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 = (b * c) + (j * (k * (-27.0d0)))
if (j <= (-2.35d+140)) then
tmp = t_1
else if (j <= 2.9d-302) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (j <= 1.02d-112) then
tmp = t * (18.0d0 * (z * (x * y)))
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 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2.35e+140) {
tmp = t_1;
} else if (j <= 2.9e-302) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 1.02e-112) {
tmp = t * (18.0 * (z * (x * y)));
} 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 = (b * c) + (j * (k * -27.0)) tmp = 0 if j <= -2.35e+140: tmp = t_1 elif j <= 2.9e-302: tmp = (b * c) + (-4.0 * (t * a)) elif j <= 1.02e-112: tmp = t * (18.0 * (z * (x * y))) 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(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (j <= -2.35e+140) tmp = t_1; elseif (j <= 2.9e-302) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (j <= 1.02e-112) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); 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 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (j <= -2.35e+140)
tmp = t_1;
elseif (j <= 2.9e-302)
tmp = (b * c) + (-4.0 * (t * a));
elseif (j <= 1.02e-112)
tmp = t * (18.0 * (z * (x * y)));
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[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.35e+140], t$95$1, If[LessEqual[j, 2.9e-302], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.02e-112], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -2.35 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.9 \cdot 10^{-302}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 1.02 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.35000000000000015e140 or 1.01999999999999996e-112 < j Initial program 75.9%
Simplified82.9%
Taylor expanded in b around inf 50.9%
if -2.35000000000000015e140 < j < 2.89999999999999994e-302Initial program 85.6%
Simplified84.6%
Taylor expanded in j around 0 77.5%
Taylor expanded in x around 0 48.1%
if 2.89999999999999994e-302 < j < 1.01999999999999996e-112Initial program 91.4%
Simplified89.5%
associate-*r*93.6%
distribute-rgt-out--91.4%
associate-+l-91.4%
associate-*l*91.5%
fmm-def91.5%
associate-*l*91.5%
*-commutative91.5%
Applied egg-rr91.5%
fmm-undef91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in t around inf 62.0%
Taylor expanded in x around inf 42.7%
associate-*r*42.8%
Simplified42.8%
Final simplification48.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 (or (<= y -3.6e+79) (not (<= y 8e-50))) (* t (* 18.0 (* z (* x y)))) (+ (* b c) (* -4.0 (* t a)))))
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 ((y <= -3.6e+79) || !(y <= 8e-50)) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((y <= (-3.6d+79)) .or. (.not. (y <= 8d-50))) then
tmp = t * (18.0d0 * (z * (x * y)))
else
tmp = (b * c) + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 ((y <= -3.6e+79) || !(y <= 8e-50)) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 (y <= -3.6e+79) or not (y <= 8e-50): tmp = t * (18.0 * (z * (x * y))) else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 ((y <= -3.6e+79) || !(y <= 8e-50)) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 ((y <= -3.6e+79) || ~((y <= 8e-50)))
tmp = t * (18.0 * (z * (x * y)));
else
tmp = (b * c) + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[y, -3.6e+79], N[Not[LessEqual[y, 8e-50]], $MachinePrecision]], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;y \leq -3.6 \cdot 10^{+79} \lor \neg \left(y \leq 8 \cdot 10^{-50}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if y < -3.5999999999999999e79 or 8.00000000000000006e-50 < y Initial program 69.7%
Simplified74.6%
associate-*r*73.8%
distribute-rgt-out--70.6%
associate-+l-70.6%
associate-*l*75.2%
fmm-def76.8%
associate-*l*76.8%
*-commutative76.8%
Applied egg-rr76.8%
fmm-undef75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in t around inf 52.6%
Taylor expanded in x around inf 44.2%
associate-*r*46.6%
Simplified46.6%
if -3.5999999999999999e79 < y < 8.00000000000000006e-50Initial program 93.2%
Simplified93.2%
Taylor expanded in j around 0 71.7%
Taylor expanded in x around 0 47.0%
Final simplification46.8%
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) -1.9e+124) (not (<= (* b c) 2.8e+160))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.9e+124) || !((b * c) <= 2.8e+160)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.9d+124)) .or. (.not. ((b * c) <= 2.8d+160))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.9e+124) || !((b * c) <= 2.8e+160)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.9e+124) or not ((b * c) <= 2.8e+160): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.9e+124) || !(Float64(b * c) <= 2.8e+160)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.9e+124) || ~(((b * c) <= 2.8e+160)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.9e+124], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.8e+160]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+124} \lor \neg \left(b \cdot c \leq 2.8 \cdot 10^{+160}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.8999999999999999e124 or 2.8e160 < (*.f64 b c) Initial program 80.7%
Simplified85.8%
associate-*r*82.0%
distribute-rgt-out--80.7%
associate-+l-80.7%
associate-*l*77.9%
fmm-def80.5%
associate-*l*80.5%
*-commutative80.5%
Applied egg-rr80.5%
fmm-undef77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in b around inf 59.6%
if -1.8999999999999999e124 < (*.f64 b c) < 2.8e160Initial program 82.3%
Simplified84.1%
Taylor expanded in j around inf 28.0%
Final simplification37.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 (* 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 81.8%
Simplified84.2%
associate-*r*83.8%
distribute-rgt-out--82.2%
associate-+l-82.2%
associate-*l*82.1%
fmm-def83.3%
associate-*l*83.3%
*-commutative83.3%
Applied egg-rr83.3%
fmm-undef82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in b around inf 21.8%
(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 2024157
(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)))