
(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 20 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 (- (* 4.0 (- i)) (* (* y (* z t)) -18.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 = (((((((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 * ((4.0 * -i) - ((y * (z * t)) * -18.0));
}
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 * ((4.0 * -i) - ((y * (z * t)) * -18.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 = (((((((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 * ((4.0 * -i) - ((y * (z * t)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(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(4.0 * Float64(-i)) - Float64(Float64(y * Float64(z * t)) * -18.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 = (((((((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 * ((4.0 * -i) - ((y * (z * t)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(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[(4.0 * (-i)), $MachinePrecision] - N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\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(4 \cdot \left(-i\right) - \left(y \cdot \left(z \cdot t\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.0%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified33.3%
associate-*r*29.6%
distribute-rgt-out--0.0%
associate-+l-0.0%
associate-*r*3.7%
*-commutative3.7%
*-commutative3.7%
associate-*l*3.7%
fma-neg7.4%
Applied egg-rr7.4%
Taylor expanded in t around 0 33.3%
fma-define44.4%
cancel-sign-sub-inv44.4%
metadata-eval44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in x around -inf 74.1%
associate-*r*74.1%
neg-mul-174.1%
cancel-sign-sub-inv74.1%
*-commutative74.1%
*-commutative74.1%
associate-*l*74.2%
metadata-eval74.2%
Simplified74.2%
Final simplification94.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 (* -4.0 (* t a)))
(t_2 (* t (* x (* 18.0 (* y z)))))
(t_3 (* j (* k -27.0)))
(t_4 (+ t_3 t_1)))
(if (<= t -2.25e+144)
t_4
(if (<= t -1.3e+125)
t_2
(if (<= t -2e+47)
(+ (* b c) t_1)
(if (<= t 6.8e+53)
(+ t_3 (* -4.0 (* x i)))
(if (<= t 7.2e+218)
t_4
(if (or (<= t 6e+245) (not (<= t 1.9e+275)))
t_2
(* -4.0 (+ (* x i) (* 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 = -4.0 * (t * a);
double t_2 = t * (x * (18.0 * (y * z)));
double t_3 = j * (k * -27.0);
double t_4 = t_3 + t_1;
double tmp;
if (t <= -2.25e+144) {
tmp = t_4;
} else if (t <= -1.3e+125) {
tmp = t_2;
} else if (t <= -2e+47) {
tmp = (b * c) + t_1;
} else if (t <= 6.8e+53) {
tmp = t_3 + (-4.0 * (x * i));
} else if (t <= 7.2e+218) {
tmp = t_4;
} else if ((t <= 6e+245) || !(t <= 1.9e+275)) {
tmp = t_2;
} else {
tmp = -4.0 * ((x * i) + (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 = (-4.0d0) * (t * a)
t_2 = t * (x * (18.0d0 * (y * z)))
t_3 = j * (k * (-27.0d0))
t_4 = t_3 + t_1
if (t <= (-2.25d+144)) then
tmp = t_4
else if (t <= (-1.3d+125)) then
tmp = t_2
else if (t <= (-2d+47)) then
tmp = (b * c) + t_1
else if (t <= 6.8d+53) then
tmp = t_3 + ((-4.0d0) * (x * i))
else if (t <= 7.2d+218) then
tmp = t_4
else if ((t <= 6d+245) .or. (.not. (t <= 1.9d+275))) then
tmp = t_2
else
tmp = (-4.0d0) * ((x * i) + (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 = -4.0 * (t * a);
double t_2 = t * (x * (18.0 * (y * z)));
double t_3 = j * (k * -27.0);
double t_4 = t_3 + t_1;
double tmp;
if (t <= -2.25e+144) {
tmp = t_4;
} else if (t <= -1.3e+125) {
tmp = t_2;
} else if (t <= -2e+47) {
tmp = (b * c) + t_1;
} else if (t <= 6.8e+53) {
tmp = t_3 + (-4.0 * (x * i));
} else if (t <= 7.2e+218) {
tmp = t_4;
} else if ((t <= 6e+245) || !(t <= 1.9e+275)) {
tmp = t_2;
} else {
tmp = -4.0 * ((x * i) + (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 = -4.0 * (t * a) t_2 = t * (x * (18.0 * (y * z))) t_3 = j * (k * -27.0) t_4 = t_3 + t_1 tmp = 0 if t <= -2.25e+144: tmp = t_4 elif t <= -1.3e+125: tmp = t_2 elif t <= -2e+47: tmp = (b * c) + t_1 elif t <= 6.8e+53: tmp = t_3 + (-4.0 * (x * i)) elif t <= 7.2e+218: tmp = t_4 elif (t <= 6e+245) or not (t <= 1.9e+275): tmp = t_2 else: tmp = -4.0 * ((x * i) + (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(-4.0 * Float64(t * a)) t_2 = Float64(t * Float64(x * Float64(18.0 * Float64(y * z)))) t_3 = Float64(j * Float64(k * -27.0)) t_4 = Float64(t_3 + t_1) tmp = 0.0 if (t <= -2.25e+144) tmp = t_4; elseif (t <= -1.3e+125) tmp = t_2; elseif (t <= -2e+47) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 6.8e+53) tmp = Float64(t_3 + Float64(-4.0 * Float64(x * i))); elseif (t <= 7.2e+218) tmp = t_4; elseif ((t <= 6e+245) || !(t <= 1.9e+275)) tmp = t_2; else tmp = Float64(-4.0 * Float64(Float64(x * i) + 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 = -4.0 * (t * a);
t_2 = t * (x * (18.0 * (y * z)));
t_3 = j * (k * -27.0);
t_4 = t_3 + t_1;
tmp = 0.0;
if (t <= -2.25e+144)
tmp = t_4;
elseif (t <= -1.3e+125)
tmp = t_2;
elseif (t <= -2e+47)
tmp = (b * c) + t_1;
elseif (t <= 6.8e+53)
tmp = t_3 + (-4.0 * (x * i));
elseif (t <= 7.2e+218)
tmp = t_4;
elseif ((t <= 6e+245) || ~((t <= 1.9e+275)))
tmp = t_2;
else
tmp = -4.0 * ((x * i) + (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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + t$95$1), $MachinePrecision]}, If[LessEqual[t, -2.25e+144], t$95$4, If[LessEqual[t, -1.3e+125], t$95$2, If[LessEqual[t, -2e+47], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 6.8e+53], N[(t$95$3 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+218], t$95$4, If[Or[LessEqual[t, 6e+245], N[Not[LessEqual[t, 1.9e+275]], $MachinePrecision]], t$95$2, N[(-4.0 * N[(N[(x * i), $MachinePrecision] + 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 := -4 \cdot \left(t \cdot a\right)\\
t_2 := t \cdot \left(x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
t_3 := j \cdot \left(k \cdot -27\right)\\
t_4 := t\_3 + t\_1\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+144}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+47}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+53}:\\
\;\;\;\;t\_3 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+218}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+245} \lor \neg \left(t \leq 1.9 \cdot 10^{+275}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if t < -2.24999999999999984e144 or 6.79999999999999995e53 < t < 7.19999999999999981e218Initial program 80.0%
Simplified89.2%
Taylor expanded in a around inf 58.7%
if -2.24999999999999984e144 < t < -1.30000000000000002e125 or 7.19999999999999981e218 < t < 6e245 or 1.90000000000000006e275 < t Initial program 76.5%
Simplified83.3%
Taylor expanded in j around 0 93.3%
Taylor expanded in b around 0 93.3%
Taylor expanded in y around inf 83.6%
*-commutative83.6%
associate-*l*83.6%
associate-*l*83.6%
Simplified83.6%
if -1.30000000000000002e125 < t < -2.0000000000000001e47Initial program 100.0%
Simplified100.0%
Taylor expanded in j around 0 100.0%
Taylor expanded in x around 0 60.7%
if -2.0000000000000001e47 < t < 6.79999999999999995e53Initial program 91.2%
Simplified89.9%
Taylor expanded in i around inf 68.7%
*-commutative68.7%
Simplified68.7%
if 6e245 < t < 1.90000000000000006e275Initial program 80.0%
Simplified100.0%
Taylor expanded in j around 0 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-lft-out100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification68.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 (* 4.0 (* x i)))
(t_2 (- (+ (* b c) (* -4.0 (* t a))) t_1))
(t_3 (* j (* k -27.0)))
(t_4 (+ t_3 (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))))))
(if (<= t -7.5e+125)
t_4
(if (<= t -1.4e-41)
t_2
(if (<= t -4.6e-48)
(+ t_3 (* 18.0 (* t (* z (* x y)))))
(if (<= t -1.05e-104)
t_2
(if (<= t 2.2e+52) (- (* b c) (+ t_1 (* 27.0 (* j k)))) 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 = 4.0 * (x * i);
double t_2 = ((b * c) + (-4.0 * (t * a))) - t_1;
double t_3 = j * (k * -27.0);
double t_4 = t_3 + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
double tmp;
if (t <= -7.5e+125) {
tmp = t_4;
} else if (t <= -1.4e-41) {
tmp = t_2;
} else if (t <= -4.6e-48) {
tmp = t_3 + (18.0 * (t * (z * (x * y))));
} else if (t <= -1.05e-104) {
tmp = t_2;
} else if (t <= 2.2e+52) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else {
tmp = t_4;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 4.0d0 * (x * i)
t_2 = ((b * c) + ((-4.0d0) * (t * a))) - t_1
t_3 = j * (k * (-27.0d0))
t_4 = t_3 + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))
if (t <= (-7.5d+125)) then
tmp = t_4
else if (t <= (-1.4d-41)) then
tmp = t_2
else if (t <= (-4.6d-48)) then
tmp = t_3 + (18.0d0 * (t * (z * (x * y))))
else if (t <= (-1.05d-104)) then
tmp = t_2
else if (t <= 2.2d+52) then
tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
else
tmp = t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = ((b * c) + (-4.0 * (t * a))) - t_1;
double t_3 = j * (k * -27.0);
double t_4 = t_3 + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
double tmp;
if (t <= -7.5e+125) {
tmp = t_4;
} else if (t <= -1.4e-41) {
tmp = t_2;
} else if (t <= -4.6e-48) {
tmp = t_3 + (18.0 * (t * (z * (x * y))));
} else if (t <= -1.05e-104) {
tmp = t_2;
} else if (t <= 2.2e+52) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else {
tmp = t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = ((b * c) + (-4.0 * (t * a))) - t_1 t_3 = j * (k * -27.0) t_4 = t_3 + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) tmp = 0 if t <= -7.5e+125: tmp = t_4 elif t <= -1.4e-41: tmp = t_2 elif t <= -4.6e-48: tmp = t_3 + (18.0 * (t * (z * (x * y)))) elif t <= -1.05e-104: tmp = t_2 elif t <= 2.2e+52: tmp = (b * c) - (t_1 + (27.0 * (j * k))) else: tmp = t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1) t_3 = Float64(j * Float64(k * -27.0)) t_4 = Float64(t_3 + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))) tmp = 0.0 if (t <= -7.5e+125) tmp = t_4; elseif (t <= -1.4e-41) tmp = t_2; elseif (t <= -4.6e-48) tmp = Float64(t_3 + Float64(18.0 * Float64(t * Float64(z * Float64(x * y))))); elseif (t <= -1.05e-104) tmp = t_2; elseif (t <= 2.2e+52) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); else tmp = t_4; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = ((b * c) + (-4.0 * (t * a))) - t_1;
t_3 = j * (k * -27.0);
t_4 = t_3 + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
tmp = 0.0;
if (t <= -7.5e+125)
tmp = t_4;
elseif (t <= -1.4e-41)
tmp = t_2;
elseif (t <= -4.6e-48)
tmp = t_3 + (18.0 * (t * (z * (x * y))));
elseif (t <= -1.05e-104)
tmp = t_2;
elseif (t <= 2.2e+52)
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
else
tmp = t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+125], t$95$4, If[LessEqual[t, -1.4e-41], t$95$2, If[LessEqual[t, -4.6e-48], N[(t$95$3 + N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e-104], t$95$2, If[LessEqual[t, 2.2e+52], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
t_3 := j \cdot \left(k \cdot -27\right)\\
t_4 := t\_3 + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+125}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-48}:\\
\;\;\;\;t\_3 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+52}:\\
\;\;\;\;b \cdot c - \left(t\_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if t < -7.5000000000000006e125 or 2.2e52 < t Initial program 78.5%
Simplified87.7%
Taylor expanded in t around inf 84.5%
if -7.5000000000000006e125 < t < -1.4000000000000001e-41 or -4.6000000000000001e-48 < t < -1.04999999999999999e-104Initial program 97.2%
Simplified94.7%
Taylor expanded in j around 0 84.4%
Taylor expanded in y around 0 74.0%
if -1.4000000000000001e-41 < t < -4.6000000000000001e-48Initial program 100.0%
Simplified61.9%
Taylor expanded in y around inf 61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*r*100.0%
Simplified100.0%
if -1.04999999999999999e-104 < t < 2.2e52Initial program 89.8%
Simplified89.7%
Taylor expanded in t around 0 92.3%
Final simplification86.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* 4.0 (* x i)))
(t_3 (* 18.0 (* x (* y z))))
(t_4 (* t (- t_3 (* a 4.0))))
(t_5 (- (* b c) (+ t_2 (* 27.0 (* j k))))))
(if (<= t -9.6e+68)
(- t_4 t_2)
(if (<= t -2.8e-7)
t_5
(if (<= t -1.2e-18)
t_4
(if (<= t -2.35e-48)
(+ t_1 (* 18.0 (* t (* z (* x y)))))
(if (<= t 4.3e+52) t_5 (+ t_1 (* t (+ (* a -4.0) t_3))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 4.0 * (x * i);
double t_3 = 18.0 * (x * (y * z));
double t_4 = t * (t_3 - (a * 4.0));
double t_5 = (b * c) - (t_2 + (27.0 * (j * k)));
double tmp;
if (t <= -9.6e+68) {
tmp = t_4 - t_2;
} else if (t <= -2.8e-7) {
tmp = t_5;
} else if (t <= -1.2e-18) {
tmp = t_4;
} else if (t <= -2.35e-48) {
tmp = t_1 + (18.0 * (t * (z * (x * y))));
} else if (t <= 4.3e+52) {
tmp = t_5;
} else {
tmp = t_1 + (t * ((a * -4.0) + t_3));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = 4.0d0 * (x * i)
t_3 = 18.0d0 * (x * (y * z))
t_4 = t * (t_3 - (a * 4.0d0))
t_5 = (b * c) - (t_2 + (27.0d0 * (j * k)))
if (t <= (-9.6d+68)) then
tmp = t_4 - t_2
else if (t <= (-2.8d-7)) then
tmp = t_5
else if (t <= (-1.2d-18)) then
tmp = t_4
else if (t <= (-2.35d-48)) then
tmp = t_1 + (18.0d0 * (t * (z * (x * y))))
else if (t <= 4.3d+52) then
tmp = t_5
else
tmp = t_1 + (t * ((a * (-4.0d0)) + t_3))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 4.0 * (x * i);
double t_3 = 18.0 * (x * (y * z));
double t_4 = t * (t_3 - (a * 4.0));
double t_5 = (b * c) - (t_2 + (27.0 * (j * k)));
double tmp;
if (t <= -9.6e+68) {
tmp = t_4 - t_2;
} else if (t <= -2.8e-7) {
tmp = t_5;
} else if (t <= -1.2e-18) {
tmp = t_4;
} else if (t <= -2.35e-48) {
tmp = t_1 + (18.0 * (t * (z * (x * y))));
} else if (t <= 4.3e+52) {
tmp = t_5;
} else {
tmp = t_1 + (t * ((a * -4.0) + t_3));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = 4.0 * (x * i) t_3 = 18.0 * (x * (y * z)) t_4 = t * (t_3 - (a * 4.0)) t_5 = (b * c) - (t_2 + (27.0 * (j * k))) tmp = 0 if t <= -9.6e+68: tmp = t_4 - t_2 elif t <= -2.8e-7: tmp = t_5 elif t <= -1.2e-18: tmp = t_4 elif t <= -2.35e-48: tmp = t_1 + (18.0 * (t * (z * (x * y)))) elif t <= 4.3e+52: tmp = t_5 else: tmp = t_1 + (t * ((a * -4.0) + t_3)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(4.0 * Float64(x * i)) t_3 = Float64(18.0 * Float64(x * Float64(y * z))) t_4 = Float64(t * Float64(t_3 - Float64(a * 4.0))) t_5 = Float64(Float64(b * c) - Float64(t_2 + Float64(27.0 * Float64(j * k)))) tmp = 0.0 if (t <= -9.6e+68) tmp = Float64(t_4 - t_2); elseif (t <= -2.8e-7) tmp = t_5; elseif (t <= -1.2e-18) tmp = t_4; elseif (t <= -2.35e-48) tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(z * Float64(x * y))))); elseif (t <= 4.3e+52) tmp = t_5; else tmp = Float64(t_1 + Float64(t * Float64(Float64(a * -4.0) + t_3))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = 4.0 * (x * i);
t_3 = 18.0 * (x * (y * z));
t_4 = t * (t_3 - (a * 4.0));
t_5 = (b * c) - (t_2 + (27.0 * (j * k)));
tmp = 0.0;
if (t <= -9.6e+68)
tmp = t_4 - t_2;
elseif (t <= -2.8e-7)
tmp = t_5;
elseif (t <= -1.2e-18)
tmp = t_4;
elseif (t <= -2.35e-48)
tmp = t_1 + (18.0 * (t * (z * (x * y))));
elseif (t <= 4.3e+52)
tmp = t_5;
else
tmp = t_1 + (t * ((a * -4.0) + t_3));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(t$95$3 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e+68], N[(t$95$4 - t$95$2), $MachinePrecision], If[LessEqual[t, -2.8e-7], t$95$5, If[LessEqual[t, -1.2e-18], t$95$4, If[LessEqual[t, -2.35e-48], N[(t$95$1 + N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+52], t$95$5, N[(t$95$1 + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$3), $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 := 4 \cdot \left(x \cdot i\right)\\
t_3 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_4 := t \cdot \left(t\_3 - a \cdot 4\right)\\
t_5 := b \cdot c - \left(t\_2 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{+68}:\\
\;\;\;\;t\_4 - t\_2\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-7}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-18}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-48}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+52}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t \cdot \left(a \cdot -4 + t\_3\right)\\
\end{array}
\end{array}
if t < -9.60000000000000031e68Initial program 79.9%
Simplified82.2%
Taylor expanded in j around 0 78.3%
Taylor expanded in b around 0 81.7%
if -9.60000000000000031e68 < t < -2.80000000000000019e-7 or -2.3499999999999999e-48 < t < 4.3e52Initial program 90.7%
Simplified90.6%
Taylor expanded in t around 0 90.0%
if -2.80000000000000019e-7 < t < -1.19999999999999997e-18Initial program 100.0%
Simplified100.0%
Taylor expanded in j around 0 100.0%
Taylor expanded in b around 0 77.4%
Taylor expanded in t around inf 77.4%
if -1.19999999999999997e-18 < t < -2.3499999999999999e-48Initial program 99.8%
Simplified59.3%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
Taylor expanded in x around 0 45.4%
associate-*r*85.9%
Simplified85.9%
if 4.3e52 < t Initial program 80.6%
Simplified91.9%
Taylor expanded in t around inf 84.2%
Final simplification86.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z))))
(t_2 (* j (* k -27.0)))
(t_3 (* 4.0 (* x i)))
(t_4 (- (* b c) (+ t_3 (* 27.0 (* j k))))))
(if (<= t -5.6e+63)
(- (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) t_3)
(if (<= t -4.2e-7)
t_4
(if (<= t -7.5e-19)
(* t (- t_1 (* a 4.0)))
(if (<= t -4.5e-48)
(+ t_2 (* 18.0 (* t (* z (* x y)))))
(if (<= t 2.7e+52) t_4 (+ t_2 (* t (+ (* a -4.0) 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 = 18.0 * (x * (y * z));
double t_2 = j * (k * -27.0);
double t_3 = 4.0 * (x * i);
double t_4 = (b * c) - (t_3 + (27.0 * (j * k)));
double tmp;
if (t <= -5.6e+63) {
tmp = (t * (((x * 18.0) * (y * z)) - (a * 4.0))) - t_3;
} else if (t <= -4.2e-7) {
tmp = t_4;
} else if (t <= -7.5e-19) {
tmp = t * (t_1 - (a * 4.0));
} else if (t <= -4.5e-48) {
tmp = t_2 + (18.0 * (t * (z * (x * y))));
} else if (t <= 2.7e+52) {
tmp = t_4;
} else {
tmp = t_2 + (t * ((a * -4.0) + t_1));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 18.0d0 * (x * (y * z))
t_2 = j * (k * (-27.0d0))
t_3 = 4.0d0 * (x * i)
t_4 = (b * c) - (t_3 + (27.0d0 * (j * k)))
if (t <= (-5.6d+63)) then
tmp = (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) - t_3
else if (t <= (-4.2d-7)) then
tmp = t_4
else if (t <= (-7.5d-19)) then
tmp = t * (t_1 - (a * 4.0d0))
else if (t <= (-4.5d-48)) then
tmp = t_2 + (18.0d0 * (t * (z * (x * y))))
else if (t <= 2.7d+52) then
tmp = t_4
else
tmp = t_2 + (t * ((a * (-4.0d0)) + t_1))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 t_2 = j * (k * -27.0);
double t_3 = 4.0 * (x * i);
double t_4 = (b * c) - (t_3 + (27.0 * (j * k)));
double tmp;
if (t <= -5.6e+63) {
tmp = (t * (((x * 18.0) * (y * z)) - (a * 4.0))) - t_3;
} else if (t <= -4.2e-7) {
tmp = t_4;
} else if (t <= -7.5e-19) {
tmp = t * (t_1 - (a * 4.0));
} else if (t <= -4.5e-48) {
tmp = t_2 + (18.0 * (t * (z * (x * y))));
} else if (t <= 2.7e+52) {
tmp = t_4;
} else {
tmp = t_2 + (t * ((a * -4.0) + t_1));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = j * (k * -27.0) t_3 = 4.0 * (x * i) t_4 = (b * c) - (t_3 + (27.0 * (j * k))) tmp = 0 if t <= -5.6e+63: tmp = (t * (((x * 18.0) * (y * z)) - (a * 4.0))) - t_3 elif t <= -4.2e-7: tmp = t_4 elif t <= -7.5e-19: tmp = t * (t_1 - (a * 4.0)) elif t <= -4.5e-48: tmp = t_2 + (18.0 * (t * (z * (x * y)))) elif t <= 2.7e+52: tmp = t_4 else: tmp = t_2 + (t * ((a * -4.0) + t_1)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(4.0 * Float64(x * i)) t_4 = Float64(Float64(b * c) - Float64(t_3 + Float64(27.0 * Float64(j * k)))) tmp = 0.0 if (t <= -5.6e+63) tmp = Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) - t_3); elseif (t <= -4.2e-7) tmp = t_4; elseif (t <= -7.5e-19) tmp = Float64(t * Float64(t_1 - Float64(a * 4.0))); elseif (t <= -4.5e-48) tmp = Float64(t_2 + Float64(18.0 * Float64(t * Float64(z * Float64(x * y))))); elseif (t <= 2.7e+52) tmp = t_4; else tmp = Float64(t_2 + Float64(t * Float64(Float64(a * -4.0) + t_1))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = j * (k * -27.0);
t_3 = 4.0 * (x * i);
t_4 = (b * c) - (t_3 + (27.0 * (j * k)));
tmp = 0.0;
if (t <= -5.6e+63)
tmp = (t * (((x * 18.0) * (y * z)) - (a * 4.0))) - t_3;
elseif (t <= -4.2e-7)
tmp = t_4;
elseif (t <= -7.5e-19)
tmp = t * (t_1 - (a * 4.0));
elseif (t <= -4.5e-48)
tmp = t_2 + (18.0 * (t * (z * (x * y))));
elseif (t <= 2.7e+52)
tmp = t_4;
else
tmp = t_2 + (t * ((a * -4.0) + t_1));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] - N[(t$95$3 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+63], N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, -4.2e-7], t$95$4, If[LessEqual[t, -7.5e-19], N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-48], N[(t$95$2 + N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+52], t$95$4, N[(t$95$2 + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $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)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := 4 \cdot \left(x \cdot i\right)\\
t_4 := b \cdot c - \left(t\_3 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+63}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) - t\_3\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-7}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-19}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-48}:\\
\;\;\;\;t\_2 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+52}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2 + t \cdot \left(a \cdot -4 + t\_1\right)\\
\end{array}
\end{array}
if t < -5.59999999999999974e63Initial program 79.9%
Simplified82.2%
Taylor expanded in j around 0 78.3%
Taylor expanded in b around 0 81.7%
pow181.7%
Applied egg-rr81.7%
unpow181.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -5.59999999999999974e63 < t < -4.2e-7 or -4.49999999999999988e-48 < t < 2.7e52Initial program 90.7%
Simplified90.6%
Taylor expanded in t around 0 90.0%
if -4.2e-7 < t < -7.49999999999999957e-19Initial program 100.0%
Simplified100.0%
Taylor expanded in j around 0 100.0%
Taylor expanded in b around 0 77.4%
Taylor expanded in t around inf 77.4%
if -7.49999999999999957e-19 < t < -4.49999999999999988e-48Initial program 99.8%
Simplified59.3%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
Taylor expanded in x around 0 45.4%
associate-*r*85.9%
Simplified85.9%
if 2.7e52 < t Initial program 80.6%
Simplified91.9%
Taylor expanded in t around inf 84.2%
Final simplification86.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* -4.0 (* x i)))))
(if (<= t -4.6e+49)
t_1
(if (<= t -4.7e-7)
t_3
(if (<= t -1.85e-42)
t_1
(if (<= t -1.3e-48)
(+ t_2 (* 18.0 (* t (* z (* x y)))))
(if (<= t -3.2e-110)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 5.8e+76) t_3 t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -4.6e+49) {
tmp = t_1;
} else if (t <= -4.7e-7) {
tmp = t_3;
} else if (t <= -1.85e-42) {
tmp = t_1;
} else if (t <= -1.3e-48) {
tmp = t_2 + (18.0 * (t * (z * (x * y))));
} else if (t <= -3.2e-110) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 5.8e+76) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + ((-4.0d0) * (x * i))
if (t <= (-4.6d+49)) then
tmp = t_1
else if (t <= (-4.7d-7)) then
tmp = t_3
else if (t <= (-1.85d-42)) then
tmp = t_1
else if (t <= (-1.3d-48)) then
tmp = t_2 + (18.0d0 * (t * (z * (x * y))))
else if (t <= (-3.2d-110)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 5.8d+76) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -4.6e+49) {
tmp = t_1;
} else if (t <= -4.7e-7) {
tmp = t_3;
} else if (t <= -1.85e-42) {
tmp = t_1;
} else if (t <= -1.3e-48) {
tmp = t_2 + (18.0 * (t * (z * (x * y))));
} else if (t <= -3.2e-110) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 5.8e+76) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (-4.0 * (x * i)) tmp = 0 if t <= -4.6e+49: tmp = t_1 elif t <= -4.7e-7: tmp = t_3 elif t <= -1.85e-42: tmp = t_1 elif t <= -1.3e-48: tmp = t_2 + (18.0 * (t * (z * (x * y)))) elif t <= -3.2e-110: tmp = (b * c) - (x * (4.0 * i)) elif t <= 5.8e+76: tmp = t_3 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (t <= -4.6e+49) tmp = t_1; elseif (t <= -4.7e-7) tmp = t_3; elseif (t <= -1.85e-42) tmp = t_1; elseif (t <= -1.3e-48) tmp = Float64(t_2 + Float64(18.0 * Float64(t * Float64(z * Float64(x * y))))); elseif (t <= -3.2e-110) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 5.8e+76) tmp = t_3; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (-4.0 * (x * i));
tmp = 0.0;
if (t <= -4.6e+49)
tmp = t_1;
elseif (t <= -4.7e-7)
tmp = t_3;
elseif (t <= -1.85e-42)
tmp = t_1;
elseif (t <= -1.3e-48)
tmp = t_2 + (18.0 * (t * (z * (x * y))));
elseif (t <= -3.2e-110)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 5.8e+76)
tmp = t_3;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+49], t$95$1, If[LessEqual[t, -4.7e-7], t$95$3, If[LessEqual[t, -1.85e-42], t$95$1, If[LessEqual[t, -1.3e-48], N[(t$95$2 + N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-110], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+76], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-7}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-48}:\\
\;\;\;\;t\_2 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-110}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+76}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.60000000000000004e49 or -4.7e-7 < t < -1.8500000000000001e-42 or 5.8000000000000003e76 < t Initial program 80.8%
Simplified87.3%
Taylor expanded in j around 0 85.9%
Taylor expanded in b around 0 81.2%
Taylor expanded in t around inf 77.7%
if -4.60000000000000004e49 < t < -4.7e-7 or -3.20000000000000028e-110 < t < 5.8000000000000003e76Initial program 90.5%
Simplified91.2%
Taylor expanded in i around inf 74.1%
*-commutative74.1%
Simplified74.1%
if -1.8500000000000001e-42 < t < -1.29999999999999994e-48Initial program 100.0%
Simplified52.3%
Taylor expanded in y around inf 52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in x around 0 52.3%
associate-*r*100.0%
Simplified100.0%
if -1.29999999999999994e-48 < t < -3.20000000000000028e-110Initial program 100.0%
Simplified100.0%
Taylor expanded in t around 0 72.7%
Taylor expanded in i around inf 72.7%
*-commutative72.7%
associate-*r*72.7%
*-commutative72.7%
associate-*l*72.7%
Simplified72.7%
Final simplification76.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 (* -4.0 (+ (* x i) (* t a))))
(t_2 (* -4.0 (* t a)))
(t_3 (* j (* k -27.0))))
(if (<= k -1.12e-19)
t_3
(if (<= k 1.05e-304)
(+ (* b c) t_2)
(if (<= k 4.5e-224)
t_1
(if (<= k 9.5e-155)
(* t (* x (* 18.0 (* y z))))
(if (<= k 8.2e+106) t_1 (+ t_3 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 = -4.0 * ((x * i) + (t * a));
double t_2 = -4.0 * (t * a);
double t_3 = j * (k * -27.0);
double tmp;
if (k <= -1.12e-19) {
tmp = t_3;
} else if (k <= 1.05e-304) {
tmp = (b * c) + t_2;
} else if (k <= 4.5e-224) {
tmp = t_1;
} else if (k <= 9.5e-155) {
tmp = t * (x * (18.0 * (y * z)));
} else if (k <= 8.2e+106) {
tmp = t_1;
} else {
tmp = t_3 + 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) :: t_3
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
t_2 = (-4.0d0) * (t * a)
t_3 = j * (k * (-27.0d0))
if (k <= (-1.12d-19)) then
tmp = t_3
else if (k <= 1.05d-304) then
tmp = (b * c) + t_2
else if (k <= 4.5d-224) then
tmp = t_1
else if (k <= 9.5d-155) then
tmp = t * (x * (18.0d0 * (y * z)))
else if (k <= 8.2d+106) then
tmp = t_1
else
tmp = t_3 + 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 = -4.0 * ((x * i) + (t * a));
double t_2 = -4.0 * (t * a);
double t_3 = j * (k * -27.0);
double tmp;
if (k <= -1.12e-19) {
tmp = t_3;
} else if (k <= 1.05e-304) {
tmp = (b * c) + t_2;
} else if (k <= 4.5e-224) {
tmp = t_1;
} else if (k <= 9.5e-155) {
tmp = t * (x * (18.0 * (y * z)));
} else if (k <= 8.2e+106) {
tmp = t_1;
} else {
tmp = t_3 + 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 = -4.0 * ((x * i) + (t * a)) t_2 = -4.0 * (t * a) t_3 = j * (k * -27.0) tmp = 0 if k <= -1.12e-19: tmp = t_3 elif k <= 1.05e-304: tmp = (b * c) + t_2 elif k <= 4.5e-224: tmp = t_1 elif k <= 9.5e-155: tmp = t * (x * (18.0 * (y * z))) elif k <= 8.2e+106: tmp = t_1 else: tmp = t_3 + 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(-4.0 * Float64(Float64(x * i) + Float64(t * a))) t_2 = Float64(-4.0 * Float64(t * a)) t_3 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (k <= -1.12e-19) tmp = t_3; elseif (k <= 1.05e-304) tmp = Float64(Float64(b * c) + t_2); elseif (k <= 4.5e-224) tmp = t_1; elseif (k <= 9.5e-155) tmp = Float64(t * Float64(x * Float64(18.0 * Float64(y * z)))); elseif (k <= 8.2e+106) tmp = t_1; else tmp = Float64(t_3 + 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 = -4.0 * ((x * i) + (t * a));
t_2 = -4.0 * (t * a);
t_3 = j * (k * -27.0);
tmp = 0.0;
if (k <= -1.12e-19)
tmp = t_3;
elseif (k <= 1.05e-304)
tmp = (b * c) + t_2;
elseif (k <= 4.5e-224)
tmp = t_1;
elseif (k <= 9.5e-155)
tmp = t * (x * (18.0 * (y * z)));
elseif (k <= 8.2e+106)
tmp = t_1;
else
tmp = t_3 + 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[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.12e-19], t$95$3, If[LessEqual[k, 1.05e-304], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[k, 4.5e-224], t$95$1, If[LessEqual[k, 9.5e-155], N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.2e+106], t$95$1, N[(t$95$3 + t$95$2), $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 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
t_3 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;k \leq -1.12 \cdot 10^{-19}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;k \leq 1.05 \cdot 10^{-304}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \left(x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;k \leq 8.2 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3 + t\_2\\
\end{array}
\end{array}
if k < -1.1200000000000001e-19Initial program 81.2%
Simplified82.6%
Taylor expanded in j around inf 42.8%
*-commutative42.8%
associate-*r*42.8%
*-commutative42.8%
Simplified42.8%
if -1.1200000000000001e-19 < k < 1.05000000000000004e-304Initial program 90.1%
Simplified94.1%
Taylor expanded in j around 0 88.4%
Taylor expanded in x around 0 45.1%
if 1.05000000000000004e-304 < k < 4.5000000000000004e-224 or 9.50000000000000024e-155 < k < 8.2000000000000005e106Initial program 87.7%
Simplified90.4%
Taylor expanded in j around 0 74.5%
Taylor expanded in b around 0 64.8%
Taylor expanded in y around 0 53.4%
cancel-sign-sub-inv53.4%
metadata-eval53.4%
*-commutative53.4%
distribute-lft-out53.4%
*-commutative53.4%
*-commutative53.4%
Simplified53.4%
if 4.5000000000000004e-224 < k < 9.50000000000000024e-155Initial program 94.4%
Simplified94.7%
Taylor expanded in j around 0 94.7%
Taylor expanded in b around 0 78.4%
Taylor expanded in y around inf 45.5%
*-commutative45.5%
associate-*l*45.5%
associate-*l*45.5%
Simplified45.5%
if 8.2000000000000005e106 < k Initial program 88.4%
Simplified88.5%
Taylor expanded in a around inf 61.9%
Final simplification49.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.5e-19)
(+ (* x (* (* y t) (* 18.0 z))) (* j (* k -27.0)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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.5e-19) {
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * 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 (k <= (-1.5d-19)) then
tmp = (x * ((y * t) * (18.0d0 * z))) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * 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 (k <= -1.5e-19) {
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * 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 k <= -1.5e-19: tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * 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 (k <= -1.5e-19) tmp = Float64(Float64(x * Float64(Float64(y * t) * Float64(18.0 * z))) + Float64(j * Float64(k * -27.0))); else 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)))); 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.5e-19)
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * 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[LessEqual[k, -1.5e-19], N[(N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.5 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if k < -1.49999999999999996e-19Initial program 81.2%
Simplified82.6%
Taylor expanded in y around inf 52.3%
*-commutative52.3%
associate-*r*53.6%
associate-*l*53.6%
*-commutative53.6%
*-commutative53.6%
associate-*r*54.9%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
if -1.49999999999999996e-19 < k Initial program 89.2%
Simplified91.5%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* -4.0 (* x i))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -2.7e+49)
t_2
(if (<= t -3.7e-7)
t_1
(if (<= t -7e-75)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t 2.4e+77) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.7e+49) {
tmp = t_2;
} else if (t <= -3.7e-7) {
tmp = t_1;
} else if (t <= -7e-75) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.4e+77) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-2.7d+49)) then
tmp = t_2
else if (t <= (-3.7d-7)) then
tmp = t_1
else if (t <= (-7d-75)) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t <= 2.4d+77) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.7e+49) {
tmp = t_2;
} else if (t <= -3.7e-7) {
tmp = t_1;
} else if (t <= -7e-75) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.4e+77) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (-4.0 * (x * i)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -2.7e+49: tmp = t_2 elif t <= -3.7e-7: tmp = t_1 elif t <= -7e-75: tmp = (b * c) + (-4.0 * (t * a)) elif t <= 2.4e+77: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.7e+49) tmp = t_2; elseif (t <= -3.7e-7) tmp = t_1; elseif (t <= -7e-75) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t <= 2.4e+77) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.7e+49)
tmp = t_2;
elseif (t <= -3.7e-7)
tmp = t_1;
elseif (t <= -7e-75)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t <= 2.4e+77)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+49], t$95$2, If[LessEqual[t, -3.7e-7], t$95$1, If[LessEqual[t, -7e-75], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+77], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\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 -2.7 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-75}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.7000000000000001e49 or 2.3999999999999999e77 < t Initial program 79.5%
Simplified87.3%
Taylor expanded in j around 0 85.9%
Taylor expanded in b around 0 82.7%
Taylor expanded in t around inf 78.9%
if -2.7000000000000001e49 < t < -3.70000000000000004e-7 or -6.9999999999999997e-75 < t < 2.3999999999999999e77Initial program 90.6%
Simplified91.3%
Taylor expanded in i around inf 73.8%
*-commutative73.8%
Simplified73.8%
if -3.70000000000000004e-7 < t < -6.9999999999999997e-75Initial program 99.9%
Simplified82.2%
Taylor expanded in j around 0 69.9%
Taylor expanded in x around 0 51.1%
Final simplification74.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 (* 18.0 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
(if (<= t -9.8e+125)
(+ (* j (* k -27.0)) (* t (+ (* a -4.0) t_1)))
(if (<= t 1.9e+111)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_2 (* 27.0 (* j k))))
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) 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 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -9.8e+125) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
} else if (t <= 1.9e+111) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
if (t <= (-9.8d+125)) then
tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + t_1))
else if (t <= 1.9d+111) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_2 + (27.0d0 * (j * k)))
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - 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 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -9.8e+125) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
} else if (t <= 1.9e+111) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) tmp = 0 if t <= -9.8e+125: tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1)) elif t <= 1.9e+111: tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k))) else: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -9.8e+125) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + t_1))); elseif (t <= 1.9e+111) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_2 + Float64(27.0 * Float64(j * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - 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 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -9.8e+125)
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
elseif (t <= 1.9e+111)
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.8e+125], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+111], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $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)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -9.8 \cdot 10^{+125}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_2 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - t\_2\\
\end{array}
\end{array}
if t < -9.80000000000000032e125Initial program 74.9%
Simplified80.5%
Taylor expanded in t around inf 84.9%
if -9.80000000000000032e125 < t < 1.89999999999999988e111Initial program 92.5%
Simplified90.8%
Taylor expanded in y around 0 91.1%
if 1.89999999999999988e111 < t Initial program 75.4%
Simplified89.8%
Taylor expanded in j around 0 92.1%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -1.15e+126)
(+ (* j (* k -27.0)) (* t (+ (* a -4.0) t_1)))
(if (<= t 6e+187)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* t (- t_1 (* a 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.15e+126) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
} else if (t <= 6e+187) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (t_1 - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.15d+126)) then
tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + t_1))
else if (t <= 6d+187) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t * (t_1 - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.15e+126) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
} else if (t <= 6e+187) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (t_1 - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.15e+126: tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1)) elif t <= 6e+187: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t * (t_1 - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.15e+126) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + t_1))); elseif (t <= 6e+187) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(t * Float64(t_1 - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.15e+126)
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
elseif (t <= 6e+187)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t * (t_1 - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+126], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+187], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+126}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+187}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.15e126Initial program 74.9%
Simplified80.5%
Taylor expanded in t around inf 84.9%
if -1.15e126 < t < 5.9999999999999998e187Initial program 90.8%
Simplified90.3%
Taylor expanded in y around 0 89.4%
if 5.9999999999999998e187 < t Initial program 78.3%
Simplified91.8%
Taylor expanded in j around 0 97.3%
Taylor expanded in b around 0 97.3%
Taylor expanded in t around inf 97.3%
Final simplification89.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -6e+146)
(and (not (<= x 2.25e-142)) (or (<= x 8.8e-38) (not (<= x 2.8e+60)))))
(* -4.0 (+ (* x i) (* t a)))
(+ (* b c) (* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -6e+146) || (!(x <= 2.25e-142) && ((x <= 8.8e-38) || !(x <= 2.8e+60)))) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-6d+146)) .or. (.not. (x <= 2.25d-142)) .and. (x <= 8.8d-38) .or. (.not. (x <= 2.8d+60))) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -6e+146) || (!(x <= 2.25e-142) && ((x <= 8.8e-38) || !(x <= 2.8e+60)))) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -6e+146) or (not (x <= 2.25e-142) and ((x <= 8.8e-38) or not (x <= 2.8e+60))): tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -6e+146) || (!(x <= 2.25e-142) && ((x <= 8.8e-38) || !(x <= 2.8e+60)))) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -6e+146) || (~((x <= 2.25e-142)) && ((x <= 8.8e-38) || ~((x <= 2.8e+60)))))
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -6e+146], And[N[Not[LessEqual[x, 2.25e-142]], $MachinePrecision], Or[LessEqual[x, 8.8e-38], N[Not[LessEqual[x, 2.8e+60]], $MachinePrecision]]]], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{+146} \lor \neg \left(x \leq 2.25 \cdot 10^{-142}\right) \land \left(x \leq 8.8 \cdot 10^{-38} \lor \neg \left(x \leq 2.8 \cdot 10^{+60}\right)\right):\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < -6.00000000000000005e146 or 2.25000000000000009e-142 < x < 8.80000000000000029e-38 or 2.8e60 < x Initial program 80.0%
Simplified85.4%
Taylor expanded in j around 0 83.1%
Taylor expanded in b around 0 83.3%
Taylor expanded in y around 0 61.8%
cancel-sign-sub-inv61.8%
metadata-eval61.8%
*-commutative61.8%
distribute-lft-out61.8%
*-commutative61.8%
*-commutative61.8%
Simplified61.8%
if -6.00000000000000005e146 < x < 2.25000000000000009e-142 or 8.80000000000000029e-38 < x < 2.8e60Initial program 91.7%
Simplified91.2%
Taylor expanded in b around inf 58.0%
Final simplification59.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 (* x (* i -4.0))))
(if (<= x -2.6e+151)
t_1
(if (<= x 1.15e-237)
(* k (* j -27.0))
(if (<= x 5.6e-34) (* -4.0 (* t a)) (if (<= x 2.1e+63) (* 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 = x * (i * -4.0);
double tmp;
if (x <= -2.6e+151) {
tmp = t_1;
} else if (x <= 1.15e-237) {
tmp = k * (j * -27.0);
} else if (x <= 5.6e-34) {
tmp = -4.0 * (t * a);
} else if (x <= 2.1e+63) {
tmp = b * c;
} 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 * (i * (-4.0d0))
if (x <= (-2.6d+151)) then
tmp = t_1
else if (x <= 1.15d-237) then
tmp = k * (j * (-27.0d0))
else if (x <= 5.6d-34) then
tmp = (-4.0d0) * (t * a)
else if (x <= 2.1d+63) then
tmp = b * c
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 * (i * -4.0);
double tmp;
if (x <= -2.6e+151) {
tmp = t_1;
} else if (x <= 1.15e-237) {
tmp = k * (j * -27.0);
} else if (x <= 5.6e-34) {
tmp = -4.0 * (t * a);
} else if (x <= 2.1e+63) {
tmp = b * c;
} 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 * (i * -4.0) tmp = 0 if x <= -2.6e+151: tmp = t_1 elif x <= 1.15e-237: tmp = k * (j * -27.0) elif x <= 5.6e-34: tmp = -4.0 * (t * a) elif x <= 2.1e+63: tmp = b * c 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(i * -4.0)) tmp = 0.0 if (x <= -2.6e+151) tmp = t_1; elseif (x <= 1.15e-237) tmp = Float64(k * Float64(j * -27.0)); elseif (x <= 5.6e-34) tmp = Float64(-4.0 * Float64(t * a)); elseif (x <= 2.1e+63) tmp = Float64(b * c); 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 * (i * -4.0);
tmp = 0.0;
if (x <= -2.6e+151)
tmp = t_1;
elseif (x <= 1.15e-237)
tmp = k * (j * -27.0);
elseif (x <= 5.6e-34)
tmp = -4.0 * (t * a);
elseif (x <= 2.1e+63)
tmp = b * c;
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[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+151], t$95$1, If[LessEqual[x, 1.15e-237], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e-34], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+63], N[(b * c), $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(i \cdot -4\right)\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-237}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-34}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+63}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.60000000000000013e151 or 2.1000000000000002e63 < x Initial program 78.1%
Simplified85.3%
associate-*r*80.2%
distribute-rgt-out--78.1%
associate-+l-78.1%
associate-*r*82.2%
*-commutative82.2%
*-commutative82.2%
associate-*l*82.2%
fma-neg82.2%
Applied egg-rr82.2%
Taylor expanded in i around inf 51.8%
*-commutative51.8%
associate-*l*51.8%
*-commutative51.8%
associate-*l*51.8%
Simplified51.8%
if -2.60000000000000013e151 < x < 1.15000000000000006e-237Initial program 90.5%
Simplified90.6%
associate-*r*93.9%
distribute-rgt-out--90.5%
associate-+l-90.5%
associate-*r*88.0%
*-commutative88.0%
*-commutative88.0%
associate-*l*88.0%
fma-neg88.0%
Applied egg-rr88.0%
Taylor expanded in j around inf 39.2%
*-commutative39.2%
*-commutative39.2%
associate-*l*39.3%
Simplified39.3%
if 1.15000000000000006e-237 < x < 5.59999999999999994e-34Initial program 96.8%
Simplified88.0%
Taylor expanded in j around 0 67.0%
Taylor expanded in b around 0 57.9%
Taylor expanded in x around 0 41.2%
*-commutative41.2%
Simplified41.2%
if 5.59999999999999994e-34 < x < 2.1000000000000002e63Initial program 91.7%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--91.7%
associate-+l-91.7%
associate-*r*91.7%
*-commutative91.7%
*-commutative91.7%
associate-*l*91.7%
fma-neg100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 100.0%
fma-define100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 42.7%
Final simplification44.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.3e+68) (not (<= t 8.5e+76))) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))) (- (* b c) (+ (* 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 ((t <= -1.3e+68) || !(t <= 8.5e+76)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= (-1.3d+68)) .or. (.not. (t <= 8.5d+76))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + (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 ((t <= -1.3e+68) || !(t <= 8.5e+76)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 (t <= -1.3e+68) or not (t <= 8.5e+76): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= -1.3e+68) || !(t <= 8.5e+76)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 ((t <= -1.3e+68) || ~((t <= 8.5e+76)))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = (b * c) - ((4.0 * (x * i)) + (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[t, -1.3e+68], N[Not[LessEqual[t, 8.5e+76]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+68} \lor \neg \left(t \leq 8.5 \cdot 10^{+76}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.2999999999999999e68 or 8.49999999999999992e76 < t Initial program 78.9%
Simplified87.0%
Taylor expanded in j around 0 85.4%
Taylor expanded in b around 0 84.1%
Taylor expanded in t around inf 80.2%
if -1.2999999999999999e68 < t < 8.49999999999999992e76Initial program 91.7%
Simplified89.9%
Taylor expanded in t around 0 85.0%
Final simplification83.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -9.5e+249) (not (<= (* b c) 1.95e+258))) (* b c) (* -4.0 (+ (* x i) (* 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 tmp;
if (((b * c) <= -9.5e+249) || !((b * c) <= 1.95e+258)) {
tmp = b * c;
} else {
tmp = -4.0 * ((x * i) + (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) :: tmp
if (((b * c) <= (-9.5d+249)) .or. (.not. ((b * c) <= 1.95d+258))) then
tmp = b * c
else
tmp = (-4.0d0) * ((x * i) + (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 tmp;
if (((b * c) <= -9.5e+249) || !((b * c) <= 1.95e+258)) {
tmp = b * c;
} else {
tmp = -4.0 * ((x * i) + (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): tmp = 0 if ((b * c) <= -9.5e+249) or not ((b * c) <= 1.95e+258): tmp = b * c else: tmp = -4.0 * ((x * i) + (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) tmp = 0.0 if ((Float64(b * c) <= -9.5e+249) || !(Float64(b * c) <= 1.95e+258)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(x * i) + 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)
tmp = 0.0;
if (((b * c) <= -9.5e+249) || ~(((b * c) <= 1.95e+258)))
tmp = b * c;
else
tmp = -4.0 * ((x * i) + (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_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -9.5e+249], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.95e+258]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + 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}
\mathbf{if}\;b \cdot c \leq -9.5 \cdot 10^{+249} \lor \neg \left(b \cdot c \leq 1.95 \cdot 10^{+258}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.49999999999999925e249 or 1.95000000000000019e258 < (*.f64 b c) Initial program 80.0%
Simplified85.7%
associate-*r*85.7%
distribute-rgt-out--80.0%
associate-+l-80.0%
associate-*r*80.0%
*-commutative80.0%
*-commutative80.0%
associate-*l*80.0%
fma-neg82.9%
Applied egg-rr82.9%
Taylor expanded in t around 0 85.7%
fma-define94.3%
cancel-sign-sub-inv94.3%
metadata-eval94.3%
*-commutative94.3%
Simplified94.3%
Taylor expanded in b around inf 72.0%
if -9.49999999999999925e249 < (*.f64 b c) < 1.95000000000000019e258Initial program 87.8%
Simplified89.2%
Taylor expanded in j around 0 71.4%
Taylor expanded in b around 0 64.5%
Taylor expanded in y around 0 50.3%
cancel-sign-sub-inv50.3%
metadata-eval50.3%
*-commutative50.3%
distribute-lft-out50.3%
*-commutative50.3%
*-commutative50.3%
Simplified50.3%
Final simplification53.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4.5e+249)
(* b c)
(if (<= (* b c) 4e-26)
(* -4.0 (+ (* x i) (* t a)))
(+ (* b c) (* -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 tmp;
if ((b * c) <= -4.5e+249) {
tmp = b * c;
} else if ((b * c) <= 4e-26) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) + (-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) :: tmp
if ((b * c) <= (-4.5d+249)) then
tmp = b * c
else if ((b * c) <= 4d-26) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) + ((-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 tmp;
if ((b * c) <= -4.5e+249) {
tmp = b * c;
} else if ((b * c) <= 4e-26) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) + (-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): tmp = 0 if (b * c) <= -4.5e+249: tmp = b * c elif (b * c) <= 4e-26: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) + (-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) tmp = 0.0 if (Float64(b * c) <= -4.5e+249) tmp = Float64(b * c); elseif (Float64(b * c) <= 4e-26) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) + 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)
tmp = 0.0;
if ((b * c) <= -4.5e+249)
tmp = b * c;
elseif ((b * c) <= 4e-26)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) + (-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_] := If[LessEqual[N[(b * c), $MachinePrecision], -4.5e+249], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e-26], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + 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}
\mathbf{if}\;b \cdot c \leq -4.5 \cdot 10^{+249}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-26}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.4999999999999996e249Initial program 77.8%
Simplified88.9%
associate-*r*88.9%
distribute-rgt-out--77.8%
associate-+l-77.8%
associate-*r*77.8%
*-commutative77.8%
*-commutative77.8%
associate-*l*77.8%
fma-neg83.3%
Applied egg-rr83.3%
Taylor expanded in t around 0 88.9%
fma-define94.4%
cancel-sign-sub-inv94.4%
metadata-eval94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in b around inf 72.7%
if -4.4999999999999996e249 < (*.f64 b c) < 4.0000000000000002e-26Initial program 86.5%
Simplified87.8%
Taylor expanded in j around 0 69.3%
Taylor expanded in b around 0 66.2%
Taylor expanded in y around 0 52.1%
cancel-sign-sub-inv52.1%
metadata-eval52.1%
*-commutative52.1%
distribute-lft-out52.1%
*-commutative52.1%
*-commutative52.1%
Simplified52.1%
if 4.0000000000000002e-26 < (*.f64 b c) Initial program 89.6%
Simplified91.0%
Taylor expanded in j around 0 78.4%
Taylor expanded in x around 0 54.6%
Final simplification54.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.2e+234) (not (<= (* b c) 1.35e+60))) (* 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) <= -4.2e+234) || !((b * c) <= 1.35e+60)) {
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) <= (-4.2d+234)) .or. (.not. ((b * c) <= 1.35d+60))) 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) <= -4.2e+234) || !((b * c) <= 1.35e+60)) {
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) <= -4.2e+234) or not ((b * c) <= 1.35e+60): 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) <= -4.2e+234) || !(Float64(b * c) <= 1.35e+60)) 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) <= -4.2e+234) || ~(((b * c) <= 1.35e+60)))
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], -4.2e+234], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.35e+60]], $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 -4.2 \cdot 10^{+234} \lor \neg \left(b \cdot c \leq 1.35 \cdot 10^{+60}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.2e234 or 1.35e60 < (*.f64 b c) Initial program 84.9%
Simplified90.9%
associate-*r*89.5%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*r*86.4%
*-commutative86.4%
*-commutative86.4%
associate-*l*86.4%
fma-neg87.9%
Applied egg-rr87.9%
Taylor expanded in t around 0 90.9%
fma-define95.5%
cancel-sign-sub-inv95.5%
metadata-eval95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in b around inf 52.6%
if -4.2e234 < (*.f64 b c) < 1.35e60Initial program 87.3%
Simplified88.0%
Taylor expanded in j around inf 29.2%
Final simplification35.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= b -6.8e+192)
(- (* b c) (* x (* 4.0 i)))
(if (<= b -1.15e+38)
(+ (* b c) (* j (* k -27.0)))
(* -4.0 (+ (* x i) (* 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 tmp;
if (b <= -6.8e+192) {
tmp = (b * c) - (x * (4.0 * i));
} else if (b <= -1.15e+38) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = -4.0 * ((x * i) + (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) :: tmp
if (b <= (-6.8d+192)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (b <= (-1.15d+38)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = (-4.0d0) * ((x * i) + (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 tmp;
if (b <= -6.8e+192) {
tmp = (b * c) - (x * (4.0 * i));
} else if (b <= -1.15e+38) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = -4.0 * ((x * i) + (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): tmp = 0 if b <= -6.8e+192: tmp = (b * c) - (x * (4.0 * i)) elif b <= -1.15e+38: tmp = (b * c) + (j * (k * -27.0)) else: tmp = -4.0 * ((x * i) + (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) tmp = 0.0 if (b <= -6.8e+192) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (b <= -1.15e+38) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(-4.0 * Float64(Float64(x * i) + 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)
tmp = 0.0;
if (b <= -6.8e+192)
tmp = (b * c) - (x * (4.0 * i));
elseif (b <= -1.15e+38)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = -4.0 * ((x * i) + (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_] := If[LessEqual[b, -6.8e+192], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.15e+38], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + 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}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{+38}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if b < -6.79999999999999992e192Initial program 86.7%
Simplified93.3%
Taylor expanded in t around 0 67.5%
Taylor expanded in i around inf 60.8%
*-commutative60.8%
associate-*r*60.8%
*-commutative60.8%
associate-*l*60.8%
Simplified60.8%
if -6.79999999999999992e192 < b < -1.1500000000000001e38Initial program 86.7%
Simplified91.1%
Taylor expanded in b around inf 61.0%
if -1.1500000000000001e38 < b Initial program 86.7%
Simplified88.4%
Taylor expanded in j around 0 71.8%
Taylor expanded in b around 0 63.4%
Taylor expanded in y around 0 51.9%
cancel-sign-sub-inv51.9%
metadata-eval51.9%
*-commutative51.9%
distribute-lft-out51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
Final simplification54.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= a -9.4e+82) (not (<= a 4.4e+41))) (* -4.0 (* t a)) (* -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 ((a <= -9.4e+82) || !(a <= 4.4e+41)) {
tmp = -4.0 * (t * a);
} 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 ((a <= (-9.4d+82)) .or. (.not. (a <= 4.4d+41))) then
tmp = (-4.0d0) * (t * a)
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 ((a <= -9.4e+82) || !(a <= 4.4e+41)) {
tmp = -4.0 * (t * a);
} 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 (a <= -9.4e+82) or not (a <= 4.4e+41): tmp = -4.0 * (t * a) 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 ((a <= -9.4e+82) || !(a <= 4.4e+41)) tmp = Float64(-4.0 * Float64(t * a)); 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 ((a <= -9.4e+82) || ~((a <= 4.4e+41)))
tmp = -4.0 * (t * a);
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[a, -9.4e+82], N[Not[LessEqual[a, 4.4e+41]], $MachinePrecision]], N[(-4.0 * N[(t * a), $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}\;a \leq -9.4 \cdot 10^{+82} \lor \neg \left(a \leq 4.4 \cdot 10^{+41}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if a < -9.4e82 or 4.3999999999999998e41 < a Initial program 79.9%
Simplified84.9%
Taylor expanded in j around 0 77.3%
Taylor expanded in b around 0 67.5%
Taylor expanded in x around 0 47.3%
*-commutative47.3%
Simplified47.3%
if -9.4e82 < a < 4.3999999999999998e41Initial program 91.0%
Simplified92.4%
Taylor expanded in j around inf 31.2%
Final simplification37.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 (* 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 86.7%
Simplified88.7%
associate-*r*89.9%
distribute-rgt-out--86.7%
associate-+l-86.7%
associate-*r*85.6%
*-commutative85.6%
*-commutative85.6%
associate-*l*85.6%
fma-neg86.0%
Applied egg-rr86.0%
Taylor expanded in t around 0 88.7%
fma-define89.9%
cancel-sign-sub-inv89.9%
metadata-eval89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in b around inf 17.5%
Final simplification17.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024041
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))