
(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 25 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
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(* 4.0 (* t a))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((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 = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a));
}
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 = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((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 = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(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(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((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 = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(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[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
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}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Taylor expanded in x around 0 26.9%
Taylor expanded in j around 0 65.4%
Final simplification92.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))))
(t_3 (* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))
(if (<= x -48000000000.0)
t_3
(if (<= x -4.2e-51)
(+ (* b c) t_1)
(if (<= x -1.55e-220)
t_2
(if (<= x 3e-299)
(+ t_1 (* (* t a) -4.0))
(if (<= x 2.9e-131)
t_2
(if (<= x 3.8e-77)
(+ t_1 (* 18.0 (* t (* x (* y z)))))
(if (<= x 1.7e+122) t_2 t_3)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double t_3 = x * ((18.0 * (z * (y * t))) - (4.0 * i));
double tmp;
if (x <= -48000000000.0) {
tmp = t_3;
} else if (x <= -4.2e-51) {
tmp = (b * c) + t_1;
} else if (x <= -1.55e-220) {
tmp = t_2;
} else if (x <= 3e-299) {
tmp = t_1 + ((t * a) * -4.0);
} else if (x <= 2.9e-131) {
tmp = t_2;
} else if (x <= 3.8e-77) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if (x <= 1.7e+122) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
t_3 = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
if (x <= (-48000000000.0d0)) then
tmp = t_3
else if (x <= (-4.2d-51)) then
tmp = (b * c) + t_1
else if (x <= (-1.55d-220)) then
tmp = t_2
else if (x <= 3d-299) then
tmp = t_1 + ((t * a) * (-4.0d0))
else if (x <= 2.9d-131) then
tmp = t_2
else if (x <= 3.8d-77) then
tmp = t_1 + (18.0d0 * (t * (x * (y * z))))
else if (x <= 1.7d+122) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double t_3 = x * ((18.0 * (z * (y * t))) - (4.0 * i));
double tmp;
if (x <= -48000000000.0) {
tmp = t_3;
} else if (x <= -4.2e-51) {
tmp = (b * c) + t_1;
} else if (x <= -1.55e-220) {
tmp = t_2;
} else if (x <= 3e-299) {
tmp = t_1 + ((t * a) * -4.0);
} else if (x <= 2.9e-131) {
tmp = t_2;
} else if (x <= 3.8e-77) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if (x <= 1.7e+122) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) t_3 = x * ((18.0 * (z * (y * t))) - (4.0 * i)) tmp = 0 if x <= -48000000000.0: tmp = t_3 elif x <= -4.2e-51: tmp = (b * c) + t_1 elif x <= -1.55e-220: tmp = t_2 elif x <= 3e-299: tmp = t_1 + ((t * a) * -4.0) elif x <= 2.9e-131: tmp = t_2 elif x <= 3.8e-77: tmp = t_1 + (18.0 * (t * (x * (y * z)))) elif x <= 1.7e+122: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) t_3 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -48000000000.0) tmp = t_3; elseif (x <= -4.2e-51) tmp = Float64(Float64(b * c) + t_1); elseif (x <= -1.55e-220) tmp = t_2; elseif (x <= 3e-299) tmp = Float64(t_1 + Float64(Float64(t * a) * -4.0)); elseif (x <= 2.9e-131) tmp = t_2; elseif (x <= 3.8e-77) tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); elseif (x <= 1.7e+122) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
t_3 = x * ((18.0 * (z * (y * t))) - (4.0 * i));
tmp = 0.0;
if (x <= -48000000000.0)
tmp = t_3;
elseif (x <= -4.2e-51)
tmp = (b * c) + t_1;
elseif (x <= -1.55e-220)
tmp = t_2;
elseif (x <= 3e-299)
tmp = t_1 + ((t * a) * -4.0);
elseif (x <= 2.9e-131)
tmp = t_2;
elseif (x <= 3.8e-77)
tmp = t_1 + (18.0 * (t * (x * (y * z))));
elseif (x <= 1.7e+122)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -48000000000.0], t$95$3, If[LessEqual[x, -4.2e-51], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, -1.55e-220], t$95$2, If[LessEqual[x, 3e-299], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-131], t$95$2, If[LessEqual[x, 3.8e-77], N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+122], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
t_3 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -48000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-51}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-220}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-299}:\\
\;\;\;\;t\_1 + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-131}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-77}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -4.8e10 or 1.7e122 < x Initial program 73.4%
Simplified78.3%
Taylor expanded in x around inf 74.9%
pow174.9%
Applied egg-rr74.9%
unpow174.9%
associate-*r*76.9%
Simplified76.9%
if -4.8e10 < x < -4.20000000000000003e-51Initial program 90.8%
Simplified90.8%
Taylor expanded in b around inf 80.5%
if -4.20000000000000003e-51 < x < -1.55000000000000006e-220 or 2.99999999999999984e-299 < x < 2.9000000000000002e-131 or 3.7999999999999999e-77 < x < 1.7e122Initial program 92.0%
Taylor expanded in y around 0 78.0%
Taylor expanded in j around 0 66.9%
if -1.55000000000000006e-220 < x < 2.99999999999999984e-299Initial program 99.8%
Simplified80.0%
Taylor expanded in a around inf 83.4%
*-commutative83.4%
Simplified83.4%
if 2.9000000000000002e-131 < x < 3.7999999999999999e-77Initial program 94.6%
Simplified99.8%
Taylor expanded in y around inf 69.8%
Final simplification73.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= t -5.2e+68)
(* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))
(if (<= t -9.8e-58)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t -5e-205)
t_2
(if (<= t -2.5e-261)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))
(if (<= t 2.3e-307)
t_2
(if (<= t 7e-302)
(* x (- (* t (* y (* 18.0 z))) (* 4.0 i)))
(if (<= t 7.8e+67)
(+ t_1 (* x (* i -4.0)))
(* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -5.2e+68) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -9.8e-58) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -5e-205) {
tmp = t_2;
} else if (t <= -2.5e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 2.3e-307) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else if (t <= 7.8e+67) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
if (t <= (-5.2d+68)) then
tmp = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
else if (t <= (-9.8d-58)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= (-5d-205)) then
tmp = t_2
else if (t <= (-2.5d-261)) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else if (t <= 2.3d-307) then
tmp = t_2
else if (t <= 7d-302) then
tmp = x * ((t * (y * (18.0d0 * z))) - (4.0d0 * i))
else if (t <= 7.8d+67) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -5.2e+68) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -9.8e-58) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -5e-205) {
tmp = t_2;
} else if (t <= -2.5e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 2.3e-307) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else if (t <= 7.8e+67) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if t <= -5.2e+68: tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0)) elif t <= -9.8e-58: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= -5e-205: tmp = t_2 elif t <= -2.5e-261: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) elif t <= 2.3e-307: tmp = t_2 elif t <= 7e-302: tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i)) elif t <= 7.8e+67: tmp = t_1 + (x * (i * -4.0)) else: tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -5.2e+68) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))); elseif (t <= -9.8e-58) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= -5e-205) tmp = t_2; elseif (t <= -2.5e-261) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); elseif (t <= 2.3e-307) tmp = t_2; elseif (t <= 7e-302) tmp = Float64(x * Float64(Float64(t * Float64(y * Float64(18.0 * z))) - Float64(4.0 * i))); elseif (t <= 7.8e+67) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (t <= -5.2e+68)
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
elseif (t <= -9.8e-58)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= -5e-205)
tmp = t_2;
elseif (t <= -2.5e-261)
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
elseif (t <= 2.3e-307)
tmp = t_2;
elseif (t <= 7e-302)
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
elseif (t <= 7.8e+67)
tmp = t_1 + (x * (i * -4.0));
else
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -5.2e+68], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-58], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-205], t$95$2, If[LessEqual[t, -2.5e-261], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-307], t$95$2, If[LessEqual[t, 7e-302], N[(x * N[(N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+67], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+68}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-261}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-302}:\\
\;\;\;\;x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if t < -5.1999999999999996e68Initial program 83.7%
Taylor expanded in x around 0 77.7%
Taylor expanded in t around inf 65.0%
cancel-sign-sub-inv65.0%
*-commutative65.0%
associate-*l*68.6%
metadata-eval68.6%
Simplified68.6%
if -5.1999999999999996e68 < t < -9.80000000000000061e-58Initial program 96.2%
Simplified96.1%
Taylor expanded in x around inf 68.8%
if -9.80000000000000061e-58 < t < -5.00000000000000001e-205 or -2.4999999999999999e-261 < t < 2.2999999999999999e-307Initial program 84.5%
Simplified84.4%
Taylor expanded in b around inf 81.2%
if -5.00000000000000001e-205 < t < -2.4999999999999999e-261Initial program 65.3%
Simplified65.3%
Taylor expanded in x around inf 58.2%
pow158.2%
Applied egg-rr58.2%
unpow158.2%
associate-*r*70.6%
Simplified70.6%
if 2.2999999999999999e-307 < t < 7.0000000000000003e-302Initial program 68.2%
Simplified68.2%
Taylor expanded in x around inf 99.5%
pow199.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
Applied egg-rr99.5%
unpow199.5%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
if 7.0000000000000003e-302 < t < 7.80000000000000013e67Initial program 91.0%
Simplified89.6%
Taylor expanded in i around inf 67.2%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
if 7.80000000000000013e67 < t Initial program 81.7%
Taylor expanded in t around -inf 78.7%
associate-*r*78.7%
neg-mul-178.7%
cancel-sign-sub-inv78.7%
*-commutative78.7%
associate-*r*78.7%
metadata-eval78.7%
*-commutative78.7%
Simplified78.7%
Final simplification72.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
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= t -1.1e+62)
(* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))
(if (<= t -3.9e-57)
t_3
(if (<= t -1.7e-205)
t_2
(if (<= t -1.62e-261)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))
(if (<= t 3.6e-308)
t_2
(if (<= t 7e-302)
t_3
(if (<= t 1.1e+68)
(+ t_1 (* x (* i -4.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (t <= -1.1e+62) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -3.9e-57) {
tmp = t_3;
} else if (t <= -1.7e-205) {
tmp = t_2;
} else if (t <= -1.62e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 3.6e-308) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = t_3;
} else if (t <= 1.1e+68) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (t <= (-1.1d+62)) then
tmp = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
else if (t <= (-3.9d-57)) then
tmp = t_3
else if (t <= (-1.7d-205)) then
tmp = t_2
else if (t <= (-1.62d-261)) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else if (t <= 3.6d-308) then
tmp = t_2
else if (t <= 7d-302) then
tmp = t_3
else if (t <= 1.1d+68) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (t <= -1.1e+62) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -3.9e-57) {
tmp = t_3;
} else if (t <= -1.7e-205) {
tmp = t_2;
} else if (t <= -1.62e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 3.6e-308) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = t_3;
} else if (t <= 1.1e+68) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if t <= -1.1e+62: tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0)) elif t <= -3.9e-57: tmp = t_3 elif t <= -1.7e-205: tmp = t_2 elif t <= -1.62e-261: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) elif t <= 3.6e-308: tmp = t_2 elif t <= 7e-302: tmp = t_3 elif t <= 1.1e+68: tmp = t_1 + (x * (i * -4.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (t <= -1.1e+62) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))); elseif (t <= -3.9e-57) tmp = t_3; elseif (t <= -1.7e-205) tmp = t_2; elseif (t <= -1.62e-261) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); elseif (t <= 3.6e-308) tmp = t_2; elseif (t <= 7e-302) tmp = t_3; elseif (t <= 1.1e+68) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (t <= -1.1e+62)
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
elseif (t <= -3.9e-57)
tmp = t_3;
elseif (t <= -1.7e-205)
tmp = t_2;
elseif (t <= -1.62e-261)
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
elseif (t <= 3.6e-308)
tmp = t_2;
elseif (t <= 7e-302)
tmp = t_3;
elseif (t <= 1.1e+68)
tmp = t_1 + (x * (i * -4.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+62], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.9e-57], t$95$3, If[LessEqual[t, -1.7e-205], t$95$2, If[LessEqual[t, -1.62e-261], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-308], t$95$2, If[LessEqual[t, 7e-302], t$95$3, If[LessEqual[t, 1.1e+68], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+62}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq -3.9 \cdot 10^{-57}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.62 \cdot 10^{-261}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-302}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+68}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.10000000000000007e62Initial program 83.7%
Taylor expanded in x around 0 77.7%
Taylor expanded in t around inf 65.0%
cancel-sign-sub-inv65.0%
*-commutative65.0%
associate-*l*68.6%
metadata-eval68.6%
Simplified68.6%
if -1.10000000000000007e62 < t < -3.90000000000000006e-57 or 3.5999999999999999e-308 < t < 7.0000000000000003e-302Initial program 93.4%
Simplified93.3%
Taylor expanded in x around inf 71.9%
if -3.90000000000000006e-57 < t < -1.7000000000000001e-205 or -1.62000000000000006e-261 < t < 3.5999999999999999e-308Initial program 84.5%
Simplified84.4%
Taylor expanded in b around inf 81.2%
if -1.7000000000000001e-205 < t < -1.62000000000000006e-261Initial program 65.3%
Simplified65.3%
Taylor expanded in x around inf 58.2%
pow158.2%
Applied egg-rr58.2%
unpow158.2%
associate-*r*70.6%
Simplified70.6%
if 7.0000000000000003e-302 < t < 1.09999999999999994e68Initial program 91.0%
Simplified89.6%
Taylor expanded in i around inf 67.2%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
if 1.09999999999999994e68 < t Initial program 81.7%
Simplified85.3%
Taylor expanded in t around inf 78.7%
Final simplification72.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
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= t -6.2e+72)
(* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))
(if (<= t -3.7e-56)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t -4.6e-205)
t_2
(if (<= t -1.92e-261)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))
(if (<= t 2.5e-307)
t_2
(if (<= t 7e-302)
(* x (- (* t (* y (* 18.0 z))) (* 4.0 i)))
(if (<= t 3.3e+62)
(+ t_1 (* x (* i -4.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -6.2e+72) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -3.7e-56) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -4.6e-205) {
tmp = t_2;
} else if (t <= -1.92e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 2.5e-307) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else if (t <= 3.3e+62) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
if (t <= (-6.2d+72)) then
tmp = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
else if (t <= (-3.7d-56)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= (-4.6d-205)) then
tmp = t_2
else if (t <= (-1.92d-261)) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else if (t <= 2.5d-307) then
tmp = t_2
else if (t <= 7d-302) then
tmp = x * ((t * (y * (18.0d0 * z))) - (4.0d0 * i))
else if (t <= 3.3d+62) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -6.2e+72) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -3.7e-56) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -4.6e-205) {
tmp = t_2;
} else if (t <= -1.92e-261) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (t <= 2.5e-307) {
tmp = t_2;
} else if (t <= 7e-302) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else if (t <= 3.3e+62) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if t <= -6.2e+72: tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0)) elif t <= -3.7e-56: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= -4.6e-205: tmp = t_2 elif t <= -1.92e-261: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) elif t <= 2.5e-307: tmp = t_2 elif t <= 7e-302: tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i)) elif t <= 3.3e+62: tmp = t_1 + (x * (i * -4.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -6.2e+72) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))); elseif (t <= -3.7e-56) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= -4.6e-205) tmp = t_2; elseif (t <= -1.92e-261) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); elseif (t <= 2.5e-307) tmp = t_2; elseif (t <= 7e-302) tmp = Float64(x * Float64(Float64(t * Float64(y * Float64(18.0 * z))) - Float64(4.0 * i))); elseif (t <= 3.3e+62) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (t <= -6.2e+72)
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
elseif (t <= -3.7e-56)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= -4.6e-205)
tmp = t_2;
elseif (t <= -1.92e-261)
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
elseif (t <= 2.5e-307)
tmp = t_2;
elseif (t <= 7e-302)
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
elseif (t <= 3.3e+62)
tmp = t_1 + (x * (i * -4.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -6.2e+72], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.7e-56], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.6e-205], t$95$2, If[LessEqual[t, -1.92e-261], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-307], t$95$2, If[LessEqual[t, 7e-302], N[(x * N[(N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+62], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-56}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.92 \cdot 10^{-261}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-302}:\\
\;\;\;\;x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+62}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -6.19999999999999977e72Initial program 83.7%
Taylor expanded in x around 0 77.7%
Taylor expanded in t around inf 65.0%
cancel-sign-sub-inv65.0%
*-commutative65.0%
associate-*l*68.6%
metadata-eval68.6%
Simplified68.6%
if -6.19999999999999977e72 < t < -3.7000000000000002e-56Initial program 96.2%
Simplified96.1%
Taylor expanded in x around inf 68.8%
if -3.7000000000000002e-56 < t < -4.5999999999999998e-205 or -1.92e-261 < t < 2.50000000000000007e-307Initial program 84.5%
Simplified84.4%
Taylor expanded in b around inf 81.2%
if -4.5999999999999998e-205 < t < -1.92e-261Initial program 65.3%
Simplified65.3%
Taylor expanded in x around inf 58.2%
pow158.2%
Applied egg-rr58.2%
unpow158.2%
associate-*r*70.6%
Simplified70.6%
if 2.50000000000000007e-307 < t < 7.0000000000000003e-302Initial program 68.2%
Simplified68.2%
Taylor expanded in x around inf 99.5%
pow199.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
Applied egg-rr99.5%
unpow199.5%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
if 7.0000000000000003e-302 < t < 3.3e62Initial program 91.0%
Simplified89.6%
Taylor expanded in i around inf 67.2%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
if 3.3e62 < t Initial program 81.7%
Simplified85.3%
Taylor expanded in t around inf 78.7%
Final simplification72.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
(let* ((t_1 (* (* t a) -4.0)) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= x -48000000000.0)
t_2
(if (<= x -4.8e-167)
(* b c)
(if (<= x 1.9e-280)
(* j (* k -27.0))
(if (<= x 7.5e-118)
t_1
(if (<= x 3.8e+57)
t_2
(if (<= x 7.8e+127)
t_1
(if (<= x 2.3e+195) t_2 (* (* x 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 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (x <= -48000000000.0) {
tmp = t_2;
} else if (x <= -4.8e-167) {
tmp = b * c;
} else if (x <= 1.9e-280) {
tmp = j * (k * -27.0);
} else if (x <= 7.5e-118) {
tmp = t_1;
} else if (x <= 3.8e+57) {
tmp = t_2;
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 2.3e+195) {
tmp = t_2;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t * a) * (-4.0d0)
t_2 = 18.0d0 * (t * (x * (y * z)))
if (x <= (-48000000000.0d0)) then
tmp = t_2
else if (x <= (-4.8d-167)) then
tmp = b * c
else if (x <= 1.9d-280) then
tmp = j * (k * (-27.0d0))
else if (x <= 7.5d-118) then
tmp = t_1
else if (x <= 3.8d+57) then
tmp = t_2
else if (x <= 7.8d+127) then
tmp = t_1
else if (x <= 2.3d+195) then
tmp = t_2
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (x <= -48000000000.0) {
tmp = t_2;
} else if (x <= -4.8e-167) {
tmp = b * c;
} else if (x <= 1.9e-280) {
tmp = j * (k * -27.0);
} else if (x <= 7.5e-118) {
tmp = t_1;
} else if (x <= 3.8e+57) {
tmp = t_2;
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 2.3e+195) {
tmp = t_2;
} else {
tmp = (x * 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 = (t * a) * -4.0 t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if x <= -48000000000.0: tmp = t_2 elif x <= -4.8e-167: tmp = b * c elif x <= 1.9e-280: tmp = j * (k * -27.0) elif x <= 7.5e-118: tmp = t_1 elif x <= 3.8e+57: tmp = t_2 elif x <= 7.8e+127: tmp = t_1 elif x <= 2.3e+195: tmp = t_2 else: tmp = (x * 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(t * a) * -4.0) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (x <= -48000000000.0) tmp = t_2; elseif (x <= -4.8e-167) tmp = Float64(b * c); elseif (x <= 1.9e-280) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 7.5e-118) tmp = t_1; elseif (x <= 3.8e+57) tmp = t_2; elseif (x <= 7.8e+127) tmp = t_1; elseif (x <= 2.3e+195) tmp = t_2; else tmp = Float64(Float64(x * 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 = (t * a) * -4.0;
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (x <= -48000000000.0)
tmp = t_2;
elseif (x <= -4.8e-167)
tmp = b * c;
elseif (x <= 1.9e-280)
tmp = j * (k * -27.0);
elseif (x <= 7.5e-118)
tmp = t_1;
elseif (x <= 3.8e+57)
tmp = t_2;
elseif (x <= 7.8e+127)
tmp = t_1;
elseif (x <= 2.3e+195)
tmp = t_2;
else
tmp = (x * 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[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -48000000000.0], t$95$2, If[LessEqual[x, -4.8e-167], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.9e-280], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-118], t$95$1, If[LessEqual[x, 3.8e+57], t$95$2, If[LessEqual[x, 7.8e+127], t$95$1, If[LessEqual[x, 2.3e+195], t$95$2, N[(N[(x * i), $MachinePrecision] * -4.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}
t_1 := \left(t \cdot a\right) \cdot -4\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -48000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-167}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-280}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+57}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+195}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -4.8e10 or 7.49999999999999978e-118 < x < 3.7999999999999999e57 or 7.79999999999999962e127 < x < 2.3000000000000001e195Initial program 79.0%
Simplified83.5%
Taylor expanded in x around inf 61.7%
Taylor expanded in t around inf 47.6%
if -4.8e10 < x < -4.79999999999999986e-167Initial program 92.6%
Taylor expanded in x around 0 90.4%
Taylor expanded in b around inf 43.1%
if -4.79999999999999986e-167 < x < 1.9000000000000001e-280Initial program 92.4%
Taylor expanded in x around 0 71.9%
Taylor expanded in j around inf 50.5%
*-commutative50.5%
associate-*r*50.5%
Simplified50.5%
if 1.9000000000000001e-280 < x < 7.49999999999999978e-118 or 3.7999999999999999e57 < x < 7.79999999999999962e127Initial program 95.6%
Taylor expanded in x around 0 89.4%
Taylor expanded in a around inf 42.8%
*-commutative42.8%
Simplified42.8%
if 2.3000000000000001e195 < x Initial program 74.4%
Simplified81.6%
Taylor expanded in x around inf 85.7%
Taylor expanded in t around 0 56.7%
Final simplification47.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 (* (* t a) -4.0)) (t_2 (* 18.0 (* t (* y (* x z))))))
(if (<= x -80000000000.0)
t_2
(if (<= x -3.2e-164)
(* b c)
(if (<= x 1.45e-279)
(* j (* k -27.0))
(if (<= x 7.4e-118)
t_1
(if (<= x 1.8e+52)
(* 18.0 (* t (* x (* y z))))
(if (<= x 7.8e+127)
t_1
(if (<= x 2.2e+195) t_2 (* (* x 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 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (y * (x * z)));
double tmp;
if (x <= -80000000000.0) {
tmp = t_2;
} else if (x <= -3.2e-164) {
tmp = b * c;
} else if (x <= 1.45e-279) {
tmp = j * (k * -27.0);
} else if (x <= 7.4e-118) {
tmp = t_1;
} else if (x <= 1.8e+52) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 2.2e+195) {
tmp = t_2;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t * a) * (-4.0d0)
t_2 = 18.0d0 * (t * (y * (x * z)))
if (x <= (-80000000000.0d0)) then
tmp = t_2
else if (x <= (-3.2d-164)) then
tmp = b * c
else if (x <= 1.45d-279) then
tmp = j * (k * (-27.0d0))
else if (x <= 7.4d-118) then
tmp = t_1
else if (x <= 1.8d+52) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 7.8d+127) then
tmp = t_1
else if (x <= 2.2d+195) then
tmp = t_2
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (y * (x * z)));
double tmp;
if (x <= -80000000000.0) {
tmp = t_2;
} else if (x <= -3.2e-164) {
tmp = b * c;
} else if (x <= 1.45e-279) {
tmp = j * (k * -27.0);
} else if (x <= 7.4e-118) {
tmp = t_1;
} else if (x <= 1.8e+52) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 2.2e+195) {
tmp = t_2;
} else {
tmp = (x * 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 = (t * a) * -4.0 t_2 = 18.0 * (t * (y * (x * z))) tmp = 0 if x <= -80000000000.0: tmp = t_2 elif x <= -3.2e-164: tmp = b * c elif x <= 1.45e-279: tmp = j * (k * -27.0) elif x <= 7.4e-118: tmp = t_1 elif x <= 1.8e+52: tmp = 18.0 * (t * (x * (y * z))) elif x <= 7.8e+127: tmp = t_1 elif x <= 2.2e+195: tmp = t_2 else: tmp = (x * 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(t * a) * -4.0) t_2 = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))) tmp = 0.0 if (x <= -80000000000.0) tmp = t_2; elseif (x <= -3.2e-164) tmp = Float64(b * c); elseif (x <= 1.45e-279) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 7.4e-118) tmp = t_1; elseif (x <= 1.8e+52) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 7.8e+127) tmp = t_1; elseif (x <= 2.2e+195) tmp = t_2; else tmp = Float64(Float64(x * 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 = (t * a) * -4.0;
t_2 = 18.0 * (t * (y * (x * z)));
tmp = 0.0;
if (x <= -80000000000.0)
tmp = t_2;
elseif (x <= -3.2e-164)
tmp = b * c;
elseif (x <= 1.45e-279)
tmp = j * (k * -27.0);
elseif (x <= 7.4e-118)
tmp = t_1;
elseif (x <= 1.8e+52)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 7.8e+127)
tmp = t_1;
elseif (x <= 2.2e+195)
tmp = t_2;
else
tmp = (x * 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[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -80000000000.0], t$95$2, If[LessEqual[x, -3.2e-164], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.45e-279], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.4e-118], t$95$1, If[LessEqual[x, 1.8e+52], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+127], t$95$1, If[LessEqual[x, 2.2e+195], t$95$2, N[(N[(x * i), $MachinePrecision] * -4.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}
t_1 := \left(t \cdot a\right) \cdot -4\\
t_2 := 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -80000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-164}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-279}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 7.4 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+52}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+195}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -8e10 or 7.79999999999999962e127 < x < 2.2e195Initial program 72.3%
Simplified76.4%
Taylor expanded in x around inf 70.0%
Taylor expanded in t around inf 53.6%
*-commutative53.6%
associate-*l*55.0%
Simplified55.0%
if -8e10 < x < -3.2e-164Initial program 92.6%
Taylor expanded in x around 0 90.4%
Taylor expanded in b around inf 43.1%
if -3.2e-164 < x < 1.45e-279Initial program 92.4%
Taylor expanded in x around 0 71.9%
Taylor expanded in j around inf 50.5%
*-commutative50.5%
associate-*r*50.5%
Simplified50.5%
if 1.45e-279 < x < 7.40000000000000029e-118 or 1.8e52 < x < 7.79999999999999962e127Initial program 95.6%
Taylor expanded in x around 0 89.4%
Taylor expanded in a around inf 42.8%
*-commutative42.8%
Simplified42.8%
if 7.40000000000000029e-118 < x < 1.8e52Initial program 91.9%
Simplified97.2%
Taylor expanded in x around inf 45.7%
Taylor expanded in t around inf 36.1%
if 2.2e195 < x Initial program 74.4%
Simplified81.6%
Taylor expanded in x around inf 85.7%
Taylor expanded in t around 0 56.7%
Final simplification47.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 (* (* t a) -4.0)) (t_2 (* 18.0 (* t (* y (* x z))))))
(if (<= x -54000000000.0)
t_2
(if (<= x -1.55e-165)
(* b c)
(if (<= x 8e-280)
(* j (* k -27.0))
(if (<= x 3.7e-118)
t_1
(if (<= x 4.2e+69)
(* (* y z) (* 18.0 (* x t)))
(if (<= x 7.8e+127)
t_1
(if (<= x 6.6e+193) t_2 (* (* x 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 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (y * (x * z)));
double tmp;
if (x <= -54000000000.0) {
tmp = t_2;
} else if (x <= -1.55e-165) {
tmp = b * c;
} else if (x <= 8e-280) {
tmp = j * (k * -27.0);
} else if (x <= 3.7e-118) {
tmp = t_1;
} else if (x <= 4.2e+69) {
tmp = (y * z) * (18.0 * (x * t));
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 6.6e+193) {
tmp = t_2;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t * a) * (-4.0d0)
t_2 = 18.0d0 * (t * (y * (x * z)))
if (x <= (-54000000000.0d0)) then
tmp = t_2
else if (x <= (-1.55d-165)) then
tmp = b * c
else if (x <= 8d-280) then
tmp = j * (k * (-27.0d0))
else if (x <= 3.7d-118) then
tmp = t_1
else if (x <= 4.2d+69) then
tmp = (y * z) * (18.0d0 * (x * t))
else if (x <= 7.8d+127) then
tmp = t_1
else if (x <= 6.6d+193) then
tmp = t_2
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (t * a) * -4.0;
double t_2 = 18.0 * (t * (y * (x * z)));
double tmp;
if (x <= -54000000000.0) {
tmp = t_2;
} else if (x <= -1.55e-165) {
tmp = b * c;
} else if (x <= 8e-280) {
tmp = j * (k * -27.0);
} else if (x <= 3.7e-118) {
tmp = t_1;
} else if (x <= 4.2e+69) {
tmp = (y * z) * (18.0 * (x * t));
} else if (x <= 7.8e+127) {
tmp = t_1;
} else if (x <= 6.6e+193) {
tmp = t_2;
} else {
tmp = (x * 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 = (t * a) * -4.0 t_2 = 18.0 * (t * (y * (x * z))) tmp = 0 if x <= -54000000000.0: tmp = t_2 elif x <= -1.55e-165: tmp = b * c elif x <= 8e-280: tmp = j * (k * -27.0) elif x <= 3.7e-118: tmp = t_1 elif x <= 4.2e+69: tmp = (y * z) * (18.0 * (x * t)) elif x <= 7.8e+127: tmp = t_1 elif x <= 6.6e+193: tmp = t_2 else: tmp = (x * 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(t * a) * -4.0) t_2 = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))) tmp = 0.0 if (x <= -54000000000.0) tmp = t_2; elseif (x <= -1.55e-165) tmp = Float64(b * c); elseif (x <= 8e-280) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 3.7e-118) tmp = t_1; elseif (x <= 4.2e+69) tmp = Float64(Float64(y * z) * Float64(18.0 * Float64(x * t))); elseif (x <= 7.8e+127) tmp = t_1; elseif (x <= 6.6e+193) tmp = t_2; else tmp = Float64(Float64(x * 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 = (t * a) * -4.0;
t_2 = 18.0 * (t * (y * (x * z)));
tmp = 0.0;
if (x <= -54000000000.0)
tmp = t_2;
elseif (x <= -1.55e-165)
tmp = b * c;
elseif (x <= 8e-280)
tmp = j * (k * -27.0);
elseif (x <= 3.7e-118)
tmp = t_1;
elseif (x <= 4.2e+69)
tmp = (y * z) * (18.0 * (x * t));
elseif (x <= 7.8e+127)
tmp = t_1;
elseif (x <= 6.6e+193)
tmp = t_2;
else
tmp = (x * 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[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -54000000000.0], t$95$2, If[LessEqual[x, -1.55e-165], N[(b * c), $MachinePrecision], If[LessEqual[x, 8e-280], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-118], t$95$1, If[LessEqual[x, 4.2e+69], N[(N[(y * z), $MachinePrecision] * N[(18.0 * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+127], t$95$1, If[LessEqual[x, 6.6e+193], t$95$2, N[(N[(x * i), $MachinePrecision] * -4.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}
t_1 := \left(t \cdot a\right) \cdot -4\\
t_2 := 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -54000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-165}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-280}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+69}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(18 \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+193}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -5.4e10 or 7.79999999999999962e127 < x < 6.6e193Initial program 72.3%
Simplified76.4%
Taylor expanded in x around inf 70.0%
Taylor expanded in t around inf 53.6%
*-commutative53.6%
associate-*l*55.0%
Simplified55.0%
if -5.4e10 < x < -1.54999999999999998e-165Initial program 92.6%
Taylor expanded in x around 0 90.4%
Taylor expanded in b around inf 43.1%
if -1.54999999999999998e-165 < x < 7.9999999999999997e-280Initial program 92.4%
Taylor expanded in x around 0 71.9%
Taylor expanded in j around inf 50.5%
*-commutative50.5%
associate-*r*50.5%
Simplified50.5%
if 7.9999999999999997e-280 < x < 3.70000000000000014e-118 or 4.2000000000000003e69 < x < 7.79999999999999962e127Initial program 97.5%
Taylor expanded in x around 0 88.4%
Taylor expanded in a around inf 44.4%
*-commutative44.4%
Simplified44.4%
if 3.70000000000000014e-118 < x < 4.2000000000000003e69Initial program 90.3%
Simplified95.1%
Taylor expanded in x around inf 43.8%
Taylor expanded in t around inf 32.9%
associate-*r*35.2%
associate-*r*35.2%
Simplified35.2%
if 6.6e193 < x Initial program 74.4%
Simplified81.6%
Taylor expanded in x around inf 85.7%
Taylor expanded in t around 0 56.7%
Final simplification47.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 (<= t -5e+61) (not (<= t 5.2e-56)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(- (+ (* b c) (* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))) (* 4.0 (* t a)))
(* (* j 27.0) k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+61) || !(t <= 5.2e-56)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5d+61)) .or. (.not. (t <= 5.2d-56))) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (((b * c) + (x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i)))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+61) || !(t <= 5.2e-56)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5e+61) or not (t <= 5.2e-56): tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5e+61) || !(t <= 5.2e-56)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5e+61) || ~((t <= 5.2e-56)))
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5e+61], N[Not[LessEqual[t, 5.2e-56]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+61} \lor \neg \left(t \leq 5.2 \cdot 10^{-56}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -5.00000000000000018e61 or 5.19999999999999994e-56 < t Initial program 84.4%
Simplified87.1%
if -5.00000000000000018e61 < t < 5.19999999999999994e-56Initial program 86.6%
Taylor expanded in x around 0 92.8%
pow145.1%
Applied egg-rr92.8%
unpow145.1%
associate-*r*45.9%
Simplified98.3%
Final simplification92.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* 18.0 (* y (* x z))) (* a -4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* x (* i -4.0)))))
(if (<= t -6e-17)
t_1
(if (<= t -1e-46)
t_3
(if (<= t -3.1e-49)
t_1
(if (<= t -1.45e-197)
(+ (* b c) t_2)
(if (<= t 4.8e+64) t_3 t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (t <= -6e-17) {
tmp = t_1;
} else if (t <= -1e-46) {
tmp = t_3;
} else if (t <= -3.1e-49) {
tmp = t_1;
} else if (t <= -1.45e-197) {
tmp = (b * c) + t_2;
} else if (t <= 4.8e+64) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (x * (i * (-4.0d0)))
if (t <= (-6d-17)) then
tmp = t_1
else if (t <= (-1d-46)) then
tmp = t_3
else if (t <= (-3.1d-49)) then
tmp = t_1
else if (t <= (-1.45d-197)) then
tmp = (b * c) + t_2
else if (t <= 4.8d+64) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (t <= -6e-17) {
tmp = t_1;
} else if (t <= -1e-46) {
tmp = t_3;
} else if (t <= -3.1e-49) {
tmp = t_1;
} else if (t <= -1.45e-197) {
tmp = (b * c) + t_2;
} else if (t <= 4.8e+64) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (x * (i * -4.0)) tmp = 0 if t <= -6e-17: tmp = t_1 elif t <= -1e-46: tmp = t_3 elif t <= -3.1e-49: tmp = t_1 elif t <= -1.45e-197: tmp = (b * c) + t_2 elif t <= 4.8e+64: tmp = t_3 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(x * Float64(i * -4.0))) tmp = 0.0 if (t <= -6e-17) tmp = t_1; elseif (t <= -1e-46) tmp = t_3; elseif (t <= -3.1e-49) tmp = t_1; elseif (t <= -1.45e-197) tmp = Float64(Float64(b * c) + t_2); elseif (t <= 4.8e+64) tmp = t_3; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (x * (i * -4.0));
tmp = 0.0;
if (t <= -6e-17)
tmp = t_1;
elseif (t <= -1e-46)
tmp = t_3;
elseif (t <= -3.1e-49)
tmp = t_1;
elseif (t <= -1.45e-197)
tmp = (b * c) + t_2;
elseif (t <= 4.8e+64)
tmp = t_3;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e-17], t$95$1, If[LessEqual[t, -1e-46], t$95$3, If[LessEqual[t, -3.1e-49], t$95$1, If[LessEqual[t, -1.45e-197], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 4.8e+64], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-46}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-197}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+64}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.00000000000000012e-17 or -1.00000000000000002e-46 < t < -3.1e-49 or 4.79999999999999999e64 < t Initial program 84.6%
Taylor expanded in x around 0 80.9%
Taylor expanded in t around inf 71.1%
cancel-sign-sub-inv71.1%
*-commutative71.1%
associate-*l*71.1%
metadata-eval71.1%
Simplified71.1%
if -6.00000000000000012e-17 < t < -1.00000000000000002e-46 or -1.45000000000000011e-197 < t < 4.79999999999999999e64Initial program 85.0%
Simplified84.0%
Taylor expanded in i around inf 67.0%
associate-*r*67.0%
*-commutative67.0%
Simplified67.0%
if -3.1e-49 < t < -1.45000000000000011e-197Initial program 91.9%
Simplified91.7%
Taylor expanded in b around inf 83.5%
Final simplification70.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 (* t (+ (* 18.0 (* y (* x z))) (* a -4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* x (* i -4.0)))))
(if (<= t -1.05e-17)
t_1
(if (<= t -3.5e-46)
t_3
(if (<= t -1.8e-50)
t_1
(if (<= t -4e-191)
(+ (* b c) t_2)
(if (<= t 2.3e+65)
t_3
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (t <= -1.05e-17) {
tmp = t_1;
} else if (t <= -3.5e-46) {
tmp = t_3;
} else if (t <= -1.8e-50) {
tmp = t_1;
} else if (t <= -4e-191) {
tmp = (b * c) + t_2;
} else if (t <= 2.3e+65) {
tmp = t_3;
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (x * (i * (-4.0d0)))
if (t <= (-1.05d-17)) then
tmp = t_1
else if (t <= (-3.5d-46)) then
tmp = t_3
else if (t <= (-1.8d-50)) then
tmp = t_1
else if (t <= (-4d-191)) then
tmp = (b * c) + t_2
else if (t <= 2.3d+65) then
tmp = t_3
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (t <= -1.05e-17) {
tmp = t_1;
} else if (t <= -3.5e-46) {
tmp = t_3;
} else if (t <= -1.8e-50) {
tmp = t_1;
} else if (t <= -4e-191) {
tmp = (b * c) + t_2;
} else if (t <= 2.3e+65) {
tmp = t_3;
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (x * (i * -4.0)) tmp = 0 if t <= -1.05e-17: tmp = t_1 elif t <= -3.5e-46: tmp = t_3 elif t <= -1.8e-50: tmp = t_1 elif t <= -4e-191: tmp = (b * c) + t_2 elif t <= 2.3e+65: tmp = t_3 else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(x * Float64(i * -4.0))) tmp = 0.0 if (t <= -1.05e-17) tmp = t_1; elseif (t <= -3.5e-46) tmp = t_3; elseif (t <= -1.8e-50) tmp = t_1; elseif (t <= -4e-191) tmp = Float64(Float64(b * c) + t_2); elseif (t <= 2.3e+65) tmp = t_3; else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (x * (i * -4.0));
tmp = 0.0;
if (t <= -1.05e-17)
tmp = t_1;
elseif (t <= -3.5e-46)
tmp = t_3;
elseif (t <= -1.8e-50)
tmp = t_1;
elseif (t <= -4e-191)
tmp = (b * c) + t_2;
elseif (t <= 2.3e+65)
tmp = t_3;
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-17], t$95$1, If[LessEqual[t, -3.5e-46], t$95$3, If[LessEqual[t, -1.8e-50], t$95$1, If[LessEqual[t, -4e-191], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 2.3e+65], t$95$3, N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-46}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-191}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+65}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.04999999999999996e-17 or -3.5000000000000002e-46 < t < -1.7999999999999999e-50Initial program 86.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in t around inf 65.4%
cancel-sign-sub-inv65.4%
*-commutative65.4%
associate-*l*66.8%
metadata-eval66.8%
Simplified66.8%
if -1.04999999999999996e-17 < t < -3.5000000000000002e-46 or -4.0000000000000001e-191 < t < 2.3e65Initial program 85.0%
Simplified84.0%
Taylor expanded in i around inf 67.0%
associate-*r*67.0%
*-commutative67.0%
Simplified67.0%
if -1.7999999999999999e-50 < t < -4.0000000000000001e-191Initial program 91.9%
Simplified91.7%
Taylor expanded in b around inf 83.5%
if 2.3e65 < t Initial program 81.7%
Simplified85.3%
Taylor expanded in t around inf 78.7%
Final simplification71.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* (* j 27.0) k) -2e+224)
(+ (* b c) (* j (* k -27.0)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= -2e+224) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((j * 27.0d0) * k) <= (-2d+224)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= -2e+224) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((j * 27.0) * k) <= -2e+224: tmp = (b * c) + (j * (k * -27.0)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(j * 27.0) * k) <= -2e+224) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((j * 27.0) * k) <= -2e+224)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision], -2e+224], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+224}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1.99999999999999994e224Initial program 57.7%
Simplified52.1%
Taylor expanded in b around inf 74.2%
if -1.99999999999999994e224 < (*.f64 (*.f64 j 27) k) Initial program 89.8%
Simplified91.4%
Final simplification89.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))) (t_2 (+ t_1 (* (* t a) -4.0))))
(if (<= t -7.8e+144)
(* (* y z) (* 18.0 (* x t)))
(if (<= t -5.6e+51)
t_2
(if (<= t -8.4e-20)
(* 18.0 (* t (* x (* y z))))
(if (<= t -1.7e-199)
(+ (* b c) t_1)
(if (<= t 3.4e+34) (+ t_1 (* x (* i -4.0))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + ((t * a) * -4.0);
double tmp;
if (t <= -7.8e+144) {
tmp = (y * z) * (18.0 * (x * t));
} else if (t <= -5.6e+51) {
tmp = t_2;
} else if (t <= -8.4e-20) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -1.7e-199) {
tmp = (b * c) + t_1;
} else if (t <= 3.4e+34) {
tmp = t_1 + (x * (i * -4.0));
} 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 + ((t * a) * (-4.0d0))
if (t <= (-7.8d+144)) then
tmp = (y * z) * (18.0d0 * (x * t))
else if (t <= (-5.6d+51)) then
tmp = t_2
else if (t <= (-8.4d-20)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (t <= (-1.7d-199)) then
tmp = (b * c) + t_1
else if (t <= 3.4d+34) then
tmp = t_1 + (x * (i * (-4.0d0)))
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 + ((t * a) * -4.0);
double tmp;
if (t <= -7.8e+144) {
tmp = (y * z) * (18.0 * (x * t));
} else if (t <= -5.6e+51) {
tmp = t_2;
} else if (t <= -8.4e-20) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -1.7e-199) {
tmp = (b * c) + t_1;
} else if (t <= 3.4e+34) {
tmp = t_1 + (x * (i * -4.0));
} 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 + ((t * a) * -4.0) tmp = 0 if t <= -7.8e+144: tmp = (y * z) * (18.0 * (x * t)) elif t <= -5.6e+51: tmp = t_2 elif t <= -8.4e-20: tmp = 18.0 * (t * (x * (y * z))) elif t <= -1.7e-199: tmp = (b * c) + t_1 elif t <= 3.4e+34: tmp = t_1 + (x * (i * -4.0)) 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(Float64(t * a) * -4.0)) tmp = 0.0 if (t <= -7.8e+144) tmp = Float64(Float64(y * z) * Float64(18.0 * Float64(x * t))); elseif (t <= -5.6e+51) tmp = t_2; elseif (t <= -8.4e-20) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (t <= -1.7e-199) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 3.4e+34) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); 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 + ((t * a) * -4.0);
tmp = 0.0;
if (t <= -7.8e+144)
tmp = (y * z) * (18.0 * (x * t));
elseif (t <= -5.6e+51)
tmp = t_2;
elseif (t <= -8.4e-20)
tmp = 18.0 * (t * (x * (y * z)));
elseif (t <= -1.7e-199)
tmp = (b * c) + t_1;
elseif (t <= 3.4e+34)
tmp = t_1 + (x * (i * -4.0));
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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+144], N[(N[(y * z), $MachinePrecision] * N[(18.0 * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.6e+51], t$95$2, If[LessEqual[t, -8.4e-20], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-199], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 3.4e+34], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $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 + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+144}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(18 \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8.4 \cdot 10^{-20}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-199}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.80000000000000036e144Initial program 80.5%
Simplified91.0%
Taylor expanded in x around inf 60.4%
Taylor expanded in t around inf 57.2%
associate-*r*59.9%
associate-*r*59.9%
Simplified59.9%
if -7.80000000000000036e144 < t < -5.60000000000000009e51 or 3.3999999999999999e34 < t Initial program 83.7%
Simplified83.7%
Taylor expanded in a around inf 52.7%
*-commutative52.7%
Simplified52.7%
if -5.60000000000000009e51 < t < -8.3999999999999996e-20Initial program 99.9%
Simplified99.8%
Taylor expanded in x around inf 77.0%
Taylor expanded in t around inf 66.1%
if -8.3999999999999996e-20 < t < -1.70000000000000003e-199Initial program 90.8%
Simplified90.6%
Taylor expanded in b around inf 72.5%
if -1.70000000000000003e-199 < t < 3.3999999999999999e34Initial program 84.3%
Simplified83.2%
Taylor expanded in i around inf 67.3%
associate-*r*67.3%
*-commutative67.3%
Simplified67.3%
Final simplification62.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 (* 4.0 (* x i))))
(if (<= t -7.6e+146)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -4.4e+46)
(- (* b c) (+ (* 4.0 (* t a)) t_1))
(if (<= t -0.00068)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t 6.8e+74)
(- (- (* b c) t_1) (* (* j 27.0) k))
(* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (t <= -7.6e+146) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -4.4e+46) {
tmp = (b * c) - ((4.0 * (t * a)) + t_1);
} else if (t <= -0.00068) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 6.8e+74) {
tmp = ((b * c) - t_1) - ((j * 27.0) * k);
} else {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if (t <= (-7.6d+146)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-4.4d+46)) then
tmp = (b * c) - ((4.0d0 * (t * a)) + t_1)
else if (t <= (-0.00068d0)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= 6.8d+74) then
tmp = ((b * c) - t_1) - ((j * 27.0d0) * k)
else
tmp = t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (t <= -7.6e+146) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -4.4e+46) {
tmp = (b * c) - ((4.0 * (t * a)) + t_1);
} else if (t <= -0.00068) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 6.8e+74) {
tmp = ((b * c) - t_1) - ((j * 27.0) * k);
} else {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if t <= -7.6e+146: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -4.4e+46: tmp = (b * c) - ((4.0 * (t * a)) + t_1) elif t <= -0.00068: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= 6.8e+74: tmp = ((b * c) - t_1) - ((j * 27.0) * k) else: tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -7.6e+146) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -4.4e+46) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_1)); elseif (t <= -0.00068) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= 6.8e+74) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -7.6e+146)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -4.4e+46)
tmp = (b * c) - ((4.0 * (t * a)) + t_1);
elseif (t <= -0.00068)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= 6.8e+74)
tmp = ((b * c) - t_1) - ((j * 27.0) * k);
else
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.6e+146], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e+46], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -0.00068], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+74], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+146}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t\_1\right)\\
\mathbf{elif}\;t \leq -0.00068:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+74}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if t < -7.59999999999999958e146Initial program 82.4%
Simplified90.5%
Taylor expanded in t around inf 78.6%
if -7.59999999999999958e146 < t < -4.4000000000000001e46Initial program 87.5%
Taylor expanded in y around 0 82.0%
Taylor expanded in j around 0 71.6%
if -4.4000000000000001e46 < t < -6.8e-4Initial program 99.9%
Simplified99.9%
Taylor expanded in x around inf 84.7%
if -6.8e-4 < t < 6.7999999999999998e74Initial program 85.9%
Taylor expanded in t around 0 80.2%
if 6.7999999999999998e74 < t Initial program 81.7%
Taylor expanded in t around -inf 78.7%
associate-*r*78.7%
neg-mul-178.7%
cancel-sign-sub-inv78.7%
*-commutative78.7%
associate-*r*78.7%
metadata-eval78.7%
*-commutative78.7%
Simplified78.7%
Final simplification79.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= t -2.5e+76)
(* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))
(if (<= t -1.05e-55)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t -9e-197)
(+ (* b c) t_1)
(if (<= t 5.5e+62)
(+ t_1 (* x (* i -4.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -2.5e+76) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -1.05e-55) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -9e-197) {
tmp = (b * c) + t_1;
} else if (t <= 5.5e+62) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (t <= (-2.5d+76)) then
tmp = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
else if (t <= (-1.05d-55)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= (-9d-197)) then
tmp = (b * c) + t_1
else if (t <= 5.5d+62) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -2.5e+76) {
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
} else if (t <= -1.05e-55) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= -9e-197) {
tmp = (b * c) + t_1;
} else if (t <= 5.5e+62) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if t <= -2.5e+76: tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0)) elif t <= -1.05e-55: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= -9e-197: tmp = (b * c) + t_1 elif t <= 5.5e+62: tmp = t_1 + (x * (i * -4.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -2.5e+76) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))); elseif (t <= -1.05e-55) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= -9e-197) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 5.5e+62) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (t <= -2.5e+76)
tmp = t * ((18.0 * (y * (x * z))) + (a * -4.0));
elseif (t <= -1.05e-55)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= -9e-197)
tmp = (b * c) + t_1;
elseif (t <= 5.5e+62)
tmp = t_1 + (x * (i * -4.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+76], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e-55], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-197], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 5.5e+62], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+76}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-197}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+62}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.49999999999999996e76Initial program 83.7%
Taylor expanded in x around 0 77.7%
Taylor expanded in t around inf 65.0%
cancel-sign-sub-inv65.0%
*-commutative65.0%
associate-*l*68.6%
metadata-eval68.6%
Simplified68.6%
if -2.49999999999999996e76 < t < -1.0500000000000001e-55Initial program 96.2%
Simplified96.1%
Taylor expanded in x around inf 68.8%
if -1.0500000000000001e-55 < t < -9.0000000000000002e-197Initial program 91.9%
Simplified91.7%
Taylor expanded in b around inf 83.5%
if -9.0000000000000002e-197 < t < 5.4999999999999997e62Initial program 83.9%
Simplified82.9%
Taylor expanded in i around inf 65.6%
associate-*r*65.6%
*-commutative65.6%
Simplified65.6%
if 5.4999999999999997e62 < t Initial program 81.7%
Simplified85.3%
Taylor expanded in t around inf 78.7%
Final simplification71.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))))
(if (or (<= t -1.5e-18) (not (<= t 8e-37)))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
(- (- (* b c) (+ (* 4.0 (* t a)) t_1)) (* (* j 27.0) k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -1.5e-18) || !(t <= 8e-37)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if ((t <= (-1.5d-18)) .or. (.not. (t <= 8d-37))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) - ((4.0d0 * (t * a)) + t_1)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -1.5e-18) || !(t <= 8e-37)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if (t <= -1.5e-18) or not (t <= 8e-37): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 else: tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if ((t <= -1.5e-18) || !(t <= 8e-37)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_1)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if ((t <= -1.5e-18) || ~((t <= 8e-37)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) - ((4.0 * (t * a)) + t_1)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1.5e-18], N[Not[LessEqual[t, 8e-37]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-18} \lor \neg \left(t \leq 8 \cdot 10^{-37}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t\_1\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -1.49999999999999991e-18 or 8.00000000000000053e-37 < t Initial program 85.6%
Simplified88.1%
Taylor expanded in j around 0 83.1%
if -1.49999999999999991e-18 < t < 8.00000000000000053e-37Initial program 85.2%
Taylor expanded in y around 0 87.6%
Final simplification85.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -1.8e+218)
(* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0)))
(if (<= y 1.22e-24)
(- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))) (* (* j 27.0) k))
(if (<= y 68000000000000.0)
(* x (- (* t (* y (* 18.0 z))) (* 4.0 i)))
(+ (* j (* k -27.0)) (* 18.0 (* t (* y (* x z)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.8e+218) {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
} else if (y <= 1.22e-24) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
} else if (y <= 68000000000000.0) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-1.8d+218)) then
tmp = t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))
else if (y <= 1.22d-24) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))) - ((j * 27.0d0) * k)
else if (y <= 68000000000000.0d0) then
tmp = x * ((t * (y * (18.0d0 * z))) - (4.0d0 * i))
else
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (t * (y * (x * z))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.8e+218) {
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
} else if (y <= 1.22e-24) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
} else if (y <= 68000000000000.0) {
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
} else {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -1.8e+218: tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0)) elif y <= 1.22e-24: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k) elif y <= 68000000000000.0: tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i)) else: tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -1.8e+218) tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))); elseif (y <= 1.22e-24) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); elseif (y <= 68000000000000.0) tmp = Float64(x * Float64(Float64(t * Float64(y * Float64(18.0 * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -1.8e+218)
tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
elseif (y <= 1.22e-24)
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
elseif (y <= 68000000000000.0)
tmp = x * ((t * (y * (18.0 * z))) - (4.0 * i));
else
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -1.8e+218], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e-24], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 68000000000000.0], N[(x * N[(N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+218}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-24}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if y < -1.79999999999999995e218Initial program 76.9%
Taylor expanded in t around -inf 82.8%
associate-*r*82.8%
neg-mul-182.8%
cancel-sign-sub-inv82.8%
*-commutative82.8%
associate-*r*82.9%
metadata-eval82.9%
*-commutative82.9%
Simplified82.9%
if -1.79999999999999995e218 < y < 1.22000000000000004e-24Initial program 89.0%
Taylor expanded in y around 0 81.7%
if 1.22000000000000004e-24 < y < 6.8e13Initial program 78.3%
Simplified78.3%
Taylor expanded in x around inf 67.0%
pow167.0%
associate-*r*67.0%
*-commutative67.0%
associate-*r*67.0%
Applied egg-rr67.0%
unpow167.0%
associate-*l*67.0%
associate-*l*67.2%
Simplified67.2%
if 6.8e13 < y Initial program 79.0%
Simplified74.3%
Taylor expanded in y around inf 48.7%
pow148.7%
*-commutative48.7%
Applied egg-rr48.7%
unpow148.7%
associate-*l*53.3%
Simplified53.3%
Final simplification74.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -3.4e+71)
(* 18.0 (* t (* y (* x z))))
(if (<= x 3.7e-249)
t_1
(if (<= x 7.5e-151)
(* (* t a) -4.0)
(if (<= x 1.7e+121) t_1 (* (* x 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 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -3.4e+71) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (x <= 3.7e-249) {
tmp = t_1;
} else if (x <= 7.5e-151) {
tmp = (t * a) * -4.0;
} else if (x <= 1.7e+121) {
tmp = t_1;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-3.4d+71)) then
tmp = 18.0d0 * (t * (y * (x * z)))
else if (x <= 3.7d-249) then
tmp = t_1
else if (x <= 7.5d-151) then
tmp = (t * a) * (-4.0d0)
else if (x <= 1.7d+121) then
tmp = t_1
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -3.4e+71) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (x <= 3.7e-249) {
tmp = t_1;
} else if (x <= 7.5e-151) {
tmp = (t * a) * -4.0;
} else if (x <= 1.7e+121) {
tmp = t_1;
} else {
tmp = (x * 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 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -3.4e+71: tmp = 18.0 * (t * (y * (x * z))) elif x <= 3.7e-249: tmp = t_1 elif x <= 7.5e-151: tmp = (t * a) * -4.0 elif x <= 1.7e+121: tmp = t_1 else: tmp = (x * 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(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -3.4e+71) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); elseif (x <= 3.7e-249) tmp = t_1; elseif (x <= 7.5e-151) tmp = Float64(Float64(t * a) * -4.0); elseif (x <= 1.7e+121) tmp = t_1; else tmp = Float64(Float64(x * 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 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -3.4e+71)
tmp = 18.0 * (t * (y * (x * z)));
elseif (x <= 3.7e-249)
tmp = t_1;
elseif (x <= 7.5e-151)
tmp = (t * a) * -4.0;
elseif (x <= 1.7e+121)
tmp = t_1;
else
tmp = (x * 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[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+71], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-249], t$95$1, If[LessEqual[x, 7.5e-151], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[x, 1.7e+121], t$95$1, N[(N[(x * i), $MachinePrecision] * -4.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}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+71}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-249}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-151}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -3.3999999999999998e71Initial program 70.1%
Simplified72.6%
Taylor expanded in x around inf 71.1%
Taylor expanded in t around inf 58.7%
*-commutative58.7%
associate-*l*61.1%
Simplified61.1%
if -3.3999999999999998e71 < x < 3.69999999999999977e-249 or 7.5000000000000004e-151 < x < 1.70000000000000005e121Initial program 90.0%
Simplified88.4%
Taylor expanded in b around inf 54.8%
if 3.69999999999999977e-249 < x < 7.5000000000000004e-151Initial program 100.0%
Taylor expanded in x around 0 94.1%
Taylor expanded in a around inf 53.6%
*-commutative53.6%
Simplified53.6%
if 1.70000000000000005e121 < x Initial program 77.7%
Simplified84.3%
Taylor expanded in x around inf 85.3%
Taylor expanded in t around 0 51.9%
Final simplification55.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= x -6e+71)
(* 18.0 (* t (* y (* x z))))
(if (<= x -5.9e-99)
(+ (* b c) t_1)
(if (<= x 8.2e+116) (+ t_1 (* (* t a) -4.0)) (* (* x 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 = j * (k * -27.0);
double tmp;
if (x <= -6e+71) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (x <= -5.9e-99) {
tmp = (b * c) + t_1;
} else if (x <= 8.2e+116) {
tmp = t_1 + ((t * a) * -4.0);
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (x <= (-6d+71)) then
tmp = 18.0d0 * (t * (y * (x * z)))
else if (x <= (-5.9d-99)) then
tmp = (b * c) + t_1
else if (x <= 8.2d+116) then
tmp = t_1 + ((t * a) * (-4.0d0))
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (x <= -6e+71) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (x <= -5.9e-99) {
tmp = (b * c) + t_1;
} else if (x <= 8.2e+116) {
tmp = t_1 + ((t * a) * -4.0);
} else {
tmp = (x * 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 = j * (k * -27.0) tmp = 0 if x <= -6e+71: tmp = 18.0 * (t * (y * (x * z))) elif x <= -5.9e-99: tmp = (b * c) + t_1 elif x <= 8.2e+116: tmp = t_1 + ((t * a) * -4.0) else: tmp = (x * 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(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -6e+71) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); elseif (x <= -5.9e-99) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 8.2e+116) tmp = Float64(t_1 + Float64(Float64(t * a) * -4.0)); else tmp = Float64(Float64(x * 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 = j * (k * -27.0);
tmp = 0.0;
if (x <= -6e+71)
tmp = 18.0 * (t * (y * (x * z)));
elseif (x <= -5.9e-99)
tmp = (b * c) + t_1;
elseif (x <= 8.2e+116)
tmp = t_1 + ((t * a) * -4.0);
else
tmp = (x * 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+71], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.9e-99], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8.2e+116], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * i), $MachinePrecision] * -4.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}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+71}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -5.9 \cdot 10^{-99}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+116}:\\
\;\;\;\;t\_1 + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -6.00000000000000025e71Initial program 70.1%
Simplified72.6%
Taylor expanded in x around inf 71.1%
Taylor expanded in t around inf 58.7%
*-commutative58.7%
associate-*l*61.1%
Simplified61.1%
if -6.00000000000000025e71 < x < -5.8999999999999999e-99Initial program 84.6%
Simplified86.5%
Taylor expanded in b around inf 60.9%
if -5.8999999999999999e-99 < x < 8.1999999999999996e116Initial program 93.6%
Simplified90.8%
Taylor expanded in a around inf 54.8%
*-commutative54.8%
Simplified54.8%
if 8.1999999999999996e116 < x Initial program 78.2%
Simplified84.7%
Taylor expanded in x around inf 83.4%
Taylor expanded in t around 0 50.8%
Final simplification56.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x i) -4.0)) (t_2 (* -27.0 (* j k))))
(if (<= j -8.5e+115)
t_2
(if (<= j -1.12e+70)
t_1
(if (<= j -9.2e-240) (* b c) (if (<= j 4.5e-109) 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 = (x * i) * -4.0;
double t_2 = -27.0 * (j * k);
double tmp;
if (j <= -8.5e+115) {
tmp = t_2;
} else if (j <= -1.12e+70) {
tmp = t_1;
} else if (j <= -9.2e-240) {
tmp = b * c;
} else if (j <= 4.5e-109) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * i) * (-4.0d0)
t_2 = (-27.0d0) * (j * k)
if (j <= (-8.5d+115)) then
tmp = t_2
else if (j <= (-1.12d+70)) then
tmp = t_1
else if (j <= (-9.2d-240)) then
tmp = b * c
else if (j <= 4.5d-109) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double t_2 = -27.0 * (j * k);
double tmp;
if (j <= -8.5e+115) {
tmp = t_2;
} else if (j <= -1.12e+70) {
tmp = t_1;
} else if (j <= -9.2e-240) {
tmp = b * c;
} else if (j <= 4.5e-109) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) * -4.0 t_2 = -27.0 * (j * k) tmp = 0 if j <= -8.5e+115: tmp = t_2 elif j <= -1.12e+70: tmp = t_1 elif j <= -9.2e-240: tmp = b * c elif j <= 4.5e-109: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) * -4.0) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (j <= -8.5e+115) tmp = t_2; elseif (j <= -1.12e+70) tmp = t_1; elseif (j <= -9.2e-240) tmp = Float64(b * c); elseif (j <= 4.5e-109) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) * -4.0;
t_2 = -27.0 * (j * k);
tmp = 0.0;
if (j <= -8.5e+115)
tmp = t_2;
elseif (j <= -1.12e+70)
tmp = t_1;
elseif (j <= -9.2e-240)
tmp = b * c;
elseif (j <= 4.5e-109)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.5e+115], t$95$2, If[LessEqual[j, -1.12e+70], t$95$1, If[LessEqual[j, -9.2e-240], N[(b * c), $MachinePrecision], If[LessEqual[j, 4.5e-109], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot i\right) \cdot -4\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -8.5 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -1.12 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -9.2 \cdot 10^{-240}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 4.5 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -8.50000000000000057e115 or 4.5000000000000001e-109 < j Initial program 82.9%
Simplified81.7%
Taylor expanded in j around inf 41.3%
if -8.50000000000000057e115 < j < -1.11999999999999993e70 or -9.19999999999999972e-240 < j < 4.5000000000000001e-109Initial program 90.9%
Simplified92.4%
Taylor expanded in x around inf 52.8%
Taylor expanded in t around 0 36.0%
if -1.11999999999999993e70 < j < -9.19999999999999972e-240Initial program 84.7%
Taylor expanded in x around 0 90.2%
Taylor expanded in b around inf 27.0%
Final simplification36.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -540000000000.0) (not (<= x 1.6e+118))) (* x (- (* 18.0 (* z (* y t))) (* 4.0 i))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -540000000000.0) || !(x <= 1.6e+118)) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-540000000000.0d0)) .or. (.not. (x <= 1.6d+118))) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -540000000000.0) || !(x <= 1.6e+118)) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -540000000000.0) or not (x <= 1.6e+118): tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -540000000000.0) || !(x <= 1.6e+118)) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -540000000000.0) || ~((x <= 1.6e+118)))
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -540000000000.0], N[Not[LessEqual[x, 1.6e+118]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -540000000000 \lor \neg \left(x \leq 1.6 \cdot 10^{+118}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -5.4e11 or 1.60000000000000008e118 < x Initial program 73.7%
Simplified78.5%
Taylor expanded in x around inf 74.5%
pow174.5%
Applied egg-rr74.5%
unpow174.5%
associate-*r*76.5%
Simplified76.5%
if -5.4e11 < x < 1.60000000000000008e118Initial program 93.1%
Taylor expanded in x around 0 73.0%
Final simplification74.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= k -4.5e-9)
t_1
(if (<= k 3.6e-132) (* (* t a) -4.0) (if (<= k 3.6e+47) (* 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 = -27.0 * (j * k);
double tmp;
if (k <= -4.5e-9) {
tmp = t_1;
} else if (k <= 3.6e-132) {
tmp = (t * a) * -4.0;
} else if (k <= 3.6e+47) {
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 = (-27.0d0) * (j * k)
if (k <= (-4.5d-9)) then
tmp = t_1
else if (k <= 3.6d-132) then
tmp = (t * a) * (-4.0d0)
else if (k <= 3.6d+47) 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 = -27.0 * (j * k);
double tmp;
if (k <= -4.5e-9) {
tmp = t_1;
} else if (k <= 3.6e-132) {
tmp = (t * a) * -4.0;
} else if (k <= 3.6e+47) {
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 = -27.0 * (j * k) tmp = 0 if k <= -4.5e-9: tmp = t_1 elif k <= 3.6e-132: tmp = (t * a) * -4.0 elif k <= 3.6e+47: 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(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -4.5e-9) tmp = t_1; elseif (k <= 3.6e-132) tmp = Float64(Float64(t * a) * -4.0); elseif (k <= 3.6e+47) 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 = -27.0 * (j * k);
tmp = 0.0;
if (k <= -4.5e-9)
tmp = t_1;
elseif (k <= 3.6e-132)
tmp = (t * a) * -4.0;
elseif (k <= 3.6e+47)
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -4.5e-9], t$95$1, If[LessEqual[k, 3.6e-132], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[k, 3.6e+47], 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 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -4.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{-132}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{+47}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -4.49999999999999976e-9 or 3.60000000000000008e47 < k Initial program 80.4%
Simplified78.8%
Taylor expanded in j around inf 41.6%
if -4.49999999999999976e-9 < k < 3.60000000000000007e-132Initial program 91.6%
Taylor expanded in x around 0 91.8%
Taylor expanded in a around inf 27.4%
*-commutative27.4%
Simplified27.4%
if 3.60000000000000007e-132 < k < 3.60000000000000008e47Initial program 87.4%
Taylor expanded in x around 0 90.3%
Taylor expanded in b around inf 31.5%
Final simplification35.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -9.2e+31)
(* -27.0 (* j k))
(if (<= k 2.7e-131)
(* (* t a) -4.0)
(if (<= k 2.1e+47) (* 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 (k <= -9.2e+31) {
tmp = -27.0 * (j * k);
} else if (k <= 2.7e-131) {
tmp = (t * a) * -4.0;
} else if (k <= 2.1e+47) {
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 (k <= (-9.2d+31)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 2.7d-131) then
tmp = (t * a) * (-4.0d0)
else if (k <= 2.1d+47) 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 (k <= -9.2e+31) {
tmp = -27.0 * (j * k);
} else if (k <= 2.7e-131) {
tmp = (t * a) * -4.0;
} else if (k <= 2.1e+47) {
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 k <= -9.2e+31: tmp = -27.0 * (j * k) elif k <= 2.7e-131: tmp = (t * a) * -4.0 elif k <= 2.1e+47: 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 (k <= -9.2e+31) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 2.7e-131) tmp = Float64(Float64(t * a) * -4.0); elseif (k <= 2.1e+47) tmp = Float64(b * c); else tmp = 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 (k <= -9.2e+31)
tmp = -27.0 * (j * k);
elseif (k <= 2.7e-131)
tmp = (t * a) * -4.0;
elseif (k <= 2.1e+47)
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[LessEqual[k, -9.2e+31], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.7e-131], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[k, 2.1e+47], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $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 -9.2 \cdot 10^{+31}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 2.7 \cdot 10^{-131}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;k \leq 2.1 \cdot 10^{+47}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -9.1999999999999998e31Initial program 78.9%
Simplified80.6%
Taylor expanded in j around inf 38.6%
if -9.1999999999999998e31 < k < 2.70000000000000021e-131Initial program 91.3%
Taylor expanded in x around 0 90.5%
Taylor expanded in a around inf 28.5%
*-commutative28.5%
Simplified28.5%
if 2.70000000000000021e-131 < k < 2.1e47Initial program 87.4%
Taylor expanded in x around 0 90.3%
Taylor expanded in b around inf 31.5%
if 2.1e47 < k Initial program 80.8%
Taylor expanded in x around 0 82.6%
Taylor expanded in j around inf 47.3%
*-commutative47.3%
associate-*r*47.2%
Simplified47.2%
Final simplification35.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 (<= (* b c) -6.5e+213) (not (<= (* b c) 7e+87))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.5e+213) || !((b * c) <= 7e+87)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-6.5d+213)) .or. (.not. ((b * c) <= 7d+87))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -6.5e+213) || !((b * c) <= 7e+87)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -6.5e+213) or not ((b * c) <= 7e+87): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -6.5e+213) || !(Float64(b * c) <= 7e+87)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -6.5e+213) || ~(((b * c) <= 7e+87)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -6.5e+213], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7e+87]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.5 \cdot 10^{+213} \lor \neg \left(b \cdot c \leq 7 \cdot 10^{+87}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.49999999999999982e213 or 6.99999999999999972e87 < (*.f64 b c) Initial program 80.2%
Taylor expanded in x around 0 79.1%
Taylor expanded in b around inf 57.4%
if -6.49999999999999982e213 < (*.f64 b c) < 6.99999999999999972e87Initial program 87.2%
Simplified88.5%
Taylor expanded in j around inf 30.6%
Final simplification37.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 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.4%
Taylor expanded in x around 0 86.1%
Taylor expanded in b around inf 20.1%
Final simplification20.1%
(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 2024050
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))