
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified30.0%
Taylor expanded in x around inf 55.4%
Final simplification92.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (* t (* a 4.0))))
(t_3 (+ t_1 (* (* t a) -4.0))))
(if (<= (* b c) -2.45e+150)
(+ (* b c) t_1)
(if (<= (* b c) -0.00027)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) -5.8e-98)
t_2
(if (<= (* b c) 1.26e-285)
(+ t_1 (* (* x i) -4.0))
(if (<= (* b c) 3e-58)
t_3
(if (<= (* b c) 6500000000.0)
(* x (* 18.0 (* y (* z t))))
(if (<= (* b c) 2.9e+100) t_3 t_2)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - (t * (a * 4.0));
double t_3 = t_1 + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2.45e+150) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -0.00027) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= -5.8e-98) {
tmp = t_2;
} else if ((b * c) <= 1.26e-285) {
tmp = t_1 + ((x * i) * -4.0);
} else if ((b * c) <= 3e-58) {
tmp = t_3;
} else if ((b * c) <= 6500000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 2.9e+100) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) - (t * (a * 4.0d0))
t_3 = t_1 + ((t * a) * (-4.0d0))
if ((b * c) <= (-2.45d+150)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-0.00027d0)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= (-5.8d-98)) then
tmp = t_2
else if ((b * c) <= 1.26d-285) then
tmp = t_1 + ((x * i) * (-4.0d0))
else if ((b * c) <= 3d-58) then
tmp = t_3
else if ((b * c) <= 6500000000.0d0) then
tmp = x * (18.0d0 * (y * (z * t)))
else if ((b * c) <= 2.9d+100) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - (t * (a * 4.0));
double t_3 = t_1 + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2.45e+150) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -0.00027) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= -5.8e-98) {
tmp = t_2;
} else if ((b * c) <= 1.26e-285) {
tmp = t_1 + ((x * i) * -4.0);
} else if ((b * c) <= 3e-58) {
tmp = t_3;
} else if ((b * c) <= 6500000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 2.9e+100) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) - (t * (a * 4.0)) t_3 = t_1 + ((t * a) * -4.0) tmp = 0 if (b * c) <= -2.45e+150: tmp = (b * c) + t_1 elif (b * c) <= -0.00027: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= -5.8e-98: tmp = t_2 elif (b * c) <= 1.26e-285: tmp = t_1 + ((x * i) * -4.0) elif (b * c) <= 3e-58: tmp = t_3 elif (b * c) <= 6500000000.0: tmp = x * (18.0 * (y * (z * t))) elif (b * c) <= 2.9e+100: tmp = t_3 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))) t_3 = Float64(t_1 + Float64(Float64(t * a) * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2.45e+150) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -0.00027) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= -5.8e-98) tmp = t_2; elseif (Float64(b * c) <= 1.26e-285) tmp = Float64(t_1 + Float64(Float64(x * i) * -4.0)); elseif (Float64(b * c) <= 3e-58) tmp = t_3; elseif (Float64(b * c) <= 6500000000.0) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (Float64(b * c) <= 2.9e+100) tmp = t_3; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) - (t * (a * 4.0));
t_3 = t_1 + ((t * a) * -4.0);
tmp = 0.0;
if ((b * c) <= -2.45e+150)
tmp = (b * c) + t_1;
elseif ((b * c) <= -0.00027)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= -5.8e-98)
tmp = t_2;
elseif ((b * c) <= 1.26e-285)
tmp = t_1 + ((x * i) * -4.0);
elseif ((b * c) <= 3e-58)
tmp = t_3;
elseif ((b * c) <= 6500000000.0)
tmp = x * (18.0 * (y * (z * t)));
elseif ((b * c) <= 2.9e+100)
tmp = t_3;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.45e+150], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -0.00027], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.8e-98], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.26e-285], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e-58], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 6500000000.0], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.9e+100], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - t \cdot \left(a \cdot 4\right)\\
t_3 := t_1 + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -2.45 \cdot 10^{+150}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;b \cdot c \leq -0.00027:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.26 \cdot 10^{-285}:\\
\;\;\;\;t_1 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-58}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 6500000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{+100}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.45000000000000003e150Initial program 83.7%
Simplified86.6%
Taylor expanded in b around inf 75.7%
if -2.45000000000000003e150 < (*.f64 b c) < -2.70000000000000003e-4Initial program 85.6%
Simplified85.8%
Taylor expanded in x around inf 60.8%
Taylor expanded in t around inf 42.5%
associate-*r*46.1%
Simplified46.1%
if -2.70000000000000003e-4 < (*.f64 b c) < -5.8e-98 or 2.9e100 < (*.f64 b c) Initial program 88.0%
Taylor expanded in y around 0 80.1%
Taylor expanded in j around 0 74.5%
Taylor expanded in a around inf 67.1%
associate-*r*67.1%
*-commutative67.1%
*-commutative67.1%
*-commutative67.1%
Simplified67.1%
if -5.8e-98 < (*.f64 b c) < 1.26e-285Initial program 92.2%
Simplified90.9%
Taylor expanded in i around inf 55.2%
*-commutative55.2%
Simplified55.2%
if 1.26e-285 < (*.f64 b c) < 3.00000000000000008e-58 or 6.5e9 < (*.f64 b c) < 2.9e100Initial program 91.8%
Simplified95.9%
Taylor expanded in a around inf 58.0%
if 3.00000000000000008e-58 < (*.f64 b c) < 6.5e9Initial program 77.0%
Simplified99.9%
Taylor expanded in x around inf 70.4%
Taylor expanded in t around inf 62.8%
*-commutative62.8%
associate-*l*62.9%
Simplified62.9%
Final simplification61.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i))) (t_2 (* (* j 27.0) k)))
(if (or (<= t_2 -5e+28) (not (<= t_2 4e+75)))
(- (- (* b c) (+ (* 4.0 (* t a)) t_1)) t_2)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -5e+28) || !(t_2 <= 4e+75)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - t_2;
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (j * 27.0d0) * k
if ((t_2 <= (-5d+28)) .or. (.not. (t_2 <= 4d+75))) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + t_1)) - t_2
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -5e+28) || !(t_2 <= 4e+75)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - t_2;
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = (j * 27.0) * k tmp = 0 if (t_2 <= -5e+28) or not (t_2 <= 4e+75): tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - t_2 else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_2 <= -5e+28) || !(t_2 <= 4e+75)) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_1)) - t_2); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if ((t_2 <= -5e+28) || ~((t_2 <= 4e+75)))
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - t_2;
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e+28], N[Not[LessEqual[t$95$2, 4e+75]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+28} \lor \neg \left(t_2 \leq 4 \cdot 10^{+75}\right):\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_1\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -4.99999999999999957e28 or 3.99999999999999971e75 < (*.f64 (*.f64 j 27) k) Initial program 82.9%
Taylor expanded in y around 0 81.4%
if -4.99999999999999957e28 < (*.f64 (*.f64 j 27) k) < 3.99999999999999971e75Initial program 91.5%
Simplified92.2%
Taylor expanded in j around 0 89.5%
Final simplification86.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* 18.0 (* y (* z t))))) (t_2 (* t (* a -4.0))))
(if (<= (* b c) -3.4e+150)
(* b c)
(if (<= (* b c) -0.00032)
t_1
(if (<= (* b c) -2.7e-99)
t_2
(if (<= (* b c) 4.3e-284)
(* i (* x -4.0))
(if (<= (* b c) 1.75e-75)
t_2
(if (<= (* b c) 2.9e+18)
t_1
(if (<= (* b c) 1.6e+87) t_2 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (y * (z * t)));
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -3.4e+150) {
tmp = b * c;
} else if ((b * c) <= -0.00032) {
tmp = t_1;
} else if ((b * c) <= -2.7e-99) {
tmp = t_2;
} else if ((b * c) <= 4.3e-284) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 1.75e-75) {
tmp = t_2;
} else if ((b * c) <= 2.9e+18) {
tmp = t_1;
} else if ((b * c) <= 1.6e+87) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (18.0d0 * (y * (z * t)))
t_2 = t * (a * (-4.0d0))
if ((b * c) <= (-3.4d+150)) then
tmp = b * c
else if ((b * c) <= (-0.00032d0)) then
tmp = t_1
else if ((b * c) <= (-2.7d-99)) then
tmp = t_2
else if ((b * c) <= 4.3d-284) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 1.75d-75) then
tmp = t_2
else if ((b * c) <= 2.9d+18) then
tmp = t_1
else if ((b * c) <= 1.6d+87) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (y * (z * t)));
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -3.4e+150) {
tmp = b * c;
} else if ((b * c) <= -0.00032) {
tmp = t_1;
} else if ((b * c) <= -2.7e-99) {
tmp = t_2;
} else if ((b * c) <= 4.3e-284) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 1.75e-75) {
tmp = t_2;
} else if ((b * c) <= 2.9e+18) {
tmp = t_1;
} else if ((b * c) <= 1.6e+87) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (18.0 * (y * (z * t))) t_2 = t * (a * -4.0) tmp = 0 if (b * c) <= -3.4e+150: tmp = b * c elif (b * c) <= -0.00032: tmp = t_1 elif (b * c) <= -2.7e-99: tmp = t_2 elif (b * c) <= 4.3e-284: tmp = i * (x * -4.0) elif (b * c) <= 1.75e-75: tmp = t_2 elif (b * c) <= 2.9e+18: tmp = t_1 elif (b * c) <= 1.6e+87: tmp = t_2 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -3.4e+150) tmp = Float64(b * c); elseif (Float64(b * c) <= -0.00032) tmp = t_1; elseif (Float64(b * c) <= -2.7e-99) tmp = t_2; elseif (Float64(b * c) <= 4.3e-284) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 1.75e-75) tmp = t_2; elseif (Float64(b * c) <= 2.9e+18) tmp = t_1; elseif (Float64(b * c) <= 1.6e+87) tmp = t_2; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (18.0 * (y * (z * t)));
t_2 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -3.4e+150)
tmp = b * c;
elseif ((b * c) <= -0.00032)
tmp = t_1;
elseif ((b * c) <= -2.7e-99)
tmp = t_2;
elseif ((b * c) <= 4.3e-284)
tmp = i * (x * -4.0);
elseif ((b * c) <= 1.75e-75)
tmp = t_2;
elseif ((b * c) <= 2.9e+18)
tmp = t_1;
elseif ((b * c) <= 1.6e+87)
tmp = t_2;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+150], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -0.00032], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.7e-99], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.3e-284], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.75e-75], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.9e+18], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e+87], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+150}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -0.00032:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-99}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{-284}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.39999999999999983e150 or 1.6e87 < (*.f64 b c) Initial program 86.9%
Simplified88.1%
add-cube-cbrt88.1%
pow388.1%
*-commutative88.1%
Applied egg-rr88.1%
Taylor expanded in b around inf 60.1%
if -3.39999999999999983e150 < (*.f64 b c) < -3.20000000000000026e-4 or 1.74999999999999993e-75 < (*.f64 b c) < 2.9e18Initial program 80.3%
Simplified91.5%
Taylor expanded in x around inf 59.3%
Taylor expanded in t around inf 46.1%
*-commutative46.1%
associate-*l*50.2%
Simplified50.2%
if -3.20000000000000026e-4 < (*.f64 b c) < -2.7e-99 or 4.3000000000000003e-284 < (*.f64 b c) < 1.74999999999999993e-75 or 2.9e18 < (*.f64 b c) < 1.6e87Initial program 92.0%
Simplified90.7%
add-cube-cbrt90.6%
pow390.6%
*-commutative90.6%
Applied egg-rr90.6%
Taylor expanded in a around inf 42.1%
*-commutative42.1%
*-commutative42.1%
associate-*l*42.1%
Simplified42.1%
if -2.7e-99 < (*.f64 b c) < 4.3000000000000003e-284Initial program 92.2%
Simplified89.3%
add-cube-cbrt89.2%
pow389.3%
*-commutative89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 33.6%
*-commutative33.6%
associate-*r*33.6%
*-commutative33.6%
Simplified33.6%
Final simplification47.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= (* b c) -2e+152)
(* b c)
(if (<= (* b c) -0.00024)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) -3.5e-100)
t_1
(if (<= (* b c) 1.9e-283)
(* i (* x -4.0))
(if (<= (* b c) 3.8e-71)
t_1
(if (<= (* b c) 2.9e+18)
(* x (* 18.0 (* y (* z t))))
(if (<= (* b c) 5.2e+86) t_1 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b * c) <= -2e+152) {
tmp = b * c;
} else if ((b * c) <= -0.00024) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= -3.5e-100) {
tmp = t_1;
} else if ((b * c) <= 1.9e-283) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 3.8e-71) {
tmp = t_1;
} else if ((b * c) <= 2.9e+18) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 5.2e+86) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if ((b * c) <= (-2d+152)) then
tmp = b * c
else if ((b * c) <= (-0.00024d0)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= (-3.5d-100)) then
tmp = t_1
else if ((b * c) <= 1.9d-283) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 3.8d-71) then
tmp = t_1
else if ((b * c) <= 2.9d+18) then
tmp = x * (18.0d0 * (y * (z * t)))
else if ((b * c) <= 5.2d+86) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b * c) <= -2e+152) {
tmp = b * c;
} else if ((b * c) <= -0.00024) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= -3.5e-100) {
tmp = t_1;
} else if ((b * c) <= 1.9e-283) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 3.8e-71) {
tmp = t_1;
} else if ((b * c) <= 2.9e+18) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 5.2e+86) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if (b * c) <= -2e+152: tmp = b * c elif (b * c) <= -0.00024: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= -3.5e-100: tmp = t_1 elif (b * c) <= 1.9e-283: tmp = i * (x * -4.0) elif (b * c) <= 3.8e-71: tmp = t_1 elif (b * c) <= 2.9e+18: tmp = x * (18.0 * (y * (z * t))) elif (b * c) <= 5.2e+86: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2e+152) tmp = Float64(b * c); elseif (Float64(b * c) <= -0.00024) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= -3.5e-100) tmp = t_1; elseif (Float64(b * c) <= 1.9e-283) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 3.8e-71) tmp = t_1; elseif (Float64(b * c) <= 2.9e+18) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (Float64(b * c) <= 5.2e+86) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -2e+152)
tmp = b * c;
elseif ((b * c) <= -0.00024)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= -3.5e-100)
tmp = t_1;
elseif ((b * c) <= 1.9e-283)
tmp = i * (x * -4.0);
elseif ((b * c) <= 3.8e-71)
tmp = t_1;
elseif ((b * c) <= 2.9e+18)
tmp = x * (18.0 * (y * (z * t)));
elseif ((b * c) <= 5.2e+86)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+152], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -0.00024], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.5e-100], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.9e-283], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.8e-71], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.9e+18], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.2e+86], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+152}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -0.00024:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -3.5 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{-283}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5.2 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0000000000000001e152 or 5.1999999999999995e86 < (*.f64 b c) Initial program 86.9%
Simplified88.1%
add-cube-cbrt88.1%
pow388.1%
*-commutative88.1%
Applied egg-rr88.1%
Taylor expanded in b around inf 60.1%
if -2.0000000000000001e152 < (*.f64 b c) < -2.40000000000000006e-4Initial program 85.6%
Simplified85.8%
Taylor expanded in x around inf 60.8%
Taylor expanded in t around inf 42.5%
associate-*r*46.1%
Simplified46.1%
if -2.40000000000000006e-4 < (*.f64 b c) < -3.5000000000000001e-100 or 1.9000000000000001e-283 < (*.f64 b c) < 3.79999999999999992e-71 or 2.9e18 < (*.f64 b c) < 5.1999999999999995e86Initial program 92.0%
Simplified90.7%
add-cube-cbrt90.6%
pow390.6%
*-commutative90.6%
Applied egg-rr90.6%
Taylor expanded in a around inf 42.1%
*-commutative42.1%
*-commutative42.1%
associate-*l*42.1%
Simplified42.1%
if -3.5000000000000001e-100 < (*.f64 b c) < 1.9000000000000001e-283Initial program 92.2%
Simplified89.3%
add-cube-cbrt89.2%
pow389.3%
*-commutative89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 33.6%
*-commutative33.6%
associate-*r*33.6%
*-commutative33.6%
Simplified33.6%
if 3.79999999999999992e-71 < (*.f64 b c) < 2.9e18Initial program 72.3%
Simplified99.9%
Taylor expanded in x around inf 57.0%
Taylor expanded in t around inf 51.4%
*-commutative51.4%
associate-*l*51.5%
Simplified51.5%
Final simplification47.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* x (* 4.0 i))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_3 (* t (- (* 18.0 (* z (* x y))) (* a 4.0))))
(t_4 (* j (* k -27.0)))
(t_5 (+ (* b c) t_4)))
(if (<= t -5.2e-20)
t_3
(if (<= t -5.8e-92)
(+ t_4 (* (* x i) -4.0))
(if (<= t -4.8e-98)
t_2
(if (<= t -1.8e-227)
t_5
(if (<= t 3.3e-178)
t_1
(if (<= t 1.3e-90)
(+ t_4 (* (* t a) -4.0))
(if (<= t 1.55e+51)
t_1
(if (<= t 1.25e+130) t_3 (if (<= t 6e+165) t_5 t_2)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (4.0 * i));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double t_4 = j * (k * -27.0);
double t_5 = (b * c) + t_4;
double tmp;
if (t <= -5.2e-20) {
tmp = t_3;
} else if (t <= -5.8e-92) {
tmp = t_4 + ((x * i) * -4.0);
} else if (t <= -4.8e-98) {
tmp = t_2;
} else if (t <= -1.8e-227) {
tmp = t_5;
} else if (t <= 3.3e-178) {
tmp = t_1;
} else if (t <= 1.3e-90) {
tmp = t_4 + ((t * a) * -4.0);
} else if (t <= 1.55e+51) {
tmp = t_1;
} else if (t <= 1.25e+130) {
tmp = t_3;
} else if (t <= 6e+165) {
tmp = t_5;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (b * c) - (x * (4.0d0 * i))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_3 = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
t_4 = j * (k * (-27.0d0))
t_5 = (b * c) + t_4
if (t <= (-5.2d-20)) then
tmp = t_3
else if (t <= (-5.8d-92)) then
tmp = t_4 + ((x * i) * (-4.0d0))
else if (t <= (-4.8d-98)) then
tmp = t_2
else if (t <= (-1.8d-227)) then
tmp = t_5
else if (t <= 3.3d-178) then
tmp = t_1
else if (t <= 1.3d-90) then
tmp = t_4 + ((t * a) * (-4.0d0))
else if (t <= 1.55d+51) then
tmp = t_1
else if (t <= 1.25d+130) then
tmp = t_3
else if (t <= 6d+165) then
tmp = t_5
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (4.0 * i));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double t_4 = j * (k * -27.0);
double t_5 = (b * c) + t_4;
double tmp;
if (t <= -5.2e-20) {
tmp = t_3;
} else if (t <= -5.8e-92) {
tmp = t_4 + ((x * i) * -4.0);
} else if (t <= -4.8e-98) {
tmp = t_2;
} else if (t <= -1.8e-227) {
tmp = t_5;
} else if (t <= 3.3e-178) {
tmp = t_1;
} else if (t <= 1.3e-90) {
tmp = t_4 + ((t * a) * -4.0);
} else if (t <= 1.55e+51) {
tmp = t_1;
} else if (t <= 1.25e+130) {
tmp = t_3;
} else if (t <= 6e+165) {
tmp = t_5;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (x * (4.0 * i)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0)) t_4 = j * (k * -27.0) t_5 = (b * c) + t_4 tmp = 0 if t <= -5.2e-20: tmp = t_3 elif t <= -5.8e-92: tmp = t_4 + ((x * i) * -4.0) elif t <= -4.8e-98: tmp = t_2 elif t <= -1.8e-227: tmp = t_5 elif t <= 3.3e-178: tmp = t_1 elif t <= 1.3e-90: tmp = t_4 + ((t * a) * -4.0) elif t <= 1.55e+51: tmp = t_1 elif t <= 1.25e+130: tmp = t_3 elif t <= 6e+165: tmp = t_5 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))) t_4 = Float64(j * Float64(k * -27.0)) t_5 = Float64(Float64(b * c) + t_4) tmp = 0.0 if (t <= -5.2e-20) tmp = t_3; elseif (t <= -5.8e-92) tmp = Float64(t_4 + Float64(Float64(x * i) * -4.0)); elseif (t <= -4.8e-98) tmp = t_2; elseif (t <= -1.8e-227) tmp = t_5; elseif (t <= 3.3e-178) tmp = t_1; elseif (t <= 1.3e-90) tmp = Float64(t_4 + Float64(Float64(t * a) * -4.0)); elseif (t <= 1.55e+51) tmp = t_1; elseif (t <= 1.25e+130) tmp = t_3; elseif (t <= 6e+165) tmp = t_5; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (x * (4.0 * i));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
t_4 = j * (k * -27.0);
t_5 = (b * c) + t_4;
tmp = 0.0;
if (t <= -5.2e-20)
tmp = t_3;
elseif (t <= -5.8e-92)
tmp = t_4 + ((x * i) * -4.0);
elseif (t <= -4.8e-98)
tmp = t_2;
elseif (t <= -1.8e-227)
tmp = t_5;
elseif (t <= 3.3e-178)
tmp = t_1;
elseif (t <= 1.3e-90)
tmp = t_4 + ((t * a) * -4.0);
elseif (t <= 1.55e+51)
tmp = t_1;
elseif (t <= 1.25e+130)
tmp = t_3;
elseif (t <= 6e+165)
tmp = t_5;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * c), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[t, -5.2e-20], t$95$3, If[LessEqual[t, -5.8e-92], N[(t$95$4 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e-98], t$95$2, If[LessEqual[t, -1.8e-227], t$95$5, If[LessEqual[t, 3.3e-178], t$95$1, If[LessEqual[t, 1.3e-90], N[(t$95$4 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+51], t$95$1, If[LessEqual[t, 1.25e+130], t$95$3, If[LessEqual[t, 6e+165], t$95$5, t$95$2]]]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
t_4 := j \cdot \left(k \cdot -27\right)\\
t_5 := b \cdot c + t_4\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-20}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-92}:\\
\;\;\;\;t_4 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-227}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-90}:\\
\;\;\;\;t_4 + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+130}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+165}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.1999999999999999e-20 or 1.55000000000000006e51 < t < 1.2499999999999999e130Initial program 86.8%
Simplified88.4%
Taylor expanded in t around inf 69.6%
expm1-log1p-u46.6%
expm1-udef44.8%
Applied egg-rr44.8%
expm1-def46.6%
expm1-log1p69.6%
associate-*r*73.2%
Simplified73.2%
if -5.1999999999999999e-20 < t < -5.79999999999999969e-92Initial program 92.1%
Simplified84.3%
Taylor expanded in i around inf 61.9%
*-commutative61.9%
Simplified61.9%
if -5.79999999999999969e-92 < t < -4.8000000000000001e-98 or 5.99999999999999981e165 < t Initial program 82.7%
Simplified89.6%
Taylor expanded in t around inf 72.1%
if -4.8000000000000001e-98 < t < -1.8e-227 or 1.2499999999999999e130 < t < 5.99999999999999981e165Initial program 77.4%
Simplified87.4%
Taylor expanded in b around inf 82.1%
if -1.8e-227 < t < 3.3000000000000002e-178 or 1.3e-90 < t < 1.55000000000000006e51Initial program 93.5%
Taylor expanded in y around 0 87.5%
Taylor expanded in j around 0 69.7%
Taylor expanded in a around 0 58.2%
associate-*r*58.2%
*-commutative58.2%
Simplified58.2%
if 3.3000000000000002e-178 < t < 1.3e-90Initial program 93.9%
Simplified88.5%
Taylor expanded in a around inf 64.0%
Final simplification67.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* (* t a) -4.0))))
(if (<= (* b c) -2.2e+150)
(+ (* b c) t_1)
(if (<= (* b c) -0.00082)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) 3.1e-55)
t_2
(if (<= (* b c) 1150000000.0)
(* x (* 18.0 (* y (* z t))))
(if (<= (* b c) 5.4e+98) t_2 (- (* b c) (* t (* a 4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2.2e+150) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -0.00082) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 3.1e-55) {
tmp = t_2;
} else if ((b * c) <= 1150000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 5.4e+98) {
tmp = t_2;
} else {
tmp = (b * c) - (t * (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((t * a) * (-4.0d0))
if ((b * c) <= (-2.2d+150)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-0.00082d0)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= 3.1d-55) then
tmp = t_2
else if ((b * c) <= 1150000000.0d0) then
tmp = x * (18.0d0 * (y * (z * t)))
else if ((b * c) <= 5.4d+98) then
tmp = t_2
else
tmp = (b * c) - (t * (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2.2e+150) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -0.00082) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 3.1e-55) {
tmp = t_2;
} else if ((b * c) <= 1150000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if ((b * c) <= 5.4e+98) {
tmp = t_2;
} else {
tmp = (b * c) - (t * (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + ((t * a) * -4.0) tmp = 0 if (b * c) <= -2.2e+150: tmp = (b * c) + t_1 elif (b * c) <= -0.00082: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= 3.1e-55: tmp = t_2 elif (b * c) <= 1150000000.0: tmp = x * (18.0 * (y * (z * t))) elif (b * c) <= 5.4e+98: tmp = t_2 else: tmp = (b * c) - (t * (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(Float64(t * a) * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2.2e+150) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -0.00082) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 3.1e-55) tmp = t_2; elseif (Float64(b * c) <= 1150000000.0) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (Float64(b * c) <= 5.4e+98) tmp = t_2; else tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + ((t * a) * -4.0);
tmp = 0.0;
if ((b * c) <= -2.2e+150)
tmp = (b * c) + t_1;
elseif ((b * c) <= -0.00082)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= 3.1e-55)
tmp = t_2;
elseif ((b * c) <= 1150000000.0)
tmp = x * (18.0 * (y * (z * t)));
elseif ((b * c) <= 5.4e+98)
tmp = t_2;
else
tmp = (b * c) - (t * (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.2e+150], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -0.00082], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.1e-55], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1150000000.0], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.4e+98], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -2.2 \cdot 10^{+150}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;b \cdot c \leq -0.00082:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{-55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1150000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5.4 \cdot 10^{+98}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.19999999999999999e150Initial program 83.7%
Simplified86.6%
Taylor expanded in b around inf 75.7%
if -2.19999999999999999e150 < (*.f64 b c) < -8.1999999999999998e-4Initial program 85.6%
Simplified85.8%
Taylor expanded in x around inf 60.8%
Taylor expanded in t around inf 42.5%
associate-*r*46.1%
Simplified46.1%
if -8.1999999999999998e-4 < (*.f64 b c) < 3.09999999999999997e-55 or 1.15e9 < (*.f64 b c) < 5.4e98Initial program 91.1%
Simplified91.3%
Taylor expanded in a around inf 52.1%
if 3.09999999999999997e-55 < (*.f64 b c) < 1.15e9Initial program 77.0%
Simplified99.9%
Taylor expanded in x around inf 70.4%
Taylor expanded in t around inf 62.8%
*-commutative62.8%
associate-*l*62.9%
Simplified62.9%
if 5.4e98 < (*.f64 b c) Initial program 89.0%
Taylor expanded in y around 0 81.5%
Taylor expanded in j around 0 79.2%
Taylor expanded in a around inf 72.7%
associate-*r*72.7%
*-commutative72.7%
*-commutative72.7%
*-commutative72.7%
Simplified72.7%
Final simplification59.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ (* b c) t_2)))
(if (<= i -9.2e+64)
(- (* b c) (* x (* 4.0 i)))
(if (<= i -5.3e+39)
(+ t_2 (* (* x i) -4.0))
(if (<= i -9e-68)
t_1
(if (<= i -4.7e-113)
t_3
(if (<= i 5.5e-181)
(- (* b c) (* t (* a 4.0)))
(if (<= i 2.8e-41)
t_1
(if (or (<= i 1.35e+76)
(and (not (<= i 2e+129)) (<= i 2.15e+153)))
t_3
(- (* (* t a) (- 4.0)) (* 4.0 (* x i))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = (b * c) + t_2;
double tmp;
if (i <= -9.2e+64) {
tmp = (b * c) - (x * (4.0 * i));
} else if (i <= -5.3e+39) {
tmp = t_2 + ((x * i) * -4.0);
} else if (i <= -9e-68) {
tmp = t_1;
} else if (i <= -4.7e-113) {
tmp = t_3;
} else if (i <= 5.5e-181) {
tmp = (b * c) - (t * (a * 4.0));
} else if (i <= 2.8e-41) {
tmp = t_1;
} else if ((i <= 1.35e+76) || (!(i <= 2e+129) && (i <= 2.15e+153))) {
tmp = t_3;
} else {
tmp = ((t * a) * -4.0) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = (b * c) + t_2
if (i <= (-9.2d+64)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (i <= (-5.3d+39)) then
tmp = t_2 + ((x * i) * (-4.0d0))
else if (i <= (-9d-68)) then
tmp = t_1
else if (i <= (-4.7d-113)) then
tmp = t_3
else if (i <= 5.5d-181) then
tmp = (b * c) - (t * (a * 4.0d0))
else if (i <= 2.8d-41) then
tmp = t_1
else if ((i <= 1.35d+76) .or. (.not. (i <= 2d+129)) .and. (i <= 2.15d+153)) then
tmp = t_3
else
tmp = ((t * a) * -4.0d0) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = (b * c) + t_2;
double tmp;
if (i <= -9.2e+64) {
tmp = (b * c) - (x * (4.0 * i));
} else if (i <= -5.3e+39) {
tmp = t_2 + ((x * i) * -4.0);
} else if (i <= -9e-68) {
tmp = t_1;
} else if (i <= -4.7e-113) {
tmp = t_3;
} else if (i <= 5.5e-181) {
tmp = (b * c) - (t * (a * 4.0));
} else if (i <= 2.8e-41) {
tmp = t_1;
} else if ((i <= 1.35e+76) || (!(i <= 2e+129) && (i <= 2.15e+153))) {
tmp = t_3;
} else {
tmp = ((t * a) * -4.0) - (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = (b * c) + t_2 tmp = 0 if i <= -9.2e+64: tmp = (b * c) - (x * (4.0 * i)) elif i <= -5.3e+39: tmp = t_2 + ((x * i) * -4.0) elif i <= -9e-68: tmp = t_1 elif i <= -4.7e-113: tmp = t_3 elif i <= 5.5e-181: tmp = (b * c) - (t * (a * 4.0)) elif i <= 2.8e-41: tmp = t_1 elif (i <= 1.35e+76) or (not (i <= 2e+129) and (i <= 2.15e+153)): tmp = t_3 else: tmp = ((t * a) * -4.0) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(Float64(b * c) + t_2) tmp = 0.0 if (i <= -9.2e+64) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (i <= -5.3e+39) tmp = Float64(t_2 + Float64(Float64(x * i) * -4.0)); elseif (i <= -9e-68) tmp = t_1; elseif (i <= -4.7e-113) tmp = t_3; elseif (i <= 5.5e-181) tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); elseif (i <= 2.8e-41) tmp = t_1; elseif ((i <= 1.35e+76) || (!(i <= 2e+129) && (i <= 2.15e+153))) tmp = t_3; else tmp = Float64(Float64(Float64(t * a) * Float64(-4.0)) - 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = (b * c) + t_2;
tmp = 0.0;
if (i <= -9.2e+64)
tmp = (b * c) - (x * (4.0 * i));
elseif (i <= -5.3e+39)
tmp = t_2 + ((x * i) * -4.0);
elseif (i <= -9e-68)
tmp = t_1;
elseif (i <= -4.7e-113)
tmp = t_3;
elseif (i <= 5.5e-181)
tmp = (b * c) - (t * (a * 4.0));
elseif (i <= 2.8e-41)
tmp = t_1;
elseif ((i <= 1.35e+76) || (~((i <= 2e+129)) && (i <= 2.15e+153)))
tmp = t_3;
else
tmp = ((t * a) * -4.0) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[i, -9.2e+64], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -5.3e+39], N[(t$95$2 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -9e-68], t$95$1, If[LessEqual[i, -4.7e-113], t$95$3, If[LessEqual[i, 5.5e-181], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.8e-41], t$95$1, If[Or[LessEqual[i, 1.35e+76], And[N[Not[LessEqual[i, 2e+129]], $MachinePrecision], LessEqual[i, 2.15e+153]]], t$95$3, N[(N[(N[(t * a), $MachinePrecision] * (-4.0)), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := b \cdot c + t_2\\
\mathbf{if}\;i \leq -9.2 \cdot 10^{+64}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;i \leq -5.3 \cdot 10^{+39}:\\
\;\;\;\;t_2 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;i \leq -9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq -4.7 \cdot 10^{-113}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 5.5 \cdot 10^{-181}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{elif}\;i \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.35 \cdot 10^{+76} \lor \neg \left(i \leq 2 \cdot 10^{+129}\right) \land i \leq 2.15 \cdot 10^{+153}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a\right) \cdot \left(-4\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if i < -9.2e64Initial program 91.1%
Taylor expanded in y around 0 80.4%
Taylor expanded in j around 0 75.2%
Taylor expanded in a around 0 64.4%
associate-*r*64.4%
*-commutative64.4%
Simplified64.4%
if -9.2e64 < i < -5.29999999999999979e39Initial program 100.0%
Simplified100.0%
Taylor expanded in i around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5.29999999999999979e39 < i < -8.99999999999999998e-68 or 5.50000000000000033e-181 < i < 2.8000000000000002e-41Initial program 84.2%
Simplified86.9%
Taylor expanded in t around inf 64.9%
if -8.99999999999999998e-68 < i < -4.7000000000000002e-113 or 2.8000000000000002e-41 < i < 1.34999999999999995e76 or 2e129 < i < 2.1499999999999999e153Initial program 89.1%
Simplified92.0%
Taylor expanded in b around inf 70.5%
if -4.7000000000000002e-113 < i < 5.50000000000000033e-181Initial program 88.2%
Taylor expanded in y around 0 77.3%
Taylor expanded in j around 0 62.3%
Taylor expanded in a around inf 60.0%
associate-*r*60.0%
*-commutative60.0%
*-commutative60.0%
*-commutative60.0%
Simplified60.0%
if 1.34999999999999995e76 < i < 2e129 or 2.1499999999999999e153 < i Initial program 85.7%
Taylor expanded in y around 0 91.4%
Taylor expanded in j around 0 86.9%
Taylor expanded in b around 0 78.4%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (* t (* a 4.0))))
(t_3 (+ (* b c) t_1))
(t_4 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -6.6e+31)
t_4
(if (<= x -1.1e-46)
t_3
(if (<= x -6.8e-203)
t_2
(if (<= x -3.3e-214)
(+ t_1 (* (* t a) -4.0))
(if (<= x -2.55e-228)
t_3
(if (<= x 8.5e-284)
t_2
(if (<= x 3.1e-225) t_3 (if (<= x 3.8e+27) t_2 t_4))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - (t * (a * 4.0));
double t_3 = (b * c) + t_1;
double t_4 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -6.6e+31) {
tmp = t_4;
} else if (x <= -1.1e-46) {
tmp = t_3;
} else if (x <= -6.8e-203) {
tmp = t_2;
} else if (x <= -3.3e-214) {
tmp = t_1 + ((t * a) * -4.0);
} else if (x <= -2.55e-228) {
tmp = t_3;
} else if (x <= 8.5e-284) {
tmp = t_2;
} else if (x <= 3.1e-225) {
tmp = t_3;
} else if (x <= 3.8e+27) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) - (t * (a * 4.0d0))
t_3 = (b * c) + t_1
t_4 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-6.6d+31)) then
tmp = t_4
else if (x <= (-1.1d-46)) then
tmp = t_3
else if (x <= (-6.8d-203)) then
tmp = t_2
else if (x <= (-3.3d-214)) then
tmp = t_1 + ((t * a) * (-4.0d0))
else if (x <= (-2.55d-228)) then
tmp = t_3
else if (x <= 8.5d-284) then
tmp = t_2
else if (x <= 3.1d-225) then
tmp = t_3
else if (x <= 3.8d+27) then
tmp = t_2
else
tmp = t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - (t * (a * 4.0));
double t_3 = (b * c) + t_1;
double t_4 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -6.6e+31) {
tmp = t_4;
} else if (x <= -1.1e-46) {
tmp = t_3;
} else if (x <= -6.8e-203) {
tmp = t_2;
} else if (x <= -3.3e-214) {
tmp = t_1 + ((t * a) * -4.0);
} else if (x <= -2.55e-228) {
tmp = t_3;
} else if (x <= 8.5e-284) {
tmp = t_2;
} else if (x <= 3.1e-225) {
tmp = t_3;
} else if (x <= 3.8e+27) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) - (t * (a * 4.0)) t_3 = (b * c) + t_1 t_4 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -6.6e+31: tmp = t_4 elif x <= -1.1e-46: tmp = t_3 elif x <= -6.8e-203: tmp = t_2 elif x <= -3.3e-214: tmp = t_1 + ((t * a) * -4.0) elif x <= -2.55e-228: tmp = t_3 elif x <= 8.5e-284: tmp = t_2 elif x <= 3.1e-225: tmp = t_3 elif x <= 3.8e+27: tmp = t_2 else: tmp = t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))) t_3 = Float64(Float64(b * c) + t_1) t_4 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -6.6e+31) tmp = t_4; elseif (x <= -1.1e-46) tmp = t_3; elseif (x <= -6.8e-203) tmp = t_2; elseif (x <= -3.3e-214) tmp = Float64(t_1 + Float64(Float64(t * a) * -4.0)); elseif (x <= -2.55e-228) tmp = t_3; elseif (x <= 8.5e-284) tmp = t_2; elseif (x <= 3.1e-225) tmp = t_3; elseif (x <= 3.8e+27) tmp = t_2; else tmp = t_4; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) - (t * (a * 4.0));
t_3 = (b * c) + t_1;
t_4 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -6.6e+31)
tmp = t_4;
elseif (x <= -1.1e-46)
tmp = t_3;
elseif (x <= -6.8e-203)
tmp = t_2;
elseif (x <= -3.3e-214)
tmp = t_1 + ((t * a) * -4.0);
elseif (x <= -2.55e-228)
tmp = t_3;
elseif (x <= 8.5e-284)
tmp = t_2;
elseif (x <= 3.1e-225)
tmp = t_3;
elseif (x <= 3.8e+27)
tmp = t_2;
else
tmp = t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.6e+31], t$95$4, If[LessEqual[x, -1.1e-46], t$95$3, If[LessEqual[x, -6.8e-203], t$95$2, If[LessEqual[x, -3.3e-214], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.55e-228], t$95$3, If[LessEqual[x, 8.5e-284], t$95$2, If[LessEqual[x, 3.1e-225], t$95$3, If[LessEqual[x, 3.8e+27], t$95$2, t$95$4]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - t \cdot \left(a \cdot 4\right)\\
t_3 := b \cdot c + t_1\\
t_4 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -6.6 \cdot 10^{+31}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-46}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-214}:\\
\;\;\;\;t_1 + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-228}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-284}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-225}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if x < -6.59999999999999985e31 or 3.80000000000000022e27 < x Initial program 76.3%
Simplified84.8%
Taylor expanded in x around inf 74.5%
if -6.59999999999999985e31 < x < -1.1e-46 or -3.2999999999999998e-214 < x < -2.5500000000000001e-228 or 8.4999999999999995e-284 < x < 3.09999999999999996e-225Initial program 97.0%
Simplified94.3%
Taylor expanded in b around inf 82.7%
if -1.1e-46 < x < -6.7999999999999998e-203 or -2.5500000000000001e-228 < x < 8.4999999999999995e-284 or 3.09999999999999996e-225 < x < 3.80000000000000022e27Initial program 96.4%
Taylor expanded in y around 0 86.2%
Taylor expanded in j around 0 75.5%
Taylor expanded in a around inf 66.5%
associate-*r*66.5%
*-commutative66.5%
*-commutative66.5%
*-commutative66.5%
Simplified66.5%
if -6.7999999999999998e-203 < x < -3.2999999999999998e-214Initial program 100.0%
Simplified99.7%
Taylor expanded in a around inf 91.7%
Final simplification72.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)
\end{array}
Initial program 88.3%
Simplified89.6%
Final simplification89.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))))
(t_3 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -2.2e+47)
t_3
(if (<= x -5.1e-14)
(+ (* 18.0 (* x (* y (* z t)))) t_1)
(if (<= x 8.4e-284)
t_2
(if (<= x 3.5e-225) (+ (* b c) t_1) (if (<= x 6e+26) t_2 t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -2.2e+47) {
tmp = t_3;
} else if (x <= -5.1e-14) {
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
} else if (x <= 8.4e-284) {
tmp = t_2;
} else if (x <= 3.5e-225) {
tmp = (b * c) + t_1;
} else if (x <= 6e+26) {
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.
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) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
t_3 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-2.2d+47)) then
tmp = t_3
else if (x <= (-5.1d-14)) then
tmp = (18.0d0 * (x * (y * (z * t)))) + t_1
else if (x <= 8.4d-284) then
tmp = t_2
else if (x <= 3.5d-225) then
tmp = (b * c) + t_1
else if (x <= 6d+26) 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;
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) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -2.2e+47) {
tmp = t_3;
} else if (x <= -5.1e-14) {
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
} else if (x <= 8.4e-284) {
tmp = t_2;
} else if (x <= 3.5e-225) {
tmp = (b * c) + t_1;
} else if (x <= 6e+26) {
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]) [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) - ((4.0 * (t * a)) + (4.0 * (x * i))) t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -2.2e+47: tmp = t_3 elif x <= -5.1e-14: tmp = (18.0 * (x * (y * (z * t)))) + t_1 elif x <= 8.4e-284: tmp = t_2 elif x <= 3.5e-225: tmp = (b * c) + t_1 elif x <= 6e+26: 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]) 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) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -2.2e+47) tmp = t_3; elseif (x <= -5.1e-14) tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + t_1); elseif (x <= 8.4e-284) tmp = t_2; elseif (x <= 3.5e-225) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 6e+26) 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])){:}
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) - ((4.0 * (t * a)) + (4.0 * (x * i)));
t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -2.2e+47)
tmp = t_3;
elseif (x <= -5.1e-14)
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
elseif (x <= 8.4e-284)
tmp = t_2;
elseif (x <= 3.5e-225)
tmp = (b * c) + t_1;
elseif (x <= 6e+26)
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.
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] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+47], t$95$3, If[LessEqual[x, -5.1e-14], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8.4e-284], t$95$2, If[LessEqual[x, 3.5e-225], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 6e+26], 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])\\\\
[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 - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -5.1 \cdot 10^{-14}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + t_1\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-284}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-225}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -2.1999999999999999e47 or 5.99999999999999994e26 < x Initial program 75.8%
Simplified84.9%
Taylor expanded in x around inf 74.9%
if -2.1999999999999999e47 < x < -5.0999999999999997e-14Initial program 92.7%
Simplified92.9%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
associate-*l*85.9%
associate-*l*78.8%
Simplified78.8%
if -5.0999999999999997e-14 < x < 8.39999999999999965e-284 or 3.4999999999999997e-225 < x < 5.99999999999999994e26Initial program 96.8%
Taylor expanded in y around 0 87.1%
Taylor expanded in j around 0 73.1%
if 8.39999999999999965e-284 < x < 3.4999999999999997e-225Initial program 93.8%
Simplified87.9%
Taylor expanded in b around inf 81.3%
Final simplification74.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.48e+147) (not (<= x 2e+126))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.48e+147) || !(x <= 2e+126)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.48d+147)) .or. (.not. (x <= 2d+126))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.48e+147) || !(x <= 2e+126)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.48e+147) or not (x <= 2e+126): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.48e+147) || !(x <= 2e+126)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.48e+147) || ~((x <= 2e+126)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.48e+147], N[Not[LessEqual[x, 2e+126]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.48 \cdot 10^{+147} \lor \neg \left(x \leq 2 \cdot 10^{+126}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -1.48000000000000002e147 or 1.99999999999999985e126 < x Initial program 75.0%
Simplified84.4%
Taylor expanded in x around inf 85.7%
if -1.48000000000000002e147 < x < 1.99999999999999985e126Initial program 92.7%
Taylor expanded in y around 0 82.8%
Final simplification83.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (* t (* a 4.0))))
(t_3 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -3.8e+45)
t_3
(if (<= x -2.5e-14)
(+ (* 18.0 (* x (* y (* z t)))) t_1)
(if (<= x 7.2e-284)
t_2
(if (<= x 8.5e-225) (+ (* b c) t_1) (if (<= x 1.1e+27) t_2 t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - (t * (a * 4.0));
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -3.8e+45) {
tmp = t_3;
} else if (x <= -2.5e-14) {
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
} else if (x <= 7.2e-284) {
tmp = t_2;
} else if (x <= 8.5e-225) {
tmp = (b * c) + t_1;
} else if (x <= 1.1e+27) {
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.
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 * (a * 4.0d0))
t_3 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-3.8d+45)) then
tmp = t_3
else if (x <= (-2.5d-14)) then
tmp = (18.0d0 * (x * (y * (z * t)))) + t_1
else if (x <= 7.2d-284) then
tmp = t_2
else if (x <= 8.5d-225) then
tmp = (b * c) + t_1
else if (x <= 1.1d+27) 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;
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 * (a * 4.0));
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -3.8e+45) {
tmp = t_3;
} else if (x <= -2.5e-14) {
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
} else if (x <= 7.2e-284) {
tmp = t_2;
} else if (x <= 8.5e-225) {
tmp = (b * c) + t_1;
} else if (x <= 1.1e+27) {
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]) [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 * (a * 4.0)) t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -3.8e+45: tmp = t_3 elif x <= -2.5e-14: tmp = (18.0 * (x * (y * (z * t)))) + t_1 elif x <= 7.2e-284: tmp = t_2 elif x <= 8.5e-225: tmp = (b * c) + t_1 elif x <= 1.1e+27: 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]) 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) - Float64(t * Float64(a * 4.0))) t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -3.8e+45) tmp = t_3; elseif (x <= -2.5e-14) tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + t_1); elseif (x <= 7.2e-284) tmp = t_2; elseif (x <= 8.5e-225) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 1.1e+27) 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])){:}
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 * (a * 4.0));
t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -3.8e+45)
tmp = t_3;
elseif (x <= -2.5e-14)
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
elseif (x <= 7.2e-284)
tmp = t_2;
elseif (x <= 8.5e-225)
tmp = (b * c) + t_1;
elseif (x <= 1.1e+27)
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.
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] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e+45], t$95$3, If[LessEqual[x, -2.5e-14], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 7.2e-284], t$95$2, If[LessEqual[x, 8.5e-225], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 1.1e+27], 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])\\\\
[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 \cdot \left(a \cdot 4\right)\\
t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+45}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + t_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-284}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-225}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -3.8000000000000002e45 or 1.0999999999999999e27 < x Initial program 75.8%
Simplified84.9%
Taylor expanded in x around inf 74.9%
if -3.8000000000000002e45 < x < -2.5000000000000001e-14Initial program 92.7%
Simplified92.9%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
associate-*l*85.9%
associate-*l*78.8%
Simplified78.8%
if -2.5000000000000001e-14 < x < 7.2000000000000004e-284 or 8.4999999999999998e-225 < x < 1.0999999999999999e27Initial program 96.8%
Taylor expanded in y around 0 87.1%
Taylor expanded in j around 0 73.1%
Taylor expanded in a around inf 65.1%
associate-*r*65.1%
*-commutative65.1%
*-commutative65.1%
*-commutative65.1%
Simplified65.1%
if 7.2000000000000004e-284 < x < 8.4999999999999998e-225Initial program 93.8%
Simplified87.9%
Taylor expanded in b around inf 81.3%
Final simplification70.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (- (* (* t a) (- 4.0)) (* 4.0 (* x i)))))
(if (<= c -1.4e-123)
(+ (* b c) t_1)
(if (<= c 9.8e-147)
t_2
(if (<= c 1.25e-58)
(+ t_1 (* (* x i) -4.0))
(if (<= c 7.5e+134) t_2 (- (* b c) (* x (* 4.0 i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = ((t * a) * -4.0) - (4.0 * (x * i));
double tmp;
if (c <= -1.4e-123) {
tmp = (b * c) + t_1;
} else if (c <= 9.8e-147) {
tmp = t_2;
} else if (c <= 1.25e-58) {
tmp = t_1 + ((x * i) * -4.0);
} else if (c <= 7.5e+134) {
tmp = t_2;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = ((t * a) * -4.0d0) - (4.0d0 * (x * i))
if (c <= (-1.4d-123)) then
tmp = (b * c) + t_1
else if (c <= 9.8d-147) then
tmp = t_2
else if (c <= 1.25d-58) then
tmp = t_1 + ((x * i) * (-4.0d0))
else if (c <= 7.5d+134) then
tmp = t_2
else
tmp = (b * c) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = ((t * a) * -4.0) - (4.0 * (x * i));
double tmp;
if (c <= -1.4e-123) {
tmp = (b * c) + t_1;
} else if (c <= 9.8e-147) {
tmp = t_2;
} else if (c <= 1.25e-58) {
tmp = t_1 + ((x * i) * -4.0);
} else if (c <= 7.5e+134) {
tmp = t_2;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = ((t * a) * -4.0) - (4.0 * (x * i)) tmp = 0 if c <= -1.4e-123: tmp = (b * c) + t_1 elif c <= 9.8e-147: tmp = t_2 elif c <= 1.25e-58: tmp = t_1 + ((x * i) * -4.0) elif c <= 7.5e+134: tmp = t_2 else: tmp = (b * c) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(Float64(t * a) * Float64(-4.0)) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -1.4e-123) tmp = Float64(Float64(b * c) + t_1); elseif (c <= 9.8e-147) tmp = t_2; elseif (c <= 1.25e-58) tmp = Float64(t_1 + Float64(Float64(x * i) * -4.0)); elseif (c <= 7.5e+134) tmp = t_2; else tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = ((t * a) * -4.0) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -1.4e-123)
tmp = (b * c) + t_1;
elseif (c <= 9.8e-147)
tmp = t_2;
elseif (c <= 1.25e-58)
tmp = t_1 + ((x * i) * -4.0);
elseif (c <= 7.5e+134)
tmp = t_2;
else
tmp = (b * c) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * a), $MachinePrecision] * (-4.0)), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.4e-123], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[c, 9.8e-147], t$95$2, If[LessEqual[c, 1.25e-58], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.5e+134], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(t \cdot a\right) \cdot \left(-4\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -1.4 \cdot 10^{-123}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;c \leq 9.8 \cdot 10^{-147}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-58}:\\
\;\;\;\;t_1 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{+134}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if c < -1.3999999999999999e-123Initial program 84.1%
Simplified84.3%
Taylor expanded in b around inf 47.6%
if -1.3999999999999999e-123 < c < 9.8000000000000001e-147 or 1.24999999999999994e-58 < c < 7.5000000000000001e134Initial program 92.3%
Taylor expanded in y around 0 75.0%
Taylor expanded in j around 0 58.0%
Taylor expanded in b around 0 48.6%
if 9.8000000000000001e-147 < c < 1.24999999999999994e-58Initial program 80.8%
Simplified80.8%
Taylor expanded in i around inf 67.3%
*-commutative67.3%
Simplified67.3%
if 7.5000000000000001e134 < c Initial program 88.4%
Taylor expanded in y around 0 79.4%
Taylor expanded in j around 0 72.5%
Taylor expanded in a around 0 55.4%
associate-*r*55.4%
*-commutative55.4%
Simplified55.4%
Final simplification50.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* t (* a 4.0)))) (t_2 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -1.16e+142)
(* x (* 18.0 (* z (* y t))))
(if (<= x -2.3e-44)
t_2
(if (<= x 2.2e-284)
t_1
(if (<= x 9.5e-226)
t_2
(if (<= x 2.8e+46) t_1 (* x (* 18.0 (* y (* z t)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (t * (a * 4.0));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -1.16e+142) {
tmp = x * (18.0 * (z * (y * t)));
} else if (x <= -2.3e-44) {
tmp = t_2;
} else if (x <= 2.2e-284) {
tmp = t_1;
} else if (x <= 9.5e-226) {
tmp = t_2;
} else if (x <= 2.8e+46) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (t * (a * 4.0d0))
t_2 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-1.16d+142)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (x <= (-2.3d-44)) then
tmp = t_2
else if (x <= 2.2d-284) then
tmp = t_1
else if (x <= 9.5d-226) then
tmp = t_2
else if (x <= 2.8d+46) then
tmp = t_1
else
tmp = x * (18.0d0 * (y * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (t * (a * 4.0));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -1.16e+142) {
tmp = x * (18.0 * (z * (y * t)));
} else if (x <= -2.3e-44) {
tmp = t_2;
} else if (x <= 2.2e-284) {
tmp = t_1;
} else if (x <= 9.5e-226) {
tmp = t_2;
} else if (x <= 2.8e+46) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 * (a * 4.0)) t_2 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -1.16e+142: tmp = x * (18.0 * (z * (y * t))) elif x <= -2.3e-44: tmp = t_2 elif x <= 2.2e-284: tmp = t_1 elif x <= 9.5e-226: tmp = t_2 elif x <= 2.8e+46: tmp = t_1 else: tmp = x * (18.0 * (y * (z * t))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(a * 4.0))) t_2 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -1.16e+142) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (x <= -2.3e-44) tmp = t_2; elseif (x <= 2.2e-284) tmp = t_1; elseif (x <= 9.5e-226) tmp = t_2; elseif (x <= 2.8e+46) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 * (a * 4.0));
t_2 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -1.16e+142)
tmp = x * (18.0 * (z * (y * t)));
elseif (x <= -2.3e-44)
tmp = t_2;
elseif (x <= 2.2e-284)
tmp = t_1;
elseif (x <= 9.5e-226)
tmp = t_2;
elseif (x <= 2.8e+46)
tmp = t_1;
else
tmp = x * (18.0 * (y * (z * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+142], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.3e-44], t$95$2, If[LessEqual[x, 2.2e-284], t$95$1, If[LessEqual[x, 9.5e-226], t$95$2, If[LessEqual[x, 2.8e+46], t$95$1, N[(x * N[(18.0 * N[(y * N[(z * t), $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])\\\\
[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(a \cdot 4\right)\\
t_2 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+142}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.16000000000000003e142Initial program 70.2%
Simplified81.1%
Taylor expanded in x around inf 85.8%
Taylor expanded in t around inf 48.4%
associate-*r*48.3%
Simplified48.3%
if -1.16000000000000003e142 < x < -2.29999999999999998e-44 or 2.2000000000000001e-284 < x < 9.5000000000000007e-226Initial program 90.9%
Simplified92.8%
Taylor expanded in b around inf 64.8%
if -2.29999999999999998e-44 < x < 2.2000000000000001e-284 or 9.5000000000000007e-226 < x < 2.80000000000000018e46Initial program 96.6%
Taylor expanded in y around 0 87.3%
Taylor expanded in j around 0 73.4%
Taylor expanded in a around inf 64.2%
associate-*r*64.2%
*-commutative64.2%
*-commutative64.2%
*-commutative64.2%
Simplified64.2%
if 2.80000000000000018e46 < x Initial program 76.8%
Simplified83.9%
Taylor expanded in x around inf 75.2%
Taylor expanded in t around inf 47.6%
*-commutative47.6%
associate-*l*47.6%
Simplified47.6%
Final simplification59.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -2.25e+141) (not (<= x 3.6e+34))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.25e+141) || !(x <= 3.6e+34)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-2.25d+141)) .or. (.not. (x <= 3.6d+34))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.25e+141) || !(x <= 3.6e+34)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -2.25e+141) or not (x <= 3.6e+34): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -2.25e+141) || !(x <= 3.6e+34)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -2.25e+141) || ~((x <= 3.6e+34)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -2.25e+141], N[Not[LessEqual[x, 3.6e+34]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+141} \lor \neg \left(x \leq 3.6 \cdot 10^{+34}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -2.2500000000000001e141 or 3.6e34 < x Initial program 74.1%
Simplified82.8%
Taylor expanded in x around inf 80.3%
if -2.2500000000000001e141 < x < 3.6e34Initial program 94.8%
Taylor expanded in x around 0 76.7%
Final simplification77.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -1.36e+141)
(* x (* 18.0 (* z (* y t))))
(if (<= x -1.32e-132)
t_1
(if (<= x -5.1e-201)
(* t (* a -4.0))
(if (<= x 3.4e-36) t_1 (* i (* x -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -1.36e+141) {
tmp = x * (18.0 * (z * (y * t)));
} else if (x <= -1.32e-132) {
tmp = t_1;
} else if (x <= -5.1e-201) {
tmp = t * (a * -4.0);
} else if (x <= 3.4e-36) {
tmp = t_1;
} else {
tmp = i * (x * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-1.36d+141)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (x <= (-1.32d-132)) then
tmp = t_1
else if (x <= (-5.1d-201)) then
tmp = t * (a * (-4.0d0))
else if (x <= 3.4d-36) then
tmp = t_1
else
tmp = i * (x * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -1.36e+141) {
tmp = x * (18.0 * (z * (y * t)));
} else if (x <= -1.32e-132) {
tmp = t_1;
} else if (x <= -5.1e-201) {
tmp = t * (a * -4.0);
} else if (x <= 3.4e-36) {
tmp = t_1;
} else {
tmp = i * (x * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -1.36e+141: tmp = x * (18.0 * (z * (y * t))) elif x <= -1.32e-132: tmp = t_1 elif x <= -5.1e-201: tmp = t * (a * -4.0) elif x <= 3.4e-36: tmp = t_1 else: tmp = i * (x * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -1.36e+141) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (x <= -1.32e-132) tmp = t_1; elseif (x <= -5.1e-201) tmp = Float64(t * Float64(a * -4.0)); elseif (x <= 3.4e-36) tmp = t_1; else tmp = Float64(i * Float64(x * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -1.36e+141)
tmp = x * (18.0 * (z * (y * t)));
elseif (x <= -1.32e-132)
tmp = t_1;
elseif (x <= -5.1e-201)
tmp = t * (a * -4.0);
elseif (x <= 3.4e-36)
tmp = t_1;
else
tmp = i * (x * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.36e+141], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.32e-132], t$95$1, If[LessEqual[x, -5.1e-201], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e-36], t$95$1, N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -1.36 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.32 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.1 \cdot 10^{-201}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if x < -1.36e141Initial program 70.2%
Simplified81.1%
Taylor expanded in x around inf 85.8%
Taylor expanded in t around inf 48.4%
associate-*r*48.3%
Simplified48.3%
if -1.36e141 < x < -1.32000000000000004e-132 or -5.1000000000000001e-201 < x < 3.4000000000000003e-36Initial program 94.1%
Simplified92.3%
Taylor expanded in b around inf 55.8%
if -1.32000000000000004e-132 < x < -5.1000000000000001e-201Initial program 99.8%
Simplified92.8%
add-cube-cbrt92.7%
pow392.7%
*-commutative92.7%
Applied egg-rr92.7%
Taylor expanded in a around inf 63.1%
*-commutative63.1%
*-commutative63.1%
associate-*l*63.1%
Simplified63.1%
if 3.4000000000000003e-36 < x Initial program 81.2%
Simplified86.9%
add-cube-cbrt86.8%
pow386.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in x around inf 43.4%
*-commutative43.4%
associate-*r*43.4%
*-commutative43.4%
Simplified43.4%
Final simplification52.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* x (* 4.0 i)))))
(if (<= y -1.6e+134)
(* x (* 18.0 (* z (* y t))))
(if (<= y -3.8e+19)
t_1
(if (<= y 1.35e-180)
(- (* b c) (* t (* a 4.0)))
(if (<= y 0.00018) t_1 (* x (* 18.0 (* y (* z t))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (4.0 * i));
double tmp;
if (y <= -1.6e+134) {
tmp = x * (18.0 * (z * (y * t)));
} else if (y <= -3.8e+19) {
tmp = t_1;
} else if (y <= 1.35e-180) {
tmp = (b * c) - (t * (a * 4.0));
} else if (y <= 0.00018) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (x * (4.0d0 * i))
if (y <= (-1.6d+134)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if (y <= (-3.8d+19)) then
tmp = t_1
else if (y <= 1.35d-180) then
tmp = (b * c) - (t * (a * 4.0d0))
else if (y <= 0.00018d0) then
tmp = t_1
else
tmp = x * (18.0d0 * (y * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (4.0 * i));
double tmp;
if (y <= -1.6e+134) {
tmp = x * (18.0 * (z * (y * t)));
} else if (y <= -3.8e+19) {
tmp = t_1;
} else if (y <= 1.35e-180) {
tmp = (b * c) - (t * (a * 4.0));
} else if (y <= 0.00018) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) - (x * (4.0 * i)) tmp = 0 if y <= -1.6e+134: tmp = x * (18.0 * (z * (y * t))) elif y <= -3.8e+19: tmp = t_1 elif y <= 1.35e-180: tmp = (b * c) - (t * (a * 4.0)) elif y <= 0.00018: tmp = t_1 else: tmp = x * (18.0 * (y * (z * t))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(x * Float64(4.0 * i))) tmp = 0.0 if (y <= -1.6e+134) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (y <= -3.8e+19) tmp = t_1; elseif (y <= 1.35e-180) tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); elseif (y <= 0.00018) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) - (x * (4.0 * i));
tmp = 0.0;
if (y <= -1.6e+134)
tmp = x * (18.0 * (z * (y * t)));
elseif (y <= -3.8e+19)
tmp = t_1;
elseif (y <= 1.35e-180)
tmp = (b * c) - (t * (a * 4.0));
elseif (y <= 0.00018)
tmp = t_1;
else
tmp = x * (18.0 * (y * (z * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+134], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e+19], t$95$1, If[LessEqual[y, 1.35e-180], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00018], t$95$1, N[(x * N[(18.0 * N[(y * N[(z * t), $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])\\\\
[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 - x \cdot \left(4 \cdot i\right)\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+134}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-180}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{elif}\;y \leq 0.00018:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if y < -1.6e134Initial program 86.2%
Simplified90.0%
Taylor expanded in x around inf 58.4%
Taylor expanded in t around inf 54.9%
associate-*r*55.0%
Simplified55.0%
if -1.6e134 < y < -3.8e19 or 1.35000000000000007e-180 < y < 1.80000000000000011e-4Initial program 91.9%
Taylor expanded in y around 0 79.9%
Taylor expanded in j around 0 60.6%
Taylor expanded in a around 0 52.6%
associate-*r*52.6%
*-commutative52.6%
Simplified52.6%
if -3.8e19 < y < 1.35000000000000007e-180Initial program 93.8%
Taylor expanded in y around 0 88.5%
Taylor expanded in j around 0 75.5%
Taylor expanded in a around inf 58.1%
associate-*r*58.1%
*-commutative58.1%
*-commutative58.1%
*-commutative58.1%
Simplified58.1%
if 1.80000000000000011e-4 < y Initial program 80.5%
Simplified82.0%
Taylor expanded in x around inf 42.1%
Taylor expanded in t around inf 32.5%
*-commutative32.5%
associate-*l*33.7%
Simplified33.7%
Final simplification48.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= c -2.05e-85)
(* b c)
(if (<= c 4.3e-148)
t_1
(if (<= c 1.8e-62)
(* k (* j -27.0))
(if (<= c 2.5e+136) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (c <= -2.05e-85) {
tmp = b * c;
} else if (c <= 4.3e-148) {
tmp = t_1;
} else if (c <= 1.8e-62) {
tmp = k * (j * -27.0);
} else if (c <= 2.5e+136) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if (c <= (-2.05d-85)) then
tmp = b * c
else if (c <= 4.3d-148) then
tmp = t_1
else if (c <= 1.8d-62) then
tmp = k * (j * (-27.0d0))
else if (c <= 2.5d+136) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (c <= -2.05e-85) {
tmp = b * c;
} else if (c <= 4.3e-148) {
tmp = t_1;
} else if (c <= 1.8e-62) {
tmp = k * (j * -27.0);
} else if (c <= 2.5e+136) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if c <= -2.05e-85: tmp = b * c elif c <= 4.3e-148: tmp = t_1 elif c <= 1.8e-62: tmp = k * (j * -27.0) elif c <= 2.5e+136: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (c <= -2.05e-85) tmp = Float64(b * c); elseif (c <= 4.3e-148) tmp = t_1; elseif (c <= 1.8e-62) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 2.5e+136) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (c <= -2.05e-85)
tmp = b * c;
elseif (c <= 4.3e-148)
tmp = t_1;
elseif (c <= 1.8e-62)
tmp = k * (j * -27.0);
elseif (c <= 2.5e+136)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.05e-85], N[(b * c), $MachinePrecision], If[LessEqual[c, 4.3e-148], t$95$1, If[LessEqual[c, 1.8e-62], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+136], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;c \leq -2.05 \cdot 10^{-85}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 4.3 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.8 \cdot 10^{-62}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -2.04999999999999997e-85 or 2.5000000000000001e136 < c Initial program 85.8%
Simplified86.8%
add-cube-cbrt86.8%
pow386.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in b around inf 39.4%
if -2.04999999999999997e-85 < c < 4.2999999999999998e-148 or 1.8e-62 < c < 2.5000000000000001e136Initial program 90.9%
Simplified92.7%
add-cube-cbrt92.5%
pow392.5%
*-commutative92.5%
Applied egg-rr92.5%
Taylor expanded in a around inf 28.4%
*-commutative28.4%
*-commutative28.4%
associate-*l*28.4%
Simplified28.4%
if 4.2999999999999998e-148 < c < 1.8e-62Initial program 87.4%
Simplified87.4%
add-cube-cbrt87.4%
pow387.4%
*-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in j around inf 47.1%
*-commutative47.1%
*-commutative47.1%
associate-*r*47.3%
Simplified47.3%
Final simplification34.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -6.6e+198) (not (<= (* b c) 2.75e+100))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.6e+198) || !((b * c) <= 2.75e+100)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-6.6d+198)) .or. (.not. ((b * c) <= 2.75d+100))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.6e+198) || !((b * c) <= 2.75e+100)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -6.6e+198) or not ((b * c) <= 2.75e+100): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -6.6e+198) || !(Float64(b * c) <= 2.75e+100)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -6.6e+198) || ~(((b * c) <= 2.75e+100)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -6.6e+198], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.75e+100]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.6 \cdot 10^{+198} \lor \neg \left(b \cdot c \leq 2.75 \cdot 10^{+100}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.59999999999999988e198 or 2.7500000000000001e100 < (*.f64 b c) Initial program 86.2%
Simplified88.9%
add-cube-cbrt88.8%
pow388.8%
*-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 68.3%
if -6.59999999999999988e198 < (*.f64 b c) < 2.7500000000000001e100Initial program 89.2%
Simplified90.5%
Taylor expanded in j around inf 23.5%
Final simplification36.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.2e+200) (not (<= (* b c) 4e+98))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.2e+200) || !((b * c) <= 4e+98)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.2d+200)) .or. (.not. ((b * c) <= 4d+98))) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.2e+200) || !((b * c) <= 4e+98)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.2e+200) or not ((b * c) <= 4e+98): tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.2e+200) || !(Float64(b * c) <= 4e+98)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.2e+200) || ~(((b * c) <= 4e+98)))
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.2e+200], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4e+98]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.2 \cdot 10^{+200} \lor \neg \left(b \cdot c \leq 4 \cdot 10^{+98}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.2e200 or 3.99999999999999999e98 < (*.f64 b c) Initial program 86.2%
Simplified88.9%
add-cube-cbrt88.8%
pow388.8%
*-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 68.3%
if -1.2e200 < (*.f64 b c) < 3.99999999999999999e98Initial program 89.2%
Simplified89.9%
add-cube-cbrt89.9%
pow389.9%
*-commutative89.9%
Applied egg-rr89.9%
Taylor expanded in j around inf 23.5%
*-commutative23.5%
*-commutative23.5%
associate-*r*23.5%
Simplified23.5%
Final simplification36.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 88.3%
Simplified89.6%
add-cube-cbrt89.6%
pow389.6%
*-commutative89.6%
Applied egg-rr89.6%
Taylor expanded in b around inf 24.5%
Final simplification24.5%
(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 2023334
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))