
(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 26 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 53000000.0)
(+
(fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(*
z
(fma
-27.0
(* j (/ k z))
(fma
-4.0
(* a (/ t z))
(fma -4.0 (* i (/ x z)) (fma 18.0 (* t (* x y)) (* b (/ c z)))))))))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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 53000000.0) {
tmp = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = z * fma(-27.0, (j * (k / z)), fma(-4.0, (a * (t / z)), fma(-4.0, (i * (x / z)), fma(18.0, (t * (x * y)), (b * (c / z))))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 53000000.0) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(z * fma(-27.0, Float64(j * Float64(k / z)), fma(-4.0, Float64(a * Float64(t / z)), fma(-4.0, Float64(i * Float64(x / z)), fma(18.0, Float64(t * Float64(x * y)), Float64(b * Float64(c / z))))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 53000000.0], N[(N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(-27.0 * N[(j * N[(k / z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(i * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(c / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 53000000:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(-27, j \cdot \frac{k}{z}, \mathsf{fma}\left(-4, a \cdot \frac{t}{z}, \mathsf{fma}\left(-4, i \cdot \frac{x}{z}, \mathsf{fma}\left(18, t \cdot \left(x \cdot y\right), b \cdot \frac{c}{z}\right)\right)\right)\right)\\
\end{array}
\end{array}
if z < 5.3e7Initial program 86.6%
Simplified91.7%
if 5.3e7 < z Initial program 88.9%
Simplified79.9%
Taylor expanded in z around inf 90.4%
fma-define90.3%
associate-/l*89.7%
fma-define89.7%
associate-/l*89.7%
fma-define89.7%
associate-/l*89.9%
fma-define89.9%
*-commutative89.9%
associate-/l*88.3%
Simplified88.3%
Final simplification90.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0)))
(t_2 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t_1 -10.0)
(+ (* j (* k -27.0)) (* b c))
(if (<= t_1 -1e-83)
t_2
(if (<= t_1 2e-318)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_1 2e-147)
t_2
(if (<= t_1 5e-109)
(* x (+ (* -4.0 i) (* b (/ c x))))
(if (<= t_1 1e-13)
(* x (- (* 18.0 (* t (* z y))) (* i 4.0)))
(if (<= t_1 2e+74)
t_2
(* k (- (/ (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t_1 <= -10.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= -1e-83) {
tmp = t_2;
} else if (t_1 <= 2e-318) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 2e-147) {
tmp = t_2;
} else if (t_1 <= 5e-109) {
tmp = x * ((-4.0 * i) + (b * (c / x)));
} else if (t_1 <= 1e-13) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else if (t_1 <= 2e+74) {
tmp = t_2;
} else {
tmp = k * (((b * c) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * 27.0d0)
t_2 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
if (t_1 <= (-10.0d0)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (t_1 <= (-1d-83)) then
tmp = t_2
else if (t_1 <= 2d-318) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_1 <= 2d-147) then
tmp = t_2
else if (t_1 <= 5d-109) then
tmp = x * (((-4.0d0) * i) + (b * (c / x)))
else if (t_1 <= 1d-13) then
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
else if (t_1 <= 2d+74) then
tmp = t_2
else
tmp = k * (((b * c) / 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t_1 <= -10.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= -1e-83) {
tmp = t_2;
} else if (t_1 <= 2e-318) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 2e-147) {
tmp = t_2;
} else if (t_1 <= 5e-109) {
tmp = x * ((-4.0 * i) + (b * (c / x)));
} else if (t_1 <= 1e-13) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else if (t_1 <= 2e+74) {
tmp = t_2;
} else {
tmp = k * (((b * c) / 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t_1 <= -10.0: tmp = (j * (k * -27.0)) + (b * c) elif t_1 <= -1e-83: tmp = t_2 elif t_1 <= 2e-318: tmp = (b * c) - (4.0 * (x * i)) elif t_1 <= 2e-147: tmp = t_2 elif t_1 <= 5e-109: tmp = x * ((-4.0 * i) + (b * (c / x))) elif t_1 <= 1e-13: tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0)) elif t_1 <= 2e+74: tmp = t_2 else: tmp = k * (((b * c) / 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t_1 <= -10.0) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (t_1 <= -1e-83) tmp = t_2; elseif (t_1 <= 2e-318) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_1 <= 2e-147) tmp = t_2; elseif (t_1 <= 5e-109) tmp = Float64(x * Float64(Float64(-4.0 * i) + Float64(b * Float64(c / x)))); elseif (t_1 <= 1e-13) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))); elseif (t_1 <= 2e+74) tmp = t_2; else tmp = Float64(k * Float64(Float64(Float64(b * c) / 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t_1 <= -10.0)
tmp = (j * (k * -27.0)) + (b * c);
elseif (t_1 <= -1e-83)
tmp = t_2;
elseif (t_1 <= 2e-318)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_1 <= 2e-147)
tmp = t_2;
elseif (t_1 <= 5e-109)
tmp = x * ((-4.0 * i) + (b * (c / x)));
elseif (t_1 <= 1e-13)
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
elseif (t_1 <= 2e+74)
tmp = t_2;
else
tmp = k * (((b * c) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -10.0], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-83], t$95$2, If[LessEqual[t$95$1, 2e-318], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-147], t$95$2, If[LessEqual[t$95$1, 5e-109], N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(b * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-13], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+74], t$95$2, N[(k * N[(N[(N[(b * c), $MachinePrecision] / k), $MachinePrecision] - N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t\_1 \leq -10:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-83}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(-4 \cdot i + b \cdot \frac{c}{x}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-13}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(\frac{b \cdot c}{k} - j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -10Initial program 84.3%
Simplified87.3%
Taylor expanded in b around inf 72.5%
if -10 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-83 or 2.0000024e-318 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e-147 or 1e-13 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e74Initial program 89.8%
Simplified95.8%
Taylor expanded in t around inf 72.7%
if -1e-83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000024e-318Initial program 90.6%
Taylor expanded in t around 0 71.3%
Taylor expanded in j around 0 71.3%
if 1.9999999999999999e-147 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000002e-109Initial program 100.0%
Taylor expanded in t around 0 72.7%
Taylor expanded in j around 0 72.7%
Taylor expanded in x around inf 86.4%
cancel-sign-sub-inv86.4%
associate-/l*86.4%
metadata-eval86.4%
Simplified86.4%
if 5.0000000000000002e-109 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-13Initial program 73.6%
Simplified66.7%
Taylor expanded in x around inf 61.6%
if 1.9999999999999999e74 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.6%
Taylor expanded in a around inf 80.9%
Taylor expanded in y around inf 78.4%
Taylor expanded in b around inf 64.2%
Taylor expanded in k around inf 66.6%
Final simplification71.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.
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 (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* t (- (* 18.0 (* x (* z y))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified30.4%
Taylor expanded in t around inf 65.4%
Final simplification93.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.
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 (* k (* j 27.0))))
(if (<= t_2 -10.0)
(+ t_1 (* b c))
(if (<= t_2 -1e-83)
(+ t_1 (* -4.0 (* t a)))
(if (<= t_2 1e-25)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_2 5e+74)
(* t (+ (* -27.0 (/ (* j k) t)) (* a -4.0)))
(if (<= t_2 1e+125)
(* c (+ b (* -27.0 (* j (/ k c)))))
(+ t_1 (* 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);
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if (t_2 <= -1e-83) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 1e-25) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_2 <= 5e+74) {
tmp = t * ((-27.0 * ((j * k) / t)) + (a * -4.0));
} else if (t_2 <= 1e+125) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_1 + (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.
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 = k * (j * 27.0d0)
if (t_2 <= (-10.0d0)) then
tmp = t_1 + (b * c)
else if (t_2 <= (-1d-83)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t_2 <= 1d-25) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_2 <= 5d+74) then
tmp = t * (((-27.0d0) * ((j * k) / t)) + (a * (-4.0d0)))
else if (t_2 <= 1d+125) then
tmp = c * (b + ((-27.0d0) * (j * (k / c))))
else
tmp = t_1 + (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;
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if (t_2 <= -1e-83) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 1e-25) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_2 <= 5e+74) {
tmp = t * ((-27.0 * ((j * k) / t)) + (a * -4.0));
} else if (t_2 <= 1e+125) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_1 + (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]) [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 = k * (j * 27.0) tmp = 0 if t_2 <= -10.0: tmp = t_1 + (b * c) elif t_2 <= -1e-83: tmp = t_1 + (-4.0 * (t * a)) elif t_2 <= 1e-25: tmp = (b * c) - (4.0 * (x * i)) elif t_2 <= 5e+74: tmp = t * ((-27.0 * ((j * k) / t)) + (a * -4.0)) elif t_2 <= 1e+125: tmp = c * (b + (-27.0 * (j * (k / c)))) else: tmp = t_1 + (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]) 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(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -10.0) tmp = Float64(t_1 + Float64(b * c)); elseif (t_2 <= -1e-83) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 1e-25) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_2 <= 5e+74) tmp = Float64(t * Float64(Float64(-27.0 * Float64(Float64(j * k) / t)) + Float64(a * -4.0))); elseif (t_2 <= 1e+125) tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / c))))); else tmp = Float64(t_1 + 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])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -10.0)
tmp = t_1 + (b * c);
elseif (t_2 <= -1e-83)
tmp = t_1 + (-4.0 * (t * a));
elseif (t_2 <= 1e-25)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_2 <= 5e+74)
tmp = t * ((-27.0 * ((j * k) / t)) + (a * -4.0));
elseif (t_2 <= 1e+125)
tmp = c * (b + (-27.0 * (j * (k / c))));
else
tmp = t_1 + (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.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -10.0], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-83], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-25], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+74], N[(t * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+125], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + 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])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -10:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-83}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-25}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+74}:\\
\;\;\;\;t \cdot \left(-27 \cdot \frac{j \cdot k}{t} + a \cdot -4\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+125}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -10Initial program 84.3%
Simplified87.3%
Taylor expanded in b around inf 72.5%
if -10 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-83Initial program 93.7%
Simplified99.7%
Taylor expanded in a around inf 57.1%
if -1e-83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e-25Initial program 88.1%
Taylor expanded in t around 0 62.7%
Taylor expanded in j around 0 61.0%
if 1.00000000000000004e-25 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999963e74Initial program 92.5%
Simplified92.7%
Taylor expanded in a around inf 58.3%
Taylor expanded in t around inf 58.3%
if 4.99999999999999963e74 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999992e124Initial program 88.0%
Taylor expanded in a around inf 88.0%
Taylor expanded in y around inf 87.3%
Taylor expanded in b around inf 51.6%
Taylor expanded in c around inf 51.6%
*-commutative51.6%
associate-/l*63.6%
Simplified63.6%
if 9.9999999999999992e124 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.5%
Simplified78.6%
Taylor expanded in i around inf 75.4%
associate-*r*75.4%
*-commutative75.4%
Simplified75.4%
Final simplification65.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.
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 (* k (* j 27.0)))
(t_3 (+ t_1 (* -4.0 (* t a)))))
(if (<= t_2 -10.0)
(+ t_1 (* b c))
(if (<= t_2 -1e-83)
t_3
(if (<= t_2 1e-25)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_2 5e+74)
t_3
(if (<= t_2 1e+125)
(* c (+ b (* -27.0 (* j (/ k c)))))
(+ t_1 (* 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);
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 = k * (j * 27.0);
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if (t_2 <= -1e-83) {
tmp = t_3;
} else if (t_2 <= 1e-25) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_2 <= 5e+74) {
tmp = t_3;
} else if (t_2 <= 1e+125) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_1 + (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.
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 = k * (j * 27.0d0)
t_3 = t_1 + ((-4.0d0) * (t * a))
if (t_2 <= (-10.0d0)) then
tmp = t_1 + (b * c)
else if (t_2 <= (-1d-83)) then
tmp = t_3
else if (t_2 <= 1d-25) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_2 <= 5d+74) then
tmp = t_3
else if (t_2 <= 1d+125) then
tmp = c * (b + ((-27.0d0) * (j * (k / c))))
else
tmp = t_1 + (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;
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 = k * (j * 27.0);
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if (t_2 <= -1e-83) {
tmp = t_3;
} else if (t_2 <= 1e-25) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_2 <= 5e+74) {
tmp = t_3;
} else if (t_2 <= 1e+125) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_1 + (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]) [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 = k * (j * 27.0) t_3 = t_1 + (-4.0 * (t * a)) tmp = 0 if t_2 <= -10.0: tmp = t_1 + (b * c) elif t_2 <= -1e-83: tmp = t_3 elif t_2 <= 1e-25: tmp = (b * c) - (4.0 * (x * i)) elif t_2 <= 5e+74: tmp = t_3 elif t_2 <= 1e+125: tmp = c * (b + (-27.0 * (j * (k / c)))) else: tmp = t_1 + (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]) 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(k * Float64(j * 27.0)) t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t_2 <= -10.0) tmp = Float64(t_1 + Float64(b * c)); elseif (t_2 <= -1e-83) tmp = t_3; elseif (t_2 <= 1e-25) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_2 <= 5e+74) tmp = t_3; elseif (t_2 <= 1e+125) tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / c))))); else tmp = Float64(t_1 + 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])){:}
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 = k * (j * 27.0);
t_3 = t_1 + (-4.0 * (t * a));
tmp = 0.0;
if (t_2 <= -10.0)
tmp = t_1 + (b * c);
elseif (t_2 <= -1e-83)
tmp = t_3;
elseif (t_2 <= 1e-25)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_2 <= 5e+74)
tmp = t_3;
elseif (t_2 <= 1e+125)
tmp = c * (b + (-27.0 * (j * (k / c))));
else
tmp = t_1 + (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.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -10.0], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-83], t$95$3, If[LessEqual[t$95$2, 1e-25], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+74], t$95$3, If[LessEqual[t$95$2, 1e+125], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + 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])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t\_2 \leq -10:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-83}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{-25}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{+125}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -10Initial program 84.3%
Simplified87.3%
Taylor expanded in b around inf 72.5%
if -10 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-83 or 1.00000000000000004e-25 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999963e74Initial program 93.1%
Simplified96.5%
Taylor expanded in a around inf 57.7%
if -1e-83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e-25Initial program 88.1%
Taylor expanded in t around 0 62.7%
Taylor expanded in j around 0 61.0%
if 4.99999999999999963e74 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999992e124Initial program 88.0%
Taylor expanded in a around inf 88.0%
Taylor expanded in y around inf 87.3%
Taylor expanded in b around inf 51.6%
Taylor expanded in c around inf 51.6%
*-commutative51.6%
associate-/l*63.6%
Simplified63.6%
if 9.9999999999999992e124 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.5%
Simplified78.6%
Taylor expanded in i around inf 75.4%
associate-*r*75.4%
*-commutative75.4%
Simplified75.4%
Final simplification65.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0)))
(t_2 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t_1 -10.0)
(+ (* j (* k -27.0)) (* b c))
(if (<= t_1 -1e-83)
t_2
(if (<= t_1 2e-318)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_1 2e+74) t_2 (* k (- (/ (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t_1 <= -10.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= -1e-83) {
tmp = t_2;
} else if (t_1 <= 2e-318) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 2e+74) {
tmp = t_2;
} else {
tmp = k * (((b * c) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * 27.0d0)
t_2 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
if (t_1 <= (-10.0d0)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (t_1 <= (-1d-83)) then
tmp = t_2
else if (t_1 <= 2d-318) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_1 <= 2d+74) then
tmp = t_2
else
tmp = k * (((b * c) / 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t_1 <= -10.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= -1e-83) {
tmp = t_2;
} else if (t_1 <= 2e-318) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 2e+74) {
tmp = t_2;
} else {
tmp = k * (((b * c) / 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t_1 <= -10.0: tmp = (j * (k * -27.0)) + (b * c) elif t_1 <= -1e-83: tmp = t_2 elif t_1 <= 2e-318: tmp = (b * c) - (4.0 * (x * i)) elif t_1 <= 2e+74: tmp = t_2 else: tmp = k * (((b * c) / 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t_1 <= -10.0) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (t_1 <= -1e-83) tmp = t_2; elseif (t_1 <= 2e-318) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_1 <= 2e+74) tmp = t_2; else tmp = Float64(k * Float64(Float64(Float64(b * c) / 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t_1 <= -10.0)
tmp = (j * (k * -27.0)) + (b * c);
elseif (t_1 <= -1e-83)
tmp = t_2;
elseif (t_1 <= 2e-318)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_1 <= 2e+74)
tmp = t_2;
else
tmp = k * (((b * c) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -10.0], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-83], t$95$2, If[LessEqual[t$95$1, 2e-318], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+74], t$95$2, N[(k * N[(N[(N[(b * c), $MachinePrecision] / k), $MachinePrecision] - N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t\_1 \leq -10:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-83}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(\frac{b \cdot c}{k} - j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -10Initial program 84.3%
Simplified87.3%
Taylor expanded in b around inf 72.5%
if -10 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-83 or 2.0000024e-318 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e74Initial program 87.4%
Simplified88.7%
Taylor expanded in t around inf 64.7%
if -1e-83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000024e-318Initial program 90.6%
Taylor expanded in t around 0 71.3%
Taylor expanded in j around 0 71.3%
if 1.9999999999999999e74 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.6%
Taylor expanded in a around inf 80.9%
Taylor expanded in y around inf 78.4%
Taylor expanded in b around inf 64.2%
Taylor expanded in k around inf 66.6%
Final simplification69.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= y -1.42e+166)
(-
(+ (* b c) (* y (+ (* -4.0 (/ (* t a) y)) (* 18.0 (* t (* z x))))))
t_1)
(if (<= y 1e+24)
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(-
(-
(+ (* b c) (* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* z x))))))
(* i (* x 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (y <= -1.42e+166) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
} else if (y <= 1e+24) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (((b * c) + (t * (y * ((-4.0 * (a / y)) + (18.0 * (z * x)))))) - (i * (x * 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.
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 = k * (j * 27.0d0)
if (y <= (-1.42d+166)) then
tmp = ((b * c) + (y * (((-4.0d0) * ((t * a) / y)) + (18.0d0 * (t * (z * x)))))) - t_1
else if (y <= 1d+24) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = (((b * c) + (t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (z * x)))))) - (i * (x * 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (y <= -1.42e+166) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
} else if (y <= 1e+24) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (((b * c) + (t * (y * ((-4.0 * (a / y)) + (18.0 * (z * x)))))) - (i * (x * 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if y <= -1.42e+166: tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1 elif y <= 1e+24: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = (((b * c) + (t * (y * ((-4.0 * (a / y)) + (18.0 * (z * x)))))) - (i * (x * 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (y <= -1.42e+166) tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(18.0 * Float64(t * Float64(z * x)))))) - t_1); elseif (y <= 1e+24) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(z * x)))))) - Float64(i * Float64(x * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (y <= -1.42e+166)
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
elseif (y <= 1e+24)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = (((b * c) + (t * (y * ((-4.0 * (a / y)) + (18.0 * (z * x)))))) - (i * (x * 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.42e+166], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[y, 1e+24], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;y \leq -1.42 \cdot 10^{+166}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 18 \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - t\_1\\
\mathbf{elif}\;y \leq 10^{+24}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(z \cdot x\right)\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - t\_1\\
\end{array}
\end{array}
if y < -1.41999999999999995e166Initial program 81.3%
Taylor expanded in a around inf 73.7%
Taylor expanded in y around inf 89.0%
Taylor expanded in i around 0 86.6%
if -1.41999999999999995e166 < y < 9.9999999999999998e23Initial program 90.1%
Simplified93.0%
if 9.9999999999999998e23 < y Initial program 81.0%
Taylor expanded in a around inf 75.2%
Taylor expanded in y around inf 87.3%
Taylor expanded in t around 0 87.4%
Final simplification91.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.
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 (* k (* j 27.0))))
(if (<= t_2 -10.0)
(+ t_1 (* b c))
(if (or (<= t_2 -1e-83) (not (<= t_2 1e-25)))
(+ t_1 (* -4.0 (* t a)))
(- (* b c) (* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if ((t_2 <= -1e-83) || !(t_2 <= 1e-25)) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) - (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.
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 = k * (j * 27.0d0)
if (t_2 <= (-10.0d0)) then
tmp = t_1 + (b * c)
else if ((t_2 <= (-1d-83)) .or. (.not. (t_2 <= 1d-25))) then
tmp = t_1 + ((-4.0d0) * (t * a))
else
tmp = (b * c) - (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;
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -10.0) {
tmp = t_1 + (b * c);
} else if ((t_2 <= -1e-83) || !(t_2 <= 1e-25)) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) - (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]) [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 = k * (j * 27.0) tmp = 0 if t_2 <= -10.0: tmp = t_1 + (b * c) elif (t_2 <= -1e-83) or not (t_2 <= 1e-25): tmp = t_1 + (-4.0 * (t * a)) else: tmp = (b * c) - (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]) 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(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -10.0) tmp = Float64(t_1 + Float64(b * c)); elseif ((t_2 <= -1e-83) || !(t_2 <= 1e-25)) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) - 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])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -10.0)
tmp = t_1 + (b * c);
elseif ((t_2 <= -1e-83) || ~((t_2 <= 1e-25)))
tmp = t_1 + (-4.0 * (t * a));
else
tmp = (b * c) - (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.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -10.0], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -1e-83], N[Not[LessEqual[t$95$2, 1e-25]], $MachinePrecision]], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -10:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-83} \lor \neg \left(t\_2 \leq 10^{-25}\right):\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -10Initial program 84.3%
Simplified87.3%
Taylor expanded in b around inf 72.5%
if -10 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-83 or 1.00000000000000004e-25 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 88.6%
Simplified87.3%
Taylor expanded in a around inf 58.2%
if -1e-83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e-25Initial program 88.1%
Taylor expanded in t around 0 62.7%
Taylor expanded in j around 0 61.0%
Final simplification63.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0)))
(t_2 (- (- (* b c) (* 4.0 (* x i))) t_1))
(t_3 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t -2.2e+134)
t_3
(if (<= t -45000000000.0)
t_2
(if (<= t -1.9e-36)
(- (* x (- (* 18.0 (* t (* z y))) (* i 4.0))) t_1)
(if (<= t 2.6e+111) 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -2.2e+134) {
tmp = t_3;
} else if (t <= -45000000000.0) {
tmp = t_2;
} else if (t <= -1.9e-36) {
tmp = (x * ((18.0 * (t * (z * y))) - (i * 4.0))) - t_1;
} else if (t <= 2.6e+111) {
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.
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 = k * (j * 27.0d0)
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
t_3 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
if (t <= (-2.2d+134)) then
tmp = t_3
else if (t <= (-45000000000.0d0)) then
tmp = t_2
else if (t <= (-1.9d-36)) then
tmp = (x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))) - t_1
else if (t <= 2.6d+111) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -2.2e+134) {
tmp = t_3;
} else if (t <= -45000000000.0) {
tmp = t_2;
} else if (t <= -1.9e-36) {
tmp = (x * ((18.0 * (t * (z * y))) - (i * 4.0))) - t_1;
} else if (t <= 2.6e+111) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = ((b * c) - (4.0 * (x * i))) - t_1 t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t <= -2.2e+134: tmp = t_3 elif t <= -45000000000.0: tmp = t_2 elif t <= -1.9e-36: tmp = (x * ((18.0 * (t * (z * y))) - (i * 4.0))) - t_1 elif t <= 2.6e+111: 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.2e+134) tmp = t_3; elseif (t <= -45000000000.0) tmp = t_2; elseif (t <= -1.9e-36) tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))) - t_1); elseif (t <= 2.6e+111) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.2e+134)
tmp = t_3;
elseif (t <= -45000000000.0)
tmp = t_2;
elseif (t <= -1.9e-36)
tmp = (x * ((18.0 * (t * (z * y))) - (i * 4.0))) - t_1;
elseif (t <= 2.6e+111)
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+134], t$95$3, If[LessEqual[t, -45000000000.0], t$95$2, If[LessEqual[t, -1.9e-36], N[(N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e+111], 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+134}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -45000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-36}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right) - t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -2.2e134 or 2.5999999999999999e111 < t Initial program 77.9%
Simplified83.8%
Taylor expanded in t around inf 80.6%
if -2.2e134 < t < -4.5e10 or -1.89999999999999985e-36 < t < 2.5999999999999999e111Initial program 90.8%
Taylor expanded in t around 0 80.1%
if -4.5e10 < t < -1.89999999999999985e-36Initial program 88.1%
Taylor expanded in a around inf 88.1%
Taylor expanded in y around inf 76.5%
Taylor expanded in x around inf 87.8%
Final simplification80.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0))))
(t_2 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t -9.5e+134)
t_2
(if (<= t -35000000000.0)
t_1
(if (<= t -2.5e-36)
(+ (* j (* k -27.0)) (* x (+ (* -4.0 i) (* 18.0 (* t (* z y))))))
(if (<= t 8e+111) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -9.5e+134) {
tmp = t_2;
} else if (t <= -35000000000.0) {
tmp = t_1;
} else if (t <= -2.5e-36) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else if (t <= 8e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
t_2 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
if (t <= (-9.5d+134)) then
tmp = t_2
else if (t <= (-35000000000.0d0)) then
tmp = t_1
else if (t <= (-2.5d-36)) then
tmp = (j * (k * (-27.0d0))) + (x * (((-4.0d0) * i) + (18.0d0 * (t * (z * y)))))
else if (t <= 8d+111) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
double t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -9.5e+134) {
tmp = t_2;
} else if (t <= -35000000000.0) {
tmp = t_1;
} else if (t <= -2.5e-36) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else if (t <= 8e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t <= -9.5e+134: tmp = t_2 elif t <= -35000000000.0: tmp = t_1 elif t <= -2.5e-36: tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y))))) elif t <= 8e+111: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(j * 27.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -9.5e+134) tmp = t_2; elseif (t <= -35000000000.0) tmp = t_1; elseif (t <= -2.5e-36) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(t * Float64(z * y)))))); elseif (t <= 8e+111) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
t_2 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -9.5e+134)
tmp = t_2;
elseif (t <= -35000000000.0)
tmp = t_1;
elseif (t <= -2.5e-36)
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
elseif (t <= 8e+111)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+134], t$95$2, If[LessEqual[t, -35000000000.0], t$95$1, If[LessEqual[t, -2.5e-36], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+111], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+134}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -35000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-36}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i + 18 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.5000000000000004e134 or 7.99999999999999965e111 < t Initial program 77.9%
Simplified83.8%
Taylor expanded in t around inf 80.6%
if -9.5000000000000004e134 < t < -3.5e10 or -2.50000000000000002e-36 < t < 7.99999999999999965e111Initial program 90.8%
Taylor expanded in t around 0 80.1%
if -3.5e10 < t < -2.50000000000000002e-36Initial program 88.1%
Simplified88.1%
Taylor expanded in x around inf 87.8%
Final simplification80.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -1.65e+166)
(-
(+ (* b c) (* y (+ (* -4.0 (/ (* t a) y)) (* 18.0 (* t (* z x))))))
(* k (* j 27.0)))
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.65e+166) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-1.65d+166)) then
tmp = ((b * c) + (y * (((-4.0d0) * ((t * a) / y)) + (18.0d0 * (t * (z * x)))))) - (k * (j * 27.0d0))
else
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.65e+166) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -1.65e+166: tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - (k * (j * 27.0)) else: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -1.65e+166) tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(18.0 * Float64(t * Float64(z * x)))))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -1.65e+166)
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - (k * (j * 27.0));
else
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -1.65e+166], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+166}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 18 \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if y < -1.6500000000000001e166Initial program 81.3%
Taylor expanded in a around inf 73.7%
Taylor expanded in y around inf 89.0%
Taylor expanded in i around 0 86.6%
if -1.6500000000000001e166 < y Initial program 88.2%
Simplified89.6%
Final simplification89.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= y -9e+79)
(-
(+ (* b c) (* y (+ (* -4.0 (/ (* t a) y)) (* 18.0 (* t (* z x))))))
t_1)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (y <= -9e+79) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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.
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 = k * (j * 27.0d0)
if (y <= (-9d+79)) then
tmp = ((b * c) + (y * (((-4.0d0) * ((t * a) / y)) + (18.0d0 * (t * (z * x)))))) - t_1
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (y <= -9e+79) {
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if y <= -9e+79: tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1 else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (y <= -9e+79) tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(18.0 * Float64(t * Float64(z * x)))))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (y <= -9e+79)
tmp = ((b * c) + (y * ((-4.0 * ((t * a) / y)) + (18.0 * (t * (z * x)))))) - t_1;
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+79], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+79}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 18 \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t\_1\\
\end{array}
\end{array}
if y < -8.99999999999999987e79Initial program 77.8%
Taylor expanded in a around inf 74.1%
Taylor expanded in y around inf 87.6%
Taylor expanded in i around 0 87.8%
if -8.99999999999999987e79 < y Initial program 89.4%
Taylor expanded in y around 0 83.8%
distribute-lft-out83.8%
*-commutative83.8%
Simplified83.8%
Final simplification84.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.
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 (* k (* j 27.0))))
(if (<= t_2 -1e+149)
(+ t_1 (* b c))
(if (<= t_2 1e+125)
(- (* b c) (* 4.0 (+ (* t a) (* x i))))
(+ t_1 (* 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);
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -1e+149) {
tmp = t_1 + (b * c);
} else if (t_2 <= 1e+125) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = t_1 + (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.
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 = k * (j * 27.0d0)
if (t_2 <= (-1d+149)) then
tmp = t_1 + (b * c)
else if (t_2 <= 1d+125) then
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
else
tmp = t_1 + (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;
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -1e+149) {
tmp = t_1 + (b * c);
} else if (t_2 <= 1e+125) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = t_1 + (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]) [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 = k * (j * 27.0) tmp = 0 if t_2 <= -1e+149: tmp = t_1 + (b * c) elif t_2 <= 1e+125: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) else: tmp = t_1 + (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]) 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(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -1e+149) tmp = Float64(t_1 + Float64(b * c)); elseif (t_2 <= 1e+125) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); else tmp = Float64(t_1 + 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])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -1e+149)
tmp = t_1 + (b * c);
elseif (t_2 <= 1e+125)
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
else
tmp = t_1 + (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.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+149], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+125], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + 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])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+149}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t\_2 \leq 10^{+125}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000005e149Initial program 81.9%
Simplified87.3%
Taylor expanded in b around inf 85.4%
if -1.00000000000000005e149 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999992e124Initial program 88.8%
Taylor expanded in y around 0 76.8%
distribute-lft-out76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in j around 0 70.1%
if 9.9999999999999992e124 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.5%
Simplified78.6%
Taylor expanded in i around inf 75.4%
associate-*r*75.4%
*-commutative75.4%
Simplified75.4%
Final simplification73.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= z -5.2e-50)
(+ (* j (* k -27.0)) (* x (+ (* -4.0 i) (* 18.0 (* t (* z y))))))
(if (<= z 5.1e+178)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
(- (* (- x) (+ (* i 4.0) (* -18.0 (* z (* t y))))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (z <= -5.2e-50) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else if (z <= 5.1e+178) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = (-x * ((i * 4.0) + (-18.0 * (z * (t * y))))) - 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.
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 = k * (j * 27.0d0)
if (z <= (-5.2d-50)) then
tmp = (j * (k * (-27.0d0))) + (x * (((-4.0d0) * i) + (18.0d0 * (t * (z * y)))))
else if (z <= 5.1d+178) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
else
tmp = (-x * ((i * 4.0d0) + ((-18.0d0) * (z * (t * y))))) - 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (z <= -5.2e-50) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else if (z <= 5.1e+178) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = (-x * ((i * 4.0) + (-18.0 * (z * (t * y))))) - 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if z <= -5.2e-50: tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y))))) elif z <= 5.1e+178: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1 else: tmp = (-x * ((i * 4.0) + (-18.0 * (z * (t * y))))) - 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (z <= -5.2e-50) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(t * Float64(z * y)))))); elseif (z <= 5.1e+178) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1); else tmp = Float64(Float64(Float64(-x) * Float64(Float64(i * 4.0) + Float64(-18.0 * Float64(z * Float64(t * y))))) - 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (z <= -5.2e-50)
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
elseif (z <= 5.1e+178)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
else
tmp = (-x * ((i * 4.0) + (-18.0 * (z * (t * y))))) - 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e-50], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e+178], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[((-x) * N[(N[(i * 4.0), $MachinePrecision] + N[(-18.0 * N[(z * N[(t * y), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-50}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i + 18 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+178}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left(i \cdot 4 + -18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if z < -5.2000000000000003e-50Initial program 79.3%
Simplified84.1%
Taylor expanded in x around inf 67.4%
if -5.2000000000000003e-50 < z < 5.0999999999999997e178Initial program 92.6%
Taylor expanded in y around 0 88.3%
distribute-lft-out88.3%
*-commutative88.3%
Simplified88.3%
if 5.0999999999999997e178 < z Initial program 81.0%
Taylor expanded in a around inf 66.1%
Taylor expanded in y around inf 62.3%
Taylor expanded in x around -inf 66.5%
associate-*r*66.5%
mul-1-neg66.5%
cancel-sign-sub-inv66.5%
associate-*r*77.5%
metadata-eval77.5%
Simplified77.5%
Final simplification80.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -4e-57)
(+ (* j (* k -27.0)) (* b c))
(if (<= t_1 5e+73)
(- (* b c) (* 4.0 (* x i)))
(* k (- (/ (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e-57) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 5e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = k * (((b * c) / 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.
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 = k * (j * 27.0d0)
if (t_1 <= (-4d-57)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (t_1 <= 5d+73) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = k * (((b * c) / 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e-57) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 5e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = k * (((b * c) / 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -4e-57: tmp = (j * (k * -27.0)) + (b * c) elif t_1 <= 5e+73: tmp = (b * c) - (4.0 * (x * i)) else: tmp = k * (((b * c) / 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -4e-57) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (t_1 <= 5e+73) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(k * Float64(Float64(Float64(b * c) / 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -4e-57)
tmp = (j * (k * -27.0)) + (b * c);
elseif (t_1 <= 5e+73)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = k * (((b * c) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-57], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(N[(b * c), $MachinePrecision] / k), $MachinePrecision] - N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-57}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(\frac{b \cdot c}{k} - j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999982e-57Initial program 86.1%
Simplified88.7%
Taylor expanded in b around inf 65.8%
if -3.99999999999999982e-57 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999976e73Initial program 88.3%
Taylor expanded in t around 0 58.2%
Taylor expanded in j around 0 55.7%
if 4.99999999999999976e73 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.9%
Taylor expanded in a around inf 81.4%
Taylor expanded in y around inf 78.9%
Taylor expanded in b around inf 62.7%
Taylor expanded in k around inf 65.1%
Final simplification60.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -4e-57)
(+ (* j (* k -27.0)) (* b c))
(if (<= t_1 5e+73)
(- (* b c) (* 4.0 (* x i)))
(* j (- (/ (* b c) j) (* k 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e-57) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 5e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = j * (((b * c) / j) - (k * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if (t_1 <= (-4d-57)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (t_1 <= 5d+73) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = j * (((b * c) / j) - (k * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e-57) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 5e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = j * (((b * c) / j) - (k * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -4e-57: tmp = (j * (k * -27.0)) + (b * c) elif t_1 <= 5e+73: tmp = (b * c) - (4.0 * (x * i)) else: tmp = j * (((b * c) / j) - (k * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -4e-57) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (t_1 <= 5e+73) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(j * Float64(Float64(Float64(b * c) / j) - Float64(k * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -4e-57)
tmp = (j * (k * -27.0)) + (b * c);
elseif (t_1 <= 5e+73)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = j * (((b * c) / j) - (k * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-57], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(N[(b * c), $MachinePrecision] / j), $MachinePrecision] - N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-57}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(\frac{b \cdot c}{j} - k \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999982e-57Initial program 86.1%
Simplified88.7%
Taylor expanded in b around inf 65.8%
if -3.99999999999999982e-57 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999976e73Initial program 88.3%
Taylor expanded in t around 0 58.2%
Taylor expanded in j around 0 55.7%
if 4.99999999999999976e73 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.9%
Taylor expanded in a around inf 81.4%
Taylor expanded in y around inf 78.9%
Taylor expanded in b around inf 62.7%
Taylor expanded in j around inf 65.2%
Final simplification60.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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= y -1.1e+80) (- (+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0)))) (* j (* k 27.0))) (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.1e+80) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-1.1d+80)) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - (j * (k * 27.0d0))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.1e+80) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -1.1e+80: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0)) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -1.1e+80) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(j * Float64(k * 27.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -1.1e+80)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -1.1e+80], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+80}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - j \cdot \left(k \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if y < -1.10000000000000001e80Initial program 77.8%
Simplified81.7%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r*82.0%
Simplified82.0%
if -1.10000000000000001e80 < y Initial program 89.4%
Taylor expanded in y around 0 83.8%
distribute-lft-out83.8%
*-commutative83.8%
Simplified83.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (or (<= t_1 -4e-57) (not (<= t_1 5e+73)))
(+ (* j (* k -27.0)) (* b c))
(- (* b c) (* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t_1 <= -4e-57) || !(t_1 <= 5e+73)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (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.
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 = k * (j * 27.0d0)
if ((t_1 <= (-4d-57)) .or. (.not. (t_1 <= 5d+73))) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (b * c) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t_1 <= -4e-57) || !(t_1 <= 5e+73)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if (t_1 <= -4e-57) or not (t_1 <= 5e+73): tmp = (j * (k * -27.0)) + (b * c) else: tmp = (b * c) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if ((t_1 <= -4e-57) || !(t_1 <= 5e+73)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(Float64(b * c) - 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if ((t_1 <= -4e-57) || ~((t_1 <= 5e+73)))
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = (b * c) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-57], N[Not[LessEqual[t$95$1, 5e+73]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-57} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+73}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999982e-57 or 4.99999999999999976e73 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.0%
Simplified86.2%
Taylor expanded in b around inf 64.8%
if -3.99999999999999982e-57 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999976e73Initial program 88.3%
Taylor expanded in t around 0 58.2%
Taylor expanded in j around 0 55.7%
Final simplification60.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -3.6e-109)
(* b c)
(if (<= c 4.5e-264)
(* j (* k -27.0))
(if (<= c 1.15e-176)
(* -4.0 (* x i))
(if (<= c 2.3e+93) (* k (* j -27.0)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -3.6e-109) {
tmp = b * c;
} else if (c <= 4.5e-264) {
tmp = j * (k * -27.0);
} else if (c <= 1.15e-176) {
tmp = -4.0 * (x * i);
} else if (c <= 2.3e+93) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-3.6d-109)) then
tmp = b * c
else if (c <= 4.5d-264) then
tmp = j * (k * (-27.0d0))
else if (c <= 1.15d-176) then
tmp = (-4.0d0) * (x * i)
else if (c <= 2.3d+93) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -3.6e-109) {
tmp = b * c;
} else if (c <= 4.5e-264) {
tmp = j * (k * -27.0);
} else if (c <= 1.15e-176) {
tmp = -4.0 * (x * i);
} else if (c <= 2.3e+93) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -3.6e-109: tmp = b * c elif c <= 4.5e-264: tmp = j * (k * -27.0) elif c <= 1.15e-176: tmp = -4.0 * (x * i) elif c <= 2.3e+93: tmp = k * (j * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -3.6e-109) tmp = Float64(b * c); elseif (c <= 4.5e-264) tmp = Float64(j * Float64(k * -27.0)); elseif (c <= 1.15e-176) tmp = Float64(-4.0 * Float64(x * i)); elseif (c <= 2.3e+93) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -3.6e-109)
tmp = b * c;
elseif (c <= 4.5e-264)
tmp = j * (k * -27.0);
elseif (c <= 1.15e-176)
tmp = -4.0 * (x * i);
elseif (c <= 2.3e+93)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -3.6e-109], N[(b * c), $MachinePrecision], If[LessEqual[c, 4.5e-264], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.15e-176], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.3e+93], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.6 \cdot 10^{-109}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 4.5 \cdot 10^{-264}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.15 \cdot 10^{-176}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 2.3 \cdot 10^{+93}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -3.6000000000000001e-109 or 2.3000000000000002e93 < c Initial program 86.3%
Taylor expanded in t around 0 71.6%
Taylor expanded in b around inf 42.7%
if -3.6000000000000001e-109 < c < 4.5000000000000001e-264Initial program 90.5%
Simplified94.2%
Taylor expanded in j around inf 32.1%
*-commutative32.1%
associate-*r*32.2%
*-commutative32.2%
Simplified32.2%
if 4.5000000000000001e-264 < c < 1.1500000000000001e-176Initial program 76.5%
Simplified86.0%
Taylor expanded in i around inf 51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in x around inf 30.1%
*-commutative30.1%
Simplified30.1%
if 1.1500000000000001e-176 < c < 2.3000000000000002e93Initial program 89.9%
Simplified88.5%
Taylor expanded in i around inf 52.4%
associate-*r*52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in x around 0 26.4%
*-commutative26.4%
*-commutative26.4%
associate-*r*26.3%
*-commutative26.3%
Simplified26.3%
Final simplification35.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= c -1e-109)
(* b c)
(if (<= c 2.6e-264)
t_1
(if (<= c 1.3e-174)
(* -4.0 (* x i))
(if (<= c 1.8e+93) 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (c <= -1e-109) {
tmp = b * c;
} else if (c <= 2.6e-264) {
tmp = t_1;
} else if (c <= 1.3e-174) {
tmp = -4.0 * (x * i);
} else if (c <= 1.8e+93) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (c <= (-1d-109)) then
tmp = b * c
else if (c <= 2.6d-264) then
tmp = t_1
else if (c <= 1.3d-174) then
tmp = (-4.0d0) * (x * i)
else if (c <= 1.8d+93) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (c <= -1e-109) {
tmp = b * c;
} else if (c <= 2.6e-264) {
tmp = t_1;
} else if (c <= 1.3e-174) {
tmp = -4.0 * (x * i);
} else if (c <= 1.8e+93) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if c <= -1e-109: tmp = b * c elif c <= 2.6e-264: tmp = t_1 elif c <= 1.3e-174: tmp = -4.0 * (x * i) elif c <= 1.8e+93: 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (c <= -1e-109) tmp = Float64(b * c); elseif (c <= 2.6e-264) tmp = t_1; elseif (c <= 1.3e-174) tmp = Float64(-4.0 * Float64(x * i)); elseif (c <= 1.8e+93) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (c <= -1e-109)
tmp = b * c;
elseif (c <= 2.6e-264)
tmp = t_1;
elseif (c <= 1.3e-174)
tmp = -4.0 * (x * i);
elseif (c <= 1.8e+93)
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e-109], N[(b * c), $MachinePrecision], If[LessEqual[c, 2.6e-264], t$95$1, If[LessEqual[c, 1.3e-174], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.8e+93], 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{-109}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{-174}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 1.8 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -9.9999999999999999e-110 or 1.8e93 < c Initial program 86.3%
Taylor expanded in t around 0 71.6%
Taylor expanded in b around inf 42.7%
if -9.9999999999999999e-110 < c < 2.6000000000000002e-264 or 1.3000000000000001e-174 < c < 1.8e93Initial program 90.2%
Simplified91.2%
Taylor expanded in j around inf 29.0%
*-commutative29.0%
associate-*r*29.1%
*-commutative29.1%
Simplified29.1%
if 2.6000000000000002e-264 < c < 1.3000000000000001e-174Initial program 76.5%
Simplified86.0%
Taylor expanded in i around inf 51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in x around inf 30.1%
*-commutative30.1%
Simplified30.1%
Final simplification35.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= c -4.8e-118)
(* b c)
(if (<= c 1.6e-262)
t_1
(if (<= c 9.2e-177)
(* -4.0 (* x i))
(if (<= c 1.95e+95) 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if (c <= -4.8e-118) {
tmp = b * c;
} else if (c <= 1.6e-262) {
tmp = t_1;
} else if (c <= 9.2e-177) {
tmp = -4.0 * (x * i);
} else if (c <= 1.95e+95) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
if (c <= (-4.8d-118)) then
tmp = b * c
else if (c <= 1.6d-262) then
tmp = t_1
else if (c <= 9.2d-177) then
tmp = (-4.0d0) * (x * i)
else if (c <= 1.95d+95) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if (c <= -4.8e-118) {
tmp = b * c;
} else if (c <= 1.6e-262) {
tmp = t_1;
} else if (c <= 9.2e-177) {
tmp = -4.0 * (x * i);
} else if (c <= 1.95e+95) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if c <= -4.8e-118: tmp = b * c elif c <= 1.6e-262: tmp = t_1 elif c <= 9.2e-177: tmp = -4.0 * (x * i) elif c <= 1.95e+95: 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (c <= -4.8e-118) tmp = Float64(b * c); elseif (c <= 1.6e-262) tmp = t_1; elseif (c <= 9.2e-177) tmp = Float64(-4.0 * Float64(x * i)); elseif (c <= 1.95e+95) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if (c <= -4.8e-118)
tmp = b * c;
elseif (c <= 1.6e-262)
tmp = t_1;
elseif (c <= 9.2e-177)
tmp = -4.0 * (x * i);
elseif (c <= 1.95e+95)
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.8e-118], N[(b * c), $MachinePrecision], If[LessEqual[c, 1.6e-262], t$95$1, If[LessEqual[c, 9.2e-177], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.95e+95], 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;c \leq -4.8 \cdot 10^{-118}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{-177}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 1.95 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -4.8000000000000003e-118 or 1.9499999999999999e95 < c Initial program 86.7%
Taylor expanded in t around 0 70.7%
Taylor expanded in b around inf 41.8%
if -4.8000000000000003e-118 < c < 1.6e-262 or 9.20000000000000087e-177 < c < 1.9499999999999999e95Initial program 90.0%
Simplified91.0%
Taylor expanded in j around inf 28.7%
if 1.6e-262 < c < 9.20000000000000087e-177Initial program 75.3%
Simplified85.3%
Taylor expanded in i around inf 53.7%
associate-*r*53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in x around inf 31.5%
*-commutative31.5%
Simplified31.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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.3e+135) (not (<= t 9e+110))) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))) (- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.3e+135) || !(t <= 9e+110)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.3d+135)) .or. (.not. (t <= 9d+110))) then
tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.3e+135) || !(t <= 9e+110)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.3e+135) or not (t <= 9e+110): tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) else: tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.3e+135) || !(t <= 9e+110)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1.3e+135) || ~((t <= 9e+110)))
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
else
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.3e+135], N[Not[LessEqual[t, 9e+110]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+135} \lor \neg \left(t \leq 9 \cdot 10^{+110}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -1.3e135 or 9.0000000000000005e110 < t Initial program 77.9%
Simplified83.8%
Taylor expanded in t around inf 80.6%
if -1.3e135 < t < 9.0000000000000005e110Initial program 90.6%
Taylor expanded in t around 0 78.3%
Final simplification78.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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= y -6.2e+166) (+ (* j (* k -27.0)) (* x (+ (* -4.0 i) (* 18.0 (* t (* z y)))))) (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -6.2e+166) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-6.2d+166)) then
tmp = (j * (k * (-27.0d0))) + (x * (((-4.0d0) * i) + (18.0d0 * (t * (z * y)))))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -6.2e+166) {
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -6.2e+166: tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y))))) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -6.2e+166) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(t * Float64(z * y)))))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -6.2e+166)
tmp = (j * (k * -27.0)) + (x * ((-4.0 * i) + (18.0 * (t * (z * y)))));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -6.2e+166], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+166}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i + 18 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if y < -6.19999999999999966e166Initial program 80.8%
Simplified80.7%
Taylor expanded in x around inf 81.1%
if -6.19999999999999966e166 < y Initial program 88.2%
Taylor expanded in y around 0 82.5%
distribute-lft-out82.5%
*-commutative82.5%
Simplified82.5%
Final simplification82.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. 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 (<= c -1.3e-113) (not (<= c 3.5e+93))) (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -1.3e-113) || !(c <= 3.5e+93)) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((c <= (-1.3d-113)) .or. (.not. (c <= 3.5d+93))) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -1.3e-113) || !(c <= 3.5e+93)) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (c <= -1.3e-113) or not (c <= 3.5e+93): 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((c <= -1.3e-113) || !(c <= 3.5e+93)) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((c <= -1.3e-113) || ~((c <= 3.5e+93)))
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. 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[c, -1.3e-113], N[Not[LessEqual[c, 3.5e+93]], $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.3 \cdot 10^{-113} \lor \neg \left(c \leq 3.5 \cdot 10^{+93}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if c < -1.3e-113 or 3.49999999999999998e93 < c Initial program 86.7%
Taylor expanded in t around 0 70.7%
Taylor expanded in b around inf 41.8%
if -1.3e-113 < c < 3.49999999999999998e93Initial program 87.7%
Simplified90.1%
Taylor expanded in j around inf 27.9%
Final simplification34.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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x 4.2e+115) (+ (* j (* k -27.0)) (* b c)) (* -4.0 (* x i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= 4.2e+115) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= 4.2d+115) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (-4.0d0) * (x * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= 4.2e+115) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= 4.2e+115: tmp = (j * (k * -27.0)) + (b * c) else: tmp = -4.0 * (x * i) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= 4.2e+115) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= 4.2e+115)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = -4.0 * (x * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 4.2e+115], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.2 \cdot 10^{+115}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < 4.20000000000000007e115Initial program 89.8%
Simplified89.9%
Taylor expanded in b around inf 51.3%
if 4.20000000000000007e115 < x Initial program 69.0%
Simplified81.3%
Taylor expanded in i around inf 61.2%
associate-*r*61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in x around inf 51.6%
*-commutative51.6%
Simplified51.6%
Final simplification51.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. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 87.2%
Taylor expanded in t around 0 64.6%
Taylor expanded in b around inf 24.6%
(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 2024096
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(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)))