
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) (* a (* t 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (* y (+ (* -4.0 (/ i y)) (* 18.0 (* z t)))))))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) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * (y * ((-4.0 * (i / y)) + (18.0 * (z * t))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * (y * ((-4.0 * (i / y)) + (18.0 * (z * t))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * (y * ((-4.0 * (i / y)) + (18.0 * (z * t)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(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)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(Float64(Float64(x * 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)))); else tmp = Float64(x * Float64(y * Float64(Float64(-4.0 * Float64(i / y)) + Float64(18.0 * Float64(z * t))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = x * (y * ((-4.0 * (i / y)) + (18.0 * (z * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(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] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $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], N[(x * N[(y * N[(N[(-4.0 * N[(i / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(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\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\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)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-4 \cdot \frac{i}{y} + 18 \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 93.2%
Simplified94.9%
associate-*r*93.7%
distribute-rgt-out--93.7%
associate-+l-93.7%
associate-*l*94.2%
fmm-def94.2%
associate-*l*94.3%
*-commutative94.3%
Applied egg-rr94.3%
fmm-undef94.3%
*-commutative94.3%
associate-*r*94.3%
*-commutative94.3%
*-commutative94.3%
*-commutative94.3%
associate-*l*93.8%
*-commutative93.8%
*-commutative93.8%
Simplified93.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified29.0%
Taylor expanded in x around inf 71.1%
Taylor expanded in y around inf 77.4%
Final simplification91.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (- t_1 (* 27.0 (* j k)))))
(if (<= (* b c) -1.42e+153)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) -5.2e-130)
t_2
(if (<= (* b c) 6e-208)
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(if (<= (* b c) 1.05e+106) t_2 (+ (* b c) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 - (27.0 * (j * k));
double tmp;
if ((b * c) <= -1.42e+153) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5.2e-130) {
tmp = t_2;
} else if ((b * c) <= 6e-208) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if ((b * c) <= 1.05e+106) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = t_1 - (27.0d0 * (j * k))
if ((b * c) <= (-1.42d+153)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= (-5.2d-130)) then
tmp = t_2
else if ((b * c) <= 6d-208) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
else if ((b * c) <= 1.05d+106) then
tmp = t_2
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 - (27.0 * (j * k));
double tmp;
if ((b * c) <= -1.42e+153) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5.2e-130) {
tmp = t_2;
} else if ((b * c) <= 6e-208) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if ((b * c) <= 1.05e+106) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = t_1 - (27.0 * (j * k)) tmp = 0 if (b * c) <= -1.42e+153: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= -5.2e-130: tmp = t_2 elif (b * c) <= 6e-208: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) elif (b * c) <= 1.05e+106: tmp = t_2 else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(t_1 - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (Float64(b * c) <= -1.42e+153) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= -5.2e-130) tmp = t_2; elseif (Float64(b * c) <= 6e-208) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 1.05e+106) tmp = t_2; else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = t_1 - (27.0 * (j * k));
tmp = 0.0;
if ((b * c) <= -1.42e+153)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= -5.2e-130)
tmp = t_2;
elseif ((b * c) <= 6e-208)
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
elseif ((b * c) <= 1.05e+106)
tmp = t_2;
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.42e+153], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.2e-130], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 6e-208], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.05e+106], t$95$2, N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -1.42 \cdot 10^{+153}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq -5.2 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-208}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.42000000000000003e153Initial program 69.8%
Simplified72.6%
Taylor expanded in j around 0 73.8%
Taylor expanded in t around 0 61.1%
if -1.42000000000000003e153 < (*.f64 b c) < -5.2000000000000001e-130 or 5.99999999999999972e-208 < (*.f64 b c) < 1.05000000000000002e106Initial program 86.8%
Simplified91.6%
Taylor expanded in x around 0 66.3%
Taylor expanded in b around 0 60.9%
if -5.2000000000000001e-130 < (*.f64 b c) < 5.99999999999999972e-208Initial program 81.5%
Simplified90.1%
Taylor expanded in i around inf 59.4%
if 1.05000000000000002e106 < (*.f64 b c) Initial program 81.3%
Simplified85.1%
Taylor expanded in x around 0 73.4%
Taylor expanded in k around inf 57.0%
Taylor expanded in k around 0 65.0%
Final simplification61.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* -4.0 (* t a))) (t_3 (+ t_1 t_2)))
(if (<= (* b c) -2.3e+152)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) -5.9e-130)
t_3
(if (<= (* b c) 2.5e-208)
(+ t_1 (* -4.0 (* x i)))
(if (<= (* b c) 1.05e+111) t_3 (+ (* b c) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (t * a);
double t_3 = t_1 + t_2;
double tmp;
if ((b * c) <= -2.3e+152) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5.9e-130) {
tmp = t_3;
} else if ((b * c) <= 2.5e-208) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 1.05e+111) {
tmp = t_3;
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * (t * a)
t_3 = t_1 + t_2
if ((b * c) <= (-2.3d+152)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= (-5.9d-130)) then
tmp = t_3
else if ((b * c) <= 2.5d-208) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if ((b * c) <= 1.05d+111) then
tmp = t_3
else
tmp = (b * c) + t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (t * a);
double t_3 = t_1 + t_2;
double tmp;
if ((b * c) <= -2.3e+152) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -5.9e-130) {
tmp = t_3;
} else if ((b * c) <= 2.5e-208) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 1.05e+111) {
tmp = t_3;
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * (t * a) t_3 = t_1 + t_2 tmp = 0 if (b * c) <= -2.3e+152: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= -5.9e-130: tmp = t_3 elif (b * c) <= 2.5e-208: tmp = t_1 + (-4.0 * (x * i)) elif (b * c) <= 1.05e+111: tmp = t_3 else: tmp = (b * c) + t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(t * a)) t_3 = Float64(t_1 + t_2) tmp = 0.0 if (Float64(b * c) <= -2.3e+152) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= -5.9e-130) tmp = t_3; elseif (Float64(b * c) <= 2.5e-208) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 1.05e+111) tmp = t_3; else tmp = Float64(Float64(b * c) + t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * (t * a);
t_3 = t_1 + t_2;
tmp = 0.0;
if ((b * c) <= -2.3e+152)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= -5.9e-130)
tmp = t_3;
elseif ((b * c) <= 2.5e-208)
tmp = t_1 + (-4.0 * (x * i));
elseif ((b * c) <= 1.05e+111)
tmp = t_3;
else
tmp = (b * c) + t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + t$95$2), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.3e+152], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.9e-130], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2.5e-208], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.05e+111], t$95$3, N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
t_3 := t\_1 + t\_2\\
\mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+152}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-130}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 2.5 \cdot 10^{-208}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{+111}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.29999999999999985e152Initial program 69.8%
Simplified72.6%
Taylor expanded in j around 0 73.8%
Taylor expanded in t around 0 61.1%
if -2.29999999999999985e152 < (*.f64 b c) < -5.9000000000000003e-130 or 2.49999999999999981e-208 < (*.f64 b c) < 1.04999999999999997e111Initial program 86.8%
Simplified91.6%
Taylor expanded in a around inf 60.8%
*-commutative60.8%
Simplified60.8%
if -5.9000000000000003e-130 < (*.f64 b c) < 2.49999999999999981e-208Initial program 81.5%
Simplified90.1%
Taylor expanded in i around inf 59.4%
if 1.04999999999999997e111 < (*.f64 b c) Initial program 81.3%
Simplified85.1%
Taylor expanded in x around 0 73.4%
Taylor expanded in k around inf 57.0%
Taylor expanded in k around 0 65.0%
Final simplification61.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* (* j 27.0) k) 1e+287)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* -27.0 (* j k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= 1e+287) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((j * 27.0d0) * k) <= 1d+287) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= 1e+287) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((j * 27.0) * k) <= 1e+287: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(j * 27.0) * k) <= 1e+287) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((j * 27.0) * k) <= 1e+287)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision], 1e+287], 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] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq 10^{+287}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e287Initial program 83.0%
Simplified88.6%
if 1.0000000000000001e287 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 72.4%
Simplified72.0%
Taylor expanded in j around inf 88.0%
Final simplification88.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= (* b c) -3.1e+103)
(* b c)
(if (<= (* b c) -5e-100)
t_1
(if (<= (* b c) 2.6e-302)
(* -4.0 (* x i))
(if (<= (* b c) 5.5e+111) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.1e+103) {
tmp = b * c;
} else if ((b * c) <= -5e-100) {
tmp = t_1;
} else if ((b * c) <= 2.6e-302) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 5.5e+111) {
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.
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 = (-27.0d0) * (j * k)
if ((b * c) <= (-3.1d+103)) then
tmp = b * c
else if ((b * c) <= (-5d-100)) then
tmp = t_1
else if ((b * c) <= 2.6d-302) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 5.5d+111) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.1e+103) {
tmp = b * c;
} else if ((b * c) <= -5e-100) {
tmp = t_1;
} else if ((b * c) <= 2.6e-302) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 5.5e+111) {
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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if (b * c) <= -3.1e+103: tmp = b * c elif (b * c) <= -5e-100: tmp = t_1 elif (b * c) <= 2.6e-302: tmp = -4.0 * (x * i) elif (b * c) <= 5.5e+111: 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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (Float64(b * c) <= -3.1e+103) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e-100) tmp = t_1; elseif (Float64(b * c) <= 2.6e-302) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 5.5e+111) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if ((b * c) <= -3.1e+103)
tmp = b * c;
elseif ((b * c) <= -5e-100)
tmp = t_1;
elseif ((b * c) <= 2.6e-302)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 5.5e+111)
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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+103], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-100], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.6e-302], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.5e+111], 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])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+103}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{-302}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.1000000000000002e103 or 5.4999999999999998e111 < (*.f64 b c) Initial program 78.1%
distribute-rgt-out--80.4%
associate-*r*80.3%
*-commutative80.3%
associate-*l*80.2%
associate-*r*80.2%
Applied egg-rr80.2%
Taylor expanded in b around inf 47.3%
if -3.1000000000000002e103 < (*.f64 b c) < -5.0000000000000001e-100 or 2.60000000000000011e-302 < (*.f64 b c) < 5.4999999999999998e111Initial program 81.8%
Simplified91.5%
Taylor expanded in j around inf 39.8%
if -5.0000000000000001e-100 < (*.f64 b c) < 2.60000000000000011e-302Initial program 87.7%
distribute-rgt-out--89.3%
associate-*r*89.2%
*-commutative89.2%
associate-*l*89.2%
associate-*r*89.2%
Applied egg-rr89.2%
Taylor expanded in i around inf 38.4%
*-commutative38.4%
Simplified38.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
(if (<= t -1.1e+114)
(+ (* t (+ (* a -4.0) t_1)) (* j (* k -27.0)))
(if (<= t 4.9e+30)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) t_2))
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -1.1e+114) {
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
} else if (t <= 4.9e+30) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_2);
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
if (t <= (-1.1d+114)) then
tmp = (t * ((a * (-4.0d0)) + t_1)) + (j * (k * (-27.0d0)))
else if (t <= 4.9d+30) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + t_2)
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -1.1e+114) {
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
} else if (t <= 4.9e+30) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_2);
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) tmp = 0 if t <= -1.1e+114: tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0)) elif t <= 4.9e+30: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_2) else: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -1.1e+114) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + t_1)) + Float64(j * Float64(k * -27.0))); elseif (t <= 4.9e+30) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + t_2)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -1.1e+114)
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
elseif (t <= 4.9e+30)
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_2);
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+114], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+30], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+114}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + t\_1\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+30}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - t\_2\\
\end{array}
\end{array}
if t < -1.1e114Initial program 81.6%
Simplified95.9%
Taylor expanded in t around inf 90.6%
if -1.1e114 < t < 4.89999999999999984e30Initial program 84.2%
Simplified86.6%
Taylor expanded in y around 0 83.9%
if 4.89999999999999984e30 < t Initial program 74.9%
Simplified81.2%
Taylor expanded in j around 0 83.5%
Final simplification85.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -2.2e+112) (not (<= t 2.1e+162))) (+ (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))) (* j (* k -27.0))) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.2e+112) || !(t <= 2.1e+162)) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-2.2d+112)) .or. (.not. (t <= 2.1d+162))) then
tmp = (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z))))) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.2e+112) || !(t <= 2.1e+162)) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -2.2e+112) or not (t <= 2.1e+162): tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.2e+112) || !(t <= 2.1e+162)) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z))))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -2.2e+112) || ~((t <= 2.1e+162)))
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2.2e+112], N[Not[LessEqual[t, 2.1e+162]], $MachinePrecision]], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+112} \lor \neg \left(t \leq 2.1 \cdot 10^{+162}\right):\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -2.1999999999999999e112 or 2.1e162 < t Initial program 75.9%
Simplified90.6%
Taylor expanded in t around inf 88.6%
if -2.1999999999999999e112 < t < 2.1e162Initial program 84.4%
Simplified86.5%
Taylor expanded in y around 0 83.1%
Final simplification84.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_2 (* j (* k -27.0))))
(if (<= x -2.5e-102)
t_1
(if (<= x 4.3e-95)
(+ t_2 (* -4.0 (* t a)))
(if (<= x 2.4) (+ (* b c) t_2) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -2.5e-102) {
tmp = t_1;
} else if (x <= 4.3e-95) {
tmp = t_2 + (-4.0 * (t * a));
} else if (x <= 2.4) {
tmp = (b * c) + t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
t_2 = j * (k * (-27.0d0))
if (x <= (-2.5d-102)) then
tmp = t_1
else if (x <= 4.3d-95) then
tmp = t_2 + ((-4.0d0) * (t * a))
else if (x <= 2.4d0) then
tmp = (b * c) + t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -2.5e-102) {
tmp = t_1;
} else if (x <= 4.3e-95) {
tmp = t_2 + (-4.0 * (t * a));
} else if (x <= 2.4) {
tmp = (b * c) + t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_2 = j * (k * -27.0) tmp = 0 if x <= -2.5e-102: tmp = t_1 elif x <= 4.3e-95: tmp = t_2 + (-4.0 * (t * a)) elif x <= 2.4: tmp = (b * c) + t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -2.5e-102) tmp = t_1; elseif (x <= 4.3e-95) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); elseif (x <= 2.4) tmp = Float64(Float64(b * c) + t_2); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (x <= -2.5e-102)
tmp = t_1;
elseif (x <= 4.3e-95)
tmp = t_2 + (-4.0 * (t * a));
elseif (x <= 2.4)
tmp = (b * c) + t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e-102], t$95$1, If[LessEqual[x, 4.3e-95], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-95}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 2.4:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.50000000000000013e-102 or 2.39999999999999991 < x Initial program 76.1%
Simplified84.6%
Taylor expanded in x around inf 64.5%
if -2.50000000000000013e-102 < x < 4.29999999999999997e-95Initial program 94.1%
Simplified92.7%
Taylor expanded in a around inf 70.9%
*-commutative70.9%
Simplified70.9%
if 4.29999999999999997e-95 < x < 2.39999999999999991Initial program 76.4%
Simplified86.1%
Taylor expanded in b around inf 67.8%
Final simplification66.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -4.5e+75)
(* j (* k -27.0))
(if (<= j -1.9e-107)
(* x (* 18.0 (* z (* y t))))
(if (<= j -5.8e-206)
(* t (* a -4.0))
(if (<= j 4.6e-37) (* -4.0 (* x i)) (* -27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -4.5e+75) {
tmp = j * (k * -27.0);
} else if (j <= -1.9e-107) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= -5.8e-206) {
tmp = t * (a * -4.0);
} else if (j <= 4.6e-37) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-4.5d+75)) then
tmp = j * (k * (-27.0d0))
else if (j <= (-1.9d-107)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (j <= (-5.8d-206)) then
tmp = t * (a * (-4.0d0))
else if (j <= 4.6d-37) then
tmp = (-4.0d0) * (x * i)
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -4.5e+75) {
tmp = j * (k * -27.0);
} else if (j <= -1.9e-107) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= -5.8e-206) {
tmp = t * (a * -4.0);
} else if (j <= 4.6e-37) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -4.5e+75: tmp = j * (k * -27.0) elif j <= -1.9e-107: tmp = x * (18.0 * (z * (y * t))) elif j <= -5.8e-206: tmp = t * (a * -4.0) elif j <= 4.6e-37: tmp = -4.0 * (x * i) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -4.5e+75) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= -1.9e-107) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (j <= -5.8e-206) tmp = Float64(t * Float64(a * -4.0)); elseif (j <= 4.6e-37) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -4.5e+75)
tmp = j * (k * -27.0);
elseif (j <= -1.9e-107)
tmp = x * (18.0 * (z * (y * t)));
elseif (j <= -5.8e-206)
tmp = t * (a * -4.0);
elseif (j <= 4.6e-37)
tmp = -4.0 * (x * i);
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -4.5e+75], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.9e-107], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -5.8e-206], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.6e-37], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -1.9 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq -5.8 \cdot 10^{-206}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;j \leq 4.6 \cdot 10^{-37}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -4.5000000000000004e75Initial program 77.5%
Simplified84.9%
Taylor expanded in b around inf 58.5%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
associate-*r*48.2%
*-commutative48.2%
Simplified48.2%
if -4.5000000000000004e75 < j < -1.9000000000000001e-107Initial program 75.5%
Simplified82.3%
Taylor expanded in x around inf 57.2%
Taylor expanded in t around inf 42.5%
associate-*r*42.6%
Simplified42.6%
if -1.9000000000000001e-107 < j < -5.8000000000000004e-206Initial program 99.9%
Simplified99.9%
Taylor expanded in j around 0 99.9%
Taylor expanded in x around inf 83.0%
Taylor expanded in a around inf 36.5%
associate-*r*36.5%
*-commutative36.5%
Simplified36.5%
if -5.8000000000000004e-206 < j < 4.5999999999999999e-37Initial program 81.7%
distribute-rgt-out--89.4%
associate-*r*90.9%
*-commutative90.9%
associate-*l*90.9%
associate-*r*90.9%
Applied egg-rr90.9%
Taylor expanded in i around inf 33.4%
*-commutative33.4%
Simplified33.4%
if 4.5999999999999999e-37 < j Initial program 86.4%
Simplified86.3%
Taylor expanded in j around inf 34.8%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -1.6e+79)
(* j (* k -27.0))
(if (<= j -1.3e-108)
(* x (* 18.0 (* t (* y z))))
(if (<= j -8.6e-206)
(* t (* a -4.0))
(if (<= j 3.7e-37) (* -4.0 (* x i)) (* -27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.6e+79) {
tmp = j * (k * -27.0);
} else if (j <= -1.3e-108) {
tmp = x * (18.0 * (t * (y * z)));
} else if (j <= -8.6e-206) {
tmp = t * (a * -4.0);
} else if (j <= 3.7e-37) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-1.6d+79)) then
tmp = j * (k * (-27.0d0))
else if (j <= (-1.3d-108)) then
tmp = x * (18.0d0 * (t * (y * z)))
else if (j <= (-8.6d-206)) then
tmp = t * (a * (-4.0d0))
else if (j <= 3.7d-37) then
tmp = (-4.0d0) * (x * i)
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.6e+79) {
tmp = j * (k * -27.0);
} else if (j <= -1.3e-108) {
tmp = x * (18.0 * (t * (y * z)));
} else if (j <= -8.6e-206) {
tmp = t * (a * -4.0);
} else if (j <= 3.7e-37) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.6e+79: tmp = j * (k * -27.0) elif j <= -1.3e-108: tmp = x * (18.0 * (t * (y * z))) elif j <= -8.6e-206: tmp = t * (a * -4.0) elif j <= 3.7e-37: tmp = -4.0 * (x * i) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1.6e+79) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= -1.3e-108) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (j <= -8.6e-206) tmp = Float64(t * Float64(a * -4.0)); elseif (j <= 3.7e-37) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -1.6e+79)
tmp = j * (k * -27.0);
elseif (j <= -1.3e-108)
tmp = x * (18.0 * (t * (y * z)));
elseif (j <= -8.6e-206)
tmp = t * (a * -4.0);
elseif (j <= 3.7e-37)
tmp = -4.0 * (x * i);
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -1.6e+79], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.3e-108], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -8.6e-206], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.7e-37], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.6 \cdot 10^{+79}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -1.3 \cdot 10^{-108}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;j \leq -8.6 \cdot 10^{-206}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;j \leq 3.7 \cdot 10^{-37}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -1.60000000000000001e79Initial program 77.5%
Simplified84.9%
Taylor expanded in b around inf 58.5%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
associate-*r*48.2%
*-commutative48.2%
Simplified48.2%
if -1.60000000000000001e79 < j < -1.29999999999999992e-108Initial program 75.5%
Simplified82.3%
Taylor expanded in x around inf 57.2%
Taylor expanded in t around inf 42.5%
if -1.29999999999999992e-108 < j < -8.6000000000000005e-206Initial program 99.9%
Simplified99.9%
Taylor expanded in j around 0 99.9%
Taylor expanded in x around inf 83.0%
Taylor expanded in a around inf 36.5%
associate-*r*36.5%
*-commutative36.5%
Simplified36.5%
if -8.6000000000000005e-206 < j < 3.7e-37Initial program 81.7%
distribute-rgt-out--89.4%
associate-*r*90.9%
*-commutative90.9%
associate-*l*90.9%
associate-*r*90.9%
Applied egg-rr90.9%
Taylor expanded in i around inf 33.4%
*-commutative33.4%
Simplified33.4%
if 3.7e-37 < j Initial program 86.4%
Simplified86.3%
Taylor expanded in j around inf 34.8%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -15000.0) (not (<= x 2.5e+56))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -15000.0) || !(x <= 2.5e+56)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-15000.0d0)) .or. (.not. (x <= 2.5d+56))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -15000.0) || !(x <= 2.5e+56)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -15000.0) or not (x <= 2.5e+56): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -15000.0) || !(x <= 2.5e+56)) 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(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -15000.0) || ~((x <= 2.5e+56)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -15000.0], N[Not[LessEqual[x, 2.5e+56]], $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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -15000 \lor \neg \left(x \leq 2.5 \cdot 10^{+56}\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) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -15000 or 2.50000000000000012e56 < x Initial program 72.3%
Simplified82.7%
Taylor expanded in x around inf 72.3%
if -15000 < x < 2.50000000000000012e56Initial program 89.7%
Simplified90.4%
Taylor expanded in x around 0 75.8%
Final simplification74.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.6)
(- (* t (- (* 18.0 (* x (* y z))) (* a 4.0))) (* 4.0 (* x i)))
(if (<= x 1.25e+57)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* 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);
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 <= -3.6) {
tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (4.0 * (x * i));
} else if (x <= 1.25e+57) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.6d0)) then
tmp = (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))) - (4.0d0 * (x * i))
else if (x <= 1.25d+57) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.6) {
tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (4.0 * (x * i));
} else if (x <= 1.25e+57) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} 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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.6: tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (4.0 * (x * i)) elif x <= 1.25e+57: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.6) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) - Float64(4.0 * Float64(x * i))); elseif (x <= 1.25e+57) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -3.6)
tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (4.0 * (x * i));
elseif (x <= 1.25e+57)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.6], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e+57], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+57}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.60000000000000009Initial program 75.0%
Simplified85.7%
Taylor expanded in j around 0 78.7%
Taylor expanded in b around 0 76.4%
if -3.60000000000000009 < x < 1.24999999999999993e57Initial program 89.7%
Simplified90.4%
Taylor expanded in x around 0 75.8%
if 1.24999999999999993e57 < x Initial program 69.8%
Simplified79.9%
Taylor expanded in x around inf 75.3%
Final simplification75.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -1.5e-17)
(+ (* b c) (* j (* k -27.0)))
(if (<= k 3.2e+197)
(- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i)))
(* k (- (* (* a -4.0) (/ t k)) (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.5e-17) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 3.2e+197) {
tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
} else {
tmp = k * (((a * -4.0) * (t / k)) - (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-1.5d-17)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (k <= 3.2d+197) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
else
tmp = k * (((a * (-4.0d0)) * (t / k)) - (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.5e-17) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 3.2e+197) {
tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
} else {
tmp = k * (((a * -4.0) * (t / k)) - (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1.5e-17: tmp = (b * c) + (j * (k * -27.0)) elif k <= 3.2e+197: tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)) else: tmp = k * (((a * -4.0) * (t / k)) - (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.5e-17) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (k <= 3.2e+197) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(k * Float64(Float64(Float64(a * -4.0) * Float64(t / k)) - Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -1.5e-17)
tmp = (b * c) + (j * (k * -27.0));
elseif (k <= 3.2e+197)
tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
else
tmp = k * (((a * -4.0) * (t / k)) - (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.5e-17], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.2e+197], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(N[(a * -4.0), $MachinePrecision] * N[(t / k), $MachinePrecision]), $MachinePrecision] - N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.5 \cdot 10^{-17}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 3.2 \cdot 10^{+197}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(\left(a \cdot -4\right) \cdot \frac{t}{k} - j \cdot 27\right)\\
\end{array}
\end{array}
if k < -1.50000000000000003e-17Initial program 81.4%
Simplified86.3%
Taylor expanded in b around inf 60.2%
if -1.50000000000000003e-17 < k < 3.1999999999999998e197Initial program 83.5%
Simplified88.0%
Taylor expanded in j around 0 80.4%
Taylor expanded in y around 0 66.6%
if 3.1999999999999998e197 < k Initial program 72.7%
Simplified81.8%
Taylor expanded in x around 0 73.6%
Taylor expanded in k around inf 73.6%
Taylor expanded in a around inf 64.9%
associate-*r/69.4%
associate-*r*69.4%
*-commutative69.4%
Simplified69.4%
Final simplification64.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.8e+106)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) 1.2e+111)
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(+ (* 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);
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) <= -3.8e+106) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= 1.2e+111) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} 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.
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) <= (-3.8d+106)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= 1.2d+111) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
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;
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) <= -3.8e+106) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= 1.2e+111) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} 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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.8e+106: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= 1.2e+111: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.8e+106) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= 1.2e+111) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.8e+106)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= 1.2e+111)
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.8e+106], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.2e+111], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+106}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{+111}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.7999999999999998e106Initial program 74.6%
Simplified77.0%
Taylor expanded in j around 0 75.9%
Taylor expanded in t around 0 56.0%
if -3.7999999999999998e106 < (*.f64 b c) < 1.20000000000000003e111Initial program 84.0%
Simplified90.6%
Taylor expanded in i around inf 54.4%
if 1.20000000000000003e111 < (*.f64 b c) Initial program 81.3%
Simplified85.1%
Taylor expanded in x around 0 73.4%
Taylor expanded in k around inf 57.0%
Taylor expanded in k around 0 65.0%
Final simplification56.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= j -1.9e+73)
t_1
(if (<= j -1.35e-89)
(* x (* 18.0 (* z (* y t))))
(if (<= j 4.7e-89) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -1.9e+73) {
tmp = t_1;
} else if (j <= -1.35e-89) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= 4.7e-89) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (j <= (-1.9d+73)) then
tmp = t_1
else if (j <= (-1.35d-89)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (j <= 4.7d-89) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -1.9e+73) {
tmp = t_1;
} else if (j <= -1.35e-89) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= 4.7e-89) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if j <= -1.9e+73: tmp = t_1 elif j <= -1.35e-89: tmp = x * (18.0 * (z * (y * t))) elif j <= 4.7e-89: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (j <= -1.9e+73) tmp = t_1; elseif (j <= -1.35e-89) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (j <= 4.7e-89) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (j <= -1.9e+73)
tmp = t_1;
elseif (j <= -1.35e-89)
tmp = x * (18.0 * (z * (y * t)));
elseif (j <= 4.7e-89)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.9e+73], t$95$1, If[LessEqual[j, -1.35e-89], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.7e-89], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -1.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.35 \cdot 10^{-89}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq 4.7 \cdot 10^{-89}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.90000000000000011e73 or 4.69999999999999995e-89 < j Initial program 81.7%
Simplified85.9%
Taylor expanded in b around inf 50.5%
if -1.90000000000000011e73 < j < -1.34999999999999994e-89Initial program 77.4%
Simplified85.0%
Taylor expanded in x around inf 59.3%
Taylor expanded in t around inf 42.7%
associate-*r*42.7%
Simplified42.7%
if -1.34999999999999994e-89 < j < 4.69999999999999995e-89Initial program 84.6%
Simplified91.1%
Taylor expanded in x around 0 58.7%
Taylor expanded in k around inf 42.0%
Taylor expanded in k around 0 56.1%
Final simplification51.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -5.2e+73)
(* j (* k -27.0))
(if (<= j -5.7e-87)
(* x (* 18.0 (* z (* y t))))
(if (<= j 6.5e+57) (+ (* b c) (* -4.0 (* t a))) (* -27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -5.2e+73) {
tmp = j * (k * -27.0);
} else if (j <= -5.7e-87) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= 6.5e+57) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-5.2d+73)) then
tmp = j * (k * (-27.0d0))
else if (j <= (-5.7d-87)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (j <= 6.5d+57) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -5.2e+73) {
tmp = j * (k * -27.0);
} else if (j <= -5.7e-87) {
tmp = x * (18.0 * (z * (y * t)));
} else if (j <= 6.5e+57) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -5.2e+73: tmp = j * (k * -27.0) elif j <= -5.7e-87: tmp = x * (18.0 * (z * (y * t))) elif j <= 6.5e+57: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -5.2e+73) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= -5.7e-87) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (j <= 6.5e+57) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -5.2e+73)
tmp = j * (k * -27.0);
elseif (j <= -5.7e-87)
tmp = x * (18.0 * (z * (y * t)));
elseif (j <= 6.5e+57)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -5.2e+73], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -5.7e-87], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 6.5e+57], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.2 \cdot 10^{+73}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -5.7 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq 6.5 \cdot 10^{+57}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -5.2000000000000001e73Initial program 77.5%
Simplified84.9%
Taylor expanded in b around inf 58.5%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
associate-*r*48.2%
*-commutative48.2%
Simplified48.2%
if -5.2000000000000001e73 < j < -5.7e-87Initial program 77.4%
Simplified85.0%
Taylor expanded in x around inf 59.3%
Taylor expanded in t around inf 42.7%
associate-*r*42.7%
Simplified42.7%
if -5.7e-87 < j < 6.4999999999999997e57Initial program 84.3%
Simplified90.9%
Taylor expanded in x around 0 53.4%
Taylor expanded in k around inf 41.2%
Taylor expanded in k around 0 49.7%
if 6.4999999999999997e57 < j Initial program 86.8%
Simplified84.6%
Taylor expanded in j around inf 46.2%
Final simplification47.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -6.2e+106) (not (<= (* b c) 4.2e+111))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.2e+106) || !((b * c) <= 4.2e+111)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-6.2d+106)) .or. (.not. ((b * c) <= 4.2d+111))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.2e+106) || !((b * c) <= 4.2e+111)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -6.2e+106) or not ((b * c) <= 4.2e+111): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -6.2e+106) || !(Float64(b * c) <= 4.2e+111)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -6.2e+106) || ~(((b * c) <= 4.2e+111)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -6.2e+106], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4.2e+111]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+106} \lor \neg \left(b \cdot c \leq 4.2 \cdot 10^{+111}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.1999999999999999e106 or 4.1999999999999999e111 < (*.f64 b c) Initial program 78.1%
distribute-rgt-out--80.4%
associate-*r*80.3%
*-commutative80.3%
associate-*l*80.2%
associate-*r*80.2%
Applied egg-rr80.2%
Taylor expanded in b around inf 47.3%
if -6.1999999999999999e106 < (*.f64 b c) < 4.1999999999999999e111Initial program 84.0%
Simplified90.6%
Taylor expanded in j around inf 33.4%
Final simplification38.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 81.9%
distribute-rgt-out--85.5%
associate-*r*86.6%
*-commutative86.6%
associate-*l*86.6%
associate-*r*86.6%
Applied egg-rr86.6%
Taylor expanded in b around inf 19.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024170
(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)))