
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.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 * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.4%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified27.3%
Taylor expanded in z around inf 9.1%
Taylor expanded in a around 0 30.3%
associate-*r*45.5%
associate-*r*45.5%
associate-*r*45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in x around inf 70.0%
cancel-sign-sub-inv70.0%
associate-*r*70.0%
metadata-eval70.0%
*-commutative70.0%
Simplified70.0%
Final simplification91.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (or (<= t -1.5e-29) (not (<= t 5e-79)))
(- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_1)
(- (+ (* b c) (* z (* y (* x (* 18.0 t))))) 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 * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((t <= -1.5e-29) || !(t <= 5e-79)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - 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 * (4.0d0 * i)) + (j * (27.0d0 * k))
if ((t <= (-1.5d-29)) .or. (.not. (t <= 5d-79))) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + (z * (y * (x * (18.0d0 * t))))) - 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 * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((t <= -1.5e-29) || !(t <= 5e-79)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - 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 * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if (t <= -1.5e-29) or not (t <= 5e-79): tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if ((t <= -1.5e-29) || !(t <= 5e-79)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(z * Float64(y * Float64(x * Float64(18.0 * t))))) - 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 * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if ((t <= -1.5e-29) || ~((t <= 5e-79)))
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1.5e-29], N[Not[LessEqual[t, 5e-79]], $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] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(z * N[(y * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-29} \lor \neg \left(t \leq 5 \cdot 10^{-79}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -1.5000000000000001e-29 or 4.99999999999999999e-79 < t Initial program 82.7%
Simplified85.5%
if -1.5000000000000001e-29 < t < 4.99999999999999999e-79Initial program 81.5%
Simplified81.7%
Taylor expanded in z around inf 86.1%
Taylor expanded in a around 0 84.4%
associate-*r*92.3%
associate-*r*92.3%
associate-*r*92.3%
*-commutative92.3%
Simplified92.3%
Final simplification88.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= (* a 4.0) -2e+80)
(- (+ (* b c) (* a (* t -4.0))) t_1)
(if (<= (* a 4.0) 2e+122)
(- (+ (* b c) (* z (* y (* x (* 18.0 t))))) t_1)
(-
(+ (* b c) (* -4.0 (* t a)))
(+ (* 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 t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((a * 4.0) <= -2e+80) {
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
} else if ((a * 4.0) <= 2e+122) {
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if ((a * 4.0d0) <= (-2d+80)) then
tmp = ((b * c) + (a * (t * (-4.0d0)))) - t_1
else if ((a * 4.0d0) <= 2d+122) then
tmp = ((b * c) + (z * (y * (x * (18.0d0 * t))))) - t_1
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((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 t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((a * 4.0) <= -2e+80) {
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
} else if ((a * 4.0) <= 2e+122) {
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if (a * 4.0) <= -2e+80: tmp = ((b * c) + (a * (t * -4.0))) - t_1 elif (a * 4.0) <= 2e+122: tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1 else: tmp = ((b * c) + (-4.0 * (t * a))) - ((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) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (Float64(a * 4.0) <= -2e+80) tmp = Float64(Float64(Float64(b * c) + Float64(a * Float64(t * -4.0))) - t_1); elseif (Float64(a * 4.0) <= 2e+122) tmp = Float64(Float64(Float64(b * c) + Float64(z * Float64(y * Float64(x * Float64(18.0 * t))))) - t_1); else 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)))); 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 * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if ((a * 4.0) <= -2e+80)
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
elseif ((a * 4.0) <= 2e+122)
tmp = ((b * c) + (z * (y * (x * (18.0 * t))))) - t_1;
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((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_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 4.0), $MachinePrecision], -2e+80], N[(N[(N[(b * c), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(a * 4.0), $MachinePrecision], 2e+122], N[(N[(N[(b * c), $MachinePrecision] + N[(z * N[(y * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], 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]]]]
\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(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+80}:\\
\;\;\;\;\left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - t\_1\\
\mathbf{elif}\;a \cdot 4 \leq 2 \cdot 10^{+122}:\\
\;\;\;\;\left(b \cdot c + z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 4 binary64)) < -2e80Initial program 71.6%
Simplified79.3%
Taylor expanded in z around inf 64.3%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
*-commutative73.6%
associate-*r*73.6%
Simplified73.6%
if -2e80 < (*.f64 a #s(literal 4 binary64)) < 2.00000000000000003e122Initial program 85.0%
Simplified84.5%
Taylor expanded in z around inf 83.7%
Taylor expanded in a around 0 84.9%
associate-*r*86.0%
associate-*r*85.9%
associate-*r*85.9%
*-commutative85.9%
Simplified85.9%
if 2.00000000000000003e122 < (*.f64 a #s(literal 4 binary64)) Initial program 85.1%
Simplified87.2%
Taylor expanded in y around 0 87.3%
Final simplification83.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 (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= (* a 4.0) -2e+80)
(- (+ (* b c) (* a (* t -4.0))) t_1)
(if (<= (* a 4.0) 2e+122)
(- (+ (* b c) (* z (* 18.0 (* t (* x y))))) t_1)
(-
(+ (* b c) (* -4.0 (* t a)))
(+ (* 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 t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((a * 4.0) <= -2e+80) {
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
} else if ((a * 4.0) <= 2e+122) {
tmp = ((b * c) + (z * (18.0 * (t * (x * y))))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if ((a * 4.0d0) <= (-2d+80)) then
tmp = ((b * c) + (a * (t * (-4.0d0)))) - t_1
else if ((a * 4.0d0) <= 2d+122) then
tmp = ((b * c) + (z * (18.0d0 * (t * (x * y))))) - t_1
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((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 t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((a * 4.0) <= -2e+80) {
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
} else if ((a * 4.0) <= 2e+122) {
tmp = ((b * c) + (z * (18.0 * (t * (x * y))))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if (a * 4.0) <= -2e+80: tmp = ((b * c) + (a * (t * -4.0))) - t_1 elif (a * 4.0) <= 2e+122: tmp = ((b * c) + (z * (18.0 * (t * (x * y))))) - t_1 else: tmp = ((b * c) + (-4.0 * (t * a))) - ((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) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (Float64(a * 4.0) <= -2e+80) tmp = Float64(Float64(Float64(b * c) + Float64(a * Float64(t * -4.0))) - t_1); elseif (Float64(a * 4.0) <= 2e+122) tmp = Float64(Float64(Float64(b * c) + Float64(z * Float64(18.0 * Float64(t * Float64(x * y))))) - t_1); else 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)))); 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 * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if ((a * 4.0) <= -2e+80)
tmp = ((b * c) + (a * (t * -4.0))) - t_1;
elseif ((a * 4.0) <= 2e+122)
tmp = ((b * c) + (z * (18.0 * (t * (x * y))))) - t_1;
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((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_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 4.0), $MachinePrecision], -2e+80], N[(N[(N[(b * c), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(a * 4.0), $MachinePrecision], 2e+122], N[(N[(N[(b * c), $MachinePrecision] + N[(z * N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], 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]]]]
\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(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+80}:\\
\;\;\;\;\left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - t\_1\\
\mathbf{elif}\;a \cdot 4 \leq 2 \cdot 10^{+122}:\\
\;\;\;\;\left(b \cdot c + z \cdot \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 4 binary64)) < -2e80Initial program 71.6%
Simplified79.3%
Taylor expanded in z around inf 64.3%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
*-commutative73.6%
associate-*r*73.6%
Simplified73.6%
if -2e80 < (*.f64 a #s(literal 4 binary64)) < 2.00000000000000003e122Initial program 85.0%
Simplified84.5%
Taylor expanded in z around inf 83.7%
Taylor expanded in a around 0 84.9%
if 2.00000000000000003e122 < (*.f64 a #s(literal 4 binary64)) Initial program 85.1%
Simplified87.2%
Taylor expanded in y around 0 87.3%
Final simplification83.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))))
(if (<= (* b c) -2e+120)
(- (* b c) (+ t_1 (* 27.0 (* j k))))
(if (<= (* b c) 1e+50)
(+ (* x (+ (* i -4.0) (* 18.0 (* t (* y z))))) (* j (* k -27.0)))
(- (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((b * c) <= -2e+120) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if ((b * c) <= 1e+50) {
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if ((b * c) <= (-2d+120)) then
tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
else if ((b * c) <= 1d+50) then
tmp = (x * ((i * (-4.0d0)) + (18.0d0 * (t * (y * z))))) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((b * c) <= -2e+120) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if ((b * c) <= 1e+50) {
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if (b * c) <= -2e+120: tmp = (b * c) - (t_1 + (27.0 * (j * k))) elif (b * c) <= 1e+50: tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -2e+120) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); elseif (Float64(b * c) <= 1e+50) tmp = Float64(Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(t * Float64(y * z))))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -2e+120)
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
elseif ((b * c) <= 1e+50)
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+120], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+50], N[(N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+120}:\\
\;\;\;\;b \cdot c - \left(t\_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+50}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -2e120Initial program 86.1%
Simplified88.9%
Taylor expanded in t around 0 86.8%
if -2e120 < (*.f64 b c) < 1.0000000000000001e50Initial program 81.8%
Simplified86.1%
Taylor expanded in x around inf 69.6%
if 1.0000000000000001e50 < (*.f64 b c) Initial program 81.1%
Simplified77.5%
Taylor expanded in z around inf 83.0%
Taylor expanded in z around 0 79.4%
associate-*r*79.4%
*-commutative79.4%
associate-*r*79.4%
Simplified79.4%
Taylor expanded in j around 0 75.8%
Final simplification73.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* x i)))))
(if (<= i -2.06e+37)
t_2
(if (<= i -8.5e-234)
(+ (* a (* t -4.0)) t_1)
(if (<= i 8.6e-305)
(* x (* t (* z (* y (- -18.0)))))
(if (<= i 520000.0) (+ (* b c) 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);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if (i <= -2.06e+37) {
tmp = t_2;
} else if (i <= -8.5e-234) {
tmp = (a * (t * -4.0)) + t_1;
} else if (i <= 8.6e-305) {
tmp = x * (t * (z * (y * -(-18.0))));
} else if (i <= 520000.0) {
tmp = (b * c) + 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))
t_2 = t_1 + ((-4.0d0) * (x * i))
if (i <= (-2.06d+37)) then
tmp = t_2
else if (i <= (-8.5d-234)) then
tmp = (a * (t * (-4.0d0))) + t_1
else if (i <= 8.6d-305) then
tmp = x * (t * (z * (y * -(-18.0d0))))
else if (i <= 520000.0d0) then
tmp = (b * c) + 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);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if (i <= -2.06e+37) {
tmp = t_2;
} else if (i <= -8.5e-234) {
tmp = (a * (t * -4.0)) + t_1;
} else if (i <= 8.6e-305) {
tmp = x * (t * (z * (y * -(-18.0))));
} else if (i <= 520000.0) {
tmp = (b * c) + 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) t_2 = t_1 + (-4.0 * (x * i)) tmp = 0 if i <= -2.06e+37: tmp = t_2 elif i <= -8.5e-234: tmp = (a * (t * -4.0)) + t_1 elif i <= 8.6e-305: tmp = x * (t * (z * (y * -(-18.0)))) elif i <= 520000.0: tmp = (b * c) + 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(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (i <= -2.06e+37) tmp = t_2; elseif (i <= -8.5e-234) tmp = Float64(Float64(a * Float64(t * -4.0)) + t_1); elseif (i <= 8.6e-305) tmp = Float64(x * Float64(t * Float64(z * Float64(y * Float64(-(-18.0)))))); elseif (i <= 520000.0) tmp = Float64(Float64(b * c) + 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);
t_2 = t_1 + (-4.0 * (x * i));
tmp = 0.0;
if (i <= -2.06e+37)
tmp = t_2;
elseif (i <= -8.5e-234)
tmp = (a * (t * -4.0)) + t_1;
elseif (i <= 8.6e-305)
tmp = x * (t * (z * (y * -(-18.0))));
elseif (i <= 520000.0)
tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.06e+37], t$95$2, If[LessEqual[i, -8.5e-234], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[i, 8.6e-305], N[(x * N[(t * N[(z * N[(y * (--18.0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 520000.0], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], 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)\\
t_2 := t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -2.06 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq -8.5 \cdot 10^{-234}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + t\_1\\
\mathbf{elif}\;i \leq 8.6 \cdot 10^{-305}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(y \cdot \left(--18\right)\right)\right)\right)\\
\mathbf{elif}\;i \leq 520000:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -2.05999999999999988e37 or 5.2e5 < i Initial program 79.3%
Simplified84.2%
Taylor expanded in i around inf 59.7%
if -2.05999999999999988e37 < i < -8.5000000000000005e-234Initial program 87.8%
Simplified86.0%
Taylor expanded in a around inf 62.3%
metadata-eval62.3%
distribute-lft-neg-in62.3%
*-commutative62.3%
associate-*l*62.3%
distribute-lft-neg-in62.3%
distribute-lft-neg-in62.3%
metadata-eval62.3%
Simplified62.3%
if -8.5000000000000005e-234 < i < 8.6000000000000004e-305Initial program 86.6%
Simplified90.9%
Taylor expanded in z around inf 91.1%
Taylor expanded in x around -inf 67.5%
mul-1-neg67.5%
cancel-sign-sub-inv67.5%
associate-*r*63.1%
metadata-eval63.1%
Simplified63.1%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
*-commutative53.9%
associate-*l*67.3%
*-commutative67.3%
associate-*r*67.4%
associate-*r*67.4%
*-commutative67.4%
associate-*l*67.4%
Simplified67.4%
if 8.6000000000000004e-305 < i < 5.2e5Initial program 81.6%
Simplified84.3%
Taylor expanded in b around inf 52.1%
Final simplification58.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -3.6e+50) (not (<= x 3.3e+68))) (+ (* x (+ (* i -4.0) (* 18.0 (* t (* y z))))) (* j (* k -27.0))) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 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 ((x <= -3.6e+50) || !(x <= 3.3e+68)) {
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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 ((x <= (-3.6d+50)) .or. (.not. (x <= 3.3d+68))) then
tmp = (x * ((i * (-4.0d0)) + (18.0d0 * (t * (y * z))))) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((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 ((x <= -3.6e+50) || !(x <= 3.3e+68)) {
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((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 (x <= -3.6e+50) or not (x <= 3.3e+68): tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((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 ((x <= -3.6e+50) || !(x <= 3.3e+68)) tmp = Float64(Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(t * Float64(y * z))))) + Float64(j * Float64(k * -27.0))); else 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)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -3.6e+50) || ~((x <= 3.3e+68)))
tmp = (x * ((i * -4.0) + (18.0 * (t * (y * z))))) + (j * (k * -27.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((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[x, -3.6e+50], N[Not[LessEqual[x, 3.3e+68]], $MachinePrecision]], N[(N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+50} \lor \neg \left(x \leq 3.3 \cdot 10^{+68}\right):\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if x < -3.59999999999999986e50 or 3.3e68 < x Initial program 68.1%
Simplified79.2%
Taylor expanded in x around inf 82.7%
if -3.59999999999999986e50 < x < 3.3e68Initial program 92.1%
Simplified88.5%
Taylor expanded in y around 0 85.2%
Final simplification84.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 (<= t -6e+43) (not (<= t 1.25e+41))) (+ (* j (* k -27.0)) (* t (* x (+ (* -4.0 (/ a x)) (* 18.0 (* y z)))))) (- (* 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 <= -6e+43) || !(t <= 1.25e+41)) {
tmp = (j * (k * -27.0)) + (t * (x * ((-4.0 * (a / x)) + (18.0 * (y * z)))));
} 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 <= (-6d+43)) .or. (.not. (t <= 1.25d+41))) then
tmp = (j * (k * (-27.0d0))) + (t * (x * (((-4.0d0) * (a / x)) + (18.0d0 * (y * z)))))
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 <= -6e+43) || !(t <= 1.25e+41)) {
tmp = (j * (k * -27.0)) + (t * (x * ((-4.0 * (a / x)) + (18.0 * (y * z)))));
} 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 <= -6e+43) or not (t <= 1.25e+41): tmp = (j * (k * -27.0)) + (t * (x * ((-4.0 * (a / x)) + (18.0 * (y * z))))) 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 <= -6e+43) || !(t <= 1.25e+41)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(x * Float64(Float64(-4.0 * Float64(a / x)) + Float64(18.0 * Float64(y * z)))))); 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 <= -6e+43) || ~((t <= 1.25e+41)))
tmp = (j * (k * -27.0)) + (t * (x * ((-4.0 * (a / x)) + (18.0 * (y * z)))));
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, -6e+43], N[Not[LessEqual[t, 1.25e+41]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(x * N[(N[(-4.0 * N[(a / x), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -6 \cdot 10^{+43} \lor \neg \left(t \leq 1.25 \cdot 10^{+41}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(x \cdot \left(-4 \cdot \frac{a}{x} + 18 \cdot \left(y \cdot z\right)\right)\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 < -6.00000000000000033e43 or 1.25000000000000006e41 < t Initial program 80.9%
Simplified88.2%
Taylor expanded in x around inf 65.1%
Taylor expanded in t around inf 76.0%
if -6.00000000000000033e43 < t < 1.25000000000000006e41Initial program 83.3%
Simplified82.8%
Taylor expanded in t around 0 74.4%
Final simplification75.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))) (t_2 (* j (* k -27.0))))
(if (<= j -4.8e+147)
t_2
(if (<= j -5.2e-65)
t_1
(if (<= j -2e-301)
(* a (* t -4.0))
(if (<= j 3.5e-208) t_1 (if (<= j 3.35e+41) (* b c) 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);
double t_2 = j * (k * -27.0);
double tmp;
if (j <= -4.8e+147) {
tmp = t_2;
} else if (j <= -5.2e-65) {
tmp = t_1;
} else if (j <= -2e-301) {
tmp = a * (t * -4.0);
} else if (j <= 3.5e-208) {
tmp = t_1;
} else if (j <= 3.35e+41) {
tmp = b * c;
} 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 = (-4.0d0) * (x * i)
t_2 = j * (k * (-27.0d0))
if (j <= (-4.8d+147)) then
tmp = t_2
else if (j <= (-5.2d-65)) then
tmp = t_1
else if (j <= (-2d-301)) then
tmp = a * (t * (-4.0d0))
else if (j <= 3.5d-208) then
tmp = t_1
else if (j <= 3.35d+41) then
tmp = b * c
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 = -4.0 * (x * i);
double t_2 = j * (k * -27.0);
double tmp;
if (j <= -4.8e+147) {
tmp = t_2;
} else if (j <= -5.2e-65) {
tmp = t_1;
} else if (j <= -2e-301) {
tmp = a * (t * -4.0);
} else if (j <= 3.5e-208) {
tmp = t_1;
} else if (j <= 3.35e+41) {
tmp = b * c;
} 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 = -4.0 * (x * i) t_2 = j * (k * -27.0) tmp = 0 if j <= -4.8e+147: tmp = t_2 elif j <= -5.2e-65: tmp = t_1 elif j <= -2e-301: tmp = a * (t * -4.0) elif j <= 3.5e-208: tmp = t_1 elif j <= 3.35e+41: tmp = b * c 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(-4.0 * Float64(x * i)) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -4.8e+147) tmp = t_2; elseif (j <= -5.2e-65) tmp = t_1; elseif (j <= -2e-301) tmp = Float64(a * Float64(t * -4.0)); elseif (j <= 3.5e-208) tmp = t_1; elseif (j <= 3.35e+41) tmp = Float64(b * c); 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 = -4.0 * (x * i);
t_2 = j * (k * -27.0);
tmp = 0.0;
if (j <= -4.8e+147)
tmp = t_2;
elseif (j <= -5.2e-65)
tmp = t_1;
elseif (j <= -2e-301)
tmp = a * (t * -4.0);
elseif (j <= 3.5e-208)
tmp = t_1;
elseif (j <= 3.35e+41)
tmp = b * c;
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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.8e+147], t$95$2, If[LessEqual[j, -5.2e-65], t$95$1, If[LessEqual[j, -2e-301], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.5e-208], t$95$1, If[LessEqual[j, 3.35e+41], N[(b * c), $MachinePrecision], 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 := -4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -4.8 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -2 \cdot 10^{-301}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;j \leq 3.5 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 3.35 \cdot 10^{+41}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -4.80000000000000004e147 or 3.3499999999999998e41 < j Initial program 77.2%
Simplified81.8%
Taylor expanded in t around 0 69.5%
Taylor expanded in i around 0 60.5%
*-commutative60.5%
associate-*r*60.5%
Simplified60.5%
Taylor expanded in b around 0 52.5%
*-commutative52.5%
*-commutative52.5%
associate-*r*52.5%
Simplified52.5%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
associate-*r*52.5%
*-commutative52.5%
Simplified52.5%
if -4.80000000000000004e147 < j < -5.20000000000000019e-65 or -2.00000000000000013e-301 < j < 3.49999999999999991e-208Initial program 86.6%
Simplified85.5%
Taylor expanded in z around inf 84.1%
Taylor expanded in i around inf 31.3%
*-commutative31.3%
Simplified31.3%
if -5.20000000000000019e-65 < j < -2.00000000000000013e-301Initial program 80.3%
Simplified88.2%
Taylor expanded in a around inf 37.4%
metadata-eval37.4%
distribute-lft-neg-in37.4%
*-commutative37.4%
associate-*l*37.4%
distribute-lft-neg-in37.4%
distribute-lft-neg-in37.4%
metadata-eval37.4%
Simplified37.4%
Taylor expanded in j around inf 33.8%
Taylor expanded in j around 0 29.6%
*-commutative29.6%
associate-*r*29.6%
*-commutative29.6%
Simplified29.6%
if 3.49999999999999991e-208 < j < 3.3499999999999998e41Initial program 86.9%
Simplified85.0%
Taylor expanded in z around inf 82.7%
Taylor expanded in b around inf 35.5%
Final simplification39.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= x -1.82e+31)
(* x (- (* 4.0 (- i)) (* z (* y (* t -18.0)))))
(if (<= x 1.15e-244)
(+ (* b c) t_1)
(if (<= x 3.4e+47)
(+ (* a (* t -4.0)) t_1)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -1.82e+31) {
tmp = x * ((4.0 * -i) - (z * (y * (t * -18.0))));
} else if (x <= 1.15e-244) {
tmp = (b * c) + t_1;
} else if (x <= 3.4e+47) {
tmp = (a * (t * -4.0)) + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (x <= (-1.82d+31)) then
tmp = x * ((4.0d0 * -i) - (z * (y * (t * (-18.0d0)))))
else if (x <= 1.15d-244) then
tmp = (b * c) + t_1
else if (x <= 3.4d+47) then
tmp = (a * (t * (-4.0d0))) + t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -1.82e+31) {
tmp = x * ((4.0 * -i) - (z * (y * (t * -18.0))));
} else if (x <= 1.15e-244) {
tmp = (b * c) + t_1;
} else if (x <= 3.4e+47) {
tmp = (a * (t * -4.0)) + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if x <= -1.82e+31: tmp = x * ((4.0 * -i) - (z * (y * (t * -18.0)))) elif x <= 1.15e-244: tmp = (b * c) + t_1 elif x <= 3.4e+47: tmp = (a * (t * -4.0)) + t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -1.82e+31) tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(z * Float64(y * Float64(t * -18.0))))); elseif (x <= 1.15e-244) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 3.4e+47) tmp = Float64(Float64(a * Float64(t * -4.0)) + t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (x <= -1.82e+31)
tmp = x * ((4.0 * -i) - (z * (y * (t * -18.0))));
elseif (x <= 1.15e-244)
tmp = (b * c) + t_1;
elseif (x <= 3.4e+47)
tmp = (a * (t * -4.0)) + t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.82e+31], N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(z * N[(y * N[(t * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-244], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 3.4e+47], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -1.82 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - z \cdot \left(y \cdot \left(t \cdot -18\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-244}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -1.8200000000000001e31Initial program 70.7%
Simplified75.7%
Taylor expanded in z around inf 65.5%
Taylor expanded in x around -inf 66.9%
mul-1-neg66.9%
cancel-sign-sub-inv66.9%
associate-*r*68.5%
metadata-eval68.5%
Simplified68.5%
Taylor expanded in t around 0 66.9%
associate-*r*68.5%
associate-*l*68.5%
*-commutative68.5%
associate-*r*70.2%
Simplified70.2%
if -1.8200000000000001e31 < x < 1.15e-244Initial program 94.7%
Simplified89.7%
Taylor expanded in b around inf 63.2%
if 1.15e-244 < x < 3.3999999999999998e47Initial program 92.0%
Simplified91.1%
Taylor expanded in a around inf 53.6%
metadata-eval53.6%
distribute-lft-neg-in53.6%
*-commutative53.6%
associate-*l*53.6%
distribute-lft-neg-in53.6%
distribute-lft-neg-in53.6%
metadata-eval53.6%
Simplified53.6%
if 3.3999999999999998e47 < x Initial program 66.7%
Simplified78.3%
Taylor expanded in x around inf 82.6%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= x -3.6e+30)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= x 1.2e-244)
(+ (* b c) t_1)
(if (<= x 1.8e+46)
(+ (* a (* t -4.0)) t_1)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -3.6e+30) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (x <= 1.2e-244) {
tmp = (b * c) + t_1;
} else if (x <= 1.8e+46) {
tmp = (a * (t * -4.0)) + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (x <= (-3.6d+30)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (x <= 1.2d-244) then
tmp = (b * c) + t_1
else if (x <= 1.8d+46) then
tmp = (a * (t * (-4.0d0))) + t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -3.6e+30) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (x <= 1.2e-244) {
tmp = (b * c) + t_1;
} else if (x <= 1.8e+46) {
tmp = (a * (t * -4.0)) + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if x <= -3.6e+30: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif x <= 1.2e-244: tmp = (b * c) + t_1 elif x <= 1.8e+46: tmp = (a * (t * -4.0)) + t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -3.6e+30) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (x <= 1.2e-244) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 1.8e+46) tmp = Float64(Float64(a * Float64(t * -4.0)) + t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (x <= -3.6e+30)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (x <= 1.2e-244)
tmp = (b * c) + t_1;
elseif (x <= 1.8e+46)
tmp = (a * (t * -4.0)) + t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+30], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e-244], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 1.8e+46], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-244}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+46}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.6000000000000002e30Initial program 70.7%
Simplified75.7%
Taylor expanded in z around inf 65.5%
Taylor expanded in a around 0 63.9%
associate-*r*72.1%
associate-*r*72.1%
associate-*r*72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in x around inf 66.9%
cancel-sign-sub-inv66.9%
associate-*r*68.5%
metadata-eval68.5%
*-commutative68.5%
Simplified68.5%
if -3.6000000000000002e30 < x < 1.20000000000000008e-244Initial program 94.7%
Simplified89.7%
Taylor expanded in b around inf 63.2%
if 1.20000000000000008e-244 < x < 1.7999999999999999e46Initial program 92.0%
Simplified91.1%
Taylor expanded in a around inf 53.6%
metadata-eval53.6%
distribute-lft-neg-in53.6%
*-commutative53.6%
associate-*l*53.6%
distribute-lft-neg-in53.6%
distribute-lft-neg-in53.6%
metadata-eval53.6%
Simplified53.6%
if 1.7999999999999999e46 < x Initial program 66.7%
Simplified78.3%
Taylor expanded in x around inf 82.6%
Final simplification66.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 (* j (* k -27.0)))
(t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -2.05e+33)
t_2
(if (<= x 1e-244)
(+ (* b c) t_1)
(if (<= x 5.7e+45) (+ (* a (* t -4.0)) 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);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -2.05e+33) {
tmp = t_2;
} else if (x <= 1e-244) {
tmp = (b * c) + t_1;
} else if (x <= 5.7e+45) {
tmp = (a * (t * -4.0)) + 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))
t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-2.05d+33)) then
tmp = t_2
else if (x <= 1d-244) then
tmp = (b * c) + t_1
else if (x <= 5.7d+45) then
tmp = (a * (t * (-4.0d0))) + 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);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -2.05e+33) {
tmp = t_2;
} else if (x <= 1e-244) {
tmp = (b * c) + t_1;
} else if (x <= 5.7e+45) {
tmp = (a * (t * -4.0)) + 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) t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -2.05e+33: tmp = t_2 elif x <= 1e-244: tmp = (b * c) + t_1 elif x <= 5.7e+45: tmp = (a * (t * -4.0)) + 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(j * Float64(k * -27.0)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -2.05e+33) tmp = t_2; elseif (x <= 1e-244) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 5.7e+45) tmp = Float64(Float64(a * Float64(t * -4.0)) + 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);
t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -2.05e+33)
tmp = t_2;
elseif (x <= 1e-244)
tmp = (b * c) + t_1;
elseif (x <= 5.7e+45)
tmp = (a * (t * -4.0)) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.05e+33], t$95$2, If[LessEqual[x, 1e-244], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 5.7e+45], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], 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)\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 10^{-244}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 5.7 \cdot 10^{+45}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -2.04999999999999997e33 or 5.70000000000000027e45 < x Initial program 68.6%
Simplified77.0%
Taylor expanded in z around inf 66.8%
Taylor expanded in a around 0 67.8%
associate-*r*73.6%
associate-*r*72.8%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in x around inf 74.8%
cancel-sign-sub-inv74.8%
associate-*r*74.0%
metadata-eval74.0%
*-commutative74.0%
Simplified74.0%
if -2.04999999999999997e33 < x < 9.9999999999999993e-245Initial program 94.7%
Simplified89.7%
Taylor expanded in b around inf 63.2%
if 9.9999999999999993e-245 < x < 5.70000000000000027e45Initial program 92.0%
Simplified91.1%
Taylor expanded in a around inf 53.6%
metadata-eval53.6%
distribute-lft-neg-in53.6%
*-commutative53.6%
associate-*l*53.6%
distribute-lft-neg-in53.6%
distribute-lft-neg-in53.6%
metadata-eval53.6%
Simplified53.6%
Final simplification65.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.6e+50)
(* -18.0 (* (* y z) (* x (- t))))
(if (<= x 4.6e+55)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 5.7e+259)
(* x (* t (* z (* y (- -18.0)))))
(* b (+ c (* -4.0 (/ (* x i) b))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.6e+50) {
tmp = -18.0 * ((y * z) * (x * -t));
} else if (x <= 4.6e+55) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.7e+259) {
tmp = x * (t * (z * (y * -(-18.0))));
} else {
tmp = b * (c + (-4.0 * ((x * i) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.6d+50)) then
tmp = (-18.0d0) * ((y * z) * (x * -t))
else if (x <= 4.6d+55) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 5.7d+259) then
tmp = x * (t * (z * (y * -(-18.0d0))))
else
tmp = b * (c + ((-4.0d0) * ((x * i) / b)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.6e+50) {
tmp = -18.0 * ((y * z) * (x * -t));
} else if (x <= 4.6e+55) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.7e+259) {
tmp = x * (t * (z * (y * -(-18.0))));
} else {
tmp = b * (c + (-4.0 * ((x * i) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.6e+50: tmp = -18.0 * ((y * z) * (x * -t)) elif x <= 4.6e+55: tmp = (b * c) + (j * (k * -27.0)) elif x <= 5.7e+259: tmp = x * (t * (z * (y * -(-18.0)))) else: tmp = b * (c + (-4.0 * ((x * i) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.6e+50) tmp = Float64(-18.0 * Float64(Float64(y * z) * Float64(x * Float64(-t)))); elseif (x <= 4.6e+55) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 5.7e+259) tmp = Float64(x * Float64(t * Float64(z * Float64(y * Float64(-(-18.0)))))); else tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(Float64(x * i) / b)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -3.6e+50)
tmp = -18.0 * ((y * z) * (x * -t));
elseif (x <= 4.6e+55)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 5.7e+259)
tmp = x * (t * (z * (y * -(-18.0))));
else
tmp = b * (c + (-4.0 * ((x * i) / b)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.6e+50], N[(-18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e+55], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.7e+259], N[(x * N[(t * N[(z * N[(y * (--18.0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / b), $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}\;x \leq -3.6 \cdot 10^{+50}:\\
\;\;\;\;-18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot \left(-t\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+55}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 5.7 \cdot 10^{+259}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(y \cdot \left(--18\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \frac{x \cdot i}{b}\right)\\
\end{array}
\end{array}
if x < -3.59999999999999986e50Initial program 71.5%
Simplified77.1%
Taylor expanded in z around inf 64.1%
Taylor expanded in x around -inf 69.3%
mul-1-neg69.3%
cancel-sign-sub-inv69.3%
associate-*r*69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in t around inf 44.7%
associate-*r*48.2%
Simplified48.2%
if -3.59999999999999986e50 < x < 4.59999999999999975e55Initial program 92.6%
Simplified89.6%
Taylor expanded in b around inf 52.3%
if 4.59999999999999975e55 < x < 5.7e259Initial program 64.4%
Simplified79.0%
Taylor expanded in z around inf 70.5%
Taylor expanded in x around -inf 82.2%
mul-1-neg82.2%
cancel-sign-sub-inv82.2%
associate-*r*78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in t around inf 59.2%
*-commutative59.2%
*-commutative59.2%
associate-*l*61.1%
*-commutative61.1%
associate-*r*61.1%
associate-*r*61.2%
*-commutative61.2%
associate-*l*61.2%
Simplified61.2%
if 5.7e259 < x Initial program 67.3%
Simplified67.3%
Taylor expanded in t around 0 78.6%
Taylor expanded in b around inf 89.0%
Taylor expanded in j around 0 89.0%
Final simplification54.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 (if (or (<= t -3e+44) (not (<= t 7.2e+41))) (* t (- (* -18.0 (* (* y z) (- x))) (* 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 <= -3e+44) || !(t <= 7.2e+41)) {
tmp = t * ((-18.0 * ((y * z) * -x)) - (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 <= (-3d+44)) .or. (.not. (t <= 7.2d+41))) then
tmp = t * (((-18.0d0) * ((y * z) * -x)) - (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 <= -3e+44) || !(t <= 7.2e+41)) {
tmp = t * ((-18.0 * ((y * z) * -x)) - (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 <= -3e+44) or not (t <= 7.2e+41): tmp = t * ((-18.0 * ((y * z) * -x)) - (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 <= -3e+44) || !(t <= 7.2e+41)) tmp = Float64(t * Float64(Float64(-18.0 * Float64(Float64(y * z) * Float64(-x))) - 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 <= -3e+44) || ~((t <= 7.2e+41)))
tmp = t * ((-18.0 * ((y * z) * -x)) - (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, -3e+44], N[Not[LessEqual[t, 7.2e+41]], $MachinePrecision]], N[(t * N[(N[(-18.0 * N[(N[(y * z), $MachinePrecision] * (-x)), $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 -3 \cdot 10^{+44} \lor \neg \left(t \leq 7.2 \cdot 10^{+41}\right):\\
\;\;\;\;t \cdot \left(-18 \cdot \left(\left(y \cdot z\right) \cdot \left(-x\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 < -2.99999999999999987e44 or 7.20000000000000051e41 < t Initial program 80.7%
Taylor expanded in t around -inf 70.5%
associate-*r*70.5%
neg-mul-170.5%
cancel-sign-sub-inv70.5%
metadata-eval70.5%
*-commutative70.5%
*-commutative70.5%
Simplified70.5%
if -2.99999999999999987e44 < t < 7.20000000000000051e41Initial program 83.4%
Simplified82.9%
Taylor expanded in t around 0 74.6%
Final simplification72.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))))
(if (<= (* b c) -5e+113)
(+ (* b c) t_1)
(if (<= (* b c) 1e+72)
(+ t_1 (* -4.0 (* x i)))
(* b (+ c (* -4.0 (/ (* x i) b))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+113) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1e+72) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = b * (c + (-4.0 * ((x * i) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-5d+113)) then
tmp = (b * c) + t_1
else if ((b * c) <= 1d+72) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = b * (c + ((-4.0d0) * ((x * i) / b)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+113) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1e+72) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = b * (c + (-4.0 * ((x * i) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -5e+113: tmp = (b * c) + t_1 elif (b * c) <= 1e+72: tmp = t_1 + (-4.0 * (x * i)) else: tmp = b * (c + (-4.0 * ((x * i) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -5e+113) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= 1e+72) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(Float64(x * i) / b)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -5e+113)
tmp = (b * c) + t_1;
elseif ((b * c) <= 1e+72)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = b * (c + (-4.0 * ((x * i) / b)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+113], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+72], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+113}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{+72}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \frac{x \cdot i}{b}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5e113Initial program 86.5%
Simplified91.9%
Taylor expanded in b around inf 76.8%
if -5e113 < (*.f64 b c) < 9.99999999999999944e71Initial program 82.2%
Simplified86.4%
Taylor expanded in i around inf 48.0%
if 9.99999999999999944e71 < (*.f64 b c) Initial program 79.1%
Simplified75.2%
Taylor expanded in t around 0 63.2%
Taylor expanded in b around inf 65.3%
Taylor expanded in j around 0 57.1%
Final simplification53.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 -3.7e+50) (not (<= x 1.02e+56))) (* -18.0 (* (* y z) (* x (- t)))) (+ (* 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 <= -3.7e+50) || !(x <= 1.02e+56)) {
tmp = -18.0 * ((y * z) * (x * -t));
} 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 <= (-3.7d+50)) .or. (.not. (x <= 1.02d+56))) then
tmp = (-18.0d0) * ((y * z) * (x * -t))
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 <= -3.7e+50) || !(x <= 1.02e+56)) {
tmp = -18.0 * ((y * z) * (x * -t));
} 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 <= -3.7e+50) or not (x <= 1.02e+56): tmp = -18.0 * ((y * z) * (x * -t)) 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 <= -3.7e+50) || !(x <= 1.02e+56)) tmp = Float64(-18.0 * Float64(Float64(y * z) * Float64(x * Float64(-t)))); 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 <= -3.7e+50) || ~((x <= 1.02e+56)))
tmp = -18.0 * ((y * z) * (x * -t));
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, -3.7e+50], N[Not[LessEqual[x, 1.02e+56]], $MachinePrecision]], N[(-18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * (-t)), $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 -3.7 \cdot 10^{+50} \lor \neg \left(x \leq 1.02 \cdot 10^{+56}\right):\\
\;\;\;\;-18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot \left(-t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < -3.7000000000000001e50 or 1.02e56 < x Initial program 68.1%
Simplified77.1%
Taylor expanded in z around inf 65.3%
Taylor expanded in x around -inf 76.6%
mul-1-neg76.6%
cancel-sign-sub-inv76.6%
associate-*r*74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in t around inf 49.4%
associate-*r*52.8%
Simplified52.8%
if -3.7000000000000001e50 < x < 1.02e56Initial program 92.6%
Simplified89.6%
Taylor expanded in b around inf 52.3%
Final simplification52.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= j -4e+147)
t_1
(if (<= j 4.2e-209) (* -4.0 (* x i)) (if (<= j 4e+39) (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -4e+147) {
tmp = t_1;
} else if (j <= 4.2e-209) {
tmp = -4.0 * (x * i);
} else if (j <= 4e+39) {
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 = j * (k * (-27.0d0))
if (j <= (-4d+147)) then
tmp = t_1
else if (j <= 4.2d-209) then
tmp = (-4.0d0) * (x * i)
else if (j <= 4d+39) 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 = j * (k * -27.0);
double tmp;
if (j <= -4e+147) {
tmp = t_1;
} else if (j <= 4.2e-209) {
tmp = -4.0 * (x * i);
} else if (j <= 4e+39) {
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 = j * (k * -27.0) tmp = 0 if j <= -4e+147: tmp = t_1 elif j <= 4.2e-209: tmp = -4.0 * (x * i) elif j <= 4e+39: 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(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -4e+147) tmp = t_1; elseif (j <= 4.2e-209) tmp = Float64(-4.0 * Float64(x * i)); elseif (j <= 4e+39) 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 = j * (k * -27.0);
tmp = 0.0;
if (j <= -4e+147)
tmp = t_1;
elseif (j <= 4.2e-209)
tmp = -4.0 * (x * i);
elseif (j <= 4e+39)
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4e+147], t$95$1, If[LessEqual[j, 4.2e-209], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4e+39], 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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -4 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 4.2 \cdot 10^{-209}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;j \leq 4 \cdot 10^{+39}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -3.9999999999999999e147 or 3.99999999999999976e39 < j Initial program 77.2%
Simplified81.8%
Taylor expanded in t around 0 69.5%
Taylor expanded in i around 0 60.5%
*-commutative60.5%
associate-*r*60.5%
Simplified60.5%
Taylor expanded in b around 0 52.5%
*-commutative52.5%
*-commutative52.5%
associate-*r*52.5%
Simplified52.5%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
associate-*r*52.5%
*-commutative52.5%
Simplified52.5%
if -3.9999999999999999e147 < j < 4.19999999999999991e-209Initial program 84.0%
Simplified85.0%
Taylor expanded in z around inf 78.6%
Taylor expanded in i around inf 27.1%
*-commutative27.1%
Simplified27.1%
if 4.19999999999999991e-209 < j < 3.99999999999999976e39Initial program 86.9%
Simplified85.0%
Taylor expanded in z around inf 82.7%
Taylor expanded in b around inf 35.5%
Final simplification37.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j k) -27.0)))
(if (<= j -4.1e+147)
t_1
(if (<= j 9.2e-209) (* -4.0 (* x i)) (if (<= j 3.4e+39) (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * k) * -27.0;
double tmp;
if (j <= -4.1e+147) {
tmp = t_1;
} else if (j <= 9.2e-209) {
tmp = -4.0 * (x * i);
} else if (j <= 3.4e+39) {
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 = (j * k) * (-27.0d0)
if (j <= (-4.1d+147)) then
tmp = t_1
else if (j <= 9.2d-209) then
tmp = (-4.0d0) * (x * i)
else if (j <= 3.4d+39) 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 = (j * k) * -27.0;
double tmp;
if (j <= -4.1e+147) {
tmp = t_1;
} else if (j <= 9.2e-209) {
tmp = -4.0 * (x * i);
} else if (j <= 3.4e+39) {
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 = (j * k) * -27.0 tmp = 0 if j <= -4.1e+147: tmp = t_1 elif j <= 9.2e-209: tmp = -4.0 * (x * i) elif j <= 3.4e+39: 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(Float64(j * k) * -27.0) tmp = 0.0 if (j <= -4.1e+147) tmp = t_1; elseif (j <= 9.2e-209) tmp = Float64(-4.0 * Float64(x * i)); elseif (j <= 3.4e+39) 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 = (j * k) * -27.0;
tmp = 0.0;
if (j <= -4.1e+147)
tmp = t_1;
elseif (j <= 9.2e-209)
tmp = -4.0 * (x * i);
elseif (j <= 3.4e+39)
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[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[j, -4.1e+147], t$95$1, If[LessEqual[j, 9.2e-209], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.4e+39], 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 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;j \leq -4.1 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 9.2 \cdot 10^{-209}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;j \leq 3.4 \cdot 10^{+39}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -4.09999999999999966e147 or 3.3999999999999999e39 < j Initial program 77.2%
Simplified81.8%
Taylor expanded in j around inf 52.5%
if -4.09999999999999966e147 < j < 9.1999999999999999e-209Initial program 84.0%
Simplified85.0%
Taylor expanded in z around inf 78.6%
Taylor expanded in i around inf 27.1%
*-commutative27.1%
Simplified27.1%
if 9.1999999999999999e-209 < j < 3.3999999999999999e39Initial program 86.9%
Simplified85.0%
Taylor expanded in z around inf 82.7%
Taylor expanded in b around inf 35.5%
Final simplification37.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 (<= k -1.3e-109) (not (<= k 1.4e+37))) (+ (* b c) (* j (* k -27.0))) (- (* b c) (* 4.0 (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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.3e-109) || !(k <= 1.4e+37)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-1.3d-109)) .or. (.not. (k <= 1.4d+37))) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -1.3e-109) || !(k <= 1.4e+37)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -1.3e-109) or not (k <= 1.4e+37): tmp = (b * c) + (j * (k * -27.0)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -1.3e-109) || !(k <= 1.4e+37)) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -1.3e-109) || ~((k <= 1.4e+37)))
tmp = (b * c) + (j * (k * -27.0));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -1.3e-109], N[Not[LessEqual[k, 1.4e+37]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.3 \cdot 10^{-109} \lor \neg \left(k \leq 1.4 \cdot 10^{+37}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if k < -1.2999999999999999e-109 or 1.3999999999999999e37 < k Initial program 81.0%
Simplified83.2%
Taylor expanded in b around inf 49.4%
if -1.2999999999999999e-109 < k < 1.3999999999999999e37Initial program 84.1%
Simplified86.0%
Taylor expanded in t around 0 51.7%
Taylor expanded in i around inf 48.7%
*-commutative48.7%
Simplified48.7%
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 (or (<= i -1.32e+186) (not (<= i 1.32e+108))) (* -4.0 (* x i)) (+ (* 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 ((i <= -1.32e+186) || !(i <= 1.32e+108)) {
tmp = -4.0 * (x * i);
} 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 ((i <= (-1.32d+186)) .or. (.not. (i <= 1.32d+108))) then
tmp = (-4.0d0) * (x * i)
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 ((i <= -1.32e+186) || !(i <= 1.32e+108)) {
tmp = -4.0 * (x * i);
} 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 (i <= -1.32e+186) or not (i <= 1.32e+108): tmp = -4.0 * (x * i) 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 ((i <= -1.32e+186) || !(i <= 1.32e+108)) tmp = Float64(-4.0 * Float64(x * i)); 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 ((i <= -1.32e+186) || ~((i <= 1.32e+108)))
tmp = -4.0 * (x * i);
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[i, -1.32e+186], N[Not[LessEqual[i, 1.32e+108]], $MachinePrecision]], N[(-4.0 * N[(x * i), $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}\;i \leq -1.32 \cdot 10^{+186} \lor \neg \left(i \leq 1.32 \cdot 10^{+108}\right):\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if i < -1.32000000000000005e186 or 1.32000000000000013e108 < i Initial program 75.1%
Simplified83.9%
Taylor expanded in z around inf 69.9%
Taylor expanded in i around inf 59.5%
*-commutative59.5%
Simplified59.5%
if -1.32000000000000005e186 < i < 1.32000000000000013e108Initial program 84.2%
Simplified84.4%
Taylor expanded in b around inf 45.8%
Final simplification48.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.5e+305) (not (<= (* b c) 1.46e+138))) (* 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 (((b * c) <= -4.5e+305) || !((b * c) <= 1.46e+138)) {
tmp = b * c;
} else {
tmp = (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 (((b * c) <= (-4.5d+305)) .or. (.not. ((b * c) <= 1.46d+138))) then
tmp = b * c
else
tmp = (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 (((b * c) <= -4.5e+305) || !((b * c) <= 1.46e+138)) {
tmp = b * c;
} else {
tmp = (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 ((b * c) <= -4.5e+305) or not ((b * c) <= 1.46e+138): tmp = b * c else: tmp = (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 ((Float64(b * c) <= -4.5e+305) || !(Float64(b * c) <= 1.46e+138)) tmp = Float64(b * c); else tmp = Float64(Float64(j * 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 (((b * c) <= -4.5e+305) || ~(((b * c) <= 1.46e+138)))
tmp = b * c;
else
tmp = (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[N[(b * c), $MachinePrecision], -4.5e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.46e+138]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $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^{+305} \lor \neg \left(b \cdot c \leq 1.46 \cdot 10^{+138}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -4.5000000000000003e305 or 1.45999999999999995e138 < (*.f64 b c) Initial program 78.0%
Simplified76.1%
Taylor expanded in z around inf 82.0%
Taylor expanded in b around inf 61.3%
if -4.5000000000000003e305 < (*.f64 b c) < 1.45999999999999995e138Initial program 83.3%
Simplified86.8%
Taylor expanded in j around inf 27.8%
Final simplification34.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 82.2%
Simplified83.9%
Taylor expanded in z around inf 78.4%
Taylor expanded in b around inf 18.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024160
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))