
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -9.5e-59)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(if (<= t 5.5e-30)
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
(*
t
(-
(+ (* 18.0 (* x (* y z))) (/ (* b c) t))
(+ (* a 4.0) (+ (* 4.0 (/ (* x i) t)) (* 27.0 (/ (* j k) t)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -9.5e-59) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else if (t <= 5.5e-30) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0) + ((4.0 * ((x * i) / t)) + (27.0 * ((j * k) / t)))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -9.5e-59) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); elseif (t <= 5.5e-30) tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t)) - Float64(Float64(a * 4.0) + Float64(Float64(4.0 * Float64(Float64(x * i) / t)) + Float64(27.0 * Float64(Float64(j * k) / t)))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -9.5e-59], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $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], If[LessEqual[t, 5.5e-30], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $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], N[(t * N[(N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] + N[(N[(4.0 * N[(N[(x * i), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / t), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-59}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\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{elif}\;t \leq 5.5 \cdot 10^{-30}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\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{else}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right) - \left(a \cdot 4 + \left(4 \cdot \frac{x \cdot i}{t} + 27 \cdot \frac{j \cdot k}{t}\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.4999999999999994e-59Initial program 81.6%
Simplified85.8%
if -9.4999999999999994e-59 < t < 5.49999999999999976e-30Initial program 90.5%
pow190.5%
associate-*l*92.1%
*-commutative92.1%
Applied egg-rr92.1%
unpow192.1%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
if 5.49999999999999976e-30 < t Initial program 82.8%
Simplified91.3%
Taylor expanded in t around inf 94.1%
Final simplification92.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* c (+ b (* t (* -4.0 (/ a c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = c * (b + (t * (-4.0 * (a / c))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = c * (b + (t * (-4.0 * (a / c))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = c * (b + (t * (-4.0 * (a / c)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - 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(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = c * (b + (t * (-4.0 * (a / c))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $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[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\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}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 96.9%
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%
Taylor expanded in x around 0 44.9%
Taylor expanded in c around inf 51.8%
associate-*r/51.8%
mul-1-neg51.8%
*-commutative51.8%
*-commutative51.8%
associate-*r*51.8%
*-commutative51.8%
associate-*l*51.8%
*-commutative51.8%
distribute-neg-in51.8%
distribute-rgt-neg-in51.8%
distribute-rgt-neg-in51.8%
metadata-eval51.8%
distribute-rgt-neg-in51.8%
distribute-lft-neg-in51.8%
metadata-eval51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around inf 45.3%
associate-*r/45.3%
*-commutative45.3%
*-commutative45.3%
associate-*r*45.3%
*-commutative45.3%
associate-*r/48.8%
associate-*r/48.8%
Simplified48.8%
Final simplification91.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* i (* x -4.0))))
(t_4 (+ t_2 (* b c))))
(if (<= t -1.5e+214)
t_1
(if (<= t -2.8e-31)
(+ t_2 (* -4.0 (* t a)))
(if (<= t -2.6e-109)
t_4
(if (<= t -4.6e-216)
t_3
(if (<= t -1.3e-231)
(* c (+ b (* t (* -4.0 (/ a c)))))
(if (<= t 2.95e-269)
t_4
(if (<= t 7e-140) t_3 (if (<= t 1.7e+106) t_4 t_1))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double t_4 = t_2 + (b * c);
double tmp;
if (t <= -1.5e+214) {
tmp = t_1;
} else if (t <= -2.8e-31) {
tmp = t_2 + (-4.0 * (t * a));
} else if (t <= -2.6e-109) {
tmp = t_4;
} else if (t <= -4.6e-216) {
tmp = t_3;
} else if (t <= -1.3e-231) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 2.95e-269) {
tmp = t_4;
} else if (t <= 7e-140) {
tmp = t_3;
} else if (t <= 1.7e+106) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (i * (x * (-4.0d0)))
t_4 = t_2 + (b * c)
if (t <= (-1.5d+214)) then
tmp = t_1
else if (t <= (-2.8d-31)) then
tmp = t_2 + ((-4.0d0) * (t * a))
else if (t <= (-2.6d-109)) then
tmp = t_4
else if (t <= (-4.6d-216)) then
tmp = t_3
else if (t <= (-1.3d-231)) then
tmp = c * (b + (t * ((-4.0d0) * (a / c))))
else if (t <= 2.95d-269) then
tmp = t_4
else if (t <= 7d-140) then
tmp = t_3
else if (t <= 1.7d+106) then
tmp = t_4
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double t_4 = t_2 + (b * c);
double tmp;
if (t <= -1.5e+214) {
tmp = t_1;
} else if (t <= -2.8e-31) {
tmp = t_2 + (-4.0 * (t * a));
} else if (t <= -2.6e-109) {
tmp = t_4;
} else if (t <= -4.6e-216) {
tmp = t_3;
} else if (t <= -1.3e-231) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 2.95e-269) {
tmp = t_4;
} else if (t <= 7e-140) {
tmp = t_3;
} else if (t <= 1.7e+106) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (i * (x * -4.0)) t_4 = t_2 + (b * c) tmp = 0 if t <= -1.5e+214: tmp = t_1 elif t <= -2.8e-31: tmp = t_2 + (-4.0 * (t * a)) elif t <= -2.6e-109: tmp = t_4 elif t <= -4.6e-216: tmp = t_3 elif t <= -1.3e-231: tmp = c * (b + (t * (-4.0 * (a / c)))) elif t <= 2.95e-269: tmp = t_4 elif t <= 7e-140: tmp = t_3 elif t <= 1.7e+106: tmp = t_4 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(i * Float64(x * -4.0))) t_4 = Float64(t_2 + Float64(b * c)) tmp = 0.0 if (t <= -1.5e+214) tmp = t_1; elseif (t <= -2.8e-31) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); elseif (t <= -2.6e-109) tmp = t_4; elseif (t <= -4.6e-216) tmp = t_3; elseif (t <= -1.3e-231) tmp = Float64(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); elseif (t <= 2.95e-269) tmp = t_4; elseif (t <= 7e-140) tmp = t_3; elseif (t <= 1.7e+106) tmp = t_4; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (i * (x * -4.0));
t_4 = t_2 + (b * c);
tmp = 0.0;
if (t <= -1.5e+214)
tmp = t_1;
elseif (t <= -2.8e-31)
tmp = t_2 + (-4.0 * (t * a));
elseif (t <= -2.6e-109)
tmp = t_4;
elseif (t <= -4.6e-216)
tmp = t_3;
elseif (t <= -1.3e-231)
tmp = c * (b + (t * (-4.0 * (a / c))));
elseif (t <= 2.95e-269)
tmp = t_4;
elseif (t <= 7e-140)
tmp = t_3;
elseif (t <= 1.7e+106)
tmp = t_4;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+214], t$95$1, If[LessEqual[t, -2.8e-31], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e-109], t$95$4, If[LessEqual[t, -4.6e-216], t$95$3, If[LessEqual[t, -1.3e-231], N[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e-269], t$95$4, If[LessEqual[t, 7e-140], t$95$3, If[LessEqual[t, 1.7e+106], t$95$4, t$95$1]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + i \cdot \left(x \cdot -4\right)\\
t_4 := t\_2 + b \cdot c\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-31}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-109}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-216}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-231}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-269}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-140}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+106}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.5000000000000001e214 or 1.69999999999999997e106 < t Initial program 84.4%
Simplified93.7%
Taylor expanded in t around inf 87.2%
if -1.5000000000000001e214 < t < -2.7999999999999999e-31Initial program 78.4%
Simplified83.2%
Taylor expanded in a around inf 60.9%
*-commutative60.9%
Simplified60.9%
if -2.7999999999999999e-31 < t < -2.5999999999999998e-109 or -1.30000000000000001e-231 < t < 2.95e-269 or 6.9999999999999996e-140 < t < 1.69999999999999997e106Initial program 89.8%
Simplified91.2%
Taylor expanded in b around inf 61.4%
if -2.5999999999999998e-109 < t < -4.59999999999999993e-216 or 2.95e-269 < t < 6.9999999999999996e-140Initial program 88.1%
Simplified86.6%
Taylor expanded in i around inf 69.6%
metadata-eval69.6%
distribute-lft-neg-in69.6%
*-commutative69.6%
associate-*r*69.6%
distribute-rgt-neg-in69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
*-commutative69.6%
Simplified69.6%
if -4.59999999999999993e-216 < t < -1.30000000000000001e-231Initial program 66.7%
Taylor expanded in x around 0 100.0%
Taylor expanded in c around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*l*100.0%
*-commutative100.0%
distribute-neg-in100.0%
distribute-rgt-neg-in100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
distribute-rgt-neg-in100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
associate-*r/100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r/100.0%
associate-*r/100.0%
Simplified100.0%
Final simplification70.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ t_1 (* i (* x -4.0))))
(t_3 (+ t_1 (* b c))))
(if (<= t -2.2e+216)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -1.85e-20)
(+ t_1 (* -4.0 (* t a)))
(if (<= t -1.2e-108)
t_3
(if (<= t -3.3e-216)
t_2
(if (<= t -1.3e-231)
(* c (+ b (* t (* -4.0 (/ a c)))))
(if (<= t 3.6e-269)
t_3
(if (<= t 1.05e-139)
t_2
(if (<= t 2e+105)
t_3
(* t (- (* (* y z) (* x 18.0)) (* a 4.0)))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double t_3 = t_1 + (b * c);
double tmp;
if (t <= -2.2e+216) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -1.85e-20) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= -1.2e-108) {
tmp = t_3;
} else if (t <= -3.3e-216) {
tmp = t_2;
} else if (t <= -1.3e-231) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 3.6e-269) {
tmp = t_3;
} else if (t <= 1.05e-139) {
tmp = t_2;
} else if (t <= 2e+105) {
tmp = t_3;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (i * (x * (-4.0d0)))
t_3 = t_1 + (b * c)
if (t <= (-2.2d+216)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-1.85d-20)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t <= (-1.2d-108)) then
tmp = t_3
else if (t <= (-3.3d-216)) then
tmp = t_2
else if (t <= (-1.3d-231)) then
tmp = c * (b + (t * ((-4.0d0) * (a / c))))
else if (t <= 3.6d-269) then
tmp = t_3
else if (t <= 1.05d-139) then
tmp = t_2
else if (t <= 2d+105) then
tmp = t_3
else
tmp = t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double t_3 = t_1 + (b * c);
double tmp;
if (t <= -2.2e+216) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -1.85e-20) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= -1.2e-108) {
tmp = t_3;
} else if (t <= -3.3e-216) {
tmp = t_2;
} else if (t <= -1.3e-231) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 3.6e-269) {
tmp = t_3;
} else if (t <= 1.05e-139) {
tmp = t_2;
} else if (t <= 2e+105) {
tmp = t_3;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (i * (x * -4.0)) t_3 = t_1 + (b * c) tmp = 0 if t <= -2.2e+216: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -1.85e-20: tmp = t_1 + (-4.0 * (t * a)) elif t <= -1.2e-108: tmp = t_3 elif t <= -3.3e-216: tmp = t_2 elif t <= -1.3e-231: tmp = c * (b + (t * (-4.0 * (a / c)))) elif t <= 3.6e-269: tmp = t_3 elif t <= 1.05e-139: tmp = t_2 elif t <= 2e+105: tmp = t_3 else: tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(i * Float64(x * -4.0))) t_3 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (t <= -2.2e+216) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -1.85e-20) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t <= -1.2e-108) tmp = t_3; elseif (t <= -3.3e-216) tmp = t_2; elseif (t <= -1.3e-231) tmp = Float64(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); elseif (t <= 3.6e-269) tmp = t_3; elseif (t <= 1.05e-139) tmp = t_2; elseif (t <= 2e+105) tmp = t_3; else tmp = Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (i * (x * -4.0));
t_3 = t_1 + (b * c);
tmp = 0.0;
if (t <= -2.2e+216)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -1.85e-20)
tmp = t_1 + (-4.0 * (t * a));
elseif (t <= -1.2e-108)
tmp = t_3;
elseif (t <= -3.3e-216)
tmp = t_2;
elseif (t <= -1.3e-231)
tmp = c * (b + (t * (-4.0 * (a / c))));
elseif (t <= 3.6e-269)
tmp = t_3;
elseif (t <= 1.05e-139)
tmp = t_2;
elseif (t <= 2e+105)
tmp = t_3;
else
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+216], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.85e-20], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.2e-108], t$95$3, If[LessEqual[t, -3.3e-216], t$95$2, If[LessEqual[t, -1.3e-231], N[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-269], t$95$3, If[LessEqual[t, 1.05e-139], t$95$2, If[LessEqual[t, 2e+105], t$95$3, N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $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])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + i \cdot \left(x \cdot -4\right)\\
t_3 := t\_1 + b \cdot c\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+216}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{-20}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-108}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-216}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-231}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-269}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-139}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+105}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.2e216Initial program 91.7%
Simplified95.8%
Taylor expanded in t around inf 83.8%
if -2.2e216 < t < -1.85e-20Initial program 78.4%
Simplified83.2%
Taylor expanded in a around inf 60.9%
*-commutative60.9%
Simplified60.9%
if -1.85e-20 < t < -1.20000000000000009e-108 or -1.30000000000000001e-231 < t < 3.59999999999999998e-269 or 1.05000000000000004e-139 < t < 1.9999999999999999e105Initial program 89.8%
Simplified91.2%
Taylor expanded in b around inf 61.4%
if -1.20000000000000009e-108 < t < -3.29999999999999969e-216 or 3.59999999999999998e-269 < t < 1.05000000000000004e-139Initial program 88.1%
Simplified86.6%
Taylor expanded in i around inf 69.6%
metadata-eval69.6%
distribute-lft-neg-in69.6%
*-commutative69.6%
associate-*r*69.6%
distribute-rgt-neg-in69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
*-commutative69.6%
Simplified69.6%
if -3.29999999999999969e-216 < t < -1.30000000000000001e-231Initial program 66.7%
Taylor expanded in x around 0 100.0%
Taylor expanded in c around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*l*100.0%
*-commutative100.0%
distribute-neg-in100.0%
distribute-rgt-neg-in100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
distribute-rgt-neg-in100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
associate-*r/100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r/100.0%
associate-*r/100.0%
Simplified100.0%
if 1.9999999999999999e105 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
pow189.2%
associate-*r*86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*r*89.2%
associate-*r*89.4%
Simplified89.4%
Final simplification70.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -2e+131)
(+ t_1 (* b c))
(if (<= t_2 -5e+80)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(if (<= t_2 -5e-8)
(+ t_1 (* -4.0 (* t a)))
(if (<= t_2 4e+175)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(+ t_1 (* i (* x -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2e+131) {
tmp = t_1 + (b * c);
} else if (t_2 <= -5e+80) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t_2 <= -5e-8) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 4e+175) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t_1 + (i * (x * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2d+131)) then
tmp = t_1 + (b * c)
else if (t_2 <= (-5d+80)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else if (t_2 <= (-5d-8)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t_2 <= 4d+175) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = t_1 + (i * (x * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2e+131) {
tmp = t_1 + (b * c);
} else if (t_2 <= -5e+80) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t_2 <= -5e-8) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 4e+175) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t_1 + (i * (x * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2e+131: tmp = t_1 + (b * c) elif t_2 <= -5e+80: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) elif t_2 <= -5e-8: tmp = t_1 + (-4.0 * (t * a)) elif t_2 <= 4e+175: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = t_1 + (i * (x * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2e+131) tmp = Float64(t_1 + Float64(b * c)); elseif (t_2 <= -5e+80) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); elseif (t_2 <= -5e-8) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 4e+175) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2e+131)
tmp = t_1 + (b * c);
elseif (t_2 <= -5e+80)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
elseif (t_2 <= -5e-8)
tmp = t_1 + (-4.0 * (t * a));
elseif (t_2 <= 4e+175)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = t_1 + (i * (x * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, -2e+131], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e+80], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-8], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+175], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(i * N[(x * -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])\\
\\
\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 -2 \cdot 10^{+131}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-8}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+175}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999998e131Initial program 90.1%
Simplified90.1%
Taylor expanded in b around inf 75.4%
if -1.9999999999999998e131 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e80Initial program 88.7%
Simplified88.7%
Taylor expanded in x around inf 84.1%
if -4.99999999999999961e80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999998e-8Initial program 88.0%
Simplified76.5%
Taylor expanded in a around inf 65.5%
*-commutative65.5%
Simplified65.5%
if -4.9999999999999998e-8 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.9999999999999997e175Initial program 87.1%
pow187.1%
associate-*l*84.2%
*-commutative84.2%
Applied egg-rr84.2%
unpow184.2%
associate-*l*86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y around 0 79.3%
distribute-lft-out79.3%
*-commutative79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in j around 0 77.3%
if 3.9999999999999997e175 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 70.9%
Simplified71.3%
Taylor expanded in i around inf 71.1%
metadata-eval71.1%
distribute-lft-neg-in71.1%
*-commutative71.1%
associate-*r*71.1%
distribute-rgt-neg-in71.1%
distribute-rgt-neg-in71.1%
metadata-eval71.1%
*-commutative71.1%
Simplified71.1%
Final simplification75.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -2e+131)
(+ t_1 (* 18.0 (* (* y z) (* t x))))
(if (<= t_2 -5e+80)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(if (<= t_2 -5e-8)
(+ t_1 (* -4.0 (* t a)))
(if (<= t_2 4e+175)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(+ t_1 (* i (* x -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2e+131) {
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
} else if (t_2 <= -5e+80) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t_2 <= -5e-8) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 4e+175) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t_1 + (i * (x * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2d+131)) then
tmp = t_1 + (18.0d0 * ((y * z) * (t * x)))
else if (t_2 <= (-5d+80)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else if (t_2 <= (-5d-8)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t_2 <= 4d+175) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = t_1 + (i * (x * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2e+131) {
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
} else if (t_2 <= -5e+80) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t_2 <= -5e-8) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t_2 <= 4e+175) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t_1 + (i * (x * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2e+131: tmp = t_1 + (18.0 * ((y * z) * (t * x))) elif t_2 <= -5e+80: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) elif t_2 <= -5e-8: tmp = t_1 + (-4.0 * (t * a)) elif t_2 <= 4e+175: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = t_1 + (i * (x * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2e+131) tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(t * x)))); elseif (t_2 <= -5e+80) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); elseif (t_2 <= -5e-8) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 4e+175) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2e+131)
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
elseif (t_2 <= -5e+80)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
elseif (t_2 <= -5e-8)
tmp = t_1 + (-4.0 * (t * a));
elseif (t_2 <= 4e+175)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = t_1 + (i * (x * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, -2e+131], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e+80], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-8], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+175], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(i * N[(x * -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])\\
\\
\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 -2 \cdot 10^{+131}:\\
\;\;\;\;t\_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-8}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+175}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999998e131Initial program 90.1%
Simplified90.1%
Taylor expanded in y around inf 77.9%
associate-*r*76.2%
Simplified76.2%
if -1.9999999999999998e131 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e80Initial program 88.7%
Simplified88.7%
Taylor expanded in x around inf 84.1%
if -4.99999999999999961e80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999998e-8Initial program 88.0%
Simplified76.5%
Taylor expanded in a around inf 65.5%
*-commutative65.5%
Simplified65.5%
if -4.9999999999999998e-8 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.9999999999999997e175Initial program 87.1%
pow187.1%
associate-*l*84.2%
*-commutative84.2%
Applied egg-rr84.2%
unpow184.2%
associate-*l*86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y around 0 79.3%
distribute-lft-out79.3%
*-commutative79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in j around 0 77.3%
if 3.9999999999999997e175 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 70.9%
Simplified71.3%
Taylor expanded in i around inf 71.1%
metadata-eval71.1%
distribute-lft-neg-in71.1%
*-commutative71.1%
associate-*r*71.1%
distribute-rgt-neg-in71.1%
distribute-rgt-neg-in71.1%
metadata-eval71.1%
*-commutative71.1%
Simplified71.1%
Final simplification75.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* -4.0 (* x i))))
(if (<= (* b c) -6.2e+171)
(* b c)
(if (<= (* b c) -7.8e-8)
t_1
(if (<= (* b c) -1.35e-129)
t_2
(if (<= (* b c) 1.25e-228)
t_1
(if (<= (* b c) 1.6e-87)
t_2
(if (<= (* b c) 3.2e+112) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -6.2e+171) {
tmp = b * c;
} else if ((b * c) <= -7.8e-8) {
tmp = t_1;
} else if ((b * c) <= -1.35e-129) {
tmp = t_2;
} else if ((b * c) <= 1.25e-228) {
tmp = t_1;
} else if ((b * c) <= 1.6e-87) {
tmp = t_2;
} else if ((b * c) <= 3.2e+112) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = (-4.0d0) * (x * i)
if ((b * c) <= (-6.2d+171)) then
tmp = b * c
else if ((b * c) <= (-7.8d-8)) then
tmp = t_1
else if ((b * c) <= (-1.35d-129)) then
tmp = t_2
else if ((b * c) <= 1.25d-228) then
tmp = t_1
else if ((b * c) <= 1.6d-87) then
tmp = t_2
else if ((b * c) <= 3.2d+112) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -6.2e+171) {
tmp = b * c;
} else if ((b * c) <= -7.8e-8) {
tmp = t_1;
} else if ((b * c) <= -1.35e-129) {
tmp = t_2;
} else if ((b * c) <= 1.25e-228) {
tmp = t_1;
} else if ((b * c) <= 1.6e-87) {
tmp = t_2;
} else if ((b * c) <= 3.2e+112) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = -4.0 * (x * i) tmp = 0 if (b * c) <= -6.2e+171: tmp = b * c elif (b * c) <= -7.8e-8: tmp = t_1 elif (b * c) <= -1.35e-129: tmp = t_2 elif (b * c) <= 1.25e-228: tmp = t_1 elif (b * c) <= 1.6e-87: tmp = t_2 elif (b * c) <= 3.2e+112: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -6.2e+171) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.8e-8) tmp = t_1; elseif (Float64(b * c) <= -1.35e-129) tmp = t_2; elseif (Float64(b * c) <= 1.25e-228) tmp = t_1; elseif (Float64(b * c) <= 1.6e-87) tmp = t_2; elseif (Float64(b * c) <= 3.2e+112) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -6.2e+171)
tmp = b * c;
elseif ((b * c) <= -7.8e-8)
tmp = t_1;
elseif ((b * c) <= -1.35e-129)
tmp = t_2;
elseif ((b * c) <= 1.25e-228)
tmp = t_1;
elseif ((b * c) <= 1.6e-87)
tmp = t_2;
elseif ((b * c) <= 3.2e+112)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+171], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.8e-8], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.35e-129], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.25e-228], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e-87], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3.2e+112], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+171}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1.35 \cdot 10^{-129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{-228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{-87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.1999999999999998e171 or 3.19999999999999986e112 < (*.f64 b c) Initial program 80.7%
pow180.7%
associate-*l*75.3%
*-commutative75.3%
Applied egg-rr75.3%
unpow175.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 79.7%
distribute-lft-out79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 59.0%
if -6.1999999999999998e171 < (*.f64 b c) < -7.7999999999999997e-8 or -1.35e-129 < (*.f64 b c) < 1.24999999999999993e-228 or 1.59999999999999989e-87 < (*.f64 b c) < 3.19999999999999986e112Initial program 88.8%
Simplified90.9%
Taylor expanded in j around inf 40.1%
if -7.7999999999999997e-8 < (*.f64 b c) < -1.35e-129 or 1.24999999999999993e-228 < (*.f64 b c) < 1.59999999999999989e-87Initial program 85.1%
pow185.1%
associate-*l*87.3%
*-commutative87.3%
Applied egg-rr87.3%
unpow187.3%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y around 0 75.3%
distribute-lft-out75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in x around inf 38.9%
Final simplification45.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* -4.0 (* x i))))
(if (<= (* b c) -7.8e+172)
(* b c)
(if (<= (* b c) -7.8e-8)
(* -27.0 (* j k))
(if (<= (* b c) -8e-128)
t_2
(if (<= (* b c) 1e-227)
t_1
(if (<= (* b c) 6.4e-89)
t_2
(if (<= (* b c) 3.7e+107) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -7.8e+172) {
tmp = b * c;
} else if ((b * c) <= -7.8e-8) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -8e-128) {
tmp = t_2;
} else if ((b * c) <= 1e-227) {
tmp = t_1;
} else if ((b * c) <= 6.4e-89) {
tmp = t_2;
} else if ((b * c) <= 3.7e+107) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * (x * i)
if ((b * c) <= (-7.8d+172)) then
tmp = b * c
else if ((b * c) <= (-7.8d-8)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= (-8d-128)) then
tmp = t_2
else if ((b * c) <= 1d-227) then
tmp = t_1
else if ((b * c) <= 6.4d-89) then
tmp = t_2
else if ((b * c) <= 3.7d+107) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -7.8e+172) {
tmp = b * c;
} else if ((b * c) <= -7.8e-8) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -8e-128) {
tmp = t_2;
} else if ((b * c) <= 1e-227) {
tmp = t_1;
} else if ((b * c) <= 6.4e-89) {
tmp = t_2;
} else if ((b * c) <= 3.7e+107) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * (x * i) tmp = 0 if (b * c) <= -7.8e+172: tmp = b * c elif (b * c) <= -7.8e-8: tmp = -27.0 * (j * k) elif (b * c) <= -8e-128: tmp = t_2 elif (b * c) <= 1e-227: tmp = t_1 elif (b * c) <= 6.4e-89: tmp = t_2 elif (b * c) <= 3.7e+107: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -7.8e+172) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.8e-8) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= -8e-128) tmp = t_2; elseif (Float64(b * c) <= 1e-227) tmp = t_1; elseif (Float64(b * c) <= 6.4e-89) tmp = t_2; elseif (Float64(b * c) <= 3.7e+107) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -7.8e+172)
tmp = b * c;
elseif ((b * c) <= -7.8e-8)
tmp = -27.0 * (j * k);
elseif ((b * c) <= -8e-128)
tmp = t_2;
elseif ((b * c) <= 1e-227)
tmp = t_1;
elseif ((b * c) <= 6.4e-89)
tmp = t_2;
elseif ((b * c) <= 3.7e+107)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.8e+172], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.8e-8], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8e-128], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1e-227], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 6.4e-89], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3.7e+107], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -7.8 \cdot 10^{+172}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.8 \cdot 10^{-8}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -8 \cdot 10^{-128}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 3.7 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -7.79999999999999934e172 or 3.7e107 < (*.f64 b c) Initial program 80.7%
pow180.7%
associate-*l*75.3%
*-commutative75.3%
Applied egg-rr75.3%
unpow175.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 79.7%
distribute-lft-out79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 59.0%
if -7.79999999999999934e172 < (*.f64 b c) < -7.7999999999999997e-8Initial program 88.3%
Simplified91.4%
Taylor expanded in j around inf 45.2%
if -7.7999999999999997e-8 < (*.f64 b c) < -8.00000000000000043e-128 or 9.99999999999999945e-228 < (*.f64 b c) < 6.39999999999999997e-89Initial program 85.1%
pow185.1%
associate-*l*87.3%
*-commutative87.3%
Applied egg-rr87.3%
unpow187.3%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y around 0 75.3%
distribute-lft-out75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in x around inf 38.9%
if -8.00000000000000043e-128 < (*.f64 b c) < 9.99999999999999945e-228 or 6.39999999999999997e-89 < (*.f64 b c) < 3.7e107Initial program 89.0%
pow189.0%
associate-*l*85.4%
*-commutative85.4%
Applied egg-rr85.4%
unpow185.4%
associate-*l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in j around inf 38.5%
*-commutative38.5%
associate-*r*38.5%
Simplified38.5%
Final simplification45.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* -4.0 (* x i))))
(if (<= (* b c) -1.06e+176)
(* b c)
(if (<= (* b c) -9.5e-8)
(* k (* j -27.0))
(if (<= (* b c) -3.6e-129)
t_2
(if (<= (* b c) 1.06e-226)
t_1
(if (<= (* b c) 1e-88)
t_2
(if (<= (* b c) 1.85e+114) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.06e+176) {
tmp = b * c;
} else if ((b * c) <= -9.5e-8) {
tmp = k * (j * -27.0);
} else if ((b * c) <= -3.6e-129) {
tmp = t_2;
} else if ((b * c) <= 1.06e-226) {
tmp = t_1;
} else if ((b * c) <= 1e-88) {
tmp = t_2;
} else if ((b * c) <= 1.85e+114) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * (x * i)
if ((b * c) <= (-1.06d+176)) then
tmp = b * c
else if ((b * c) <= (-9.5d-8)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= (-3.6d-129)) then
tmp = t_2
else if ((b * c) <= 1.06d-226) then
tmp = t_1
else if ((b * c) <= 1d-88) then
tmp = t_2
else if ((b * c) <= 1.85d+114) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.06e+176) {
tmp = b * c;
} else if ((b * c) <= -9.5e-8) {
tmp = k * (j * -27.0);
} else if ((b * c) <= -3.6e-129) {
tmp = t_2;
} else if ((b * c) <= 1.06e-226) {
tmp = t_1;
} else if ((b * c) <= 1e-88) {
tmp = t_2;
} else if ((b * c) <= 1.85e+114) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * (x * i) tmp = 0 if (b * c) <= -1.06e+176: tmp = b * c elif (b * c) <= -9.5e-8: tmp = k * (j * -27.0) elif (b * c) <= -3.6e-129: tmp = t_2 elif (b * c) <= 1.06e-226: tmp = t_1 elif (b * c) <= 1e-88: tmp = t_2 elif (b * c) <= 1.85e+114: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -1.06e+176) tmp = Float64(b * c); elseif (Float64(b * c) <= -9.5e-8) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= -3.6e-129) tmp = t_2; elseif (Float64(b * c) <= 1.06e-226) tmp = t_1; elseif (Float64(b * c) <= 1e-88) tmp = t_2; elseif (Float64(b * c) <= 1.85e+114) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -1.06e+176)
tmp = b * c;
elseif ((b * c) <= -9.5e-8)
tmp = k * (j * -27.0);
elseif ((b * c) <= -3.6e-129)
tmp = t_2;
elseif ((b * c) <= 1.06e-226)
tmp = t_1;
elseif ((b * c) <= 1e-88)
tmp = t_2;
elseif ((b * c) <= 1.85e+114)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.06e+176], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-8], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.6e-129], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.06e-226], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1e-88], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.85e+114], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.06 \cdot 10^{+176}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-8}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.06 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{-88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.06000000000000002e176 or 1.85e114 < (*.f64 b c) Initial program 80.7%
pow180.7%
associate-*l*75.3%
*-commutative75.3%
Applied egg-rr75.3%
unpow175.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 79.7%
distribute-lft-out79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 59.0%
if -1.06000000000000002e176 < (*.f64 b c) < -9.50000000000000036e-8Initial program 88.3%
Simplified91.4%
Taylor expanded in j around inf 45.2%
associate-*r*45.2%
*-commutative45.2%
Simplified45.2%
if -9.50000000000000036e-8 < (*.f64 b c) < -3.6e-129 or 1.0599999999999999e-226 < (*.f64 b c) < 9.99999999999999934e-89Initial program 85.1%
pow185.1%
associate-*l*87.3%
*-commutative87.3%
Applied egg-rr87.3%
unpow187.3%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in y around 0 75.3%
distribute-lft-out75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in x around inf 38.9%
if -3.6e-129 < (*.f64 b c) < 1.0599999999999999e-226 or 9.99999999999999934e-89 < (*.f64 b c) < 1.85e114Initial program 89.0%
pow189.0%
associate-*l*85.4%
*-commutative85.4%
Applied egg-rr85.4%
unpow185.4%
associate-*l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in j around inf 38.5%
*-commutative38.5%
associate-*r*38.5%
Simplified38.5%
Final simplification45.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -1.15e+172)
(* b c)
(if (<= (* b c) -2.35e-7)
(* k (* j -27.0))
(if (<= (* b c) -8.5e-220)
(* 18.0 (* z (* y (* t x))))
(if (<= (* b c) 5.5e-226)
t_1
(if (<= (* b c) 5.5e-89)
(* -4.0 (* x i))
(if (<= (* b c) 2.6e+105) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.15e+172) {
tmp = b * c;
} else if ((b * c) <= -2.35e-7) {
tmp = k * (j * -27.0);
} else if ((b * c) <= -8.5e-220) {
tmp = 18.0 * (z * (y * (t * x)));
} else if ((b * c) <= 5.5e-226) {
tmp = t_1;
} else if ((b * c) <= 5.5e-89) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 2.6e+105) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-1.15d+172)) then
tmp = b * c
else if ((b * c) <= (-2.35d-7)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= (-8.5d-220)) then
tmp = 18.0d0 * (z * (y * (t * x)))
else if ((b * c) <= 5.5d-226) then
tmp = t_1
else if ((b * c) <= 5.5d-89) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 2.6d+105) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.15e+172) {
tmp = b * c;
} else if ((b * c) <= -2.35e-7) {
tmp = k * (j * -27.0);
} else if ((b * c) <= -8.5e-220) {
tmp = 18.0 * (z * (y * (t * x)));
} else if ((b * c) <= 5.5e-226) {
tmp = t_1;
} else if ((b * c) <= 5.5e-89) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 2.6e+105) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.15e+172: tmp = b * c elif (b * c) <= -2.35e-7: tmp = k * (j * -27.0) elif (b * c) <= -8.5e-220: tmp = 18.0 * (z * (y * (t * x))) elif (b * c) <= 5.5e-226: tmp = t_1 elif (b * c) <= 5.5e-89: tmp = -4.0 * (x * i) elif (b * c) <= 2.6e+105: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.15e+172) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.35e-7) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= -8.5e-220) tmp = Float64(18.0 * Float64(z * Float64(y * Float64(t * x)))); elseif (Float64(b * c) <= 5.5e-226) tmp = t_1; elseif (Float64(b * c) <= 5.5e-89) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 2.6e+105) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -1.15e+172)
tmp = b * c;
elseif ((b * c) <= -2.35e-7)
tmp = k * (j * -27.0);
elseif ((b * c) <= -8.5e-220)
tmp = 18.0 * (z * (y * (t * x)));
elseif ((b * c) <= 5.5e-226)
tmp = t_1;
elseif ((b * c) <= 5.5e-89)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 2.6e+105)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.15e+172], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.35e-7], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.5e-220], N[(18.0 * N[(z * N[(y * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.5e-226], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.5e-89], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.6e+105], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.15 \cdot 10^{+172}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.35 \cdot 10^{-7}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-220}:\\
\;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(t \cdot x\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{-89}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.15e172 or 2.6000000000000002e105 < (*.f64 b c) Initial program 80.7%
pow180.7%
associate-*l*75.3%
*-commutative75.3%
Applied egg-rr75.3%
unpow175.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 79.7%
distribute-lft-out79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 59.0%
if -1.15e172 < (*.f64 b c) < -2.35e-7Initial program 88.3%
Simplified91.4%
Taylor expanded in j around inf 45.2%
associate-*r*45.2%
*-commutative45.2%
Simplified45.2%
if -2.35e-7 < (*.f64 b c) < -8.4999999999999996e-220Initial program 89.4%
Simplified92.1%
Taylor expanded in t around inf 55.5%
Taylor expanded in x around inf 30.5%
associate-*r*33.1%
associate-*r*33.1%
associate-*r*38.2%
Simplified38.2%
if -8.4999999999999996e-220 < (*.f64 b c) < 5.5e-226 or 5.50000000000000012e-89 < (*.f64 b c) < 2.6000000000000002e105Initial program 89.5%
pow189.5%
associate-*l*86.4%
*-commutative86.4%
Applied egg-rr86.4%
unpow186.4%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in j around inf 39.7%
*-commutative39.7%
associate-*r*39.7%
Simplified39.7%
if 5.5e-226 < (*.f64 b c) < 5.50000000000000012e-89Initial program 75.5%
pow175.5%
associate-*l*81.1%
*-commutative81.1%
Applied egg-rr81.1%
unpow181.1%
associate-*l*81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y around 0 75.0%
distribute-lft-out75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around inf 44.8%
Final simplification46.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -3.2e+53) (not (<= t 5.5e-30)))
(*
t
(-
(+ (* 18.0 (* x (* y z))) (/ (* b c) t))
(+ (* a 4.0) (+ (* 4.0 (/ (* x i) t)) (* 27.0 (/ (* j k) t))))))
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -3.2e+53) || !(t <= 5.5e-30)) {
tmp = t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0) + ((4.0 * ((x * i) / t)) + (27.0 * ((j * k) / t)))));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-3.2d+53)) .or. (.not. (t <= 5.5d-30))) then
tmp = t * (((18.0d0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0d0) + ((4.0d0 * ((x * i) / t)) + (27.0d0 * ((j * k) / t)))))
else
tmp = ((((y * ((x * 18.0d0) * (t * z))) - (t * (a * 4.0d0))) + (b * c)) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -3.2e+53) || !(t <= 5.5e-30)) {
tmp = t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0) + ((4.0 * ((x * i) / t)) + (27.0 * ((j * k) / t)))));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -3.2e+53) or not (t <= 5.5e-30): tmp = t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0) + ((4.0 * ((x * i) / t)) + (27.0 * ((j * k) / t))))) else: tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -3.2e+53) || !(t <= 5.5e-30)) tmp = Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t)) - Float64(Float64(a * 4.0) + Float64(Float64(4.0 * Float64(Float64(x * i) / t)) + Float64(27.0 * Float64(Float64(j * k) / t)))))); else tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -3.2e+53) || ~((t <= 5.5e-30)))
tmp = t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - ((a * 4.0) + ((4.0 * ((x * i) / t)) + (27.0 * ((j * k) / t)))));
else
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -3.2e+53], N[Not[LessEqual[t, 5.5e-30]], $MachinePrecision]], N[(t * N[(N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] + N[(N[(4.0 * N[(N[(x * i), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $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]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+53} \lor \neg \left(t \leq 5.5 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right) - \left(a \cdot 4 + \left(4 \cdot \frac{x \cdot i}{t} + 27 \cdot \frac{j \cdot k}{t}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\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)\\
\end{array}
\end{array}
if t < -3.2e53 or 5.49999999999999976e-30 < t Initial program 82.6%
Simplified89.2%
Taylor expanded in t around inf 91.6%
if -3.2e53 < t < 5.49999999999999976e-30Initial program 89.0%
pow189.0%
associate-*l*90.3%
*-commutative90.3%
Applied egg-rr90.3%
unpow190.3%
associate-*l*94.0%
*-commutative94.0%
Simplified94.0%
Final simplification92.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))) (t_2 (- (- (* b c) (* 4.0 (* x i))) t_1)))
(if (<= t -2.8e+241)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -7e+191)
t_2
(if (<= t -7e+127)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(if (<= t -2e-57)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 1.65e+105)
t_2
(* t (- (* (* y z) (* x 18.0)) (* a 4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (t <= -2.8e+241) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -7e+191) {
tmp = t_2;
} else if (t <= -7e+127) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t <= -2e-57) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 1.65e+105) {
tmp = t_2;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * 27.0d0)
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
if (t <= (-2.8d+241)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-7d+191)) then
tmp = t_2
else if (t <= (-7d+127)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else if (t <= (-2d-57)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 1.65d+105) then
tmp = t_2
else
tmp = t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (t <= -2.8e+241) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -7e+191) {
tmp = t_2;
} else if (t <= -7e+127) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (t <= -2e-57) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 1.65e+105) {
tmp = t_2;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = ((b * c) - (4.0 * (x * i))) - t_1 tmp = 0 if t <= -2.8e+241: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -7e+191: tmp = t_2 elif t <= -7e+127: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) elif t <= -2e-57: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 1.65e+105: tmp = t_2 else: tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) tmp = 0.0 if (t <= -2.8e+241) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -7e+191) tmp = t_2; elseif (t <= -7e+127) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); elseif (t <= -2e-57) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 1.65e+105) tmp = t_2; else tmp = Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
tmp = 0.0;
if (t <= -2.8e+241)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -7e+191)
tmp = t_2;
elseif (t <= -7e+127)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
elseif (t <= -2e-57)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (t <= 1.65e+105)
tmp = t_2;
else
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(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]}, If[LessEqual[t, -2.8e+241], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7e+191], t$95$2, If[LessEqual[t, -7e+127], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2e-57], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.65e+105], t$95$2, N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $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])\\
\\
\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\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+241}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -7 \cdot 10^{+191}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-57}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.80000000000000026e241Initial program 94.1%
Simplified94.1%
Taylor expanded in t around inf 94.3%
if -2.80000000000000026e241 < t < -6.9999999999999994e191 or -1.99999999999999991e-57 < t < 1.64999999999999999e105Initial program 89.4%
Taylor expanded in t around 0 82.7%
if -6.9999999999999994e191 < t < -6.99999999999999956e127Initial program 28.3%
Simplified28.6%
Taylor expanded in x around inf 57.7%
if -6.99999999999999956e127 < t < -1.99999999999999991e-57Initial program 84.2%
Taylor expanded in x around 0 72.6%
if 1.64999999999999999e105 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
pow189.2%
associate-*r*86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*r*89.2%
associate-*r*89.4%
Simplified89.4%
Final simplification82.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* b c))) (t_2 (* -4.0 (* x i))))
(if (<= x -3.2e+271)
(* 18.0 (* t (* x (* y z))))
(if (<= x -4.6e+193)
t_2
(if (<= x -3.5e-287)
t_1
(if (<= x -1.9e-308)
(* t (* a -4.0))
(if (<= x 2.2e+54)
t_1
(if (<= x 5.3e+187) t_2 (* t (* z (* 18.0 (* x y))))))))))))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)) + (b * c);
double t_2 = -4.0 * (x * i);
double tmp;
if (x <= -3.2e+271) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -4.6e+193) {
tmp = t_2;
} else if (x <= -3.5e-287) {
tmp = t_1;
} else if (x <= -1.9e-308) {
tmp = t * (a * -4.0);
} else if (x <= 2.2e+54) {
tmp = t_1;
} else if (x <= 5.3e+187) {
tmp = t_2;
} else {
tmp = t * (z * (18.0 * (x * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
t_2 = (-4.0d0) * (x * i)
if (x <= (-3.2d+271)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= (-4.6d+193)) then
tmp = t_2
else if (x <= (-3.5d-287)) then
tmp = t_1
else if (x <= (-1.9d-308)) then
tmp = t * (a * (-4.0d0))
else if (x <= 2.2d+54) then
tmp = t_1
else if (x <= 5.3d+187) then
tmp = t_2
else
tmp = t * (z * (18.0d0 * (x * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double t_2 = -4.0 * (x * i);
double tmp;
if (x <= -3.2e+271) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -4.6e+193) {
tmp = t_2;
} else if (x <= -3.5e-287) {
tmp = t_1;
} else if (x <= -1.9e-308) {
tmp = t * (a * -4.0);
} else if (x <= 2.2e+54) {
tmp = t_1;
} else if (x <= 5.3e+187) {
tmp = t_2;
} else {
tmp = t * (z * (18.0 * (x * y)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (b * c) t_2 = -4.0 * (x * i) tmp = 0 if x <= -3.2e+271: tmp = 18.0 * (t * (x * (y * z))) elif x <= -4.6e+193: tmp = t_2 elif x <= -3.5e-287: tmp = t_1 elif x <= -1.9e-308: tmp = t * (a * -4.0) elif x <= 2.2e+54: tmp = t_1 elif x <= 5.3e+187: tmp = t_2 else: tmp = t * (z * (18.0 * (x * y))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)) t_2 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -3.2e+271) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= -4.6e+193) tmp = t_2; elseif (x <= -3.5e-287) tmp = t_1; elseif (x <= -1.9e-308) tmp = Float64(t * Float64(a * -4.0)); elseif (x <= 2.2e+54) tmp = t_1; elseif (x <= 5.3e+187) tmp = t_2; else tmp = Float64(t * Float64(z * Float64(18.0 * Float64(x * y)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (b * c);
t_2 = -4.0 * (x * i);
tmp = 0.0;
if (x <= -3.2e+271)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= -4.6e+193)
tmp = t_2;
elseif (x <= -3.5e-287)
tmp = t_1;
elseif (x <= -1.9e-308)
tmp = t * (a * -4.0);
elseif (x <= 2.2e+54)
tmp = t_1;
elseif (x <= 5.3e+187)
tmp = t_2;
else
tmp = t * (z * (18.0 * (x * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+271], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.6e+193], t$95$2, If[LessEqual[x, -3.5e-287], t$95$1, If[LessEqual[x, -1.9e-308], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+54], t$95$1, If[LessEqual[x, 5.3e+187], t$95$2, N[(t * N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + b \cdot c\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+271}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{+193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-308}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{+187}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.2000000000000001e271Initial program 62.5%
Simplified75.0%
Taylor expanded in t around inf 76.3%
Taylor expanded in x around inf 64.0%
if -3.2000000000000001e271 < x < -4.60000000000000026e193 or 2.1999999999999999e54 < x < 5.30000000000000034e187Initial program 75.6%
pow175.6%
associate-*l*73.1%
*-commutative73.1%
Applied egg-rr73.1%
unpow173.1%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y around 0 78.4%
distribute-lft-out78.4%
*-commutative78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in x around inf 56.3%
if -4.60000000000000026e193 < x < -3.5e-287 or -1.9000000000000001e-308 < x < 2.1999999999999999e54Initial program 91.4%
Simplified90.9%
Taylor expanded in b around inf 57.3%
if -3.5e-287 < x < -1.9000000000000001e-308Initial program 99.8%
pow199.8%
associate-*l*85.5%
*-commutative85.5%
Applied egg-rr85.5%
unpow185.5%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around 0 99.8%
distribute-lft-out99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 82.2%
*-commutative82.2%
*-commutative82.2%
associate-*r*82.2%
Simplified82.2%
if 5.30000000000000034e187 < x Initial program 69.2%
Simplified76.9%
Taylor expanded in t around inf 66.0%
pow166.0%
associate-*r*69.5%
Applied egg-rr69.5%
unpow169.5%
associate-*r*66.0%
associate-*r*66.0%
Simplified66.0%
Taylor expanded in x around inf 59.0%
associate-*r*66.4%
*-commutative66.4%
associate-*l*66.4%
*-commutative66.4%
associate-*r*66.4%
*-commutative66.4%
Simplified66.4%
Final simplification59.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* -4.0 (* t a)))))
(if (<= x -2.3e+192)
t_1
(if (<= x -2.9e+51)
(+ t_2 (* b c))
(if (<= x 1e-308)
t_3
(if (<= x 1.3e-289)
(* c (+ b (* t (* -4.0 (/ a c)))))
(if (<= x 3.8e+41) t_3 t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (t * a));
double tmp;
if (x <= -2.3e+192) {
tmp = t_1;
} else if (x <= -2.9e+51) {
tmp = t_2 + (b * c);
} else if (x <= 1e-308) {
tmp = t_3;
} else if (x <= 1.3e-289) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (x <= 3.8e+41) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + ((-4.0d0) * (t * a))
if (x <= (-2.3d+192)) then
tmp = t_1
else if (x <= (-2.9d+51)) then
tmp = t_2 + (b * c)
else if (x <= 1d-308) then
tmp = t_3
else if (x <= 1.3d-289) then
tmp = c * (b + (t * ((-4.0d0) * (a / c))))
else if (x <= 3.8d+41) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (t * a));
double tmp;
if (x <= -2.3e+192) {
tmp = t_1;
} else if (x <= -2.9e+51) {
tmp = t_2 + (b * c);
} else if (x <= 1e-308) {
tmp = t_3;
} else if (x <= 1.3e-289) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (x <= 3.8e+41) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (-4.0 * (t * a)) tmp = 0 if x <= -2.3e+192: tmp = t_1 elif x <= -2.9e+51: tmp = t_2 + (b * c) elif x <= 1e-308: tmp = t_3 elif x <= 1.3e-289: tmp = c * (b + (t * (-4.0 * (a / c)))) elif x <= 3.8e+41: tmp = t_3 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (x <= -2.3e+192) tmp = t_1; elseif (x <= -2.9e+51) tmp = Float64(t_2 + Float64(b * c)); elseif (x <= 1e-308) tmp = t_3; elseif (x <= 1.3e-289) tmp = Float64(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); elseif (x <= 3.8e+41) tmp = t_3; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (-4.0 * (t * a));
tmp = 0.0;
if (x <= -2.3e+192)
tmp = t_1;
elseif (x <= -2.9e+51)
tmp = t_2 + (b * c);
elseif (x <= 1e-308)
tmp = t_3;
elseif (x <= 1.3e-289)
tmp = c * (b + (t * (-4.0 * (a / c))));
elseif (x <= 3.8e+41)
tmp = t_3;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e+192], t$95$1, If[LessEqual[x, -2.9e+51], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e-308], t$95$3, If[LessEqual[x, 1.3e-289], N[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+41], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{+51}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{elif}\;x \leq 10^{-308}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-289}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+41}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.2999999999999999e192 or 3.8000000000000001e41 < x Initial program 72.5%
Simplified82.5%
Taylor expanded in x around inf 73.8%
if -2.2999999999999999e192 < x < -2.8999999999999998e51Initial program 91.5%
Simplified95.8%
Taylor expanded in b around inf 67.4%
if -2.8999999999999998e51 < x < 9.9999999999999991e-309 or 1.2999999999999999e-289 < x < 3.8000000000000001e41Initial program 91.6%
Simplified90.3%
Taylor expanded in a around inf 63.5%
*-commutative63.5%
Simplified63.5%
if 9.9999999999999991e-309 < x < 1.2999999999999999e-289Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in c around inf 99.8%
associate-*r/99.8%
mul-1-neg99.8%
*-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-neg-in99.8%
distribute-rgt-neg-in99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
metadata-eval99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 89.6%
associate-*r/89.6%
*-commutative89.6%
*-commutative89.6%
associate-*r*89.6%
*-commutative89.6%
associate-*r/89.4%
associate-*r/89.4%
Simplified89.4%
Final simplification68.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* -4.0 (* t a))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -1.02e+118)
t_2
(if (<= x -3.2e+51)
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(if (<= x 5e-310)
t_1
(if (<= x 2.4e-290)
(* c (+ b (* t (* -4.0 (/ a c)))))
(if (<= x 4.8e+41) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.02e+118) {
tmp = t_2;
} else if (x <= -3.2e+51) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else if (x <= 5e-310) {
tmp = t_1;
} else if (x <= 2.4e-290) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (x <= 4.8e+41) {
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.
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))) + ((-4.0d0) * (t * a))
t_2 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-1.02d+118)) then
tmp = t_2
else if (x <= (-3.2d+51)) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else if (x <= 5d-310) then
tmp = t_1
else if (x <= 2.4d-290) then
tmp = c * (b + (t * ((-4.0d0) * (a / c))))
else if (x <= 4.8d+41) 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;
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)) + (-4.0 * (t * a));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.02e+118) {
tmp = t_2;
} else if (x <= -3.2e+51) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else if (x <= 5e-310) {
tmp = t_1;
} else if (x <= 2.4e-290) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (x <= 4.8e+41) {
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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (-4.0 * (t * a)) t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -1.02e+118: tmp = t_2 elif x <= -3.2e+51: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) elif x <= 5e-310: tmp = t_1 elif x <= 2.4e-290: tmp = c * (b + (t * (-4.0 * (a / c)))) elif x <= 4.8e+41: 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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -1.02e+118) tmp = t_2; elseif (x <= -3.2e+51) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); elseif (x <= 5e-310) tmp = t_1; elseif (x <= 2.4e-290) tmp = Float64(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); elseif (x <= 4.8e+41) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -1.02e+118)
tmp = t_2;
elseif (x <= -3.2e+51)
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
elseif (x <= 5e-310)
tmp = t_1;
elseif (x <= 2.4e-290)
tmp = c * (b + (t * (-4.0 * (a / c))));
elseif (x <= 4.8e+41)
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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+118], t$95$2, If[LessEqual[x, -3.2e+51], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e-310], t$95$1, If[LessEqual[x, 2.4e-290], N[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+41], 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])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{+51}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-310}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-290}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.0199999999999999e118 or 4.8000000000000003e41 < x Initial program 75.8%
Simplified85.2%
Taylor expanded in x around inf 69.9%
if -1.0199999999999999e118 < x < -3.2000000000000002e51Initial program 88.9%
Taylor expanded in a around 0 88.9%
Taylor expanded in i around 0 100.0%
Taylor expanded in j around 0 100.0%
if -3.2000000000000002e51 < x < 4.999999999999985e-310 or 2.4000000000000001e-290 < x < 4.8000000000000003e41Initial program 91.6%
Simplified90.3%
Taylor expanded in a around inf 63.5%
*-commutative63.5%
Simplified63.5%
if 4.999999999999985e-310 < x < 2.4000000000000001e-290Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in c around inf 99.8%
associate-*r/99.8%
mul-1-neg99.8%
*-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-neg-in99.8%
distribute-rgt-neg-in99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
metadata-eval99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 89.6%
associate-*r/89.6%
*-commutative89.6%
*-commutative89.6%
associate-*r*89.6%
*-commutative89.6%
associate-*r/89.4%
associate-*r/89.4%
Simplified89.4%
Final simplification68.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c 1e-232)
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
(-
(+ (* b c) (* t (- (* (* y z) (* 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);
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 <= 1e-232) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * (((y * z) * (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.
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 <= 1d-232) then
tmp = ((((y * ((x * 18.0d0) * (t * z))) - (t * (a * 4.0d0))) + (b * c)) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
else
tmp = ((b * c) + (t * (((y * z) * (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;
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 <= 1e-232) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * (((y * z) * (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= 1e-232: tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) else: tmp = ((b * c) + (t * (((y * z) * (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= 1e-232) tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= 1e-232)
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
else
tmp = ((b * c) + (t * (((y * z) * (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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, 1e-232], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $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], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 10^{-232}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\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{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\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 c < 1.00000000000000002e-232Initial program 85.5%
pow185.5%
associate-*l*85.3%
*-commutative85.3%
Applied egg-rr85.3%
unpow185.3%
associate-*l*86.0%
*-commutative86.0%
Simplified86.0%
if 1.00000000000000002e-232 < c Initial program 86.5%
Simplified90.1%
Final simplification87.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -2.3e+192)
t_1
(if (<= x 32500.0)
(- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
(if (<= x 3.6e+177)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(if (<= x 3.8e+210)
(+ (* j (* k -27.0)) (* 18.0 (* (* y z) (* t x))))
t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.3e+192) {
tmp = t_1;
} else if (x <= 32500.0) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if (x <= 3.6e+177) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else if (x <= 3.8e+210) {
tmp = (j * (k * -27.0)) + (18.0 * ((y * z) * (t * x)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-2.3d+192)) then
tmp = t_1
else if (x <= 32500.0d0) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
else if (x <= 3.6d+177) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else if (x <= 3.8d+210) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * ((y * z) * (t * x)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.3e+192) {
tmp = t_1;
} else if (x <= 32500.0) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if (x <= 3.6e+177) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else if (x <= 3.8e+210) {
tmp = (j * (k * -27.0)) + (18.0 * ((y * z) * (t * x)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -2.3e+192: tmp = t_1 elif x <= 32500.0: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) elif x <= 3.6e+177: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) elif x <= 3.8e+210: tmp = (j * (k * -27.0)) + (18.0 * ((y * z) * (t * x))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -2.3e+192) tmp = t_1; elseif (x <= 32500.0) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); elseif (x <= 3.6e+177) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); elseif (x <= 3.8e+210) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(Float64(y * z) * Float64(t * x)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -2.3e+192)
tmp = t_1;
elseif (x <= 32500.0)
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
elseif (x <= 3.6e+177)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
elseif (x <= 3.8e+210)
tmp = (j * (k * -27.0)) + (18.0 * ((y * z) * (t * x)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e+192], t$95$1, If[LessEqual[x, 32500.0], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+177], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+210], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 32500:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+177}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+210}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.2999999999999999e192 or 3.80000000000000028e210 < x Initial program 64.5%
Simplified77.8%
Taylor expanded in x around inf 81.5%
if -2.2999999999999999e192 < x < 32500Initial program 92.7%
Taylor expanded in x around 0 79.0%
if 32500 < x < 3.60000000000000003e177Initial program 86.6%
pow186.6%
associate-*l*91.8%
*-commutative91.8%
Applied egg-rr91.8%
unpow191.8%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y around 0 81.3%
distribute-lft-out81.3%
*-commutative81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in j around 0 71.0%
if 3.60000000000000003e177 < x < 3.80000000000000028e210Initial program 62.5%
Simplified87.5%
Taylor expanded in y around inf 75.1%
associate-*r*87.6%
Simplified87.6%
Final simplification78.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0)))))
(if (<= t -2.8e+241)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -2.9e+173)
t_1
(if (<= t -6e-58)
(* c (+ b (/ (+ (* j (* k -27.0)) (* t (* a -4.0))) c)))
(if (<= t 1e+106) t_1 (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
double tmp;
if (t <= -2.8e+241) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -2.9e+173) {
tmp = t_1;
} else if (t <= -6e-58) {
tmp = c * (b + (((j * (k * -27.0)) + (t * (a * -4.0))) / c));
} else if (t <= 1e+106) {
tmp = t_1;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
if (t <= (-2.8d+241)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-2.9d+173)) then
tmp = t_1
else if (t <= (-6d-58)) then
tmp = c * (b + (((j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))) / c))
else if (t <= 1d+106) then
tmp = t_1
else
tmp = t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
double tmp;
if (t <= -2.8e+241) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -2.9e+173) {
tmp = t_1;
} else if (t <= -6e-58) {
tmp = c * (b + (((j * (k * -27.0)) + (t * (a * -4.0))) / c));
} else if (t <= 1e+106) {
tmp = t_1;
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) tmp = 0 if t <= -2.8e+241: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -2.9e+173: tmp = t_1 elif t <= -6e-58: tmp = c * (b + (((j * (k * -27.0)) + (t * (a * -4.0))) / c)) elif t <= 1e+106: tmp = t_1 else: tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t <= -2.8e+241) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -2.9e+173) tmp = t_1; elseif (t <= -6e-58) tmp = Float64(c * Float64(b + Float64(Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))) / c))); elseif (t <= 1e+106) tmp = t_1; else tmp = Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
tmp = 0.0;
if (t <= -2.8e+241)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -2.9e+173)
tmp = t_1;
elseif (t <= -6e-58)
tmp = c * (b + (((j * (k * -27.0)) + (t * (a * -4.0))) / c));
elseif (t <= 1e+106)
tmp = t_1;
else
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+241], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.9e+173], t$95$1, If[LessEqual[t, -6e-58], N[(c * N[(b + N[(N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+106], t$95$1, N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $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])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+241}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-58}:\\
\;\;\;\;c \cdot \left(b + \frac{j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)}{c}\right)\\
\mathbf{elif}\;t \leq 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.80000000000000026e241Initial program 94.1%
Simplified94.1%
Taylor expanded in t around inf 94.3%
if -2.80000000000000026e241 < t < -2.90000000000000007e173 or -6.00000000000000015e-58 < t < 1.00000000000000009e106Initial program 87.8%
Taylor expanded in t around 0 81.3%
if -2.90000000000000007e173 < t < -6.00000000000000015e-58Initial program 79.9%
Taylor expanded in x around 0 72.1%
Taylor expanded in c around inf 69.4%
associate-*r/69.4%
mul-1-neg69.4%
*-commutative69.4%
*-commutative69.4%
associate-*r*69.4%
*-commutative69.4%
associate-*l*69.5%
*-commutative69.5%
distribute-neg-in69.5%
distribute-rgt-neg-in69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
distribute-lft-neg-in69.5%
metadata-eval69.5%
*-commutative69.5%
Simplified69.5%
if 1.00000000000000009e106 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
pow189.2%
associate-*r*86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*r*89.2%
associate-*r*89.4%
Simplified89.4%
Final simplification81.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 3.6e+210)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 3.6e+210) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= 3.6d+210) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 3.6e+210) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= 3.6e+210: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 3.6e+210) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= 3.6e+210)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 3.6e+210], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.6 \cdot 10^{+210}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\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}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < 3.6000000000000003e210Initial program 88.1%
Simplified90.3%
if 3.6000000000000003e210 < x Initial program 61.9%
Simplified71.4%
Taylor expanded in x around inf 90.5%
Final simplification90.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1e-57) (not (<= t 6.4e+44))) (- (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))) (* j (* k 27.0))) (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -1e-57) || !(t <= 6.4e+44)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-1d-57)) .or. (.not. (t <= 6.4d+44))) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - (j * (k * 27.0d0))
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -1e-57) || !(t <= 6.4e+44)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1e-57) or not (t <= 6.4e+44): tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0)) else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1e-57) || !(t <= 6.4e+44)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * 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(x * i) + Float64(t * a)))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1e-57) || ~((t <= 6.4e+44)))
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (j * (k * 27.0));
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1e-57], N[Not[LessEqual[t, 6.4e+44]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $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[(x * i), $MachinePrecision] + N[(t * a), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-57} \lor \neg \left(t \leq 6.4 \cdot 10^{+44}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\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(x \cdot i + t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -9.99999999999999955e-58 or 6.40000000000000009e44 < t Initial program 83.1%
Simplified88.7%
Taylor expanded in x around 0 85.7%
*-commutative85.7%
associate-*r*85.8%
Simplified85.8%
if -9.99999999999999955e-58 < t < 6.40000000000000009e44Initial program 88.6%
Taylor expanded in y around 0 93.6%
distribute-lft-out93.6%
*-commutative93.6%
Simplified93.6%
Final simplification89.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (or (<= t -2.8e+241) (not (<= t 4.4e+106)))
(- (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0))) t_1)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t <= -2.8e+241) || !(t <= 4.4e+106)) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * 27.0d0)
if ((t <= (-2.8d+241)) .or. (.not. (t <= 4.4d+106))) then
tmp = (t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))) - t_1
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t <= -2.8e+241) || !(t <= 4.4e+106)) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if (t <= -2.8e+241) or not (t <= 4.4e+106): tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1 else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if ((t <= -2.8e+241) || !(t <= 4.4e+106)) tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if ((t <= -2.8e+241) || ~((t <= 4.4e+106)))
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.8e+241], N[Not[LessEqual[t, 4.4e+106]], $MachinePrecision]], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $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])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+241} \lor \neg \left(t \leq 4.4 \cdot 10^{+106}\right):\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -2.80000000000000026e241 or 4.39999999999999983e106 < t Initial program 84.2%
pow184.2%
associate-*l*75.7%
*-commutative75.7%
Applied egg-rr75.7%
unpow175.7%
associate-*l*74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in t around -inf 94.3%
associate-*r*94.3%
neg-mul-194.3%
cancel-sign-sub-inv94.3%
metadata-eval94.3%
*-commutative94.3%
associate-*r*92.6%
Simplified92.6%
if -2.80000000000000026e241 < t < 4.39999999999999983e106Initial program 86.4%
Taylor expanded in y around 0 87.3%
distribute-lft-out87.3%
*-commutative87.3%
Simplified87.3%
Final simplification88.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* b c))))
(if (<= t -3.6e-24)
(+ t_1 (* -4.0 (* t a)))
(if (<= t 2.3e-269)
t_2
(if (<= t 4.5e-140)
(+ t_1 (* i (* x -4.0)))
(if (<= t 3.55e+106) t_2 (* 18.0 (* t (* x (* y z))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if (t <= -3.6e-24) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= 2.3e-269) {
tmp = t_2;
} else if (t <= 4.5e-140) {
tmp = t_1 + (i * (x * -4.0));
} else if (t <= 3.55e+106) {
tmp = t_2;
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (b * c)
if (t <= (-3.6d-24)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t <= 2.3d-269) then
tmp = t_2
else if (t <= 4.5d-140) then
tmp = t_1 + (i * (x * (-4.0d0)))
else if (t <= 3.55d+106) then
tmp = t_2
else
tmp = 18.0d0 * (t * (x * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if (t <= -3.6e-24) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= 2.3e-269) {
tmp = t_2;
} else if (t <= 4.5e-140) {
tmp = t_1 + (i * (x * -4.0));
} else if (t <= 3.55e+106) {
tmp = t_2;
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (b * c) tmp = 0 if t <= -3.6e-24: tmp = t_1 + (-4.0 * (t * a)) elif t <= 2.3e-269: tmp = t_2 elif t <= 4.5e-140: tmp = t_1 + (i * (x * -4.0)) elif t <= 3.55e+106: tmp = t_2 else: tmp = 18.0 * (t * (x * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (t <= -3.6e-24) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t <= 2.3e-269) tmp = t_2; elseif (t <= 4.5e-140) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); elseif (t <= 3.55e+106) tmp = t_2; else tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (b * c);
tmp = 0.0;
if (t <= -3.6e-24)
tmp = t_1 + (-4.0 * (t * a));
elseif (t <= 2.3e-269)
tmp = t_2;
elseif (t <= 4.5e-140)
tmp = t_1 + (i * (x * -4.0));
elseif (t <= 3.55e+106)
tmp = t_2;
else
tmp = 18.0 * (t * (x * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e-24], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-269], t$95$2, If[LessEqual[t, 4.5e-140], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.55e+106], t$95$2, N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + b \cdot c\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-269}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 3.55 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -3.6000000000000001e-24Initial program 83.2%
Simplified87.8%
Taylor expanded in a around inf 61.6%
*-commutative61.6%
Simplified61.6%
if -3.6000000000000001e-24 < t < 2.3e-269 or 4.50000000000000004e-140 < t < 3.55000000000000015e106Initial program 88.4%
Simplified90.4%
Taylor expanded in b around inf 60.3%
if 2.3e-269 < t < 4.50000000000000004e-140Initial program 89.5%
Simplified86.9%
Taylor expanded in i around inf 69.2%
metadata-eval69.2%
distribute-lft-neg-in69.2%
*-commutative69.2%
associate-*r*69.2%
distribute-rgt-neg-in69.2%
distribute-rgt-neg-in69.2%
metadata-eval69.2%
*-commutative69.2%
Simplified69.2%
if 3.55000000000000015e106 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
Taylor expanded in x around inf 57.1%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -8.5e+245)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 5.2e+105)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* j 27.0)))
(* t (- (* (* y z) (* x 18.0)) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -8.5e+245) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 5.2e+105) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-8.5d+245)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 5.2d+105) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (j * 27.0d0))
else
tmp = t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -8.5e+245) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 5.2e+105) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
} else {
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -8.5e+245: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 5.2e+105: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0)) else: tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -8.5e+245) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 5.2e+105) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -8.5e+245)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 5.2e+105)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
else
tmp = t * (((y * z) * (x * 18.0)) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -8.5e+245], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+105], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+245}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+105}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -8.49999999999999971e245Initial program 94.1%
Simplified94.1%
Taylor expanded in t around inf 94.3%
if -8.49999999999999971e245 < t < 5.2000000000000004e105Initial program 86.4%
Taylor expanded in y around 0 87.3%
distribute-lft-out87.3%
*-commutative87.3%
Simplified87.3%
if 5.2000000000000004e105 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
pow189.2%
associate-*r*86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*r*89.2%
associate-*r*89.4%
Simplified89.4%
Final simplification88.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -6.2e+171) (not (<= (* b c) 6.2e+103))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.2e+171) || !((b * c) <= 6.2e+103)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-6.2d+171)) .or. (.not. ((b * c) <= 6.2d+103))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.2e+171) || !((b * c) <= 6.2e+103)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -6.2e+171) or not ((b * c) <= 6.2e+103): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -6.2e+171) || !(Float64(b * c) <= 6.2e+103)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -6.2e+171) || ~(((b * c) <= 6.2e+103)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -6.2e+171], N[Not[LessEqual[N[(b * c), $MachinePrecision], 6.2e+103]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+171} \lor \neg \left(b \cdot c \leq 6.2 \cdot 10^{+103}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.1999999999999998e171 or 6.2000000000000003e103 < (*.f64 b c) Initial program 80.7%
pow180.7%
associate-*l*75.3%
*-commutative75.3%
Applied egg-rr75.3%
unpow175.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around 0 79.7%
distribute-lft-out79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 59.0%
if -6.1999999999999998e171 < (*.f64 b c) < 6.2000000000000003e103Initial program 88.0%
Simplified90.2%
Taylor expanded in j around inf 33.4%
Final simplification40.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -9.5e+121)
(* c (+ b (* t (* -4.0 (/ a c)))))
(if (<= t 7e+106)
(+ (* j (* k -27.0)) (* b c))
(* 18.0 (* t (* x (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -9.5e+121) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 7e+106) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-9.5d+121)) then
tmp = c * (b + (t * ((-4.0d0) * (a / c))))
else if (t <= 7d+106) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = 18.0d0 * (t * (x * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -9.5e+121) {
tmp = c * (b + (t * (-4.0 * (a / c))));
} else if (t <= 7e+106) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -9.5e+121: tmp = c * (b + (t * (-4.0 * (a / c)))) elif t <= 7e+106: tmp = (j * (k * -27.0)) + (b * c) else: tmp = 18.0 * (t * (x * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -9.5e+121) tmp = Float64(c * Float64(b + Float64(t * Float64(-4.0 * Float64(a / c))))); elseif (t <= 7e+106) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -9.5e+121)
tmp = c * (b + (t * (-4.0 * (a / c))));
elseif (t <= 7e+106)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = 18.0 * (t * (x * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -9.5e+121], N[(c * N[(b + N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+106], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+121}:\\
\;\;\;\;c \cdot \left(b + t \cdot \left(-4 \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+106}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.49999999999999949e121Initial program 79.9%
Taylor expanded in x around 0 63.0%
Taylor expanded in c around inf 60.6%
associate-*r/60.6%
mul-1-neg60.6%
*-commutative60.6%
*-commutative60.6%
associate-*r*60.6%
*-commutative60.6%
associate-*l*60.6%
*-commutative60.6%
distribute-neg-in60.6%
distribute-rgt-neg-in60.6%
distribute-rgt-neg-in60.6%
metadata-eval60.6%
distribute-rgt-neg-in60.6%
distribute-lft-neg-in60.6%
metadata-eval60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in t around inf 50.7%
associate-*r/50.7%
*-commutative50.7%
*-commutative50.7%
associate-*r*50.7%
*-commutative50.7%
associate-*r/50.7%
associate-*r/50.7%
Simplified50.7%
if -9.49999999999999949e121 < t < 6.99999999999999962e106Initial program 88.7%
Simplified89.9%
Taylor expanded in b around inf 55.8%
if 6.99999999999999962e106 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
Taylor expanded in x around inf 57.1%
Final simplification55.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= t -9.5e-20)
(+ t_1 (* -4.0 (* t a)))
(if (<= t 2.4e+106) (+ t_1 (* b c)) (* 18.0 (* t (* x (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -9.5e-20) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= 2.4e+106) {
tmp = t_1 + (b * c);
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (t <= (-9.5d-20)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (t <= 2.4d+106) then
tmp = t_1 + (b * c)
else
tmp = 18.0d0 * (t * (x * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -9.5e-20) {
tmp = t_1 + (-4.0 * (t * a));
} else if (t <= 2.4e+106) {
tmp = t_1 + (b * c);
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if t <= -9.5e-20: tmp = t_1 + (-4.0 * (t * a)) elif t <= 2.4e+106: tmp = t_1 + (b * c) else: tmp = 18.0 * (t * (x * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -9.5e-20) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (t <= 2.4e+106) tmp = Float64(t_1 + Float64(b * c)); else tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (t <= -9.5e-20)
tmp = t_1 + (-4.0 * (t * a));
elseif (t <= 2.4e+106)
tmp = t_1 + (b * c);
else
tmp = 18.0 * (t * (x * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-20], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+106], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+106}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.5e-20Initial program 83.2%
Simplified87.8%
Taylor expanded in a around inf 61.6%
*-commutative61.6%
Simplified61.6%
if -9.5e-20 < t < 2.4000000000000001e106Initial program 88.7%
Simplified89.5%
Taylor expanded in b around inf 57.9%
if 2.4000000000000001e106 < t Initial program 80.0%
Simplified92.4%
Taylor expanded in t around inf 89.2%
Taylor expanded in x around inf 57.1%
Final simplification58.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.9%
pow185.9%
associate-*l*83.2%
*-commutative83.2%
Applied egg-rr83.2%
unpow183.2%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 79.8%
distribute-lft-out79.8%
*-commutative79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in b around inf 22.7%
Final simplification22.7%
(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 2024058
(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)))