
(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 23 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
(let* ((t_1 (* j (* k -27.0))))
(if (<= y -6.3e+162)
(*
y
(-
(+ (* -4.0 (/ (* a t) y)) (+ (* 18.0 (* t (* x z))) (/ (* b c) y)))
(+ (* 4.0 (/ (* x i) y)) (* 27.0 (/ (* j k) y)))))
(if (<= y 2.45e+33)
(+
(fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (fma b c (* x (* -4.0 i))))
t_1)
(+
t_1
(*
z
(+
(+ (* -4.0 (* i (/ x z))) (* (* t 18.0) (* y x)))
(/ (fma -4.0 (* a t) (* b c)) z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (y <= -6.3e+162) {
tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y))));
} else if (y <= 2.45e+33) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), fma(b, c, (x * (-4.0 * i)))) + t_1;
} else {
tmp = t_1 + (z * (((-4.0 * (i * (x / z))) + ((t * 18.0) * (y * x))) + (fma(-4.0, (a * t), (b * c)) / z)));
}
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)) tmp = 0.0 if (y <= -6.3e+162) tmp = Float64(y * Float64(Float64(Float64(-4.0 * Float64(Float64(a * t) / y)) + Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y))) - Float64(Float64(4.0 * Float64(Float64(x * i) / y)) + Float64(27.0 * Float64(Float64(j * k) / y))))); elseif (y <= 2.45e+33) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + t_1); else tmp = Float64(t_1 + Float64(z * Float64(Float64(Float64(-4.0 * Float64(i * Float64(x / z))) + Float64(Float64(t * 18.0) * Float64(y * x))) + Float64(fma(-4.0, Float64(a * t), Float64(b * c)) / z)))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.3e+162], N[(y * N[(N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(N[(x * i), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+33], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(z * N[(N[(N[(-4.0 * N[(i * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * 18.0), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;y \leq -6.3 \cdot 10^{+162}:\\
\;\;\;\;y \cdot \left(\left(-4 \cdot \frac{a \cdot t}{y} + \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right)\right) - \left(4 \cdot \frac{x \cdot i}{y} + 27 \cdot \frac{j \cdot k}{y}\right)\right)\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + z \cdot \left(\left(-4 \cdot \left(i \cdot \frac{x}{z}\right) + \left(t \cdot 18\right) \cdot \left(y \cdot x\right)\right) + \frac{\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)}{z}\right)\\
\end{array}
\end{array}
if y < -6.3000000000000001e162Initial program 64.2%
Simplified64.2%
Taylor expanded in y around inf 96.3%
if -6.3000000000000001e162 < y < 2.45000000000000007e33Initial program 91.7%
Simplified94.5%
if 2.45000000000000007e33 < y Initial program 89.5%
Simplified85.2%
Taylor expanded in z around inf 72.5%
+-commutative72.5%
associate-+r+72.5%
associate-+l+72.5%
associate-/l*68.1%
associate-*r*68.1%
metadata-eval68.1%
cancel-sign-sub-inv68.1%
associate-*r/68.1%
div-sub68.4%
Simplified68.4%
Final simplification90.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* i (* x 4.0))) (t_2 (* k (* 27.0 j))))
(if (<=
(-
(- (+ (* b c) (- (* t (* z (* y (* 18.0 x)))) (* t (* a 4.0)))) t_1)
t_2)
INFINITY)
(- (- (+ (* b c) (* t (- (* z (* x (* y 18.0))) (* a 4.0)))) t_1) t_2)
(* 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 t_1 = i * (x * 4.0);
double t_2 = k * (27.0 * j);
double tmp;
if (((((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - t_1) - t_2) <= ((double) INFINITY)) {
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - t_1) - t_2;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = i * (x * 4.0);
double t_2 = k * (27.0 * j);
double tmp;
if (((((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - t_1) - t_2) <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - t_1) - t_2;
} 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): t_1 = i * (x * 4.0) t_2 = k * (27.0 * j) tmp = 0 if ((((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - t_1) - t_2) <= math.inf: tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - t_1) - t_2 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) t_1 = Float64(i * Float64(x * 4.0)) t_2 = Float64(k * Float64(27.0 * j)) tmp = 0.0 if (Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(18.0 * x)))) - Float64(t * Float64(a * 4.0)))) - t_1) - t_2) <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(x * Float64(y * 18.0))) - Float64(a * 4.0)))) - t_1) - t_2); 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)
t_1 = i * (x * 4.0);
t_2 = k * (27.0 * j);
tmp = 0.0;
if (((((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - t_1) - t_2) <= Inf)
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - t_1) - t_2;
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_] := Block[{t$95$1 = N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(x * N[(y * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $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}
t_1 := i \cdot \left(x \cdot 4\right)\\
t_2 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - t\_1\right) - t\_2 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(y \cdot 18\right)\right) - a \cdot 4\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.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 94.3%
distribute-rgt-out--94.3%
associate-*r*93.1%
*-commutative93.1%
associate-*r*94.3%
*-commutative94.3%
associate-*l*94.3%
Applied egg-rr94.3%
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%
Simplified25.0%
Taylor expanded in x around inf 81.4%
Final simplification93.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -3.2e+73)
(*
y
(-
(+ (* -4.0 (/ (* a t) y)) (+ (* 18.0 (* t (* x z))) (/ (* b c) y)))
(+ (* 4.0 (/ (* x i) y)) (* 27.0 (/ (* j k) y)))))
(-
(- (+ (* b c) (* t (- (* z (* x (* y 18.0))) (* a 4.0)))) (* i (* x 4.0)))
(* k (* 27.0 j)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -3.2e+73) {
tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y))));
} else {
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-3.2d+73)) then
tmp = y * ((((-4.0d0) * ((a * t) / y)) + ((18.0d0 * (t * (x * z))) + ((b * c) / y))) - ((4.0d0 * ((x * i) / y)) + (27.0d0 * ((j * k) / y))))
else
tmp = (((b * c) + (t * ((z * (x * (y * 18.0d0))) - (a * 4.0d0)))) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -3.2e+73) {
tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y))));
} else {
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -3.2e+73: tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y)))) else: tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -3.2e+73) tmp = Float64(y * Float64(Float64(Float64(-4.0 * Float64(Float64(a * t) / y)) + Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y))) - Float64(Float64(4.0 * Float64(Float64(x * i) / y)) + Float64(27.0 * Float64(Float64(j * k) / y))))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(x * Float64(y * 18.0))) - Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -3.2e+73)
tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y))));
else
tmp = (((b * c) + (t * ((z * (x * (y * 18.0))) - (a * 4.0)))) - (i * (x * 4.0))) - (k * (27.0 * j));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -3.2e+73], N[(y * N[(N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(N[(x * i), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(x * N[(y * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\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}\;y \leq -3.2 \cdot 10^{+73}:\\
\;\;\;\;y \cdot \left(\left(-4 \cdot \frac{a \cdot t}{y} + \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right)\right) - \left(4 \cdot \frac{x \cdot i}{y} + 27 \cdot \frac{j \cdot k}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(y \cdot 18\right)\right) - a \cdot 4\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\end{array}
\end{array}
if y < -3.19999999999999982e73Initial program 72.0%
Simplified72.0%
Taylor expanded in y around inf 94.7%
if -3.19999999999999982e73 < y Initial program 91.3%
distribute-rgt-out--92.7%
associate-*r*91.8%
*-commutative91.8%
associate-*r*92.7%
*-commutative92.7%
associate-*l*92.7%
Applied egg-rr92.7%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= t -2.25e+95)
(* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
(if (<= t -1.8e-24)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t -6.5e-190)
t_2
(if (<= t -2e-303)
(+ t_1 (* i (* -4.0 x)))
(if (<= t 4.3e-58)
t_2
(* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))))))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 = (b * c) + t_1;
double tmp;
if (t <= -2.25e+95) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= -1.8e-24) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -6.5e-190) {
tmp = t_2;
} else if (t <= -2e-303) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 4.3e-58) {
tmp = t_2;
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
if (t <= (-2.25d+95)) then
tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
else if (t <= (-1.8d-24)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= (-6.5d-190)) then
tmp = t_2
else if (t <= (-2d-303)) then
tmp = t_1 + (i * ((-4.0d0) * x))
else if (t <= 4.3d-58) then
tmp = t_2
else
tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * z))))
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 = (b * c) + t_1;
double tmp;
if (t <= -2.25e+95) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= -1.8e-24) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -6.5e-190) {
tmp = t_2;
} else if (t <= -2e-303) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 4.3e-58) {
tmp = t_2;
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
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 = (b * c) + t_1 tmp = 0 if t <= -2.25e+95: tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a)) elif t <= -1.8e-24: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= -6.5e-190: tmp = t_2 elif t <= -2e-303: tmp = t_1 + (i * (-4.0 * x)) elif t <= 4.3e-58: tmp = t_2 else: tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z)))) 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(Float64(b * c) + t_1) tmp = 0.0 if (t <= -2.25e+95) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a))); elseif (t <= -1.8e-24) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= -6.5e-190) tmp = t_2; elseif (t <= -2e-303) tmp = Float64(t_1 + Float64(i * Float64(-4.0 * x))); elseif (t <= 4.3e-58) tmp = t_2; else tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * z))))); 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 = (b * c) + t_1;
tmp = 0.0;
if (t <= -2.25e+95)
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
elseif (t <= -1.8e-24)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= -6.5e-190)
tmp = t_2;
elseif (t <= -2e-303)
tmp = t_1 + (i * (-4.0 * x));
elseif (t <= 4.3e-58)
tmp = t_2;
else
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
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[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -2.25e+95], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-24], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-190], t$95$2, If[LessEqual[t, -2e-303], N[(t$95$1 + N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-58], t$95$2, N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-303}:\\
\;\;\;\;t\_1 + i \cdot \left(-4 \cdot x\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -2.25000000000000008e95Initial program 82.5%
Simplified87.0%
Taylor expanded in t around inf 82.8%
Taylor expanded in t around inf 78.5%
if -2.25000000000000008e95 < t < -1.8e-24Initial program 95.6%
Simplified95.7%
Taylor expanded in x around inf 71.4%
if -1.8e-24 < t < -6.4999999999999997e-190 or -1.99999999999999986e-303 < t < 4.2999999999999999e-58Initial program 91.6%
Simplified91.6%
Taylor expanded in b around inf 68.6%
if -6.4999999999999997e-190 < t < -1.99999999999999986e-303Initial program 69.9%
Simplified70.0%
Taylor expanded in i around inf 72.2%
associate-*r*72.2%
*-commutative72.2%
associate-*r*72.2%
*-commutative72.2%
Simplified72.2%
if 4.2999999999999999e-58 < t Initial program 93.6%
Simplified96.9%
Taylor expanded in t around inf 71.0%
Taylor expanded in y around inf 58.9%
Taylor expanded in t around inf 59.8%
Final simplification68.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
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))))
(if (<= t -2.8e+95)
t_3
(if (<= t -2.1e-24)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t -1.25e-190)
t_2
(if (<= t -3.5e-305)
(+ t_1 (* i (* -4.0 x)))
(if (<= t 3.45e-59) t_2 t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
double tmp;
if (t <= -2.8e+95) {
tmp = t_3;
} else if (t <= -2.1e-24) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -1.25e-190) {
tmp = t_2;
} else if (t <= -3.5e-305) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 3.45e-59) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = (b * c) + t_1
t_3 = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
if (t <= (-2.8d+95)) then
tmp = t_3
else if (t <= (-2.1d-24)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= (-1.25d-190)) then
tmp = t_2
else if (t <= (-3.5d-305)) then
tmp = t_1 + (i * ((-4.0d0) * x))
else if (t <= 3.45d-59) then
tmp = t_2
else
tmp = t_3
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 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
double tmp;
if (t <= -2.8e+95) {
tmp = t_3;
} else if (t <= -2.1e-24) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -1.25e-190) {
tmp = t_2;
} else if (t <= -3.5e-305) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 3.45e-59) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a)) tmp = 0 if t <= -2.8e+95: tmp = t_3 elif t <= -2.1e-24: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= -1.25e-190: tmp = t_2 elif t <= -3.5e-305: tmp = t_1 + (i * (-4.0 * x)) elif t <= 3.45e-59: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a))) tmp = 0.0 if (t <= -2.8e+95) tmp = t_3; elseif (t <= -2.1e-24) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= -1.25e-190) tmp = t_2; elseif (t <= -3.5e-305) tmp = Float64(t_1 + Float64(i * Float64(-4.0 * x))); elseif (t <= 3.45e-59) tmp = t_2; else tmp = t_3; 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 = (b * c) + t_1;
t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
tmp = 0.0;
if (t <= -2.8e+95)
tmp = t_3;
elseif (t <= -2.1e-24)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= -1.25e-190)
tmp = t_2;
elseif (t <= -3.5e-305)
tmp = t_1 + (i * (-4.0 * x));
elseif (t <= 3.45e-59)
tmp = t_2;
else
tmp = t_3;
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[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+95], t$95$3, If[LessEqual[t, -2.1e-24], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.25e-190], t$95$2, If[LessEqual[t, -3.5e-305], N[(t$95$1 + N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.45e-59], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+95}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-305}:\\
\;\;\;\;t\_1 + i \cdot \left(-4 \cdot x\right)\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -2.7999999999999998e95 or 3.44999999999999991e-59 < t Initial program 89.0%
Simplified92.7%
Taylor expanded in t around inf 76.0%
Taylor expanded in t around inf 68.6%
if -2.7999999999999998e95 < t < -2.0999999999999999e-24Initial program 95.6%
Simplified95.7%
Taylor expanded in x around inf 71.4%
if -2.0999999999999999e-24 < t < -1.25000000000000009e-190 or -3.4999999999999998e-305 < t < 3.44999999999999991e-59Initial program 91.6%
Simplified91.6%
Taylor expanded in b around inf 68.6%
if -1.25000000000000009e-190 < t < -3.4999999999999998e-305Initial program 69.9%
Simplified70.0%
Taylor expanded in i around inf 72.2%
associate-*r*72.2%
*-commutative72.2%
associate-*r*72.2%
*-commutative72.2%
Simplified72.2%
Final simplification69.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 (<= (* b c) 2e+294)
(-
(+ (* b c) (* t (- (* (* y z) (* 18.0 x)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* c (+ b (* -4.0 (/ (* a t) 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 tmp;
if ((b * c) <= 2e+294) {
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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) :: tmp
if ((b * c) <= 2d+294) then
tmp = ((b * c) + (t * (((y * z) * (18.0d0 * x)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = c * (b + ((-4.0d0) * ((a * t) / 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 tmp;
if ((b * c) <= 2e+294) {
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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): tmp = 0 if (b * c) <= 2e+294: tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = c * (b + (-4.0 * ((a * t) / 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) tmp = 0.0 if (Float64(b * c) <= 2e+294) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(18.0 * x)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(a * t) / 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)
tmp = 0.0;
if ((b * c) <= 2e+294)
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = c * (b + (-4.0 * ((a * t) / 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_] := If[LessEqual[N[(b * c), $MachinePrecision], 2e+294], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * x), $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[(c * N[(b + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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}\;b \cdot c \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot x\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 2.00000000000000013e294Initial program 90.0%
Simplified90.5%
if 2.00000000000000013e294 < (*.f64 b c) Initial program 66.7%
Simplified66.7%
Taylor expanded in x around 0 66.7%
Taylor expanded in j around 0 77.8%
Taylor expanded in c around inf 88.9%
*-commutative88.9%
Simplified88.9%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))))
(if (<= t -7e-28)
t_3
(if (<= t -2.15e-190)
t_2
(if (<= t -1.6e-304)
(+ t_1 (* i (* -4.0 x)))
(if (<= t 7.2e-54) t_2 t_3))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
double tmp;
if (t <= -7e-28) {
tmp = t_3;
} else if (t <= -2.15e-190) {
tmp = t_2;
} else if (t <= -1.6e-304) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 7.2e-54) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = (b * c) + t_1
t_3 = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
if (t <= (-7d-28)) then
tmp = t_3
else if (t <= (-2.15d-190)) then
tmp = t_2
else if (t <= (-1.6d-304)) then
tmp = t_1 + (i * ((-4.0d0) * x))
else if (t <= 7.2d-54) then
tmp = t_2
else
tmp = t_3
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 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
double tmp;
if (t <= -7e-28) {
tmp = t_3;
} else if (t <= -2.15e-190) {
tmp = t_2;
} else if (t <= -1.6e-304) {
tmp = t_1 + (i * (-4.0 * x));
} else if (t <= 7.2e-54) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a)) tmp = 0 if t <= -7e-28: tmp = t_3 elif t <= -2.15e-190: tmp = t_2 elif t <= -1.6e-304: tmp = t_1 + (i * (-4.0 * x)) elif t <= 7.2e-54: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a))) tmp = 0.0 if (t <= -7e-28) tmp = t_3; elseif (t <= -2.15e-190) tmp = t_2; elseif (t <= -1.6e-304) tmp = Float64(t_1 + Float64(i * Float64(-4.0 * x))); elseif (t <= 7.2e-54) tmp = t_2; else tmp = t_3; 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 = (b * c) + t_1;
t_3 = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
tmp = 0.0;
if (t <= -7e-28)
tmp = t_3;
elseif (t <= -2.15e-190)
tmp = t_2;
elseif (t <= -1.6e-304)
tmp = t_1 + (i * (-4.0 * x));
elseif (t <= 7.2e-54)
tmp = t_2;
else
tmp = t_3;
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[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-28], t$95$3, If[LessEqual[t, -2.15e-190], t$95$2, If[LessEqual[t, -1.6e-304], N[(t$95$1 + N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-54], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{-28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-304}:\\
\;\;\;\;t\_1 + i \cdot \left(-4 \cdot x\right)\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -6.9999999999999999e-28 or 7.19999999999999953e-54 < t Initial program 90.3%
Simplified93.3%
Taylor expanded in t around inf 74.2%
Taylor expanded in t around inf 64.3%
if -6.9999999999999999e-28 < t < -2.15e-190 or -1.59999999999999999e-304 < t < 7.19999999999999953e-54Initial program 91.5%
Simplified91.5%
Taylor expanded in b around inf 69.2%
if -2.15e-190 < t < -1.59999999999999999e-304Initial program 69.9%
Simplified70.0%
Taylor expanded in i around inf 72.2%
associate-*r*72.2%
*-commutative72.2%
associate-*r*72.2%
*-commutative72.2%
Simplified72.2%
Final simplification67.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.35e-33) (not (<= t 7.8e-103))) (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 4.0 (* x i))) (- (- (- (* b c) (* (* a t) 4.0)) (* i (* x 4.0))) (* k (* 27.0 j)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.35e-33) || !(t <= 7.8e-103)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-1.35d-33)) .or. (.not. (t <= 7.8d-103))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = (((b * c) - ((a * t) * 4.0d0)) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -1.35e-33) || !(t <= 7.8e-103)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.35e-33) or not (t <= 7.8e-103): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.35e-33) || !(t <= 7.8e-103)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(a * t) * 4.0)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1.35e-33) || ~((t <= 7.8e-103)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.35e-33], N[Not[LessEqual[t, 7.8e-103]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-33} \lor \neg \left(t \leq 7.8 \cdot 10^{-103}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - \left(a \cdot t\right) \cdot 4\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\end{array}
\end{array}
if t < -1.35e-33 or 7.8000000000000004e-103 < t Initial program 90.8%
Simplified92.3%
Taylor expanded in j around 0 85.4%
if -1.35e-33 < t < 7.8000000000000004e-103Initial program 85.3%
Taylor expanded in x around 0 88.7%
Final simplification86.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 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -3.75e-65)
(- t_1 (* 27.0 (* j k)))
(if (<= t 4.5e-99)
(- (- (- (* b c) (* (* a t) 4.0)) (* i (* x 4.0))) (* k (* 27.0 j)))
(- t_1 (* 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 t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -3.75e-65) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 4.5e-99) {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = t_1 - (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) :: t_1
real(8) :: tmp
t_1 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-3.75d-65)) then
tmp = t_1 - (27.0d0 * (j * k))
else if (t <= 4.5d-99) then
tmp = (((b * c) - ((a * t) * 4.0d0)) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
else
tmp = t_1 - (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 t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -3.75e-65) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 4.5e-99) {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = t_1 - (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): t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -3.75e-65: tmp = t_1 - (27.0 * (j * k)) elif t <= 4.5e-99: tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j)) else: tmp = t_1 - (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) t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -3.75e-65) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (t <= 4.5e-99) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(a * t) * 4.0)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(t_1 - 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)
t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -3.75e-65)
tmp = t_1 - (27.0 * (j * k));
elseif (t <= 4.5e-99)
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
else
tmp = t_1 - (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_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.75e-65], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-99], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(4.0 * N[(x * 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}
t_1 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.75 \cdot 10^{-65}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-99}:\\
\;\;\;\;\left(\left(b \cdot c - \left(a \cdot t\right) \cdot 4\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -3.7500000000000001e-65Initial program 87.4%
distribute-rgt-out--88.6%
associate-*r*89.8%
*-commutative89.8%
associate-*r*88.6%
*-commutative88.6%
associate-*l*88.6%
Applied egg-rr88.6%
Taylor expanded in i around 0 83.8%
if -3.7500000000000001e-65 < t < 4.5000000000000003e-99Initial program 85.2%
Taylor expanded in x around 0 88.8%
if 4.5000000000000003e-99 < t Initial program 94.2%
Simplified95.8%
Taylor expanded in j around 0 87.6%
Final simplification86.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
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -2.5e-15)
(+ (* b c) t_1)
(if (<= (* b c) -2e-267)
(+ t_1 (* t (* -4.0 a)))
(if (<= (* b c) 5e+45)
(* -4.0 (+ (* a t) (* x i)))
(* c (+ b (* -4.0 (/ (* a t) 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2.5e-15) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -2e-267) {
tmp = t_1 + (t * (-4.0 * a));
} else if ((b * c) <= 5e+45) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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 = j * (k * (-27.0d0))
if ((b * c) <= (-2.5d-15)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-2d-267)) then
tmp = t_1 + (t * ((-4.0d0) * a))
else if ((b * c) <= 5d+45) then
tmp = (-4.0d0) * ((a * t) + (x * i))
else
tmp = c * (b + ((-4.0d0) * ((a * t) / 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2.5e-15) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -2e-267) {
tmp = t_1 + (t * (-4.0 * a));
} else if ((b * c) <= 5e+45) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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 = j * (k * -27.0) tmp = 0 if (b * c) <= -2.5e-15: tmp = (b * c) + t_1 elif (b * c) <= -2e-267: tmp = t_1 + (t * (-4.0 * a)) elif (b * c) <= 5e+45: tmp = -4.0 * ((a * t) + (x * i)) else: tmp = c * (b + (-4.0 * ((a * t) / 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(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2.5e-15) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -2e-267) tmp = Float64(t_1 + Float64(t * Float64(-4.0 * a))); elseif (Float64(b * c) <= 5e+45) tmp = Float64(-4.0 * Float64(Float64(a * t) + Float64(x * i))); else tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(a * t) / 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 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -2.5e-15)
tmp = (b * c) + t_1;
elseif ((b * c) <= -2e-267)
tmp = t_1 + (t * (-4.0 * a));
elseif ((b * c) <= 5e+45)
tmp = -4.0 * ((a * t) + (x * i));
else
tmp = c * (b + (-4.0 * ((a * t) / 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e-15], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-267], N[(t$95$1 + N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+45], N[(-4.0 * N[(N[(a * t), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2.5 \cdot 10^{-15}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-267}:\\
\;\;\;\;t\_1 + t \cdot \left(-4 \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+45}:\\
\;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.5e-15Initial program 87.3%
Simplified87.4%
Taylor expanded in b around inf 61.3%
if -2.5e-15 < (*.f64 b c) < -2e-267Initial program 86.5%
Simplified88.8%
Taylor expanded in a around inf 57.2%
associate-*r*57.2%
*-commutative57.2%
metadata-eval57.2%
distribute-rgt-neg-in57.2%
*-commutative57.2%
distribute-rgt-neg-in57.2%
metadata-eval57.2%
*-commutative57.2%
Simplified57.2%
if -2e-267 < (*.f64 b c) < 5e45Initial program 92.1%
distribute-rgt-out--93.3%
associate-*r*93.3%
*-commutative93.3%
associate-*r*93.3%
*-commutative93.3%
associate-*l*93.2%
Applied egg-rr93.2%
Taylor expanded in t around inf 93.3%
Taylor expanded in a around inf 72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in j around 0 53.3%
cancel-sign-sub-inv53.3%
metadata-eval53.3%
+-commutative53.3%
*-commutative53.3%
distribute-lft-out53.3%
*-commutative53.3%
Simplified53.3%
if 5e45 < (*.f64 b c) Initial program 85.6%
Simplified87.4%
Taylor expanded in x around 0 75.5%
Taylor expanded in j around 0 67.5%
Taylor expanded in c around inf 71.1%
*-commutative71.1%
Simplified71.1%
Final simplification60.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -8e+23)
(+ (* j (* k -27.0)) (* t (+ t_1 (* -4.0 a))))
(if (<= t 1.85e+86)
(- (- (- (* b c) (* (* a t) 4.0)) (* i (* x 4.0))) (* k (* 27.0 j)))
(+ (* b c) (* t (- t_1 (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -8e+23) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
} else if (t <= 1.85e+86) {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-8d+23)) then
tmp = (j * (k * (-27.0d0))) + (t * (t_1 + ((-4.0d0) * a)))
else if (t <= 1.85d+86) then
tmp = (((b * c) - ((a * t) * 4.0d0)) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
else
tmp = (b * c) + (t * (t_1 - (a * 4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -8e+23) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
} else if (t <= 1.85e+86) {
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -8e+23: tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a))) elif t <= 1.85e+86: tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j)) else: tmp = (b * c) + (t * (t_1 - (a * 4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -8e+23) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(-4.0 * a)))); elseif (t <= 1.85e+86) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(a * t) * 4.0)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -8e+23)
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
elseif (t <= 1.85e+86)
tmp = (((b * c) - ((a * t) * 4.0)) - (i * (x * 4.0))) - (k * (27.0 * j));
else
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e+23], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+86], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -8 \cdot 10^{+23}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_1 + -4 \cdot a\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+86}:\\
\;\;\;\;\left(\left(b \cdot c - \left(a \cdot t\right) \cdot 4\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -7.9999999999999993e23Initial program 84.9%
Simplified89.9%
Taylor expanded in t around inf 82.5%
if -7.9999999999999993e23 < t < 1.84999999999999996e86Initial program 89.2%
Taylor expanded in x around 0 85.2%
if 1.84999999999999996e86 < t Initial program 90.4%
distribute-rgt-out--95.2%
associate-*r*95.2%
*-commutative95.2%
associate-*r*95.2%
*-commutative95.2%
associate-*l*95.1%
Applied egg-rr95.1%
Taylor expanded in i around 0 88.0%
Taylor expanded in j around 0 87.2%
Final simplification84.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 (or (<= t -2.1e-37) (not (<= t 1.15e-41))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (* b c) (+ (* 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.1e-37) || !(t <= 1.15e-41)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((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.1d-37)) .or. (.not. (t <= 1.15d-41))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = (b * c) - ((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.1e-37) || !(t <= 1.15e-41)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((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.1e-37) or not (t <= 1.15e-41): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = (b * c) - ((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.1e-37) || !(t <= 1.15e-41)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(b * c) - 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.1e-37) || ~((t <= 1.15e-41)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = (b * c) - ((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.1e-37], N[Not[LessEqual[t, 1.15e-41]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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.1 \cdot 10^{-37} \lor \neg \left(t \leq 1.15 \cdot 10^{-41}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -2.1000000000000001e-37 or 1.15000000000000005e-41 < t Initial program 89.4%
distribute-rgt-out--91.6%
associate-*r*91.6%
*-commutative91.6%
associate-*r*91.6%
*-commutative91.6%
associate-*l*91.6%
Applied egg-rr91.6%
Taylor expanded in i around 0 84.4%
Taylor expanded in j around 0 75.4%
if -2.1000000000000001e-37 < t < 1.15000000000000005e-41Initial program 87.4%
Simplified85.8%
Taylor expanded in t around 0 82.9%
Final simplification79.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -1.5e-17)
(+ (* j (* k -27.0)) (* t (+ t_1 (* -4.0 a))))
(if (<= t 5.2e-42)
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(+ (* b c) (* t (- t_1 (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.5e-17) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
} else if (t <= 5.2e-42) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.5d-17)) then
tmp = (j * (k * (-27.0d0))) + (t * (t_1 + ((-4.0d0) * a)))
else if (t <= 5.2d-42) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = (b * c) + (t * (t_1 - (a * 4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.5e-17) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
} else if (t <= 5.2e-42) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.5e-17: tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a))) elif t <= 5.2e-42: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = (b * c) + (t * (t_1 - (a * 4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.5e-17) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(-4.0 * a)))); elseif (t <= 5.2e-42) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.5e-17)
tmp = (j * (k * -27.0)) + (t * (t_1 + (-4.0 * a)));
elseif (t <= 5.2e-42)
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e-17], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-42], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-17}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_1 + -4 \cdot a\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-42}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.50000000000000003e-17Initial program 86.9%
Simplified89.9%
Taylor expanded in t around inf 78.8%
if -1.50000000000000003e-17 < t < 5.2e-42Initial program 87.1%
Simplified86.4%
Taylor expanded in t around 0 81.7%
if 5.2e-42 < t Initial program 93.0%
distribute-rgt-out--96.4%
associate-*r*94.8%
*-commutative94.8%
associate-*r*96.4%
*-commutative96.4%
associate-*l*96.4%
Applied egg-rr96.4%
Taylor expanded in i around 0 86.5%
Taylor expanded in j around 0 78.2%
Final simplification80.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 (<= t -1.8e+103)
(* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
(if (<= t 2.8e-41)
(- (- (* b c) (* i (* x 4.0))) (* k (* 27.0 j)))
(* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))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 <= -1.8e+103) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= 2.8e-41) {
tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
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 <= (-1.8d+103)) then
tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
else if (t <= 2.8d-41) then
tmp = ((b * c) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
else
tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * z))))
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 <= -1.8e+103) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= 2.8e-41) {
tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
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 <= -1.8e+103: tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a)) elif t <= 2.8e-41: tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j)) else: tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z)))) 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 <= -1.8e+103) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a))); elseif (t <= 2.8e-41) tmp = Float64(Float64(Float64(b * c) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j))); else tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * z))))); 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 <= -1.8e+103)
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
elseif (t <= 2.8e-41)
tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
else
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
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[t, -1.8e+103], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-41], N[(N[(N[(b * c), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $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}\;t \leq -1.8 \cdot 10^{+103}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;\left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -1.80000000000000008e103Initial program 81.3%
Simplified86.0%
Taylor expanded in t around inf 86.2%
Taylor expanded in t around inf 81.6%
if -1.80000000000000008e103 < t < 2.8000000000000002e-41Initial program 88.7%
distribute-rgt-out--88.7%
associate-*r*88.0%
*-commutative88.0%
associate-*r*88.7%
*-commutative88.7%
associate-*l*88.7%
Applied egg-rr88.7%
Taylor expanded in t around 0 78.2%
if 2.8000000000000002e-41 < t Initial program 93.0%
Simplified96.6%
Taylor expanded in t around inf 73.0%
Taylor expanded in y around inf 59.7%
Taylor expanded in t around inf 62.3%
Final simplification75.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -9.5e+102)
(* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
(if (<= t 1.4e-41)
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))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 <= -9.5e+102) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= 1.4e-41) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
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 <= (-9.5d+102)) then
tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
else if (t <= 1.4d-41) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * z))))
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 <= -9.5e+102) {
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
} else if (t <= 1.4e-41) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
}
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 <= -9.5e+102: tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a)) elif t <= 1.4e-41: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z)))) 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 <= -9.5e+102) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a))); elseif (t <= 1.4e-41) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * z))))); 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 <= -9.5e+102)
tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
elseif (t <= 1.4e-41)
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
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[t, -9.5e+102], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-41], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $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}\;t \leq -9.5 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-41}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.4999999999999992e102Initial program 81.3%
Simplified86.0%
Taylor expanded in t around inf 86.2%
Taylor expanded in t around inf 81.6%
if -9.4999999999999992e102 < t < 1.4000000000000001e-41Initial program 88.7%
Simplified88.0%
Taylor expanded in t around 0 78.2%
if 1.4000000000000001e-41 < t Initial program 93.0%
Simplified96.6%
Taylor expanded in t around inf 73.0%
Taylor expanded in y around inf 59.7%
Taylor expanded in t around inf 62.3%
Final simplification75.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4e+133)
(+ (* b c) (* -4.0 (* a t)))
(if (<= (* b c) 2e+26)
(+ (* j (* k -27.0)) (* i (* -4.0 x)))
(* c (+ b (* -4.0 (/ (* a t) 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 tmp;
if ((b * c) <= -4e+133) {
tmp = (b * c) + (-4.0 * (a * t));
} else if ((b * c) <= 2e+26) {
tmp = (j * (k * -27.0)) + (i * (-4.0 * x));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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) :: tmp
if ((b * c) <= (-4d+133)) then
tmp = (b * c) + ((-4.0d0) * (a * t))
else if ((b * c) <= 2d+26) then
tmp = (j * (k * (-27.0d0))) + (i * ((-4.0d0) * x))
else
tmp = c * (b + ((-4.0d0) * ((a * t) / 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 tmp;
if ((b * c) <= -4e+133) {
tmp = (b * c) + (-4.0 * (a * t));
} else if ((b * c) <= 2e+26) {
tmp = (j * (k * -27.0)) + (i * (-4.0 * x));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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): tmp = 0 if (b * c) <= -4e+133: tmp = (b * c) + (-4.0 * (a * t)) elif (b * c) <= 2e+26: tmp = (j * (k * -27.0)) + (i * (-4.0 * x)) else: tmp = c * (b + (-4.0 * ((a * t) / 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) tmp = 0.0 if (Float64(b * c) <= -4e+133) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(a * t))); elseif (Float64(b * c) <= 2e+26) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(-4.0 * x))); else tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(a * t) / 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)
tmp = 0.0;
if ((b * c) <= -4e+133)
tmp = (b * c) + (-4.0 * (a * t));
elseif ((b * c) <= 2e+26)
tmp = (j * (k * -27.0)) + (i * (-4.0 * x));
else
tmp = c * (b + (-4.0 * ((a * t) / 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_] := If[LessEqual[N[(b * c), $MachinePrecision], -4e+133], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+26], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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}\;b \cdot c \leq -4 \cdot 10^{+133}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(a \cdot t\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+26}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(-4 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.0000000000000001e133Initial program 85.2%
Simplified85.2%
Taylor expanded in x around 0 82.7%
Taylor expanded in j around 0 78.2%
if -4.0000000000000001e133 < (*.f64 b c) < 2.0000000000000001e26Initial program 89.9%
Simplified90.6%
Taylor expanded in i around inf 52.7%
associate-*r*52.7%
*-commutative52.7%
associate-*r*52.7%
*-commutative52.7%
Simplified52.7%
if 2.0000000000000001e26 < (*.f64 b c) Initial program 86.8%
Simplified88.4%
Taylor expanded in x around 0 72.8%
Taylor expanded in j around 0 65.5%
Taylor expanded in c around inf 70.4%
*-commutative70.4%
Simplified70.4%
Final simplification60.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 (<= (* b c) -5e-83)
(+ (* b c) (* j (* k -27.0)))
(if (<= (* b c) 5e+45)
(* -4.0 (+ (* a t) (* x i)))
(* c (+ b (* -4.0 (/ (* a t) 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 tmp;
if ((b * c) <= -5e-83) {
tmp = (b * c) + (j * (k * -27.0));
} else if ((b * c) <= 5e+45) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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) :: tmp
if ((b * c) <= (-5d-83)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if ((b * c) <= 5d+45) then
tmp = (-4.0d0) * ((a * t) + (x * i))
else
tmp = c * (b + ((-4.0d0) * ((a * t) / 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 tmp;
if ((b * c) <= -5e-83) {
tmp = (b * c) + (j * (k * -27.0));
} else if ((b * c) <= 5e+45) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = c * (b + (-4.0 * ((a * t) / 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): tmp = 0 if (b * c) <= -5e-83: tmp = (b * c) + (j * (k * -27.0)) elif (b * c) <= 5e+45: tmp = -4.0 * ((a * t) + (x * i)) else: tmp = c * (b + (-4.0 * ((a * t) / 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) tmp = 0.0 if (Float64(b * c) <= -5e-83) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (Float64(b * c) <= 5e+45) tmp = Float64(-4.0 * Float64(Float64(a * t) + Float64(x * i))); else tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(a * t) / 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)
tmp = 0.0;
if ((b * c) <= -5e-83)
tmp = (b * c) + (j * (k * -27.0));
elseif ((b * c) <= 5e+45)
tmp = -4.0 * ((a * t) + (x * i));
else
tmp = c * (b + (-4.0 * ((a * t) / 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_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e-83], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+45], N[(-4.0 * N[(N[(a * t), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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}\;b \cdot c \leq -5 \cdot 10^{-83}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+45}:\\
\;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5e-83Initial program 85.2%
Simplified86.4%
Taylor expanded in b around inf 55.4%
if -5e-83 < (*.f64 b c) < 5e45Initial program 92.6%
distribute-rgt-out--93.6%
associate-*r*93.7%
*-commutative93.7%
associate-*r*93.6%
*-commutative93.6%
associate-*l*93.6%
Applied egg-rr93.6%
Taylor expanded in t around inf 93.6%
Taylor expanded in a around inf 72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in j around 0 50.4%
cancel-sign-sub-inv50.4%
metadata-eval50.4%
+-commutative50.4%
*-commutative50.4%
distribute-lft-out50.4%
*-commutative50.4%
Simplified50.4%
if 5e45 < (*.f64 b c) Initial program 85.6%
Simplified87.4%
Taylor expanded in x around 0 75.5%
Taylor expanded in j around 0 67.5%
Taylor expanded in c around inf 71.1%
*-commutative71.1%
Simplified71.1%
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 (if (or (<= (* b c) -9e+130) (not (<= (* b c) 1.55e+49))) (+ (* b c) (* -4.0 (* a t))) (* -4.0 (+ (* a t) (* 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 (((b * c) <= -9e+130) || !((b * c) <= 1.55e+49)) {
tmp = (b * c) + (-4.0 * (a * t));
} else {
tmp = -4.0 * ((a * t) + (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 (((b * c) <= (-9d+130)) .or. (.not. ((b * c) <= 1.55d+49))) then
tmp = (b * c) + ((-4.0d0) * (a * t))
else
tmp = (-4.0d0) * ((a * t) + (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 (((b * c) <= -9e+130) || !((b * c) <= 1.55e+49)) {
tmp = (b * c) + (-4.0 * (a * t));
} else {
tmp = -4.0 * ((a * t) + (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 ((b * c) <= -9e+130) or not ((b * c) <= 1.55e+49): tmp = (b * c) + (-4.0 * (a * t)) else: tmp = -4.0 * ((a * t) + (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 ((Float64(b * c) <= -9e+130) || !(Float64(b * c) <= 1.55e+49)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(a * t))); else tmp = Float64(-4.0 * Float64(Float64(a * t) + 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 (((b * c) <= -9e+130) || ~(((b * c) <= 1.55e+49)))
tmp = (b * c) + (-4.0 * (a * t));
else
tmp = -4.0 * ((a * t) + (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[N[(b * c), $MachinePrecision], -9e+130], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.55e+49]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] + N[(x * 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}\;b \cdot c \leq -9 \cdot 10^{+130} \lor \neg \left(b \cdot c \leq 1.55 \cdot 10^{+49}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.00000000000000078e130 or 1.54999999999999996e49 < (*.f64 b c) Initial program 85.4%
Simplified86.5%
Taylor expanded in x around 0 78.5%
Taylor expanded in j around 0 71.9%
if -9.00000000000000078e130 < (*.f64 b c) < 1.54999999999999996e49Initial program 90.2%
distribute-rgt-out--92.1%
associate-*r*90.3%
*-commutative90.3%
associate-*r*92.1%
*-commutative92.1%
associate-*l*92.1%
Applied egg-rr92.1%
Taylor expanded in t around inf 87.8%
Taylor expanded in a around inf 68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in j around 0 45.6%
cancel-sign-sub-inv45.6%
metadata-eval45.6%
+-commutative45.6%
*-commutative45.6%
distribute-lft-out45.6%
*-commutative45.6%
Simplified45.6%
Final simplification55.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.9e+217) (not (<= (* b c) 1.35e+194))) (* b c) (* -4.0 (+ (* a t) (* 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 (((b * c) <= -1.9e+217) || !((b * c) <= 1.35e+194)) {
tmp = b * c;
} else {
tmp = -4.0 * ((a * t) + (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 (((b * c) <= (-1.9d+217)) .or. (.not. ((b * c) <= 1.35d+194))) then
tmp = b * c
else
tmp = (-4.0d0) * ((a * t) + (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 (((b * c) <= -1.9e+217) || !((b * c) <= 1.35e+194)) {
tmp = b * c;
} else {
tmp = -4.0 * ((a * t) + (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 ((b * c) <= -1.9e+217) or not ((b * c) <= 1.35e+194): tmp = b * c else: tmp = -4.0 * ((a * t) + (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 ((Float64(b * c) <= -1.9e+217) || !(Float64(b * c) <= 1.35e+194)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(a * t) + 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 (((b * c) <= -1.9e+217) || ~(((b * c) <= 1.35e+194)))
tmp = b * c;
else
tmp = -4.0 * ((a * t) + (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[N[(b * c), $MachinePrecision], -1.9e+217], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.35e+194]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] + N[(x * 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}\;b \cdot c \leq -1.9 \cdot 10^{+217} \lor \neg \left(b \cdot c \leq 1.35 \cdot 10^{+194}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.90000000000000001e217 or 1.3500000000000001e194 < (*.f64 b c) Initial program 82.9%
Simplified86.3%
Taylor expanded in b around inf 77.0%
Taylor expanded in b around inf 74.5%
if -1.90000000000000001e217 < (*.f64 b c) < 1.3500000000000001e194Initial program 90.1%
distribute-rgt-out--91.6%
associate-*r*90.6%
*-commutative90.6%
associate-*r*91.6%
*-commutative91.6%
associate-*l*91.6%
Applied egg-rr91.6%
Taylor expanded in t around inf 85.3%
Taylor expanded in a around inf 66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in j around 0 45.8%
cancel-sign-sub-inv45.8%
metadata-eval45.8%
+-commutative45.8%
*-commutative45.8%
distribute-lft-out45.8%
*-commutative45.8%
Simplified45.8%
Final simplification52.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 (if (or (<= a -3.55e+33) (not (<= a 1e+100))) (* -4.0 (+ (* a t) (* x i))) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 ((a <= -3.55e+33) || !(a <= 1e+100)) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((a <= (-3.55d+33)) .or. (.not. (a <= 1d+100))) then
tmp = (-4.0d0) * ((a * t) + (x * i))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 ((a <= -3.55e+33) || !(a <= 1e+100)) {
tmp = -4.0 * ((a * t) + (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -3.55e+33) or not (a <= 1e+100): tmp = -4.0 * ((a * t) + (x * i)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -3.55e+33) || !(a <= 1e+100)) tmp = Float64(-4.0 * Float64(Float64(a * t) + Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((a <= -3.55e+33) || ~((a <= 1e+100)))
tmp = -4.0 * ((a * t) + (x * i));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -3.55e+33], N[Not[LessEqual[a, 1e+100]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.55 \cdot 10^{+33} \lor \neg \left(a \leq 10^{+100}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if a < -3.54999999999999989e33 or 1.00000000000000002e100 < a Initial program 83.9%
distribute-rgt-out--86.8%
associate-*r*87.7%
*-commutative87.7%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
Applied egg-rr86.8%
Taylor expanded in t around inf 82.2%
Taylor expanded in a around inf 73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in j around 0 59.7%
cancel-sign-sub-inv59.7%
metadata-eval59.7%
+-commutative59.7%
*-commutative59.7%
distribute-lft-out59.7%
*-commutative59.7%
Simplified59.7%
if -3.54999999999999989e33 < a < 1.00000000000000002e100Initial program 91.5%
Simplified89.6%
Taylor expanded in b around inf 54.2%
Final simplification56.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 (if (or (<= (* b c) -2e+163) (not (<= (* b c) 7.8e+51))) (* b c) (* -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 (((b * c) <= -2e+163) || !((b * c) <= 7.8e+51)) {
tmp = b * c;
} else {
tmp = -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 (((b * c) <= (-2d+163)) .or. (.not. ((b * c) <= 7.8d+51))) then
tmp = b * c
else
tmp = (-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 (((b * c) <= -2e+163) || !((b * c) <= 7.8e+51)) {
tmp = b * c;
} else {
tmp = -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 ((b * c) <= -2e+163) or not ((b * c) <= 7.8e+51): tmp = b * c else: tmp = -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 ((Float64(b * c) <= -2e+163) || !(Float64(b * c) <= 7.8e+51)) tmp = Float64(b * c); else tmp = 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 (((b * c) <= -2e+163) || ~(((b * c) <= 7.8e+51)))
tmp = b * c;
else
tmp = -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[N[(b * c), $MachinePrecision], -2e+163], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7.8e+51]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+163} \lor \neg \left(b \cdot c \leq 7.8 \cdot 10^{+51}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9999999999999999e163 or 7.79999999999999968e51 < (*.f64 b c) Initial program 85.7%
Simplified89.0%
Taylor expanded in b around inf 67.1%
Taylor expanded in b around inf 58.9%
if -1.9999999999999999e163 < (*.f64 b c) < 7.79999999999999968e51Initial program 89.9%
distribute-rgt-out--91.7%
associate-*r*90.0%
*-commutative90.0%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
Applied egg-rr91.7%
Taylor expanded in i around inf 30.5%
*-commutative30.5%
Simplified30.5%
Final simplification40.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) -2.9e-15) (not (<= (* b c) 9e+25))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.9e-15) || !((b * c) <= 9e+25)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.9d-15)) .or. (.not. ((b * c) <= 9d+25))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.9e-15) || !((b * c) <= 9e+25)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.9e-15) or not ((b * c) <= 9e+25): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.9e-15) || !(Float64(b * c) <= 9e+25)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.9e-15) || ~(((b * c) <= 9e+25)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.9e-15], N[Not[LessEqual[N[(b * c), $MachinePrecision], 9e+25]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.9 \cdot 10^{-15} \lor \neg \left(b \cdot c \leq 9 \cdot 10^{+25}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -2.90000000000000019e-15 or 9.0000000000000006e25 < (*.f64 b c) Initial program 87.2%
Simplified88.7%
Taylor expanded in b around inf 58.1%
Taylor expanded in b around inf 47.5%
if -2.90000000000000019e-15 < (*.f64 b c) < 9.0000000000000006e25Initial program 89.7%
Simplified91.4%
Taylor expanded in j around inf 28.2%
Final simplification38.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 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 88.4%
Simplified90.0%
Taylor expanded in b around inf 44.9%
Taylor expanded in b around inf 26.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024172
(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)))