
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #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.3%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified10.7%
Taylor expanded in x around inf 65.0%
Final simplification92.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (+ (* t a) (* x i)))))
(t_2 (* 18.0 (* x (* y z))))
(t_3 (+ (* b c) (* t (- t_2 (* a 4.0)))))
(t_4 (* (* j 27.0) k)))
(if (<= t_4 -4e+50)
(+ (* t (+ (* a -4.0) t_2)) (* j (* k -27.0)))
(if (<= t_4 -1e-120)
t_3
(if (<= t_4 -4e-220)
t_1
(if (<= t_4 -1e-317)
t_3
(if (<= t_4 1e-110)
t_1
(if (<= t_4 1.22e+107)
t_3
(- (- (* b c) (* 4.0 (* x i))) t_4)))))))))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 * ((t * a) + (x * i)));
double t_2 = 18.0 * (x * (y * z));
double t_3 = (b * c) + (t * (t_2 - (a * 4.0)));
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -4e+50) {
tmp = (t * ((a * -4.0) + t_2)) + (j * (k * -27.0));
} else if (t_4 <= -1e-120) {
tmp = t_3;
} else if (t_4 <= -4e-220) {
tmp = t_1;
} else if (t_4 <= -1e-317) {
tmp = t_3;
} else if (t_4 <= 1e-110) {
tmp = t_1;
} else if (t_4 <= 1.22e+107) {
tmp = t_3;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_4;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (b * c) + ((-4.0d0) * ((t * a) + (x * i)))
t_2 = 18.0d0 * (x * (y * z))
t_3 = (b * c) + (t * (t_2 - (a * 4.0d0)))
t_4 = (j * 27.0d0) * k
if (t_4 <= (-4d+50)) then
tmp = (t * ((a * (-4.0d0)) + t_2)) + (j * (k * (-27.0d0)))
else if (t_4 <= (-1d-120)) then
tmp = t_3
else if (t_4 <= (-4d-220)) then
tmp = t_1
else if (t_4 <= (-1d-317)) then
tmp = t_3
else if (t_4 <= 1d-110) then
tmp = t_1
else if (t_4 <= 1.22d+107) then
tmp = t_3
else
tmp = ((b * c) - (4.0d0 * (x * i))) - t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * ((t * a) + (x * i)));
double t_2 = 18.0 * (x * (y * z));
double t_3 = (b * c) + (t * (t_2 - (a * 4.0)));
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -4e+50) {
tmp = (t * ((a * -4.0) + t_2)) + (j * (k * -27.0));
} else if (t_4 <= -1e-120) {
tmp = t_3;
} else if (t_4 <= -4e-220) {
tmp = t_1;
} else if (t_4 <= -1e-317) {
tmp = t_3;
} else if (t_4 <= 1e-110) {
tmp = t_1;
} else if (t_4 <= 1.22e+107) {
tmp = t_3;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * ((t * a) + (x * i))) t_2 = 18.0 * (x * (y * z)) t_3 = (b * c) + (t * (t_2 - (a * 4.0))) t_4 = (j * 27.0) * k tmp = 0 if t_4 <= -4e+50: tmp = (t * ((a * -4.0) + t_2)) + (j * (k * -27.0)) elif t_4 <= -1e-120: tmp = t_3 elif t_4 <= -4e-220: tmp = t_1 elif t_4 <= -1e-317: tmp = t_3 elif t_4 <= 1e-110: tmp = t_1 elif t_4 <= 1.22e+107: tmp = t_3 else: tmp = ((b * c) - (4.0 * (x * i))) - t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))) t_2 = Float64(18.0 * Float64(x * Float64(y * z))) t_3 = Float64(Float64(b * c) + Float64(t * Float64(t_2 - Float64(a * 4.0)))) t_4 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_4 <= -4e+50) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + t_2)) + Float64(j * Float64(k * -27.0))); elseif (t_4 <= -1e-120) tmp = t_3; elseif (t_4 <= -4e-220) tmp = t_1; elseif (t_4 <= -1e-317) tmp = t_3; elseif (t_4 <= 1e-110) tmp = t_1; elseif (t_4 <= 1.22e+107) tmp = t_3; else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_4); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * ((t * a) + (x * i)));
t_2 = 18.0 * (x * (y * z));
t_3 = (b * c) + (t * (t_2 - (a * 4.0)));
t_4 = (j * 27.0) * k;
tmp = 0.0;
if (t_4 <= -4e+50)
tmp = (t * ((a * -4.0) + t_2)) + (j * (k * -27.0));
elseif (t_4 <= -1e-120)
tmp = t_3;
elseif (t_4 <= -4e-220)
tmp = t_1;
elseif (t_4 <= -1e-317)
tmp = t_3;
elseif (t_4 <= 1e-110)
tmp = t_1;
elseif (t_4 <= 1.22e+107)
tmp = t_3;
else
tmp = ((b * c) - (4.0 * (x * i))) - t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$2 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$4, -4e+50], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -1e-120], t$95$3, If[LessEqual[t$95$4, -4e-220], t$95$1, If[LessEqual[t$95$4, -1e-317], t$95$3, If[LessEqual[t$95$4, 1e-110], t$95$1, If[LessEqual[t$95$4, 1.22e+107], t$95$3, N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_3 := b \cdot c + t \cdot \left(t\_2 - a \cdot 4\right)\\
t_4 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_4 \leq -4 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + t\_2\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-120}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-317}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 1.22 \cdot 10^{+107}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_4\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000003e50Initial program 79.8%
Simplified81.3%
Taylor expanded in t around inf 77.9%
if -4.0000000000000003e50 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999979e-121 or -3.99999999999999997e-220 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000023e-317 or 1.0000000000000001e-110 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.22e107Initial program 88.0%
Simplified91.1%
Taylor expanded in x around inf 89.4%
associate-*r*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in i around 0 84.0%
if -9.99999999999999979e-121 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999997e-220 or -1.00000023e-317 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e-110Initial program 91.1%
Simplified89.7%
Taylor expanded in x around inf 89.7%
associate-*r*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y around 0 80.9%
*-commutative80.9%
sub-neg80.9%
+-commutative80.9%
associate-+l+80.9%
distribute-lft-neg-in80.9%
*-commutative80.9%
metadata-eval80.9%
distribute-lft-out80.9%
*-commutative80.9%
Simplified80.9%
if 1.22e107 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 80.8%
Taylor expanded in t around 0 79.0%
Final simplification81.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 (+ (* b c) (* -4.0 (+ (* t a) (* x i)))))
(t_2 (* j (* k -27.0)))
(t_3 (* x (* y z)))
(t_4 (* (* j 27.0) k)))
(if (<= t_4 -5e+66)
(+ t_2 (* 18.0 (* t t_3)))
(if (<= t_4 -4e-220)
t_1
(if (<= t_4 -5e-287)
(* t (- (* 18.0 t_3) (* a 4.0)))
(if (<= t_4 1e+164) t_1 (+ t_2 (* -4.0 (* t a)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * ((t * a) + (x * i)));
double t_2 = j * (k * -27.0);
double t_3 = x * (y * z);
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -5e+66) {
tmp = t_2 + (18.0 * (t * t_3));
} else if (t_4 <= -4e-220) {
tmp = t_1;
} else if (t_4 <= -5e-287) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if (t_4 <= 1e+164) {
tmp = t_1;
} else {
tmp = t_2 + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * ((t * a) + (x * i)))
t_2 = j * (k * (-27.0d0))
t_3 = x * (y * z)
t_4 = (j * 27.0d0) * k
if (t_4 <= (-5d+66)) then
tmp = t_2 + (18.0d0 * (t * t_3))
else if (t_4 <= (-4d-220)) then
tmp = t_1
else if (t_4 <= (-5d-287)) then
tmp = t * ((18.0d0 * t_3) - (a * 4.0d0))
else if (t_4 <= 1d+164) then
tmp = t_1
else
tmp = t_2 + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * ((t * a) + (x * i)));
double t_2 = j * (k * -27.0);
double t_3 = x * (y * z);
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -5e+66) {
tmp = t_2 + (18.0 * (t * t_3));
} else if (t_4 <= -4e-220) {
tmp = t_1;
} else if (t_4 <= -5e-287) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if (t_4 <= 1e+164) {
tmp = t_1;
} else {
tmp = t_2 + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * ((t * a) + (x * i))) t_2 = j * (k * -27.0) t_3 = x * (y * z) t_4 = (j * 27.0) * k tmp = 0 if t_4 <= -5e+66: tmp = t_2 + (18.0 * (t * t_3)) elif t_4 <= -4e-220: tmp = t_1 elif t_4 <= -5e-287: tmp = t * ((18.0 * t_3) - (a * 4.0)) elif t_4 <= 1e+164: tmp = t_1 else: tmp = t_2 + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(x * Float64(y * z)) t_4 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_4 <= -5e+66) tmp = Float64(t_2 + Float64(18.0 * Float64(t * t_3))); elseif (t_4 <= -4e-220) tmp = t_1; elseif (t_4 <= -5e-287) tmp = Float64(t * Float64(Float64(18.0 * t_3) - Float64(a * 4.0))); elseif (t_4 <= 1e+164) tmp = t_1; else tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * ((t * a) + (x * i)));
t_2 = j * (k * -27.0);
t_3 = x * (y * z);
t_4 = (j * 27.0) * k;
tmp = 0.0;
if (t_4 <= -5e+66)
tmp = t_2 + (18.0 * (t * t_3));
elseif (t_4 <= -4e-220)
tmp = t_1;
elseif (t_4 <= -5e-287)
tmp = t * ((18.0 * t_3) - (a * 4.0));
elseif (t_4 <= 1e+164)
tmp = t_1;
else
tmp = t_2 + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+66], N[(t$95$2 + N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -4e-220], t$95$1, If[LessEqual[t$95$4, -5e-287], N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+164], t$95$1, N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := x \cdot \left(y \cdot z\right)\\
t_4 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+66}:\\
\;\;\;\;t\_2 + 18 \cdot \left(t \cdot t\_3\right)\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_3 - a \cdot 4\right)\\
\mathbf{elif}\;t\_4 \leq 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999991e66Initial program 78.7%
Simplified80.3%
Taylor expanded in y around inf 73.9%
*-commutative73.9%
Simplified73.9%
if -4.99999999999999991e66 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999997e-220 or -5.00000000000000025e-287 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e164Initial program 89.1%
Simplified89.2%
Taylor expanded in x around inf 86.9%
associate-*r*86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y around 0 71.9%
*-commutative71.9%
sub-neg71.9%
+-commutative71.9%
associate-+l+71.9%
distribute-lft-neg-in71.9%
*-commutative71.9%
metadata-eval71.9%
distribute-lft-out71.9%
*-commutative71.9%
Simplified71.9%
if -3.99999999999999997e-220 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000025e-287Initial program 94.1%
Simplified99.9%
Taylor expanded in x around inf 99.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 84.0%
if 1e164 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.4%
Simplified85.2%
Taylor expanded in a around inf 88.5%
Final simplification75.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -2.8e+77)
(and (not (<= t 4.1e-51))
(or (<= t 16500000000000.0) (not (<= t 1.1e+56)))))
(*
t
(-
(+ (* a -4.0) (+ (* 18.0 (* x (* y z))) (/ (* b c) t)))
(* 27.0 (/ (* j k) t))))
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.8e+77) || (!(t <= 4.1e-51) && ((t <= 16500000000000.0) || !(t <= 1.1e+56)))) {
tmp = t * (((a * -4.0) + ((18.0 * (x * (y * z))) + ((b * c) / t))) - (27.0 * ((j * k) / t)));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-2.8d+77)) .or. (.not. (t <= 4.1d-51)) .and. (t <= 16500000000000.0d0) .or. (.not. (t <= 1.1d+56))) then
tmp = t * (((a * (-4.0d0)) + ((18.0d0 * (x * (y * z))) + ((b * c) / t))) - (27.0d0 * ((j * k) / t)))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.8e+77) || (!(t <= 4.1e-51) && ((t <= 16500000000000.0) || !(t <= 1.1e+56)))) {
tmp = t * (((a * -4.0) + ((18.0 * (x * (y * z))) + ((b * c) / t))) - (27.0 * ((j * k) / t)));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -2.8e+77) or (not (t <= 4.1e-51) and ((t <= 16500000000000.0) or not (t <= 1.1e+56))): tmp = t * (((a * -4.0) + ((18.0 * (x * (y * z))) + ((b * c) / t))) - (27.0 * ((j * k) / t))) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.8e+77) || (!(t <= 4.1e-51) && ((t <= 16500000000000.0) || !(t <= 1.1e+56)))) tmp = Float64(t * Float64(Float64(Float64(a * -4.0) + Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t))) - Float64(27.0 * Float64(Float64(j * k) / t)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -2.8e+77) || (~((t <= 4.1e-51)) && ((t <= 16500000000000.0) || ~((t <= 1.1e+56)))))
tmp = t * (((a * -4.0) + ((18.0 * (x * (y * z))) + ((b * c) / t))) - (27.0 * ((j * k) / t)));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2.8e+77], And[N[Not[LessEqual[t, 4.1e-51]], $MachinePrecision], Or[LessEqual[t, 16500000000000.0], N[Not[LessEqual[t, 1.1e+56]], $MachinePrecision]]]], N[(t * N[(N[(N[(a * -4.0), $MachinePrecision] + N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(N[(j * k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+77} \lor \neg \left(t \leq 4.1 \cdot 10^{-51}\right) \land \left(t \leq 16500000000000 \lor \neg \left(t \leq 1.1 \cdot 10^{+56}\right)\right):\\
\;\;\;\;t \cdot \left(\left(a \cdot -4 + \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right)\right) - 27 \cdot \frac{j \cdot k}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -2.8e77 or 4.09999999999999973e-51 < t < 1.65e13 or 1.10000000000000008e56 < t Initial program 85.4%
Simplified86.7%
associate-*r*86.2%
distribute-rgt-out--85.4%
associate-*l*78.5%
fmm-def78.5%
associate-*l*78.6%
associate-*l*77.8%
Applied egg-rr77.8%
fmm-undef77.8%
*-commutative77.8%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.5%
*-commutative78.5%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 77.8%
associate-*r*77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in t around inf 89.9%
if -2.8e77 < t < 4.09999999999999973e-51 or 1.65e13 < t < 1.10000000000000008e56Initial program 86.0%
Taylor expanded in y around 0 85.2%
distribute-lft-out85.2%
*-commutative85.2%
Simplified85.2%
Final simplification87.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 27.0) k)))
(if (<= t_1 -1e+237)
(* k (+ (* j -27.0) (* -4.0 (/ (* x i) k))))
(if (<= t_1 2e+269)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* -27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+237) {
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
} else if (t_1 <= 2e+269) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+237)) then
tmp = k * ((j * (-27.0d0)) + ((-4.0d0) * ((x * i) / k)))
else if (t_1 <= 2d+269) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+237) {
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
} else if (t_1 <= 2e+269) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+237: tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k))) elif t_1 <= 2e+269: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+237) tmp = Float64(k * Float64(Float64(j * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / k)))); elseif (t_1 <= 2e+269) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+237)
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
elseif (t_1 <= 2e+269)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+237], N[(k * N[(N[(j * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+269], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+237}:\\
\;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+269}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999994e236Initial program 65.5%
Simplified73.0%
Taylor expanded in i around inf 80.6%
*-commutative80.6%
*-commutative80.6%
associate-*l*80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in k around inf 84.8%
if -9.9999999999999994e236 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e269Initial program 89.7%
Simplified89.6%
if 2.0000000000000001e269 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.4%
Simplified81.0%
Taylor expanded in j around inf 95.2%
Final simplification89.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (+ (* j -27.0) (* -4.0 (/ (* x i) k)))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.08e+198)
t_2
(if (<= t -8.2e+150)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(if (<= t -2.65e-64)
(* t (- (* z (* 18.0 (* x y))) (* a 4.0)))
(if (<= t -2.6e-228)
t_1
(if (<= t -1.9e-274)
(- (* b c) (* 4.0 (* x i)))
(if (<= t 1.1e+56) 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 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.08e+198) {
tmp = t_2;
} else if (t <= -8.2e+150) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= -2.65e-64) {
tmp = t * ((z * (18.0 * (x * y))) - (a * 4.0));
} else if (t <= -2.6e-228) {
tmp = t_1;
} else if (t <= -1.9e-274) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 1.1e+56) {
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 = k * ((j * (-27.0d0)) + ((-4.0d0) * ((x * i) / k)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.08d+198)) then
tmp = t_2
else if (t <= (-8.2d+150)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (t <= (-2.65d-64)) then
tmp = t * ((z * (18.0d0 * (x * y))) - (a * 4.0d0))
else if (t <= (-2.6d-228)) then
tmp = t_1
else if (t <= (-1.9d-274)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t <= 1.1d+56) 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 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.08e+198) {
tmp = t_2;
} else if (t <= -8.2e+150) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= -2.65e-64) {
tmp = t * ((z * (18.0 * (x * y))) - (a * 4.0));
} else if (t <= -2.6e-228) {
tmp = t_1;
} else if (t <= -1.9e-274) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 1.1e+56) {
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 = k * ((j * -27.0) + (-4.0 * ((x * i) / k))) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.08e+198: tmp = t_2 elif t <= -8.2e+150: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) elif t <= -2.65e-64: tmp = t * ((z * (18.0 * (x * y))) - (a * 4.0)) elif t <= -2.6e-228: tmp = t_1 elif t <= -1.9e-274: tmp = (b * c) - (4.0 * (x * i)) elif t <= 1.1e+56: 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(k * Float64(Float64(j * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / k)))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.08e+198) tmp = t_2; elseif (t <= -8.2e+150) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (t <= -2.65e-64) tmp = Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0))); elseif (t <= -2.6e-228) tmp = t_1; elseif (t <= -1.9e-274) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t <= 1.1e+56) 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 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.08e+198)
tmp = t_2;
elseif (t <= -8.2e+150)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
elseif (t <= -2.65e-64)
tmp = t * ((z * (18.0 * (x * y))) - (a * 4.0));
elseif (t <= -2.6e-228)
tmp = t_1;
elseif (t <= -1.9e-274)
tmp = (b * c) - (4.0 * (x * i));
elseif (t <= 1.1e+56)
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[(k * N[(N[(j * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.08e+198], t$95$2, If[LessEqual[t, -8.2e+150], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.65e-64], N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e-228], t$95$1, If[LessEqual[t, -1.9e-274], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+56], 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 := k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.08 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{+150}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq -2.65 \cdot 10^{-64}:\\
\;\;\;\;t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.08e198 or 1.10000000000000008e56 < t Initial program 85.5%
Simplified87.4%
Taylor expanded in x around inf 81.0%
associate-*r*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in t around inf 68.9%
if -1.08e198 < t < -8.19999999999999988e150Initial program 90.8%
Simplified90.8%
Taylor expanded in a around inf 82.5%
if -8.19999999999999988e150 < t < -2.6500000000000001e-64Initial program 83.9%
Simplified81.7%
Taylor expanded in x around inf 79.2%
associate-*r*79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in t around inf 55.6%
pow155.6%
associate-*r*60.5%
associate-*r*60.5%
*-commutative60.5%
associate-*r*60.6%
Applied egg-rr60.6%
unpow160.6%
*-commutative60.6%
associate-*l*60.5%
*-commutative60.5%
Simplified60.5%
if -2.6500000000000001e-64 < t < -2.6e-228 or -1.89999999999999992e-274 < t < 1.10000000000000008e56Initial program 85.8%
Simplified86.6%
Taylor expanded in i around inf 64.0%
*-commutative64.0%
*-commutative64.0%
associate-*l*64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in k around inf 63.1%
if -2.6e-228 < t < -1.89999999999999992e-274Initial program 89.4%
Taylor expanded in t around 0 89.0%
Taylor expanded in j around 0 89.0%
Final simplification66.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 (* (* j 27.0) k)))
(if (<= t_2 -4e+50)
(+ (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))) t_1)
(if (<= t_2 1e+164)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(* x (* 4.0 i)))
(+ t_1 (* -4.0 (* t a)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+50) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + t_1;
} else if (t_2 <= 1e+164) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
} else {
tmp = t_1 + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-4d+50)) then
tmp = (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z))))) + t_1
else if (t_2 <= 1d+164) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - (x * (4.0d0 * i))
else
tmp = t_1 + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+50) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + t_1;
} else if (t_2 <= 1e+164) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
} else {
tmp = t_1 + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -4e+50: tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + t_1 elif t_2 <= 1e+164: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i)) else: tmp = t_1 + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -4e+50) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z))))) + t_1); elseif (t_2 <= 1e+164) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(x * Float64(4.0 * i))); else tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -4e+50)
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + t_1;
elseif (t_2 <= 1e+164)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
else
tmp = t_1 + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+50], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 1e+164], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+164}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - x \cdot \left(4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000003e50Initial program 79.8%
Simplified81.3%
Taylor expanded in t around inf 77.9%
if -4.0000000000000003e50 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e164Initial program 89.2%
Simplified89.8%
Taylor expanded in x around inf 88.2%
associate-*r*88.2%
*-commutative88.2%
Simplified88.2%
if 1e164 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.4%
Simplified85.2%
Taylor expanded in a around inf 88.5%
Final simplification85.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) (* 4.0 (* x i))))
(t_2 (+ (* j (* k -27.0)) (* -4.0 (* t a)))))
(if (<= x -1.2e+21)
(* y (* (* x z) (* 18.0 t)))
(if (<= x -1.7e-244)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 2.7e-5)
t_2
(if (<= x 1.45e+96)
t_1
(if (<= x 8.6e+133)
t_2
(if (<= x 1.82e+165) (* t (* 18.0 (* z (* x y)))) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if (x <= -1.2e+21) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -1.7e-244) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.7e-5) {
tmp = t_2;
} else if (x <= 1.45e+96) {
tmp = t_1;
} else if (x <= 8.6e+133) {
tmp = t_2;
} else if (x <= 1.82e+165) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
t_2 = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
if (x <= (-1.2d+21)) then
tmp = y * ((x * z) * (18.0d0 * t))
else if (x <= (-1.7d-244)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 2.7d-5) then
tmp = t_2
else if (x <= 1.45d+96) then
tmp = t_1
else if (x <= 8.6d+133) then
tmp = t_2
else if (x <= 1.82d+165) then
tmp = t * (18.0d0 * (z * (x * y)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if (x <= -1.2e+21) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -1.7e-244) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.7e-5) {
tmp = t_2;
} else if (x <= 1.45e+96) {
tmp = t_1;
} else if (x <= 8.6e+133) {
tmp = t_2;
} else if (x <= 1.82e+165) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) t_2 = (j * (k * -27.0)) + (-4.0 * (t * a)) tmp = 0 if x <= -1.2e+21: tmp = y * ((x * z) * (18.0 * t)) elif x <= -1.7e-244: tmp = (b * c) - (27.0 * (j * k)) elif x <= 2.7e-5: tmp = t_2 elif x <= 1.45e+96: tmp = t_1 elif x <= 8.6e+133: tmp = t_2 elif x <= 1.82e+165: tmp = t * (18.0 * (z * (x * y))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_2 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (x <= -1.2e+21) tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); elseif (x <= -1.7e-244) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 2.7e-5) tmp = t_2; elseif (x <= 1.45e+96) tmp = t_1; elseif (x <= 8.6e+133) tmp = t_2; elseif (x <= 1.82e+165) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (x * i));
t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
tmp = 0.0;
if (x <= -1.2e+21)
tmp = y * ((x * z) * (18.0 * t));
elseif (x <= -1.7e-244)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 2.7e-5)
tmp = t_2;
elseif (x <= 1.45e+96)
tmp = t_1;
elseif (x <= 8.6e+133)
tmp = t_2;
elseif (x <= 1.82e+165)
tmp = t * (18.0 * (z * (x * y)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+21], N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-244], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-5], t$95$2, If[LessEqual[x, 1.45e+96], t$95$1, If[LessEqual[x, 8.6e+133], t$95$2, If[LessEqual[x, 1.82e+165], N[(t * N[(18.0 * N[(z * N[(x * y), $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 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-244}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+133}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.82 \cdot 10^{+165}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.2e21Initial program 75.7%
Simplified80.3%
associate-*r*77.3%
distribute-rgt-out--75.7%
associate-*l*77.3%
fmm-def77.3%
associate-*l*77.3%
associate-*l*78.6%
Applied egg-rr78.6%
fmm-undef78.6%
*-commutative78.6%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in x around inf 50.0%
associate-*r*49.9%
*-commutative49.9%
associate-*r*50.0%
associate-*l*53.0%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*53.0%
Simplified53.0%
if -1.2e21 < x < -1.70000000000000004e-244Initial program 90.0%
Taylor expanded in t around 0 73.2%
Taylor expanded in i around 0 60.8%
if -1.70000000000000004e-244 < x < 2.6999999999999999e-5 or 1.44999999999999989e96 < x < 8.59999999999999989e133Initial program 96.5%
Simplified90.1%
Taylor expanded in a around inf 66.7%
if 2.6999999999999999e-5 < x < 1.44999999999999989e96 or 1.82000000000000003e165 < x Initial program 72.8%
Taylor expanded in t around 0 60.5%
Taylor expanded in j around 0 62.8%
if 8.59999999999999989e133 < x < 1.82000000000000003e165Initial program 90.7%
Simplified100.0%
Taylor expanded in x around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 80.7%
Taylor expanded in x around inf 71.0%
associate-*r*61.7%
*-commutative61.7%
Simplified61.7%
Final simplification61.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -3.3e+197)
(+ (* b c) (* t (- t_1 (* a 4.0))))
(if (or (<= t 2.2e-40) (and (not (<= t 5800000000000.0)) (<= t 6e+56)))
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))
(+ (* t (+ (* a -4.0) t_1)) (* 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 t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -3.3e+197) {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
} else if ((t <= 2.2e-40) || (!(t <= 5800000000000.0) && (t <= 6e+56))) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (t * ((a * -4.0) + t_1)) + (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) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-3.3d+197)) then
tmp = (b * c) + (t * (t_1 - (a * 4.0d0)))
else if ((t <= 2.2d-40) .or. (.not. (t <= 5800000000000.0d0)) .and. (t <= 6d+56)) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
else
tmp = (t * ((a * (-4.0d0)) + t_1)) + (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 t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -3.3e+197) {
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
} else if ((t <= 2.2e-40) || (!(t <= 5800000000000.0) && (t <= 6e+56))) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (t * ((a * -4.0) + t_1)) + (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): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -3.3e+197: tmp = (b * c) + (t * (t_1 - (a * 4.0))) elif (t <= 2.2e-40) or (not (t <= 5800000000000.0) and (t <= 6e+56)): tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) else: tmp = (t * ((a * -4.0) + t_1)) + (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) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -3.3e+197) tmp = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))); elseif ((t <= 2.2e-40) || (!(t <= 5800000000000.0) && (t <= 6e+56))) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + t_1)) + 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)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -3.3e+197)
tmp = (b * c) + (t * (t_1 - (a * 4.0)));
elseif ((t <= 2.2e-40) || (~((t <= 5800000000000.0)) && (t <= 6e+56)))
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
else
tmp = (t * ((a * -4.0) + t_1)) + (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_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+197], N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.2e-40], And[N[Not[LessEqual[t, 5800000000000.0]], $MachinePrecision], LessEqual[t, 6e+56]]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+197}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-40} \lor \neg \left(t \leq 5800000000000\right) \land t \leq 6 \cdot 10^{+56}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + t\_1\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -3.2999999999999997e197Initial program 74.1%
Simplified77.8%
Taylor expanded in x around inf 78.0%
associate-*r*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in i around 0 82.0%
if -3.2999999999999997e197 < t < 2.20000000000000009e-40 or 5.8e12 < t < 6.00000000000000012e56Initial program 87.2%
Taylor expanded in y around 0 84.2%
distribute-lft-out84.2%
*-commutative84.2%
Simplified84.2%
if 2.20000000000000009e-40 < t < 5.8e12 or 6.00000000000000012e56 < t Initial program 86.8%
Simplified90.4%
Taylor expanded in t around inf 77.7%
Final simplification82.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 (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k)))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -1.55e+81)
t_2
(if (<= t 1.75e-128)
t_1
(if (<= t 6000000000000.0)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t 3.5e+56) 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 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -1.55e+81) {
tmp = t_2;
} else if (t <= 1.75e-128) {
tmp = t_1;
} else if (t <= 6000000000000.0) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 3.5e+56) {
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 = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-1.55d+81)) then
tmp = t_2
else if (t <= 1.75d-128) then
tmp = t_1
else if (t <= 6000000000000.0d0) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= 3.5d+56) 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 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -1.55e+81) {
tmp = t_2;
} else if (t <= 1.75e-128) {
tmp = t_1;
} else if (t <= 6000000000000.0) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 3.5e+56) {
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 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -1.55e+81: tmp = t_2 elif t <= 1.75e-128: tmp = t_1 elif t <= 6000000000000.0: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= 3.5e+56: 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(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -1.55e+81) tmp = t_2; elseif (t <= 1.75e-128) tmp = t_1; elseif (t <= 6000000000000.0) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= 3.5e+56) 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 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -1.55e+81)
tmp = t_2;
elseif (t <= 1.75e-128)
tmp = t_1;
elseif (t <= 6000000000000.0)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= 3.5e+56)
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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+81], t$95$2, If[LessEqual[t, 1.75e-128], t$95$1, If[LessEqual[t, 6000000000000.0], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+56], 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 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6000000000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.55e81 or 3.49999999999999999e56 < t Initial program 86.3%
Simplified87.8%
Taylor expanded in x around inf 78.8%
associate-*r*78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in i around 0 78.0%
if -1.55e81 < t < 1.75e-128 or 6e12 < t < 3.49999999999999999e56Initial program 89.8%
Taylor expanded in t around 0 79.6%
if 1.75e-128 < t < 6e12Initial program 63.0%
Simplified70.9%
Taylor expanded in x around inf 69.5%
Final simplification77.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= x -4.7e+24)
(* y (* (* x z) (* 18.0 t)))
(if (<= x -3.4e-244)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 1.6e+28)
(+ t_1 (* -4.0 (* t a)))
(if (<= x 2.7e+136)
(+ t_1 (* x (* i -4.0)))
(if (<= x 1.7e+165)
(* t (* 18.0 (* z (* x y))))
(- (* b c) (* 4.0 (* x i))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -4.7e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -3.4e-244) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.6e+28) {
tmp = t_1 + (-4.0 * (t * a));
} else if (x <= 2.7e+136) {
tmp = t_1 + (x * (i * -4.0));
} else if (x <= 1.7e+165) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (x <= (-4.7d+24)) then
tmp = y * ((x * z) * (18.0d0 * t))
else if (x <= (-3.4d-244)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 1.6d+28) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (x <= 2.7d+136) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (x <= 1.7d+165) then
tmp = t * (18.0d0 * (z * (x * y)))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (x <= -4.7e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -3.4e-244) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.6e+28) {
tmp = t_1 + (-4.0 * (t * a));
} else if (x <= 2.7e+136) {
tmp = t_1 + (x * (i * -4.0));
} else if (x <= 1.7e+165) {
tmp = t * (18.0 * (z * (x * y)));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if x <= -4.7e+24: tmp = y * ((x * z) * (18.0 * t)) elif x <= -3.4e-244: tmp = (b * c) - (27.0 * (j * k)) elif x <= 1.6e+28: tmp = t_1 + (-4.0 * (t * a)) elif x <= 2.7e+136: tmp = t_1 + (x * (i * -4.0)) elif x <= 1.7e+165: tmp = t * (18.0 * (z * (x * y))) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -4.7e+24) tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); elseif (x <= -3.4e-244) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.6e+28) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (x <= 2.7e+136) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (x <= 1.7e+165) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (x <= -4.7e+24)
tmp = y * ((x * z) * (18.0 * t));
elseif (x <= -3.4e-244)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 1.6e+28)
tmp = t_1 + (-4.0 * (t * a));
elseif (x <= 2.7e+136)
tmp = t_1 + (x * (i * -4.0));
elseif (x <= 1.7e+165)
tmp = t * (18.0 * (z * (x * y)));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[x, -4.7e+24], N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.4e-244], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+28], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+136], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+165], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -4.7 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-244}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+136}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+165}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -4.7e24Initial program 75.7%
Simplified80.3%
associate-*r*77.3%
distribute-rgt-out--75.7%
associate-*l*77.3%
fmm-def77.3%
associate-*l*77.3%
associate-*l*78.6%
Applied egg-rr78.6%
fmm-undef78.6%
*-commutative78.6%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in x around inf 50.0%
associate-*r*49.9%
*-commutative49.9%
associate-*r*50.0%
associate-*l*53.0%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*53.0%
Simplified53.0%
if -4.7e24 < x < -3.40000000000000009e-244Initial program 90.0%
Taylor expanded in t around 0 73.2%
Taylor expanded in i around 0 60.8%
if -3.40000000000000009e-244 < x < 1.6e28Initial program 96.4%
Simplified89.7%
Taylor expanded in a around inf 64.3%
if 1.6e28 < x < 2.7000000000000002e136Initial program 89.4%
Simplified94.7%
Taylor expanded in i around inf 69.6%
*-commutative69.6%
*-commutative69.6%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
if 2.7000000000000002e136 < x < 1.70000000000000005e165Initial program 90.7%
Simplified100.0%
Taylor expanded in x around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 80.7%
Taylor expanded in x around inf 71.0%
associate-*r*61.7%
*-commutative61.7%
Simplified61.7%
if 1.70000000000000005e165 < x Initial program 64.4%
Taylor expanded in t around 0 58.7%
Taylor expanded in j around 0 65.8%
Final simplification61.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -1.5e+129)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) -2.15e-80)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= (* b c) 9e+82) (+ t_1 (* x (* i -4.0))) (+ (* b c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.5e+129) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -2.15e-80) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 9e+82) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-1.5d+129)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= (-2.15d-80)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if ((b * c) <= 9d+82) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.5e+129) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= -2.15e-80) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 9e+82) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.5e+129: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= -2.15e-80: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif (b * c) <= 9e+82: tmp = t_1 + (x * (i * -4.0)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.5e+129) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= -2.15e-80) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (Float64(b * c) <= 9e+82) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -1.5e+129)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= -2.15e-80)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif ((b * c) <= 9e+82)
tmp = t_1 + (x * (i * -4.0));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.5e+129], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.15e-80], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e+82], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+129}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq -2.15 \cdot 10^{-80}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+82}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.50000000000000015e129Initial program 86.9%
Taylor expanded in t around 0 70.9%
Taylor expanded in j around 0 66.7%
if -1.50000000000000015e129 < (*.f64 b c) < -2.1500000000000001e-80Initial program 84.0%
Simplified92.7%
Taylor expanded in x around inf 83.5%
associate-*r*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in t around inf 70.9%
if -2.1500000000000001e-80 < (*.f64 b c) < 8.9999999999999993e82Initial program 87.2%
Simplified86.5%
Taylor expanded in i around inf 56.9%
*-commutative56.9%
*-commutative56.9%
associate-*l*56.9%
*-commutative56.9%
Simplified56.9%
if 8.9999999999999993e82 < (*.f64 b c) Initial program 80.9%
Simplified83.6%
Taylor expanded in b around inf 57.1%
Final simplification61.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 (<= k -1.95e-57)
(* k (* j -27.0))
(if (or (<= k 2.2e+143) (and (not (<= k 1.22e+238)) (<= k 2e+268)))
(* 18.0 (* t (* x (* y z))))
(* -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 (k <= -1.95e-57) {
tmp = k * (j * -27.0);
} else if ((k <= 2.2e+143) || (!(k <= 1.22e+238) && (k <= 2e+268))) {
tmp = 18.0 * (t * (x * (y * z)));
} 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 (k <= (-1.95d-57)) then
tmp = k * (j * (-27.0d0))
else if ((k <= 2.2d+143) .or. (.not. (k <= 1.22d+238)) .and. (k <= 2d+268)) then
tmp = 18.0d0 * (t * (x * (y * z)))
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 (k <= -1.95e-57) {
tmp = k * (j * -27.0);
} else if ((k <= 2.2e+143) || (!(k <= 1.22e+238) && (k <= 2e+268))) {
tmp = 18.0 * (t * (x * (y * z)));
} 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 k <= -1.95e-57: tmp = k * (j * -27.0) elif (k <= 2.2e+143) or (not (k <= 1.22e+238) and (k <= 2e+268)): tmp = 18.0 * (t * (x * (y * z))) 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 (k <= -1.95e-57) tmp = Float64(k * Float64(j * -27.0)); elseif ((k <= 2.2e+143) || (!(k <= 1.22e+238) && (k <= 2e+268))) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); 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 (k <= -1.95e-57)
tmp = k * (j * -27.0);
elseif ((k <= 2.2e+143) || (~((k <= 1.22e+238)) && (k <= 2e+268)))
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.95e-57], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 2.2e+143], And[N[Not[LessEqual[k, 1.22e+238]], $MachinePrecision], LessEqual[k, 2e+268]]], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.95 \cdot 10^{-57}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 2.2 \cdot 10^{+143} \lor \neg \left(k \leq 1.22 \cdot 10^{+238}\right) \land k \leq 2 \cdot 10^{+268}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -1.95000000000000003e-57Initial program 74.6%
Simplified78.2%
associate-*r*77.0%
distribute-rgt-out--75.7%
associate-*l*72.0%
fmm-def72.0%
associate-*l*72.1%
associate-*l*73.3%
Applied egg-rr73.3%
fmm-undef73.3%
*-commutative73.3%
associate-*l*73.3%
*-commutative73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
fma-undefine73.3%
associate-*r*73.3%
*-commutative73.3%
associate-*r*73.3%
Simplified73.3%
Taylor expanded in x around 0 68.4%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in j around inf 33.5%
associate-*r*32.4%
*-commutative32.4%
*-commutative32.4%
Simplified32.4%
if -1.95000000000000003e-57 < k < 2.20000000000000014e143 or 1.2200000000000001e238 < k < 1.9999999999999999e268Initial program 91.4%
Simplified90.0%
associate-*r*91.4%
distribute-rgt-out--91.4%
associate-*l*90.7%
fmm-def90.7%
associate-*l*90.0%
associate-*l*90.6%
Applied egg-rr90.6%
fmm-undef90.6%
*-commutative90.6%
associate-*l*90.6%
*-commutative90.6%
cancel-sign-sub-inv90.6%
metadata-eval90.6%
fma-undefine90.6%
associate-*r*91.2%
*-commutative91.2%
associate-*r*91.3%
Simplified91.3%
Taylor expanded in x around 0 73.4%
associate-*r*73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in x around inf 33.4%
if 2.20000000000000014e143 < k < 1.2200000000000001e238 or 1.9999999999999999e268 < k Initial program 87.0%
Simplified90.2%
Taylor expanded in j around inf 68.2%
Final simplification37.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 (<= k -1.95e-57)
(* k (* j -27.0))
(if (or (<= k 1.75e+143) (and (not (<= k 2.9e+238)) (<= k 6.5e+266)))
(* 18.0 (* t (* y (* x z))))
(* -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 (k <= -1.95e-57) {
tmp = k * (j * -27.0);
} else if ((k <= 1.75e+143) || (!(k <= 2.9e+238) && (k <= 6.5e+266))) {
tmp = 18.0 * (t * (y * (x * z)));
} 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 (k <= (-1.95d-57)) then
tmp = k * (j * (-27.0d0))
else if ((k <= 1.75d+143) .or. (.not. (k <= 2.9d+238)) .and. (k <= 6.5d+266)) then
tmp = 18.0d0 * (t * (y * (x * z)))
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 (k <= -1.95e-57) {
tmp = k * (j * -27.0);
} else if ((k <= 1.75e+143) || (!(k <= 2.9e+238) && (k <= 6.5e+266))) {
tmp = 18.0 * (t * (y * (x * z)));
} 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 k <= -1.95e-57: tmp = k * (j * -27.0) elif (k <= 1.75e+143) or (not (k <= 2.9e+238) and (k <= 6.5e+266)): tmp = 18.0 * (t * (y * (x * z))) 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 (k <= -1.95e-57) tmp = Float64(k * Float64(j * -27.0)); elseif ((k <= 1.75e+143) || (!(k <= 2.9e+238) && (k <= 6.5e+266))) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); 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 (k <= -1.95e-57)
tmp = k * (j * -27.0);
elseif ((k <= 1.75e+143) || (~((k <= 2.9e+238)) && (k <= 6.5e+266)))
tmp = 18.0 * (t * (y * (x * z)));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.95e-57], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 1.75e+143], And[N[Not[LessEqual[k, 2.9e+238]], $MachinePrecision], LessEqual[k, 6.5e+266]]], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.95 \cdot 10^{-57}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.75 \cdot 10^{+143} \lor \neg \left(k \leq 2.9 \cdot 10^{+238}\right) \land k \leq 6.5 \cdot 10^{+266}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -1.95000000000000003e-57Initial program 74.6%
Simplified78.2%
associate-*r*77.0%
distribute-rgt-out--75.7%
associate-*l*72.0%
fmm-def72.0%
associate-*l*72.1%
associate-*l*73.3%
Applied egg-rr73.3%
fmm-undef73.3%
*-commutative73.3%
associate-*l*73.3%
*-commutative73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
fma-undefine73.3%
associate-*r*73.3%
*-commutative73.3%
associate-*r*73.3%
Simplified73.3%
Taylor expanded in x around 0 68.4%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in j around inf 33.5%
associate-*r*32.4%
*-commutative32.4%
*-commutative32.4%
Simplified32.4%
if -1.95000000000000003e-57 < k < 1.75000000000000004e143 or 2.9000000000000002e238 < k < 6.50000000000000006e266Initial program 91.4%
Simplified90.0%
associate-*r*91.4%
distribute-rgt-out--91.4%
associate-*l*90.7%
fmm-def90.7%
associate-*l*90.0%
associate-*l*90.6%
Applied egg-rr90.6%
fmm-undef90.6%
*-commutative90.6%
associate-*l*90.6%
*-commutative90.6%
cancel-sign-sub-inv90.6%
metadata-eval90.6%
fma-undefine90.6%
associate-*r*91.2%
*-commutative91.2%
associate-*r*91.3%
Simplified91.3%
Taylor expanded in x around 0 73.4%
associate-*r*73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in x around inf 33.4%
pow133.4%
associate-*r*31.4%
Applied egg-rr31.4%
unpow131.4%
associate-*r*33.4%
*-commutative33.4%
associate-*l*36.5%
*-commutative36.5%
Simplified36.5%
if 1.75000000000000004e143 < k < 2.9000000000000002e238 or 6.50000000000000006e266 < k Initial program 87.0%
Simplified90.2%
Taylor expanded in j around inf 68.2%
Final simplification39.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 (<= k -1.85e-57)
(* k (* j -27.0))
(if (<= k 1.2e+143)
(* t (* 18.0 (* z (* x y))))
(if (or (<= k 9.5e+235) (not (<= k 6.5e+266)))
(* -27.0 (* j k))
(* 18.0 (* t (* y (* x z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.85e-57) {
tmp = k * (j * -27.0);
} else if (k <= 1.2e+143) {
tmp = t * (18.0 * (z * (x * y)));
} else if ((k <= 9.5e+235) || !(k <= 6.5e+266)) {
tmp = -27.0 * (j * k);
} else {
tmp = 18.0 * (t * (y * (x * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-1.85d-57)) then
tmp = k * (j * (-27.0d0))
else if (k <= 1.2d+143) then
tmp = t * (18.0d0 * (z * (x * y)))
else if ((k <= 9.5d+235) .or. (.not. (k <= 6.5d+266))) then
tmp = (-27.0d0) * (j * k)
else
tmp = 18.0d0 * (t * (y * (x * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.85e-57) {
tmp = k * (j * -27.0);
} else if (k <= 1.2e+143) {
tmp = t * (18.0 * (z * (x * y)));
} else if ((k <= 9.5e+235) || !(k <= 6.5e+266)) {
tmp = -27.0 * (j * k);
} else {
tmp = 18.0 * (t * (y * (x * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1.85e-57: tmp = k * (j * -27.0) elif k <= 1.2e+143: tmp = t * (18.0 * (z * (x * y))) elif (k <= 9.5e+235) or not (k <= 6.5e+266): tmp = -27.0 * (j * k) else: tmp = 18.0 * (t * (y * (x * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.85e-57) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 1.2e+143) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); elseif ((k <= 9.5e+235) || !(k <= 6.5e+266)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -1.85e-57)
tmp = k * (j * -27.0);
elseif (k <= 1.2e+143)
tmp = t * (18.0 * (z * (x * y)));
elseif ((k <= 9.5e+235) || ~((k <= 6.5e+266)))
tmp = -27.0 * (j * k);
else
tmp = 18.0 * (t * (y * (x * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.85e-57], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e+143], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 9.5e+235], N[Not[LessEqual[k, 6.5e+266]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(t * N[(y * N[(x * 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}\;k \leq -1.85 \cdot 10^{-57}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{+143}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+235} \lor \neg \left(k \leq 6.5 \cdot 10^{+266}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if k < -1.85e-57Initial program 74.6%
Simplified78.2%
associate-*r*77.0%
distribute-rgt-out--75.7%
associate-*l*72.0%
fmm-def72.0%
associate-*l*72.1%
associate-*l*73.3%
Applied egg-rr73.3%
fmm-undef73.3%
*-commutative73.3%
associate-*l*73.3%
*-commutative73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
fma-undefine73.3%
associate-*r*73.3%
*-commutative73.3%
associate-*r*73.3%
Simplified73.3%
Taylor expanded in x around 0 68.4%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in j around inf 33.5%
associate-*r*32.4%
*-commutative32.4%
*-commutative32.4%
Simplified32.4%
if -1.85e-57 < k < 1.1999999999999999e143Initial program 91.7%
Simplified90.2%
Taylor expanded in x around inf 81.8%
associate-*r*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in t around inf 50.0%
Taylor expanded in x around inf 32.2%
associate-*r*33.6%
*-commutative33.6%
Simplified33.6%
if 1.1999999999999999e143 < k < 9.49999999999999966e235 or 6.50000000000000006e266 < k Initial program 87.0%
Simplified90.2%
Taylor expanded in j around inf 68.2%
if 9.49999999999999966e235 < k < 6.50000000000000006e266Initial program 85.7%
Simplified85.7%
associate-*r*85.7%
distribute-rgt-out--85.7%
associate-*l*85.7%
fmm-def85.7%
associate-*l*85.7%
associate-*l*85.7%
Applied egg-rr85.7%
fmm-undef85.7%
*-commutative85.7%
associate-*l*85.7%
*-commutative85.7%
cancel-sign-sub-inv85.7%
metadata-eval85.7%
fma-undefine85.7%
associate-*r*85.7%
*-commutative85.7%
associate-*r*85.7%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*r*85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 58.1%
pow158.1%
associate-*r*43.8%
Applied egg-rr43.8%
unpow143.8%
associate-*r*58.1%
*-commutative58.1%
associate-*l*71.9%
*-commutative71.9%
Simplified71.9%
Final simplification38.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= z -9.2e-119)
(* t (* 18.0 (* z (* x y))))
(if (<= z 1.25e-100)
t_1
(if (<= z 1e-42)
(* k (* j -27.0))
(if (<= z 4.5e+85) t_1 (* y (* (* x z) (* 18.0 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 t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (z <= -9.2e-119) {
tmp = t * (18.0 * (z * (x * y)));
} else if (z <= 1.25e-100) {
tmp = t_1;
} else if (z <= 1e-42) {
tmp = k * (j * -27.0);
} else if (z <= 4.5e+85) {
tmp = t_1;
} else {
tmp = y * ((x * z) * (18.0 * t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) * (t * a))
if (z <= (-9.2d-119)) then
tmp = t * (18.0d0 * (z * (x * y)))
else if (z <= 1.25d-100) then
tmp = t_1
else if (z <= 1d-42) then
tmp = k * (j * (-27.0d0))
else if (z <= 4.5d+85) then
tmp = t_1
else
tmp = y * ((x * z) * (18.0d0 * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (t * a));
double tmp;
if (z <= -9.2e-119) {
tmp = t * (18.0 * (z * (x * y)));
} else if (z <= 1.25e-100) {
tmp = t_1;
} else if (z <= 1e-42) {
tmp = k * (j * -27.0);
} else if (z <= 4.5e+85) {
tmp = t_1;
} else {
tmp = y * ((x * z) * (18.0 * t));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if z <= -9.2e-119: tmp = t * (18.0 * (z * (x * y))) elif z <= 1.25e-100: tmp = t_1 elif z <= 1e-42: tmp = k * (j * -27.0) elif z <= 4.5e+85: tmp = t_1 else: tmp = y * ((x * z) * (18.0 * 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) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (z <= -9.2e-119) tmp = Float64(t * Float64(18.0 * Float64(z * Float64(x * y)))); elseif (z <= 1.25e-100) tmp = t_1; elseif (z <= 1e-42) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= 4.5e+85) tmp = t_1; else tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (z <= -9.2e-119)
tmp = t * (18.0 * (z * (x * y)));
elseif (z <= 1.25e-100)
tmp = t_1;
elseif (z <= 1e-42)
tmp = k * (j * -27.0);
elseif (z <= 4.5e+85)
tmp = t_1;
else
tmp = y * ((x * z) * (18.0 * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e-119], N[(t * N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-100], t$95$1, If[LessEqual[z, 1e-42], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+85], t$95$1, N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{-119}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-42}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\end{array}
\end{array}
if z < -9.19999999999999973e-119Initial program 91.2%
Simplified87.4%
Taylor expanded in x around inf 69.1%
associate-*r*69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in t around inf 47.6%
Taylor expanded in x around inf 33.5%
associate-*r*34.4%
*-commutative34.4%
Simplified34.4%
if -9.19999999999999973e-119 < z < 1.25e-100 or 1.00000000000000004e-42 < z < 4.50000000000000007e85Initial program 83.3%
Simplified88.4%
Taylor expanded in x around inf 70.7%
associate-*r*70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in x around 0 43.6%
if 1.25e-100 < z < 1.00000000000000004e-42Initial program 92.1%
Simplified92.3%
associate-*r*92.2%
distribute-rgt-out--92.1%
associate-*l*92.2%
fmm-def92.2%
associate-*l*92.2%
associate-*l*92.2%
Applied egg-rr92.2%
fmm-undef92.2%
*-commutative92.2%
associate-*l*92.2%
*-commutative92.2%
cancel-sign-sub-inv92.2%
metadata-eval92.2%
fma-undefine92.2%
associate-*r*92.2%
*-commutative92.2%
associate-*r*92.3%
Simplified92.3%
Taylor expanded in x around 0 84.5%
associate-*r*84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in j around inf 40.0%
associate-*r*40.1%
*-commutative40.1%
*-commutative40.1%
Simplified40.1%
if 4.50000000000000007e85 < z Initial program 77.1%
Simplified76.6%
associate-*r*77.1%
distribute-rgt-out--77.1%
associate-*l*76.8%
fmm-def76.8%
associate-*l*76.8%
associate-*l*74.7%
Applied egg-rr74.7%
fmm-undef74.7%
*-commutative74.7%
associate-*l*76.8%
*-commutative76.8%
cancel-sign-sub-inv76.8%
metadata-eval76.8%
fma-undefine76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*r*76.8%
Simplified76.8%
Taylor expanded in x around 0 72.2%
associate-*r*72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in t around inf 69.9%
Taylor expanded in x around inf 52.2%
associate-*r*54.2%
*-commutative54.2%
associate-*r*58.3%
associate-*l*57.6%
associate-*r*57.6%
*-commutative57.6%
*-commutative57.6%
*-commutative57.6%
associate-*l*57.6%
Simplified57.6%
Final simplification42.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -2.8e+24)
(* y (* (* x z) (* 18.0 t)))
(if (<= x -3.5e-291)
t_1
(if (<= x 4.7e-268)
(+ (* b c) (* -4.0 (* t a)))
(if (<= x 2.8e+15) t_1 (* -4.0 (* x i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -2.8e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -3.5e-291) {
tmp = t_1;
} else if (x <= 4.7e-268) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 2.8e+15) {
tmp = t_1;
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-2.8d+24)) then
tmp = y * ((x * z) * (18.0d0 * t))
else if (x <= (-3.5d-291)) then
tmp = t_1
else if (x <= 4.7d-268) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (x <= 2.8d+15) then
tmp = t_1
else
tmp = (-4.0d0) * (x * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -2.8e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -3.5e-291) {
tmp = t_1;
} else if (x <= 4.7e-268) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 2.8e+15) {
tmp = t_1;
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -2.8e+24: tmp = y * ((x * z) * (18.0 * t)) elif x <= -3.5e-291: tmp = t_1 elif x <= 4.7e-268: tmp = (b * c) + (-4.0 * (t * a)) elif x <= 2.8e+15: tmp = t_1 else: tmp = -4.0 * (x * i) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -2.8e+24) tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); elseif (x <= -3.5e-291) tmp = t_1; elseif (x <= 4.7e-268) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (x <= 2.8e+15) tmp = t_1; else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -2.8e+24)
tmp = y * ((x * z) * (18.0 * t));
elseif (x <= -3.5e-291)
tmp = t_1;
elseif (x <= 4.7e-268)
tmp = (b * c) + (-4.0 * (t * a));
elseif (x <= 2.8e+15)
tmp = t_1;
else
tmp = -4.0 * (x * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+24], N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e-291], t$95$1, If[LessEqual[x, 4.7e-268], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+15], t$95$1, N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-268}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -2.8000000000000002e24Initial program 75.7%
Simplified80.3%
associate-*r*77.3%
distribute-rgt-out--75.7%
associate-*l*77.3%
fmm-def77.3%
associate-*l*77.3%
associate-*l*78.6%
Applied egg-rr78.6%
fmm-undef78.6%
*-commutative78.6%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in x around inf 50.0%
associate-*r*49.9%
*-commutative49.9%
associate-*r*50.0%
associate-*l*53.0%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*53.0%
Simplified53.0%
if -2.8000000000000002e24 < x < -3.49999999999999996e-291 or 4.69999999999999973e-268 < x < 2.8e15Initial program 94.1%
Simplified89.6%
Taylor expanded in b around inf 56.9%
if -3.49999999999999996e-291 < x < 4.69999999999999973e-268Initial program 94.0%
Simplified94.1%
Taylor expanded in x around inf 82.4%
associate-*r*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x around 0 71.6%
if 2.8e15 < x Initial program 78.1%
Simplified83.0%
associate-*r*78.1%
distribute-rgt-out--78.1%
associate-*l*78.2%
fmm-def78.2%
associate-*l*78.2%
associate-*l*79.9%
Applied egg-rr79.9%
fmm-undef79.9%
*-commutative79.9%
associate-*l*79.9%
*-commutative79.9%
cancel-sign-sub-inv79.9%
metadata-eval79.9%
fma-undefine79.9%
associate-*r*79.9%
*-commutative79.9%
associate-*r*79.9%
Simplified79.9%
Taylor expanded in i around inf 47.2%
*-commutative47.2%
Simplified47.2%
Final simplification54.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 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -2e+24)
(* y (* (* x z) (* 18.0 t)))
(if (<= x -2e-293)
t_1
(if (<= x 3.3e-267)
(+ (* b c) (* -4.0 (* t a)))
(if (<= x 1.55e-9) t_1 (- (* b c) (* 4.0 (* x i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -2e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -2e-293) {
tmp = t_1;
} else if (x <= 3.3e-267) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 1.55e-9) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-2d+24)) then
tmp = y * ((x * z) * (18.0d0 * t))
else if (x <= (-2d-293)) then
tmp = t_1
else if (x <= 3.3d-267) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (x <= 1.55d-9) then
tmp = t_1
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -2e+24) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -2e-293) {
tmp = t_1;
} else if (x <= 3.3e-267) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 1.55e-9) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -2e+24: tmp = y * ((x * z) * (18.0 * t)) elif x <= -2e-293: tmp = t_1 elif x <= 3.3e-267: tmp = (b * c) + (-4.0 * (t * a)) elif x <= 1.55e-9: tmp = t_1 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -2e+24) tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); elseif (x <= -2e-293) tmp = t_1; elseif (x <= 3.3e-267) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (x <= 1.55e-9) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -2e+24)
tmp = y * ((x * z) * (18.0 * t));
elseif (x <= -2e-293)
tmp = t_1;
elseif (x <= 3.3e-267)
tmp = (b * c) + (-4.0 * (t * a));
elseif (x <= 1.55e-9)
tmp = t_1;
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+24], N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e-293], t$95$1, If[LessEqual[x, 3.3e-267], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e-9], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-267}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -2e24Initial program 75.7%
Simplified80.3%
associate-*r*77.3%
distribute-rgt-out--75.7%
associate-*l*77.3%
fmm-def77.3%
associate-*l*77.3%
associate-*l*78.6%
Applied egg-rr78.6%
fmm-undef78.6%
*-commutative78.6%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in x around inf 50.0%
associate-*r*49.9%
*-commutative49.9%
associate-*r*50.0%
associate-*l*53.0%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*53.0%
Simplified53.0%
if -2e24 < x < -2.0000000000000001e-293 or 3.30000000000000004e-267 < x < 1.55000000000000002e-9Initial program 93.9%
Simplified89.3%
Taylor expanded in b around inf 58.0%
if -2.0000000000000001e-293 < x < 3.30000000000000004e-267Initial program 94.0%
Simplified94.1%
Taylor expanded in x around inf 82.4%
associate-*r*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x around 0 71.6%
if 1.55000000000000002e-9 < x Initial program 79.5%
Taylor expanded in t around 0 57.1%
Taylor expanded in j around 0 52.5%
Final simplification56.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 (- (* b c) (* 27.0 (* j k)))))
(if (<= x -9.5e+22)
(* y (* (* x z) (* 18.0 t)))
(if (<= x -1.3e-292)
t_1
(if (<= x 5e-268)
(+ (* b c) (* -4.0 (* t a)))
(if (<= x 1.02e-9) t_1 (- (* b c) (* 4.0 (* x i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (x <= -9.5e+22) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -1.3e-292) {
tmp = t_1;
} else if (x <= 5e-268) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 1.02e-9) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) - (27.0d0 * (j * k))
if (x <= (-9.5d+22)) then
tmp = y * ((x * z) * (18.0d0 * t))
else if (x <= (-1.3d-292)) then
tmp = t_1
else if (x <= 5d-268) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (x <= 1.02d-9) then
tmp = t_1
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) - (27.0 * (j * k));
double tmp;
if (x <= -9.5e+22) {
tmp = y * ((x * z) * (18.0 * t));
} else if (x <= -1.3e-292) {
tmp = t_1;
} else if (x <= 5e-268) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (x <= 1.02e-9) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) tmp = 0 if x <= -9.5e+22: tmp = y * ((x * z) * (18.0 * t)) elif x <= -1.3e-292: tmp = t_1 elif x <= 5e-268: tmp = (b * c) + (-4.0 * (t * a)) elif x <= 1.02e-9: tmp = t_1 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (x <= -9.5e+22) tmp = Float64(y * Float64(Float64(x * z) * Float64(18.0 * t))); elseif (x <= -1.3e-292) tmp = t_1; elseif (x <= 5e-268) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (x <= 1.02e-9) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
tmp = 0.0;
if (x <= -9.5e+22)
tmp = y * ((x * z) * (18.0 * t));
elseif (x <= -1.3e-292)
tmp = t_1;
elseif (x <= 5e-268)
tmp = (b * c) + (-4.0 * (t * a));
elseif (x <= 1.02e-9)
tmp = t_1;
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e+22], N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.3e-292], t$95$1, If[LessEqual[x, 5e-268], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e-9], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+22}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-268}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -9.49999999999999937e22Initial program 75.7%
Simplified80.3%
associate-*r*77.3%
distribute-rgt-out--75.7%
associate-*l*77.3%
fmm-def77.3%
associate-*l*77.3%
associate-*l*78.6%
Applied egg-rr78.6%
fmm-undef78.6%
*-commutative78.6%
associate-*l*78.6%
*-commutative78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
fma-undefine78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Taylor expanded in x around 0 72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in x around inf 50.0%
associate-*r*49.9%
*-commutative49.9%
associate-*r*50.0%
associate-*l*53.0%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*53.0%
Simplified53.0%
if -9.49999999999999937e22 < x < -1.30000000000000007e-292 or 4.9999999999999999e-268 < x < 1.01999999999999999e-9Initial program 93.9%
Taylor expanded in t around 0 66.4%
Taylor expanded in i around 0 58.0%
if -1.30000000000000007e-292 < x < 4.9999999999999999e-268Initial program 94.0%
Simplified94.1%
Taylor expanded in x around inf 82.4%
associate-*r*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x around 0 71.6%
if 1.01999999999999999e-9 < x Initial program 79.5%
Taylor expanded in t around 0 57.1%
Taylor expanded in j around 0 52.5%
Final simplification56.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 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.65e+14)
t_1
(if (<= x -3.2e-243)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 3.9e-100) (+ (* j (* k -27.0)) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.65e+14) {
tmp = t_1;
} else if (x <= -3.2e-243) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 3.9e-100) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-1.65d+14)) then
tmp = t_1
else if (x <= (-3.2d-243)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 3.9d-100) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.65e+14) {
tmp = t_1;
} else if (x <= -3.2e-243) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 3.9e-100) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -1.65e+14: tmp = t_1 elif x <= -3.2e-243: tmp = (b * c) - (27.0 * (j * k)) elif x <= 3.9e-100: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.65e+14) tmp = t_1; elseif (x <= -3.2e-243) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 3.9e-100) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.65e+14)
tmp = t_1;
elseif (x <= -3.2e-243)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 3.9e-100)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+14], t$95$1, If[LessEqual[x, -3.2e-243], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e-100], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-243}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-100}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.65e14 or 3.89999999999999977e-100 < x Initial program 80.7%
Simplified84.7%
Taylor expanded in x around inf 67.9%
if -1.65e14 < x < -3.1999999999999998e-243Initial program 89.4%
Taylor expanded in t around 0 73.6%
Taylor expanded in i around 0 64.7%
if -3.1999999999999998e-243 < x < 3.89999999999999977e-100Initial program 95.0%
Simplified87.4%
Taylor expanded in a around inf 72.2%
Final simplification68.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= j -3.5e+204)
t_1
(if (<= j -3e+75) (* b c) (if (<= j 4.6e-53) (* -4.0 (* x i)) 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 = -27.0 * (j * k);
double tmp;
if (j <= -3.5e+204) {
tmp = t_1;
} else if (j <= -3e+75) {
tmp = b * c;
} else if (j <= 4.6e-53) {
tmp = -4.0 * (x * i);
} 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 = (-27.0d0) * (j * k)
if (j <= (-3.5d+204)) then
tmp = t_1
else if (j <= (-3d+75)) then
tmp = b * c
else if (j <= 4.6d-53) then
tmp = (-4.0d0) * (x * i)
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 = -27.0 * (j * k);
double tmp;
if (j <= -3.5e+204) {
tmp = t_1;
} else if (j <= -3e+75) {
tmp = b * c;
} else if (j <= 4.6e-53) {
tmp = -4.0 * (x * i);
} 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 = -27.0 * (j * k) tmp = 0 if j <= -3.5e+204: tmp = t_1 elif j <= -3e+75: tmp = b * c elif j <= 4.6e-53: tmp = -4.0 * (x * i) 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(-27.0 * Float64(j * k)) tmp = 0.0 if (j <= -3.5e+204) tmp = t_1; elseif (j <= -3e+75) tmp = Float64(b * c); elseif (j <= 4.6e-53) tmp = Float64(-4.0 * Float64(x * i)); 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 = -27.0 * (j * k);
tmp = 0.0;
if (j <= -3.5e+204)
tmp = t_1;
elseif (j <= -3e+75)
tmp = b * c;
elseif (j <= 4.6e-53)
tmp = -4.0 * (x * i);
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -3.5e+204], t$95$1, If[LessEqual[j, -3e+75], N[(b * c), $MachinePrecision], If[LessEqual[j, 4.6e-53], N[(-4.0 * N[(x * i), $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 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -3.5 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -3 \cdot 10^{+75}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 4.6 \cdot 10^{-53}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -3.49999999999999989e204 or 4.6000000000000003e-53 < j Initial program 83.8%
Simplified86.4%
Taylor expanded in j around inf 42.9%
if -3.49999999999999989e204 < j < -3e75Initial program 85.7%
Simplified85.7%
associate-*r*85.7%
distribute-rgt-out--85.7%
associate-*l*81.2%
fmm-def81.2%
associate-*l*81.2%
associate-*l*81.2%
Applied egg-rr81.2%
fmm-undef81.2%
*-commutative81.2%
associate-*l*81.2%
*-commutative81.2%
cancel-sign-sub-inv81.2%
metadata-eval81.2%
fma-undefine81.2%
associate-*r*81.2%
*-commutative81.2%
associate-*r*81.2%
Simplified81.2%
Taylor expanded in b around inf 46.0%
if -3e75 < j < 4.6000000000000003e-53Initial program 87.6%
Simplified87.5%
associate-*r*88.5%
distribute-rgt-out--87.6%
associate-*l*86.6%
fmm-def86.6%
associate-*l*85.8%
associate-*l*87.4%
Applied egg-rr87.4%
fmm-undef87.4%
*-commutative87.4%
associate-*l*87.4%
*-commutative87.4%
cancel-sign-sub-inv87.4%
metadata-eval87.4%
fma-undefine87.4%
associate-*r*88.2%
*-commutative88.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in i around inf 28.9%
*-commutative28.9%
Simplified28.9%
Final simplification36.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 (<= j -4.8e+204)
(* k (* j -27.0))
(if (<= j -6.6e+77)
(* b c)
(if (<= j 2.5e-53) (* -4.0 (* x i)) (* -27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -4.8e+204) {
tmp = k * (j * -27.0);
} else if (j <= -6.6e+77) {
tmp = b * c;
} else if (j <= 2.5e-53) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-4.8d+204)) then
tmp = k * (j * (-27.0d0))
else if (j <= (-6.6d+77)) then
tmp = b * c
else if (j <= 2.5d-53) then
tmp = (-4.0d0) * (x * i)
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -4.8e+204) {
tmp = k * (j * -27.0);
} else if (j <= -6.6e+77) {
tmp = b * c;
} else if (j <= 2.5e-53) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -4.8e+204: tmp = k * (j * -27.0) elif j <= -6.6e+77: tmp = b * c elif j <= 2.5e-53: tmp = -4.0 * (x * i) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -4.8e+204) tmp = Float64(k * Float64(j * -27.0)); elseif (j <= -6.6e+77) tmp = Float64(b * c); elseif (j <= 2.5e-53) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -4.8e+204)
tmp = k * (j * -27.0);
elseif (j <= -6.6e+77)
tmp = b * c;
elseif (j <= 2.5e-53)
tmp = -4.0 * (x * i);
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -4.8e+204], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -6.6e+77], N[(b * c), $MachinePrecision], If[LessEqual[j, 2.5e-53], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.8 \cdot 10^{+204}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;j \leq -6.6 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 2.5 \cdot 10^{-53}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -4.7999999999999999e204Initial program 88.6%
Simplified85.3%
associate-*r*88.5%
distribute-rgt-out--88.5%
associate-*l*85.1%
fmm-def85.1%
associate-*l*85.1%
associate-*l*85.1%
Applied egg-rr85.1%
fmm-undef85.1%
*-commutative85.1%
associate-*l*85.1%
*-commutative85.1%
cancel-sign-sub-inv85.1%
metadata-eval85.1%
fma-undefine85.1%
associate-*r*85.1%
*-commutative85.1%
associate-*r*85.2%
Simplified85.2%
Taylor expanded in x around 0 81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in j around inf 45.9%
associate-*r*46.0%
*-commutative46.0%
*-commutative46.0%
Simplified46.0%
if -4.7999999999999999e204 < j < -6.5999999999999996e77Initial program 85.7%
Simplified85.7%
associate-*r*85.7%
distribute-rgt-out--85.7%
associate-*l*81.2%
fmm-def81.2%
associate-*l*81.2%
associate-*l*81.2%
Applied egg-rr81.2%
fmm-undef81.2%
*-commutative81.2%
associate-*l*81.2%
*-commutative81.2%
cancel-sign-sub-inv81.2%
metadata-eval81.2%
fma-undefine81.2%
associate-*r*81.2%
*-commutative81.2%
associate-*r*81.2%
Simplified81.2%
Taylor expanded in b around inf 46.0%
if -6.5999999999999996e77 < j < 2.5e-53Initial program 87.6%
Simplified87.5%
associate-*r*88.5%
distribute-rgt-out--87.6%
associate-*l*86.6%
fmm-def86.6%
associate-*l*85.8%
associate-*l*87.4%
Applied egg-rr87.4%
fmm-undef87.4%
*-commutative87.4%
associate-*l*87.4%
*-commutative87.4%
cancel-sign-sub-inv87.4%
metadata-eval87.4%
fma-undefine87.4%
associate-*r*88.2%
*-commutative88.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in i around inf 28.9%
*-commutative28.9%
Simplified28.9%
if 2.5e-53 < j Initial program 82.4%
Simplified86.7%
Taylor expanded in j around inf 41.9%
Final simplification36.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.45e+65) (not (<= (* b c) 2.8e+41))) (* 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) <= -1.45e+65) || !((b * c) <= 2.8e+41)) {
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) <= (-1.45d+65)) .or. (.not. ((b * c) <= 2.8d+41))) 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) <= -1.45e+65) || !((b * c) <= 2.8e+41)) {
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) <= -1.45e+65) or not ((b * c) <= 2.8e+41): 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) <= -1.45e+65) || !(Float64(b * c) <= 2.8e+41)) 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) <= -1.45e+65) || ~(((b * c) <= 2.8e+41)))
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], -1.45e+65], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.8e+41]], $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 -1.45 \cdot 10^{+65} \lor \neg \left(b \cdot c \leq 2.8 \cdot 10^{+41}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.45e65 or 2.7999999999999999e41 < (*.f64 b c) Initial program 85.2%
Simplified83.4%
associate-*r*85.2%
distribute-rgt-out--85.2%
associate-*l*85.2%
fmm-def85.2%
associate-*l*84.3%
associate-*l*85.1%
Applied egg-rr85.1%
fmm-undef85.1%
*-commutative85.1%
associate-*l*85.1%
*-commutative85.1%
cancel-sign-sub-inv85.1%
metadata-eval85.1%
fma-undefine85.1%
associate-*r*86.0%
*-commutative86.0%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in b around inf 43.1%
if -1.45e65 < (*.f64 b c) < 2.7999999999999999e41Initial program 86.1%
Simplified87.8%
Taylor expanded in j around inf 31.4%
Final simplification36.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 (* 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.7%
Simplified86.0%
associate-*r*86.5%
distribute-rgt-out--86.1%
associate-*l*83.7%
fmm-def83.7%
associate-*l*83.4%
associate-*l*83.7%
Applied egg-rr83.7%
fmm-undef83.7%
*-commutative83.7%
associate-*l*84.1%
*-commutative84.1%
cancel-sign-sub-inv84.1%
metadata-eval84.1%
fma-undefine84.1%
associate-*r*84.5%
*-commutative84.5%
associate-*r*84.5%
Simplified84.5%
Taylor expanded in b around inf 19.8%
Final simplification19.8%
(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 2024076
(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)))